HEX
Server: LiteSpeed
System:
User: ()
PHP: 7.3.33
Disabled: ln,cat,popen,pclose,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,system,dl,passthru,exec,shell_exec,popen,proc_close,proc_get_status,proc_nice,proc_open,escapeshellcmd,escapeshellarg,show_source,posix_mkfifo,mysql_list_dbs,get_current_user,getmyuid,pconnect,link,symlink,pcntl_exec,ini_alter,pfsockopen,leak,apache_child_terminate,posix_setpgid,posix_setsid,posix_setuid,proc_terminate,syslog,stream_select,socket_select,socket_create,socket_create_listen,socket_create_pair,socket_listen,socket_accept,socket_bind,socket_strerror,pcntl_fork,pcntl_signal,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,openlog,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,virtual,ini_get_all,php_passthru,posix_uname,php_uname,highlight_file,define_syslog_variables,ftp_exec,inject_code,eval
Upload Files
File: /var/www/vhosts/miroglu.net/httpdocs/wp-content/plugins/elementor/core/breakpoints/breakpoint.php
<?php
namespace Elementor\Core\Breakpoints;

use Elementor\Core\Base\Base_Object;
use Elementor\Plugin;
use Elementor\Core\Breakpoints\Manager as Breakpoints_Manager;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

class Breakpoint extends Base_Object {

	private $name;
	private $label;
	private $default_value;
	private $db_key;
	private $value;
	private $is_custom;
	private $direction = 'max';
	private $is_enabled = false;
	private $config;

	/**
	 * Get Name
	 *
	 * @since 3.2.0
	 *
	 * @return string
	 */
	public function get_name() {
		return $this->name;
	}

	/**
	 * Is Enabled
	 *
	 * Check if the breakpoint is enabled or not. The breakpoint instance receives this data from
	 * the Breakpoints Manager.
	 *
	 * @return bool $is_enabled class variable
	 */
	public function is_enabled() {
		return $this->is_enabled;
	}

	/**
	 * Get Label
	 *
	 * Retrieve the breakpoint label.
	 *
	 * @since 3.2.0
	 *
	 * @return string $label class variable
	 */
	public function get_label() {
		return $this->label;
	}

	/**
	 * Get Value
	 *
	 * Retrieve the saved breakpoint value.
	 *
	 * @since 3.2.0
	 *
	 * @return int $value class variable
	 */
	public function get_value() {
		if ( ! $this->value ) {
			$this->init_value();
		}

		return $this->value;
	}

	/**
	 * Is Custom
	 *
	 * Check if the breakpoint's value is a custom or default value.
	 *
	 * @since 3.2.0
	 *
	 * @return bool $is_custom class variable
	 */
	public function is_custom() {
		if ( ! $this->is_custom ) {
			$this->get_value();
		}

		return $this->is_custom;
	}

	/**
	 * Get Default Value
	 *
	 * Returns the Breakpoint's default value.
	 *
	 * @since 3.2.0
	 *
	 * @return int $default_value class variable
	 */
	public function get_default_value() {
		return $this->default_value;
	}

	/**
	 * Get Direction
	 *
	 * Returns the Breakpoint's direction ('min'/'max').
	 *
	 * @since 3.2.0
	 *
	 * @return string $direction class variable
	 */
	public function get_direction() {
		return $this->direction;
	}

	/**
	 * Set Value
	 *
	 * Set the `$value` class variable and the `$is_custom` class variable.
	 *
	 * @since 3.2.0
	 *
	 * @return int $value class variable
	 */
	private function init_value() {
		$cached_value = Plugin::$instance->kits_manager->get_current_settings( $this->db_key );

		if ( $cached_value ) {
			$this->value = (int) $cached_value;

			$this->is_custom = $this->value !== $this->default_value;
		} else {
			$this->value = $this->default_value;

			$this->is_custom = false;
		}

		return $this->value;
	}

	public function __construct( $args ) {
		$this->name = $args['name'];
		$this->label = $args['label'];
		// Used for CSS generation
		$this->db_key = Breakpoints_Manager::BREAKPOINT_SETTING_PREFIX . $args['name'];
		$this->direction = $args['direction'];
		$this->is_enabled = $args['is_enabled'];
		$this->default_value = $args['default_value'];
	}
}