SILENT KILLERPanel

Current Path: > home > > transcarter > www > wp-content > plugins > elementskit-lite > libs > framework > classes


Operation   : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Software     : Apache
Server IP    : 198.54.126.42 | Your IP: 216.73.216.135
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home//transcarter/www/wp-content/plugins/elementskit-lite/libs/framework/classes

NameTypeSizeLast ModifiedActions
ajax.php File 5727 bytes July 17 2025 21:06:24.
onboard-status.php File 2915 bytes July 17 2025 21:06:24.
plugin-data-sender.php File 634 bytes July 17 2025 21:06:24.
plugin-installer.php File 3265 bytes July 17 2025 21:06:24.
plugin-skin.php File 469 bytes July 17 2025 21:06:24.
plugin-status.php File 3054 bytes July 17 2025 21:06:24.
utils.php File 2410 bytes July 17 2025 21:06:24.

Reading File: /home//transcarter/www/wp-content/plugins/elementskit-lite/libs/framework/classes/utils.php

<?php 
namespace ElementsKit_Lite\Libs\Framework\Classes;

defined( 'ABSPATH' ) || exit;

class Utils {

	public static $instance = null;
	private static $key     = 'elementskit_options';

	public static function get_dir() {
		return \ElementsKit_Lite::lib_dir() . 'framework/';
	}

	public static function get_url() {
		return \ElementsKit_Lite::lib_url() . 'framework/';
	}

	public function get_option( $key, $default = '' ) {
		$data_all = get_option( self::$key );
		return ( isset( $data_all[ $key ] ) && $data_all[ $key ] != '' ) ? $data_all[ $key ] : $default;
	}

	public function save_option( $key, $value = '' ) {
		$data_all         = get_option( self::$key, array() );
		$data_all[ $key ] = $value;
		update_option( 'elementskit_options', $data_all );
	}

	public function get_settings( $key, $default = '' ) {
		$data_all = $this->get_option( 'settings', array() );
		return ( isset( $data_all[ $key ] ) && $data_all[ $key ] != '' ) ? $data_all[ $key ] : $default;
	}

	public function save_settings( $new_data = '' ) {
		$data_old = $this->get_option( 'settings', array() );
		$data     = array_merge( $data_old, $new_data );
		$this->save_option( 'settings', $data );
	}

	/*
		-> this method used to check weather the widget active/deactive
		-> this method takes two paramitter 1. widget name 2. Active/deactive hook
	 */ 
	public function is_widget_active_class( $widget_name, $pro_active ) {
		if ( $pro_active ) {
			return 'label-' . $widget_name . ' attr-panel-heading';
		} else {
			return 'label-' . $widget_name . ' attr-panel-heading pro-disabled';
		}
	}

	public function input( $input_options ) {
		$defaults      = array(
			'type'     => null,
			'name'     => '',
			'value'    => '',
			'class'    => '',
			'label'    => '',
			'info'     => '',
			'disabled' => '',
			'options'  => array(),
		);
		$input_options = array_merge( $defaults, $input_options );

		if ( file_exists( self::get_dir() . 'controls/settings/' . $input_options['type'] . '.php' ) ) {
			extract( $input_options );
			include self::get_dir() . 'controls/settings/' . $input_options['type'] . '.php';
		}
	}

	public static function strify( $str ) {
		return strtolower( preg_replace( '/[^A-Za-z0-9]/', '__', $str ) );
	}




	public static function instance() {
		if ( is_null( self::$instance ) ) {

			// Fire the class instance
			self::$instance = new self();
		}

		return self::$instance;
	}
}

SILENT KILLER Tool