File manager - Edit - /home/monara/public_html/test.athavaneng.com/loader.tar
Back
v1/editor-v1-loader.php 0000644 00000004073 15073240254 0010667 0 ustar 00 <?php namespace Elementor\Core\Editor\Loader\V1; use Elementor\Core\Editor\Loader\Common\Editor_Common_Scripts_Settings; use Elementor\Core\Editor\Loader\Editor_Base_Loader; use Elementor\Plugin; use Elementor\Utils; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class Editor_V1_Loader extends Editor_Base_Loader { /** * @return void */ public function init() { // Loading UI and Icons v2 scrips for the use of new features that should live in V1. $packages_to_register = [ 'ui', 'icons', 'query' ]; foreach ( $packages_to_register as $package ) { $this->assets_config_provider->load( $package ); } } /** * @return void */ public function register_scripts() { parent::register_scripts(); $assets_url = $this->config->get( 'assets_url' ); $min_suffix = $this->config->get( 'min_suffix' ); foreach ( $this->assets_config_provider->all() as $package => $config ) { wp_register_script( $config['handle'], "{$assets_url}js/packages/{$package}/{$package}{$min_suffix}.js", $config['deps'], ELEMENTOR_VERSION, true ); } wp_register_script( 'elementor-editor-loader-v1', "{$assets_url}js/editor-loader-v1{$min_suffix}.js", [ 'elementor-editor' ], ELEMENTOR_VERSION, true ); } /** * @return void */ public function enqueue_scripts() { parent::enqueue_scripts(); // Must be last. wp_enqueue_script( 'elementor-editor-loader-v1' ); Utils::print_js_config( 'elementor-editor', 'ElementorConfig', Editor_Common_Scripts_Settings::get() ); } /** * @return void */ public function print_root_template() { // Exposing the path for the view part to render the body of the editor template. $body_file_path = __DIR__ . '/templates/editor-body-v1-view.php'; include ELEMENTOR_PATH . 'includes/editor-templates/editor-wrapper.php'; } /** * @return void */ public function register_additional_templates() { parent::register_additional_templates(); Plugin::$instance->common->add_template( ELEMENTOR_PATH . 'includes/editor-templates/responsive-bar.php' ); } } v1/templates/editor-body-v1-view.php 0000644 00000003074 15073240254 0013324 0 ustar 00 <?php namespace Elementor\Core\Editor\Loader\V1\Templates; use Elementor\Plugin; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } $notice = Plugin::$instance->editor->notice_bar->get_notice(); ?> <div id="elementor-loading"> <div class="elementor-loader-wrapper"> <div class="elementor-loader" aria-hidden="true"> <div class="elementor-loader-boxes"> <div class="elementor-loader-box"></div> <div class="elementor-loader-box"></div> <div class="elementor-loader-box"></div> <div class="elementor-loader-box"></div> </div> </div> <div class="elementor-loading-title"><?php echo esc_html__( 'Loading', 'elementor' ); ?></div> </div> </div> <h1 class="elementor-screen-only"><?php printf( esc_html__( 'Edit "%s" with Elementor', 'elementor' ), esc_html( get_the_title() ) ); ?></h1> <div id="elementor-editor-wrapper"> <aside id="elementor-panel" class="elementor-panel" aria-labelledby="elementor-panel-header-title"></aside> <main id="elementor-preview" aria-label="<?php echo esc_attr__( 'Preview', 'elementor' ); ?>"> <div id="elementor-responsive-bar"></div> <div id="elementor-preview-responsive-wrapper" class="elementor-device-desktop elementor-device-rotate-portrait"> <div id="elementor-preview-loading"> <i class="eicon-loading eicon-animation-spin" aria-hidden="true"></i> </div> <?php if ( $notice ) { $notice->render(); } // IFrame will be created here by the Javascript later. ?> </div> </main> <aside id="elementor-navigator" aria-labelledby="elementor-navigator__header__title"></aside> </div> v1/js/editor-loader-v1.js 0000644 00000000032 15073240254 0011117 0 ustar 00 window.elementor.start(); common/editor-common-scripts-settings.php 0000644 00000021314 15073240254 0014647 0 ustar 00 <?php namespace Elementor\Core\Editor\Loader\Common; use Elementor\Api; use Elementor\Core\Debug\Loading_Inspection_Manager; use Elementor\Core\Settings\Manager as SettingsManager; use Elementor\Group_Control_Typography; use Elementor\Icons_Manager; use Elementor\Modules\Apps\Module as AppsModule; use Elementor\Modules\EditorEvents\Module as EditorEventsModule; use Elementor\Modules\Home\Module as Home_Module; use Elementor\Plugin; use Elementor\Settings; use Elementor\Shapes; use Elementor\Tools; use Elementor\User; use Elementor\Utils; use Elementor\Core\Utils\Hints; use Elementor\Core\Utils\Promotions\Filtered_Promotions_Manager; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class Editor_Common_Scripts_Settings { public static function get() { $settings = SettingsManager::get_settings_managers_config(); // Moved to document since 2.9.0. unset( $settings['page'] ); $document = Plugin::$instance->documents->get_doc_or_auto_save( Plugin::$instance->editor->get_post_id() ); $kits_manager = Plugin::$instance->kits_manager; $page_title_selector = $kits_manager->get_current_settings( 'page_title_selector' ); $page_title_selector .= ', .elementor-page-title .elementor-heading-title'; $client_env = [ 'initial_document' => $document->get_config(), 'version' => ELEMENTOR_VERSION, 'home_url' => home_url(), 'admin_settings_url' => admin_url( 'admin.php?page=' . Home_Module::get_elementor_settings_page_id() ), 'admin_tools_url' => admin_url( 'admin.php?page=' . Tools::PAGE_ID ), 'admin_apps_url' => admin_url( 'admin.php?page=' . AppsModule::PAGE_ID ), 'autosave_interval' => AUTOSAVE_INTERVAL, 'tabs' => Plugin::$instance->controls_manager->get_tabs(), 'controls' => Plugin::$instance->controls_manager->get_controls_data(), 'elements' => Plugin::$instance->elements_manager->get_element_types_config(), 'globals' => [ 'defaults_enabled' => [ 'colors' => $kits_manager->is_custom_colors_enabled(), 'typography' => $kits_manager->is_custom_typography_enabled(), ], ], 'icons' => [ 'libraries' => Icons_Manager::get_icon_manager_tabs_config(), 'goProURL' => 'https://go.elementor.com/go-pro-icon-library/', ], 'fa4_to_fa5_mapping_url' => ELEMENTOR_ASSETS_URL . 'lib/font-awesome/migration/mapping.js', 'settings' => $settings, 'wp_editor' => static::get_wp_editor_config(), 'settings_page_link' => Settings::get_url(), 'tools_page_link' => Tools::get_url(), 'tools_page_nonce' => wp_create_nonce( 'tools-page-from-editor' ), 'elementor_site' => 'https://go.elementor.com/about-elementor/', 'docs_elementor_site' => 'https://go.elementor.com/docs/', 'help_the_content_url' => 'https://go.elementor.com/the-content-missing/', 'help_flexbox_bc_url' => 'https://go.elementor.com/flexbox-layout-bc/', 'elementPromotionURL' => 'https://go.elementor.com/go-pro-%s', 'dynamicPromotionURL' => 'https://go.elementor.com/go-pro-dynamic-tag', 'additional_shapes' => Shapes::get_additional_shapes_for_config(), 'user' => [ 'restrictions' => Plugin::$instance->role_manager->get_user_restrictions_array(), 'is_administrator' => current_user_can( 'manage_options' ), 'introduction' => User::get_introduction_meta(), 'dismissed_editor_notices' => User::get_dismissed_editor_notices(), 'locale' => get_user_locale(), ], 'preview' => [ 'help_preview_error_url' => 'https://go.elementor.com/preview-not-loaded/', 'help_preview_http_error_url' => 'https://go.elementor.com/preview-not-loaded/#permissions', 'help_preview_http_error_500_url' => 'https://go.elementor.com/500-error/', 'debug_data' => Loading_Inspection_Manager::instance()->run_inspections(), ], 'locale' => get_locale(), 'rich_editing_enabled' => filter_var( get_user_meta( get_current_user_id(), 'rich_editing', true ), FILTER_VALIDATE_BOOLEAN ), 'page_title_selector' => $page_title_selector, 'tinymceHasCustomConfig' => class_exists( 'Tinymce_Advanced' ) || class_exists( 'Advanced_Editor_Tools' ), 'inlineEditing' => Plugin::$instance->widgets_manager->get_inline_editing_config(), 'dynamicTags' => Plugin::$instance->dynamic_tags->get_config(), 'ui' => [ 'defaultGenericFonts' => $kits_manager->get_current_settings( 'default_generic_fonts' ), ], // Empty array for BC to avoid errors. 'i18n' => [], // 'responsive' contains the custom breakpoints config introduced in Elementor v3.2.0 'responsive' => [ 'breakpoints' => Plugin::$instance->breakpoints->get_breakpoints_config(), 'icons_map' => Plugin::$instance->breakpoints->get_responsive_icons_classes_map(), ], 'promotion' => [ 'elements' => Plugin::$instance->editor->promotion->get_elements_promotion(), 'integration' => [ 'ally-accessibility' => Hints::get_ally_action_data(), ], ], 'editor_events' => EditorEventsModule::get_editor_events_config(), 'promotions' => [ 'notes' => Filtered_Promotions_Manager::get_filtered_promotion_data( [ 'upgrade_url' => 'https://go.elementor.com/go-pro-notes/' ], 'elementor/panel/notes/custom_promotion', 'upgrade_url' ), ], 'fontVariableRanges' => Group_Control_Typography::get_font_variable_ranges(), ]; if ( Plugin::$instance->experiments->is_feature_active( 'container' ) ) { $client_env['elementsPresets'] = Plugin::$instance->editor->get_elements_presets(); } $is_admin_user_without_pro = current_user_can( 'manage_options' ) && ! Utils::has_pro(); if ( $is_admin_user_without_pro ) { $client_env['integrationWidgets'] = array_merge( ( isset( $client_env['integrationWidgets'] ) && is_array( $client_env['integrationWidgets'] ) ? $client_env['integrationWidgets'] : [] ), [ [ 'categories' => '[ "general" ]', 'icon' => 'eicon-accessibility', 'name' => 'ally-accessibility', 'title' => esc_html__( 'Ally Accessibility', 'elementor' ), 'keywords' => [ 'Accessibility', 'Usability', 'Inclusive', 'Statement', 'WCAG', 'Ally', 'Complaince', ], ], ], ); } static::bc_move_document_filters(); /** * Localize editor settings. * * Filters the editor localized settings. * * @since 1.0.0 * * @param array $client_env Editor configuration. * @param int $post_id The ID of the current post being edited. */ $client_env = apply_filters( 'elementor/editor/localize_settings', $client_env ); if ( $is_admin_user_without_pro ) { $client_env = self::ensure_pro_widgets( $client_env ); } $client_env['promotionWidgets'] = self::ensure_numeric_keys( $client_env['promotionWidgets'] ); return $client_env; } private static function ensure_pro_widgets( array $client_env ) { $pro_widgets = Api::get_promotion_widgets(); if ( ! isset( $client_env['promotionWidgets'] ) ) { $client_env['promotionWidgets'] = $pro_widgets; } else { $client_env['promotionWidgets'] = array_merge( $pro_widgets, $client_env['promotionWidgets'] ); } return $client_env; } private static function ensure_numeric_keys( array $array ) { return array_values( $array ); } private static function bc_move_document_filters() { global $wp_filter; $old_tag = 'elementor/editor/localize_settings'; $new_tag = 'elementor/document/config'; if ( ! has_filter( $old_tag ) ) { return; } foreach ( $wp_filter[ $old_tag ] as $priority => $filters ) { foreach ( $filters as $filter_id => $filter_args ) { if ( 2 === $filter_args['accepted_args'] ) { remove_filter( $old_tag, $filter_id, $priority ); add_filter( $new_tag, $filter_args['function'], $priority, 2 ); } } } } /** * Get WordPress editor config. * * Config the default WordPress editor with custom settings for Elementor use. * * @since 1.9.0 * @access private */ private static function get_wp_editor_config() { // Remove all TinyMCE plugins. remove_all_filters( 'mce_buttons', 10 ); remove_all_filters( 'mce_external_plugins', 10 ); if ( ! class_exists( '\_WP_Editors', false ) ) { require ABSPATH . WPINC . '/class-wp-editor.php'; } // WordPress 4.8 and higher if ( method_exists( '\_WP_Editors', 'print_tinymce_scripts' ) ) { \_WP_Editors::print_default_editor_scripts(); \_WP_Editors::print_tinymce_scripts(); } ob_start(); wp_editor( '%%EDITORCONTENT%%', 'elementorwpeditor', [ 'editor_class' => 'elementor-wp-editor', 'editor_height' => 250, 'drag_drop_upload' => true, ] ); $config = ob_get_clean(); // Don't call \_WP_Editors methods again remove_action( 'admin_print_footer_scripts', [ '_WP_Editors', 'editor_js' ], 50 ); remove_action( 'admin_print_footer_scripts', [ '_WP_Editors', 'print_default_editor_scripts' ], 45 ); \_WP_Editors::editor_js(); return $config; } } v2/scss/editor-v2-app-bar-overrides.scss 0000644 00000002142 15073240254 0014077 0 ustar 00 /** * Here should be only styles that related to the Editor v1, and should be overridden when using the Editor v2. */ body { --editor-v2-top-bar-height: 48px; } #elementor-editor-wrapper { height: calc(100vh - var(--editor-v2-top-bar-height)); } body.elementor-navigator-docked #elementor-navigator { height: calc(100% - var(--editor-v2-top-bar-height)); top: var(--editor-v2-top-bar-height); } .elementor-panel #elementor-panel-header-menu-button, .elementor-panel #elementor-panel-header-add-button, .elementor-panel #elementor-panel-footer { display: none; } .elementor-panel #elementor-panel-header { font-weight: 700; background-color: var( --e-a-bg-default ); color: var( --e-a-color-txt-accent ); border-block-end: var( --e-a-border ); height: 48px; } // Make the MCE full-screen work properly with the top bar. .elementor-control-type-wysiwyg .mce-fullscreen { inset: var(--editor-v2-top-bar-height) 0 0 0; & > .mce-container-body { display: flex; flex-direction: column; height: 100%; & > .mce-edit-area { flex-grow: 1; & > iframe { height: 100% !important; } } } } v2/templates/editor-body-v2-view.php 0000644 00000003152 15073240254 0013323 0 ustar 00 <?php namespace Elementor\Core\Editor\Loader\V2\Templates; use Elementor\Plugin; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } $notice = Plugin::$instance->editor->notice_bar->get_notice(); ?> <div id="elementor-loading"> <div class="elementor-loader-wrapper"> <div class="elementor-loader" aria-hidden="true"> <div class="elementor-loader-boxes"> <div class="elementor-loader-box"></div> <div class="elementor-loader-box"></div> <div class="elementor-loader-box"></div> <div class="elementor-loader-box"></div> </div> </div> <div class="elementor-loading-title"><?php echo esc_html__( 'Loading', 'elementor' ); ?></div> </div> </div> <h1 class="elementor-screen-only"><?php printf( esc_html__( 'Edit "%s" with Elementor', 'elementor' ), esc_html( get_the_title() ) ); ?></h1> <div id="elementor-editor-wrapper-v2"></div> <div id="elementor-editor-wrapper"> <aside id="elementor-panel" class="elementor-panel" aria-labelledby="elementor-panel-header-title"></aside> <main id="elementor-preview" aria-label="<?php echo esc_attr__( 'Preview', 'elementor' ); ?>"> <div id="elementor-responsive-bar"></div> <div id="elementor-preview-responsive-wrapper" class="elementor-device-desktop elementor-device-rotate-portrait"> <div id="elementor-preview-loading"> <i class="eicon-loading eicon-animation-spin" aria-hidden="true"></i> </div> <?php if ( $notice ) { $notice->render(); } // IFrame will be created here by the Javascript later. ?> </div> </main> <aside id="elementor-navigator" aria-labelledby="elementor-navigator__header__title"></aside> </div> v2/editor-v2-loader.php 0000644 00000012720 15073240254 0010667 0 ustar 00 <?php namespace Elementor\Core\Editor\Loader\V2; use Elementor\Core\Editor\Loader\Common\Editor_Common_Scripts_Settings; use Elementor\Core\Editor\Loader\Editor_Base_Loader; use Elementor\Core\Utils\Assets_Translation_Loader; use Elementor\Core\Utils\Collection; use Elementor\Utils; use Elementor\Modules\AtomicWidgets\Image\Placeholder_Image; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class Editor_V2_Loader extends Editor_Base_Loader { const APP_PACKAGE = 'editor'; const ENV_PACKAGE = 'env'; /** * Packages that should only be registered, unless some other asset depends on them. */ const LIBS = [ 'editor-responsive', 'editor-ui', 'editor-v1-adapters', self::ENV_PACKAGE, 'http-client', 'icons', 'locations', 'menus', 'query', 'schema', 'store', 'session', 'twing', 'ui', 'utils', 'wp-media', 'editor-current-user', ]; const EXTENSIONS = [ 'editor-documents', 'editor-notifications', 'editor-panels', ]; /** * Additional dependencies for packages that rely on global variables, rather than * an explicit npm dependency (e.g. `window.elementor`, `window.wp`, etc.). */ const ADDITIONAL_DEPS = [ 'editor-v1-adapters' => [ 'elementor-web-cli', ], 'wp-media' => [ 'media-models', ], ]; /** * @return void */ public function init() { $packages = array_merge( $this->get_packages_to_enqueue(), self::LIBS ); $packages_with_app = array_merge( $packages, [ self::APP_PACKAGE ] ); foreach ( $packages_with_app as $package ) { $this->assets_config_provider->load( $package ); } do_action( 'elementor/editor/v2/init' ); } /** * @return void */ public function register_scripts() { parent::register_scripts(); $assets_url = $this->config->get( 'assets_url' ); $min_suffix = $this->config->get( 'min_suffix' ); foreach ( $this->assets_config_provider->all() as $package => $config ) { if ( self::ENV_PACKAGE === $package ) { wp_register_script( 'elementor-editor-environment-v2', "{$assets_url}js/editor-environment-v2{$min_suffix}.js", [ $config['handle'] ], ELEMENTOR_VERSION, true ); } if ( static::APP_PACKAGE === $package ) { wp_register_script( 'elementor-editor-loader-v2', "{$assets_url}js/editor-loader-v2{$min_suffix}.js", [ 'elementor-editor', $config['handle'] ], ELEMENTOR_VERSION, true ); } $additional_deps = self::ADDITIONAL_DEPS[ $package ] ?? []; $deps = array_merge( $config['deps'], $additional_deps ); wp_register_script( $config['handle'], "{$assets_url}js/packages/{$package}/{$package}{$min_suffix}.js", $deps, ELEMENTOR_VERSION, true ); } $packages_handles = $this->assets_config_provider->pluck( 'handle' )->all(); Assets_Translation_Loader::for_handles( $packages_handles, 'elementor' ); do_action( 'elementor/editor/v2/scripts/register' ); } /** * @return void */ public function enqueue_scripts() { do_action( 'elementor/editor/v2/scripts/enqueue/before' ); parent::enqueue_scripts(); wp_enqueue_script( 'elementor-editor-environment-v2' ); $env_config = $this->assets_config_provider->get( self::ENV_PACKAGE ); if ( $env_config ) { $client_env = apply_filters( 'elementor/editor/v2/scripts/env', [ '@elementor/http-client' => [ 'base_url' => rest_url(), 'headers' => [ 'X-WP-Nonce' => wp_create_nonce( 'wp_rest' ), ], ], '@elementor/editor-controls' => [ 'background_placeholder_image' => Placeholder_Image::get_background_placeholder_image(), ], ] ); Utils::print_js_config( $env_config['handle'], 'elementorEditorV2Env', $client_env ); } $packages_with_app = array_merge( $this->get_packages_to_enqueue(), [ self::APP_PACKAGE ] ); foreach ( $this->assets_config_provider->only( $packages_with_app ) as $config ) { wp_enqueue_script( $config['handle'] ); } do_action( 'elementor/editor/v2/scripts/enqueue' ); Utils::print_js_config( 'elementor-editor', 'ElementorConfig', Editor_Common_Scripts_Settings::get() ); // Must be last. wp_enqueue_script( 'elementor-editor-loader-v2' ); do_action( 'elementor/editor/v2/scripts/enqueue/after' ); } /** * @return void */ public function register_styles() { parent::register_styles(); $assets_url = $this->config->get( 'assets_url' ); $min_suffix = $this->config->get( 'min_suffix' ); foreach ( $this->get_styles() as $style ) { wp_register_style( "elementor-{$style}", "{$assets_url}css/{$style}{$min_suffix}.css", [ 'elementor-editor' ], ELEMENTOR_VERSION ); } do_action( 'elementor/editor/v2/styles/register' ); } /** * @return void */ public function enqueue_styles() { parent::enqueue_styles(); foreach ( $this->get_styles() as $style ) { wp_enqueue_style( "elementor-{$style}" ); } do_action( 'elementor/editor/v2/styles/enqueue' ); } /** * @return void */ public function print_root_template() { // Exposing the path for the view part to render the body of the editor template. $body_file_path = __DIR__ . '/templates/editor-body-v2-view.php'; include ELEMENTOR_PATH . 'includes/editor-templates/editor-wrapper.php'; } public static function get_packages_to_enqueue(): array { return apply_filters( 'elementor/editor/v2/packages', self::EXTENSIONS ); } private function get_styles(): array { $styles = apply_filters( 'elementor/editor/v2/styles', [] ); return Collection::make( $styles ) ->unique() ->all(); } } v2/js/editor-environment-v2.js 0000644 00000000251 15073240254 0012222 0 ustar 00 if ( ! window.elementorV2?.env ) { throw new Error( 'The "@elementor/env" package was not loaded.' ); } window.elementorV2.env.initEnv( window.elementorEditorV2Env ); v2/js/editor-loader-v2.js 0000644 00000000626 15073240254 0011132 0 ustar 00 window.__elementorEditorV1LoadingPromise = new Promise( ( resolve ) => { window.addEventListener( 'elementor/init', () => { resolve(); }, { once: true } ); } ); window.elementor.start(); if ( ! window.elementorV2?.editor ) { throw new Error( 'The "@elementor/editor" package was not loaded.' ); } window.elementorV2 .editor .start( document.getElementById( 'elementor-editor-wrapper-v2' ), ); editor-loader-factory.php 0000644 00000002450 15073240254 0011457 0 ustar 00 <?php namespace Elementor\Core\Editor\Loader; use Elementor\Core\Editor\Editor; use Elementor\Core\Editor\Loader\V1\Editor_V1_Loader; use Elementor\Core\Editor\Loader\V2\Editor_V2_Loader; use Elementor\Core\Utils\Assets_Config_Provider; use Elementor\Core\Utils\Collection; use Elementor\Plugin; use Elementor\Utils; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class Editor_Loader_Factory { /** * @return Editor_Loader_Interface */ public static function create() { $config = new Collection( [ 'assets_url' => ELEMENTOR_ASSETS_URL, 'min_suffix' => ( Utils::is_script_debug() || Utils::is_elementor_tests() ) ? '' : '.min', 'direction_suffix' => is_rtl() ? '-rtl' : '', ] ); $assets_config_provider = ( new Assets_Config_Provider() ) ->set_path_resolver( function ( $name ) { return ELEMENTOR_ASSETS_PATH . "js/packages/{$name}/{$name}.asset.php"; } ); if ( static::should_use_v2_loader() ) { return new Editor_V2_Loader( $config, $assets_config_provider ); } return new Editor_V1_Loader( $config, $assets_config_provider ); } /** * If there are v2 packages enqueued, we should use the V2 loader. * * @return bool */ private static function should_use_v2_loader() { return ! empty( Editor_V2_Loader::get_packages_to_enqueue() ); } } editor-base-loader.php 0000644 00000013213 15073240254 0010721 0 ustar 00 <?php namespace Elementor\Core\Editor\Loader; use Elementor\Core\Utils\Assets_Config_Provider; use Elementor\Core\Utils\Collection; use Elementor\Plugin; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } abstract class Editor_Base_Loader implements Editor_Loader_Interface { /** * @var Collection */ protected $config; /** * @var Assets_Config_Provider */ protected $assets_config_provider; /** * @param Collection $config * @param Assets_Config_Provider $assets_config_provider */ public function __construct( Collection $config, Assets_Config_Provider $assets_config_provider ) { $this->config = $config; $this->assets_config_provider = $assets_config_provider; } /** * @return void */ public function register_scripts() { $assets_url = $this->config->get( 'assets_url' ); $min_suffix = $this->config->get( 'min_suffix' ); wp_register_script( 'elementor-editor-modules', "{$assets_url}js/editor-modules{$min_suffix}.js", [ 'elementor-common-modules' ], ELEMENTOR_VERSION, true ); wp_register_script( 'elementor-editor-document', "{$assets_url}js/editor-document{$min_suffix}.js", [ 'elementor-common-modules' ], ELEMENTOR_VERSION, true ); wp_register_script( 'perfect-scrollbar', "{$assets_url}lib/perfect-scrollbar/js/perfect-scrollbar{$min_suffix}.js", [], '1.4.0', true ); wp_register_script( 'jquery-easing', "{$assets_url}lib/jquery-easing/jquery-easing{$min_suffix}.js", [ 'jquery' ], '1.3.2', true ); wp_register_script( 'nprogress', "{$assets_url}lib/nprogress/nprogress{$min_suffix}.js", [], '0.2.0', true ); wp_register_script( 'tipsy', "{$assets_url}lib/tipsy/tipsy{$min_suffix}.js", [ 'jquery' ], '1.0.0', true ); wp_register_script( 'jquery-elementor-select2', "{$assets_url}lib/e-select2/js/e-select2.full{$min_suffix}.js", [ 'jquery' ], '4.0.6-rc.1', true ); wp_register_script( 'flatpickr', "{$assets_url}lib/flatpickr/flatpickr{$min_suffix}.js", [ 'jquery' ], '4.6.13', true ); wp_register_script( 'ace', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.5/ace.js', [], '1.2.5', true ); wp_register_script( 'ace-language-tools', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.5/ext-language_tools.js', [ 'ace' ], '1.2.5', true ); wp_register_script( 'jquery-hover-intent', "{$assets_url}lib/jquery-hover-intent/jquery-hover-intent{$min_suffix}.js", [], '1.0.0', true ); wp_register_script( 'nouislider', "{$assets_url}lib/nouislider/nouislider{$min_suffix}.js", [], '13.0.0', true ); wp_register_script( 'pickr', "{$assets_url}lib/pickr/pickr.min.js", [], '1.8.2', true ); wp_register_script( 'elementor-editor', "{$assets_url}js/editor{$min_suffix}.js", [ 'elementor-common', 'elementor-editor-modules', 'elementor-editor-document', 'wp-auth-check', 'jquery-ui-sortable', 'jquery-ui-resizable', 'perfect-scrollbar', 'nprogress', 'tipsy', 'imagesloaded', 'heartbeat', 'jquery-elementor-select2', 'flatpickr', 'ace', 'ace-language-tools', 'jquery-hover-intent', 'nouislider', 'pickr', 'react', 'react-dom', ], ELEMENTOR_VERSION, true ); wp_set_script_translations( 'elementor-editor', 'elementor' ); wp_register_script( 'elementor-responsive-bar', "{$assets_url}js/responsive-bar{$min_suffix}.js", [ 'elementor-editor' ], ELEMENTOR_VERSION, true ); wp_set_script_translations( 'elementor-responsive-bar', 'elementor' ); } /** * @return void */ public function enqueue_scripts() { wp_enqueue_script( 'elementor-responsive-bar' ); } /** * @return void */ public function register_styles() { $assets_url = $this->config->get( 'assets_url' ); $min_suffix = $this->config->get( 'min_suffix' ); $direction_suffix = $this->config->get( 'direction_suffix' ); wp_register_style( 'font-awesome', "{$assets_url}lib/font-awesome/css/font-awesome{$min_suffix}.css", [], '4.7.0' ); wp_register_style( 'elementor-select2', "{$assets_url}lib/e-select2/css/e-select2{$min_suffix}.css", [], '4.0.6-rc.1' ); wp_register_style( 'google-font-roboto', 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700', [], ELEMENTOR_VERSION ); wp_register_style( 'flatpickr', "{$assets_url}lib/flatpickr/flatpickr{$min_suffix}.css", [], '4.6.13' ); wp_register_style( 'pickr', "{$assets_url}lib/pickr/themes/monolith.min.css", [], '1.8.2' ); wp_register_style( 'elementor-editor', "{$assets_url}css/editor{$direction_suffix}{$min_suffix}.css", [ 'elementor-common', 'elementor-select2', 'elementor-icons', 'wp-auth-check', 'google-font-roboto', 'flatpickr', 'pickr', ], ELEMENTOR_VERSION ); wp_register_style( 'elementor-responsive-bar', "{$assets_url}css/responsive-bar{$min_suffix}.css", [], ELEMENTOR_VERSION ); } /** * @return void */ public function enqueue_styles() { wp_enqueue_style( 'elementor-editor' ); wp_enqueue_style( 'elementor-responsive-bar' ); } /** * @return void */ public function register_additional_templates() { $templates = [ 'global', 'panel', 'panel-elements', 'repeater', 'templates', 'navigator', 'hotkeys', 'responsive-bar', ]; $templates = apply_filters( 'elementor/editor/templates', $templates ); foreach ( $templates as $template ) { Plugin::$instance->common->add_template( ELEMENTOR_PATH . "includes/editor-templates/{$template}.php" ); } } } editor-loader-interface.php 0000644 00000002162 15073240254 0011750 0 ustar 00 <?php namespace Elementor\Core\Editor\Loader; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } interface Editor_Loader_Interface { /** * Init function purpose is to prepare some stuff that should be available for other methods * and register some hooks * * @return void */ public function init(); /** * Register all the scripts for the editor. * * @return void */ public function register_scripts(); /** * Enqueue all the scripts for the editor. * * @return void */ public function enqueue_scripts(); /** * Register all the styles for the editor. * * @return void */ public function register_styles(); /** * Enqueue all the styles for the editor. * * @return void */ public function enqueue_styles(); /** * Print the actual initial html for the editor, later on, the scripts takeover and renders the JS apps. * * @return void */ public function print_root_template(); /** * Register additional templates that are required for the marionette part of the application * * @return void */ public function register_additional_templates(); }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings