PK+\EOcolor-picker.phpnuW+A '#6ec1e4', 2 => '#54595f', 3 => '#7a7a7a', 4 => '#61ce70', 5 => '#4054b2', 6 => '#23a455', 7 => '#000', 8 => '#fff', ]; } } PK+\hhbase.phpnuW+Aget_default_scheme(); update_option( 'elementor_scheme_' . static::get_type(), $scheme_value ); } return $scheme_value; } /** * Save scheme. * * Update Elementor scheme in the database, and update the last updated * scheme time. * * @since 1.0.0 * @access public * * @param array $posted */ public function save_scheme( array $posted ) { update_option( 'elementor_scheme_' . static::get_type(), $posted ); update_option( self::LAST_UPDATED_META, time() ); } /** * Get scheme. * * Retrieve the scheme. * * @since 1.0.0 * @access public * * @return array The scheme. */ public function get_scheme() { $scheme = []; foreach ( $this->get_scheme_value() as $scheme_key => $scheme_value ) { $scheme[ $scheme_key ] = [ 'value' => $scheme_value, ]; } return $scheme; } } PK+\5 manager.phpnuW+A_registered_schemes[ $scheme_instance::get_type() ] = $scheme_instance; } /** * Unregister scheme. * * Removes a scheme from the list of registered schemes. * * @since 1.0.0 * @access public * * @param string $id Scheme ID. * * @return bool True if the scheme was removed, False otherwise. */ public function unregister_scheme( $id ) { if ( ! isset( $this->_registered_schemes[ $id ] ) ) { return false; } unset( $this->_registered_schemes[ $id ] ); return true; } /** * Get registered schemes. * * Retrieve the registered schemes list from the current instance. * * @since 1.0.0 * @access public * * @return Base[] Registered schemes. */ public function get_registered_schemes() { return $this->_registered_schemes; } /** * Get schemes data. * * Retrieve all the registered schemes with data for each scheme. * * @since 1.0.0 * @access public * * @return array Registered schemes with each scheme data. */ public function get_registered_schemes_data() { $data = []; foreach ( $this->get_registered_schemes() as $scheme ) { $type = $scheme::get_type(); $data[ $type ] = [ 'items' => $scheme->get_scheme(), ]; if ( $scheme instanceof Base_UI ) { $data[ $type ]['title'] = $scheme->get_title(); $data[ $type ]['disabled_title'] = $scheme->get_disabled_title(); } } return $data; } /** * Get default schemes. * * Retrieve all the registered schemes with default scheme for each scheme. * * @since 1.0.0 * @access public * * @return array Registered schemes with with default scheme for each scheme. */ public function get_schemes_defaults() { $data = []; foreach ( $this->get_registered_schemes() as $scheme ) { $type = $scheme::get_type(); $data[ $type ] = [ 'items' => $scheme->get_default_scheme(), ]; if ( $scheme instanceof Base_UI ) { $data[ $type ]['title'] = $scheme->get_title(); } } return $data; } /** * Get system schemes. * * Retrieve all the registered ui schemes with system schemes for each scheme. * * @since 1.0.0 * @access public * * @return array Registered ui schemes with with system scheme for each scheme. */ public function get_system_schemes() { $data = []; foreach ( $this->get_registered_schemes() as $scheme ) { if ( $scheme instanceof Base_UI ) { $data[ $scheme::get_type() ] = $scheme->get_system_schemes(); } } return $data; } /** * Get scheme. * * Retrieve a single scheme from the list of all the registered schemes in * the current instance. * * @since 1.0.0 * @access public * * @param string $id Scheme ID. * * @return false|Base Scheme instance if scheme exist, False otherwise. */ public function get_scheme( $id ) { $schemes = $this->get_registered_schemes(); if ( ! isset( $schemes[ $id ] ) ) { return false; } return $schemes[ $id ]; } /** * Get scheme value. * * Retrieve the scheme value from the list of all the registered schemes in * the current instance. * * @since 1.0.0 * @access public * * @param string $scheme_type Scheme type. * @param string $scheme_value Scheme value. * * @return false|string Scheme value if scheme exist, False otherwise. */ public function get_scheme_value( $scheme_type, $scheme_value ) { $scheme = $this->get_scheme( $scheme_type ); if ( ! $scheme ) { return false; } return $scheme->get_scheme_value()[ $scheme_value ]; } /** * Ajax apply scheme. * * Ajax handler for Elementor apply_scheme. * * Fired by `wp_ajax_elementor_apply_scheme` action. * * @since 1.0.0 * @access public * * @param array $data * * @return bool */ public function ajax_apply_scheme( array $data ) { if ( ! User::is_current_user_can_edit_post_type( Source_Local::CPT ) ) { return false; } if ( ! isset( $data['scheme_name'] ) ) { return false; } $scheme_obj = $this->get_scheme( $data['scheme_name'] ); if ( ! $scheme_obj ) { return false; } $posted = json_decode( $data['data'], true ); $scheme_obj->save_scheme( $posted ); return true; } /** * Print ui schemes templates. * * Used to generate the scheme templates on the editor using Underscore JS * template, for all the registered ui schemes. * * @since 1.0.0 * @access public */ public function print_schemes_templates() { foreach ( $this->get_registered_schemes() as $scheme ) { if ( $scheme instanceof Base_UI ) { $scheme->print_template(); } } } /** * @param Ajax $ajax * * @since 2.3.0 * @access public */ public function register_ajax_actions( Ajax $ajax ) { $ajax->register_ajax_action( 'apply_scheme', [ $this, 'ajax_apply_scheme' ] ); } /** * Get enabled schemes. * * Retrieve all enabled schemes from the list of the registered schemes in * the current instance. * * @since 1.0.0 * @access public * @static * * @return array Enabled schemes. */ public static function get_enabled_schemes() { if ( null === self::$_enabled_schemes ) { $enabled_schemes = []; foreach ( self::$_schemes_types as $schemes_type ) { if ( 'yes' === get_option( 'elementor_disable_' . $schemes_type . '_schemes' ) ) { continue; } $enabled_schemes[] = $schemes_type; } /** * Enabled schemes. * * Filters the list of enabled schemes. * * @since 1.0.0 * * @param array $enabled_schemes The list of enabled schemes. */ $enabled_schemes = apply_filters( 'elementor/schemes/enabled_schemes', $enabled_schemes ); self::$_enabled_schemes = $enabled_schemes; } return self::$_enabled_schemes; } /** * Register default schemes. * * Add a default schemes to the register schemes list. * * This method is used to set initial schemes when initializing the class. * * @since 1.7.12 * @access private */ private function register_default_schemes() { foreach ( self::$_schemes_types as $scheme_type ) { $this->register_scheme( __NAMESPACE__ . '\\' . str_replace( '-', '_', ucwords( $scheme_type, '-' ) ) ); } } /** * Schemes manager constructor. * * Initializing Elementor schemes manager and register default schemes. * * @since 1.0.0 * @access public */ public function __construct() { $this->register_default_schemes(); add_action( 'elementor/ajax/register_actions', [ $this, 'register_ajax_actions' ] ); } } PK+\ base-ui.phpnuW+A_system_schemes ) { $this->_system_schemes = $this->_init_system_schemes(); } return $this->_system_schemes; } /** * Print scheme template. * * Used to generate the scheme template on the editor using Underscore JS * template. * * @since 2.8.0 * @access public */ final public function print_template() { ?> get_scheme_titles(); foreach ( $this->get_scheme_value() as $scheme_key => $scheme_value ) { $scheme[ $scheme_key ] = [ 'title' => isset( $titles[ $scheme_key ] ) ? $titles[ $scheme_key ] : '', 'value' => $scheme_value, ]; } return $scheme; } } PK+\./ typography.phpnuW+A __( 'Primary Headline', 'elementor' ), self::TYPOGRAPHY_2 => __( 'Secondary Headline', 'elementor' ), self::TYPOGRAPHY_3 => __( 'Body Text', 'elementor' ), self::TYPOGRAPHY_4 => __( 'Accent Text', 'elementor' ), ]; } /** * Get default typography scheme. * * Retrieve the default typography scheme. * * @since 1.0.0 * @access public * * @return array Default typography scheme. */ public function get_default_scheme() { return [ self::TYPOGRAPHY_1 => [ 'font_family' => 'Roboto', 'font_weight' => '600', ], self::TYPOGRAPHY_2 => [ 'font_family' => 'Roboto Slab', 'font_weight' => '400', ], self::TYPOGRAPHY_3 => [ 'font_family' => 'Roboto', 'font_weight' => '400', ], self::TYPOGRAPHY_4 => [ 'font_family' => 'Roboto', 'font_weight' => '500', ], ]; } /** * Init system typography schemes. * * Initialize the system typography schemes. * * @since 1.0.0 * @access protected * * @return array System typography schemes. */ protected function _init_system_schemes() { return []; } /** * Print typography scheme content template. * * Used to generate the HTML in the editor using Underscore JS template. The * variables for the class are available using `data` JS object. * * @since 1.0.0 * @access public */ public function print_template_content() { ?>
__( 'Primary', 'elementor' ), self::COLOR_2 => __( 'Secondary', 'elementor' ), self::COLOR_3 => __( 'Text', 'elementor' ), self::COLOR_4 => __( 'Accent', 'elementor' ), ]; } /** * Get default color scheme. * * Retrieve the default color scheme. * * @since 1.0.0 * @access public * * @return array Default color scheme. */ public function get_default_scheme() { return [ self::COLOR_1 => '#6ec1e4', self::COLOR_2 => '#54595f', self::COLOR_3 => '#7a7a7a', self::COLOR_4 => '#61ce70', ]; } /** * Print color scheme content template. * * Used to generate the HTML in the editor using Underscore JS template. The * variables for the class are available using `data` JS object. * * @since 1.0.0 * @access public */ public function print_template_content() { ?>
_get_current_scheme_title(); ?>
_get_system_schemes_to_print() as $scheme_name => $scheme ) : ?>
[ 'title' => 'Joker', 'items' => [ self::COLOR_1 => '#202020', self::COLOR_2 => '#b7b4b4', self::COLOR_3 => '#707070', self::COLOR_4 => '#f6121c', ], ], 'ocean' => [ 'title' => 'Ocean', 'items' => [ self::COLOR_1 => '#1569ae', self::COLOR_2 => '#b6c9db', self::COLOR_3 => '#545454', self::COLOR_4 => '#fdd247', ], ], 'royal' => [ 'title' => 'Royal', 'items' => [ self::COLOR_1 => '#d5ba7f', self::COLOR_2 => '#902729', self::COLOR_3 => '#ae4848', self::COLOR_4 => '#302a8c', ], ], 'violet' => [ 'title' => 'Violet', 'items' => [ self::COLOR_1 => '#747476', self::COLOR_2 => '#ebca41', self::COLOR_3 => '#6f1683', self::COLOR_4 => '#a43cbd', ], ], 'sweet' => [ 'title' => 'Sweet', 'items' => [ self::COLOR_1 => '#6ccdd9', self::COLOR_2 => '#763572', self::COLOR_3 => '#919ca7', self::COLOR_4 => '#f12184', ], ], 'urban' => [ 'title' => 'Urban', 'items' => [ self::COLOR_1 => '#db6159', self::COLOR_2 => '#3b3b3b', self::COLOR_3 => '#7a7979', self::COLOR_4 => '#2abf64', ], ], 'earth' => [ 'title' => 'Earth', 'items' => [ self::COLOR_1 => '#882021', self::COLOR_2 => '#c48e4c', self::COLOR_3 => '#825e24', self::COLOR_4 => '#e8c12f', ], ], 'river' => [ 'title' => 'River', 'items' => [ self::COLOR_1 => '#8dcfc8', self::COLOR_2 => '#565656', self::COLOR_3 => '#50656e', self::COLOR_4 => '#dc5049', ], ], 'pastel' => [ 'title' => 'Pastel', 'items' => [ self::COLOR_1 => '#f27f6f', self::COLOR_2 => '#f4cd78', self::COLOR_3 => '#a5b3c1', self::COLOR_4 => '#aac9c3', ], ], ]; } /** * Get system color schemes to print. * * Retrieve the system color schemes * * @since 1.0.0 * @access protected * * @return array The system color schemes. */ protected function _get_system_schemes_to_print() { return $this->get_system_schemes(); } /** * Get current color scheme title. * * Retrieve the current color scheme title. * * @since 1.0.0 * @access protected * * @return string The current color scheme title. */ protected function _get_current_scheme_title() { return __( 'Color Palette', 'elementor' ); } } PK+\EOcolor-picker.phpnuW+APK+\hhbase.phpnuW+APK+\5  manager.phpnuW+APK+\ +base-ui.phpnuW+APK+\./ 8typography.phpnuW+APK+\+]X (Ecolor.phpnuW+APKb^