config->get( 'premium_temps' ); wp_localize_script( 'premium-temps-editor', 'PremiumTempsData', apply_filters( 'premium-templates-core/assets/editor/localize', array( 'Elementor_Version' => ELEMENTOR_VERSION, 'PremiumTemplatesBtn' => $button, 'modalRegions' => $this->get_modal_region(), 'license' => array( 'status' => Templates\premium_templates()->config->get( 'status' ), 'activateLink' => Templates\premium_templates()->config->get( 'license_page' ), 'proMessage' => Templates\premium_templates()->config->get( 'pro_message' ), ), ) ) ); } /** * Get Modal Region * * Get modal region in the editor. * * @since 3.6.0 * @access public */ public function get_modal_region() { return array( 'modalHeader' => '.dialog-header', 'modalContent' => '.dialog-message', ); } /** * Add Templates Scripts * * Load required templates for the templates library. * * @since 3.6.0 * @access public */ public function load_footer_scripts() { $scripts = glob( PREMIUM_ADDONS_PATH . 'includes/templates/scripts/*.php' ); array_map( function ( $file ) { $name = basename( $file, '.php' ); ob_start(); include $file; printf( '', $name, ob_get_clean() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped }, $scripts ); } /** * Get Instance * * Creates and returns an instance of the class. * * @since 3.6.0 * @access public * * @return object */ public static function get_instance() { if ( self::$instance == null ) { self::$instance = new self(); } return self::$instance; } } }