PK!,  module.phpnu[register_layout_experiment(); if ( ! $this->is_experiment_active() ) { return; } add_action( 'elementor/admin/menu/after_register', function ( Admin_Menu_Manager $admin_menu, array $hooks ) { $hook_suffix = 'toplevel_page_elementor'; add_action( "admin_print_scripts-{$hook_suffix}", [ $this, 'enqueue_home_screen_scripts' ] ); }, 10, 2 ); add_filter( 'elementor/document/urls/edit', [ $this, 'add_active_document_to_edit_link' ] ); } public function enqueue_home_screen_scripts(): void { if ( ! current_user_can( 'manage_options' ) ) { return; } $min_suffix = Utils::is_script_debug() ? '' : '.min'; wp_enqueue_script( 'e-home-screen', ELEMENTOR_ASSETS_URL . 'js/e-home-screen' . $min_suffix . '.js', [ 'react', 'react-dom', 'elementor-common', 'elementor-v2-ui', ], ELEMENTOR_VERSION, true ); wp_set_script_translations( 'e-home-screen', 'elementor' ); wp_localize_script( 'e-home-screen', 'elementorHomeScreenData', $this->get_app_js_config() ); } public function is_experiment_active(): bool { return Plugin::$instance->experiments->is_feature_active( self::PAGE_ID ); } public function add_active_document_to_edit_link( $edit_link ) { $active_document = Utils::get_super_global_value( $_GET, 'active-document' ) ?? null; $active_tab = Utils::get_super_global_value( $_GET, 'active-tab' ) ?? null; if ( $active_document ) { $edit_link = add_query_arg( 'active-document', $active_document, $edit_link ); } if ( $active_tab ) { $edit_link = add_query_arg( 'active-tab', $active_tab, $edit_link ); } return $edit_link; } private function register_layout_experiment(): void { Plugin::$instance->experiments->add_feature( [ 'name' => static::PAGE_ID, 'title' => esc_html__( 'Elementor Home Screen', 'elementor' ), 'description' => esc_html__( 'Default Elementor menu page.', 'elementor' ), 'hidden' => true, 'default' => Experiments_Manager::STATE_ACTIVE, ] ); } private function get_app_js_config(): array { return API::get_home_screen_items(); } public static function get_elementor_settings_page_id(): string { return Plugin::$instance->experiments->is_feature_active( self::PAGE_ID ) ? 'elementor-settings' : Settings::PAGE_ID; } } PK!ܪW#classes/transformations-manager.phpnu[home_screen_data = $home_screen_data; $this->wordpress_adapter = new Wordpress_Adapter(); $this->plugin_status_adapter = new Plugin_Status_Adapter( $this->wordpress_adapter ); $this->transformation_classes = $this->get_transformation_classes(); } public function run_transformations(): array { if ( ! empty( self::$cached_data ) ) { return self::$cached_data; } $transformations = self::TRANSFORMATIONS; foreach ( $transformations as $transformation_id ) { $this->home_screen_data = $this->transformation_classes[ $transformation_id ]->transform( $this->home_screen_data ); } self::$cached_data = $this->home_screen_data; return $this->home_screen_data; } private function get_transformation_classes(): array { $classes = []; $transformations = self::TRANSFORMATIONS; $arguments = [ 'wordpress_adapter' => $this->wordpress_adapter, 'plugin_status_adapter' => $this->plugin_status_adapter, ]; foreach ( $transformations as $transformation_id ) { $class_name = '\\Elementor\\Modules\\Home\\Transformations\\' . $transformation_id; $classes[ $transformation_id ] = new $class_name( $arguments ); } return $classes; } } PK!/~ "transformations/filter-plugins.phpnu[get_add_ons_installation_status( $home_screen_data['add_ons']['repeater'] ); return $home_screen_data; } private function is_plugin( $add_on ): bool { return 'link' !== $add_on['type']; } private function get_add_ons_installation_status( array $add_ons ): array { $transformed_add_ons = []; foreach ( $add_ons as $add_on ) { if ( $this->is_plugin( $add_on ) ) { $this->handle_plugin_add_on( $add_on, $transformed_add_ons ); } else { $transformed_add_ons[] = $add_on; } } return $transformed_add_ons; } private function get_plugin_installation_status( $add_on ): string { $plugin_path = $add_on['file_path']; if ( ! $this->plugin_status_adapter->is_plugin_installed( $plugin_path ) ) { if ( 'wporg' === $add_on['type'] ) { return self::PLUGIN_IS_NOT_INSTALLED_FROM_WPORG; } return self::PLUGIN_IS_NOT_INSTALLED_NOT_FROM_WPORG; } if ( $this->wordpress_adapter->is_plugin_active( $plugin_path ) ) { return self::PLUGIN_IS_ACTIVATED; } return self::PLUGIN_IS_INSTALLED_NOT_ACTIVATED; } private function handle_plugin_add_on( array $add_on, array &$transformed_add_ons ): void { $installation_status = $this->get_plugin_installation_status( $add_on ); if ( self::PLUGIN_IS_ACTIVATED === $installation_status ) { return; } switch ( $this->get_plugin_installation_status( $add_on ) ) { case self::PLUGIN_IS_NOT_INSTALLED_NOT_FROM_WPORG: break; case self::PLUGIN_IS_NOT_INSTALLED_FROM_WPORG: $installation_url = $this->plugin_status_adapter->get_install_plugin_url( $add_on['file_path'] ); $add_on['url'] = html_entity_decode( $installation_url ); $add_on['target'] = '_self'; break; case self::PLUGIN_IS_INSTALLED_NOT_ACTIVATED: $activation_url = $this->plugin_status_adapter->get_activate_plugin_url( $add_on['file_path'] ); $add_on['url'] = html_entity_decode( $activation_url ); $add_on['button_label'] = esc_html__( 'Activate', 'elementor' ); $add_on['target'] = '_self'; break; } $transformed_add_ons[] = $add_on; } } PK!o@@1transformations/filter-top-section-by-license.phpnu[has_pro = Utils::has_pro(); } private function is_valid_item( $item ) { if ( isset( $item['license'] ) ) { $has_pro_json_not_free = $this->has_pro && 'pro' === $item['license'][0]; $is_not_pro_json_not_pro = ! $this->has_pro && 'free' === $item['license'][0]; return $has_pro_json_not_free || $is_not_pro_json_not_pro; } } public function transform( array $home_screen_data ): array { foreach ( $home_screen_data['top_with_licences'] as $index => $item ) { if ( $this->is_valid_item( $item ) ) { $new_top[] = $item; } } $home_screen_data['top_with_licences'] = reset( $new_top ); unset( $home_screen_data['top'] ); return $home_screen_data; } } PK!l  5transformations/filter-sidebar-upgrade-by-license.phpnu[has_pro = Utils::has_pro(); } private function is_valid_item( $item ) { $has_pro_json_not_free = $this->has_pro && 'pro' === $item['license'][0]; $is_not_pro_json_not_pro = ! $this->has_pro && 'free' === $item['license'][0]; $should_show = ! isset( $item['show'] ) || 'true' === $item['show']; return $has_pro_json_not_free && $should_show || $is_not_pro_json_not_pro && $should_show; } public function transform( array $home_screen_data ): array { $new_sidebar_upgrade = []; foreach ( $home_screen_data['sidebar_upgrade'] as $index => $item ) { if ( $this->is_valid_item( $item ) ) { $new_sidebar_upgrade[] = $item; } } if ( empty( $new_sidebar_upgrade ) ) { unset( $home_screen_data['sidebar_upgrade'] ); return $home_screen_data; } $home_screen_data['sidebar_upgrade'] = reset( $new_sidebar_upgrade ); return $home_screen_data; } } PK!'transformations/create-new-page-url.phpnu[documents->get_create_new_post_url( 'page' ); return $home_screen_data; } } PK!(6{^ ^ ,transformations/create-site-settings-url.phpnu[get_site_settings_url_config(); $home_screen_data['get_started']['repeater'] = array_map( function( $repeater_item ) use ( $site_settings_url_config ) { if ( ! in_array( $repeater_item['title'], static::SITE_SETTINGS_ITEMS, true ) ) { return $repeater_item; } if ( ! empty( $repeater_item['tab_id'] ) ) { $site_settings_url_config['url'] = add_query_arg( [ 'active-tab' => $repeater_item['tab_id'] ], $site_settings_url_config['url'] ); } return array_merge( $repeater_item, $site_settings_url_config ); }, $home_screen_data['get_started']['repeater'] ); return $home_screen_data; } private function get_site_settings_url_config(): array { $existing_elementor_page = $this->get_elementor_page(); $site_settings_url = ! empty( $existing_elementor_page ) ? $this->get_elementor_edit_url( $existing_elementor_page->ID ) : $this->get_elementor_create_new_page_url(); return [ 'new_page' => empty( $existing_elementor_page ), 'url' => $site_settings_url, 'type' => static::URL_TYPE, ]; } private function get_elementor_create_new_page_url(): string { $active_kit_id = Plugin::$instance->kits_manager->get_active_id(); if ( empty( $active_kit_id ) ) { return Plugin::$instance->documents->get_create_new_post_url( 'page' ); } return add_query_arg( [ 'active-document' => $active_kit_id ], Plugin::$instance->documents->get_create_new_post_url( 'page' ) ); } private function get_elementor_edit_url( int $post_id ): string { $active_kit_id = Plugin::$instance->kits_manager->get_active_id(); $document = Plugin::$instance->documents->get( $post_id ); if ( ! $document ) { return ''; } return add_query_arg( [ 'active-document' => $active_kit_id ], $document->get_edit_url() ); } private function get_elementor_page() { $args = [ 'meta_key' => Document::BUILT_WITH_ELEMENTOR_META_KEY, 'sort_order' => 'asc', 'sort_column' => 'post_date', ]; $pages = get_pages( $args ); if ( empty( $pages ) ) { return null; } $show_page_on_front = 'page' === get_option( 'show_on_front' ); if ( ! $show_page_on_front ) { return $pages[0]; } $home_page_id = get_option( 'page_on_front' ); foreach ( $pages as $page ) { if ( (string) $page->ID === $home_page_id ) { return $page; } } return $pages[0]; } } PK!1transformations/base/transformations-abstract.phpnu[wordpress_adapter = $args['wordpress_adapter'] ?? null; $this->plugin_status_adapter = $args['plugin_status_adapter'] ?? null; } abstract public function transform( array $home_screen_data ): array; } PK!>o6transformations/filter-condition-introduction-meta.phpnu[introduction_meta_data = User::get_introduction_meta() ?? []; } public function transform( array $home_screen_data ): array { $introduction_meta_conditions = $this->get_introduction_meta_conditions( $home_screen_data ); $active_addons = $this->get_activated_addons( $introduction_meta_conditions ); $home_screen_data['add_ons']['repeater'] = $this->get_inactive_addons( $home_screen_data, $active_addons ); return $home_screen_data; } private function get_introduction_meta_conditions( $home_screen_data ): array { $add_ons = $home_screen_data['add_ons']['repeater']; $conditions = []; foreach ( $add_ons as $add_on ) { if ( array_key_exists( 'condition', $add_on ) && 'introduction_meta' === $add_on['condition']['key'] ) { $conditions[ $add_on['title'] ] = $add_on['condition']['value']; } } return $conditions; } private function get_activated_addons( $conditions ): array { $active_addons = []; foreach ( $conditions as $add_on_title => $introduction_meta_value ) { if ( ! empty( $this->introduction_meta_data[ $introduction_meta_value ] ) ) { $active_addons[] = $add_on_title; } } return $active_addons; } private function get_inactive_addons( $home_screen_data, $active_addons ): array { $add_ons = $home_screen_data['add_ons']['repeater']; $inactive_add_ons = []; foreach ( $add_ons as $add_on ) { if ( ! in_array( $add_on['title'], $active_addons ) ) { $inactive_add_ons[] = $add_on; } } return $inactive_add_ons; } } PK!+m  1transformations/filter-get-started-by-license.phpnu[has_pro = Utils::has_pro(); } private function is_valid_item( $item ) { $has_pro_json_not_free = $this->has_pro && 'pro' === $item['license'][0]; $is_not_pro_json_not_pro = ! $this->has_pro && 'free' === $item['license'][0]; return $has_pro_json_not_free || $is_not_pro_json_not_pro; } public function transform( array $home_screen_data ): array { $new_get_started = []; foreach ( $home_screen_data['get_started'] as $index => $item ) { if ( $this->is_valid_item( $item ) ) { $new_get_started[] = $item; } } $home_screen_data['get_started'] = reset( $new_get_started ); return $home_screen_data; } } PK!u$api.phpnu[run_transformations(); } private static function fetch_data(): array { $response = wp_remote_get( self::HOME_SCREEN_DATA_URL ); if ( is_wp_error( $response ) ) { return []; } $data = json_decode( wp_remote_retrieve_body( $response ), true ); if ( empty( $data['home-screen'] ) || ! is_array( $data['home-screen'] ) ) { return []; } return $data['home-screen']; } private static function get_transient( $cache_key ) { $cache = get_option( $cache_key ); if ( empty( $cache['timeout'] ) ) { return false; } if ( current_time( 'timestamp' ) > $cache['timeout'] ) { return false; } return json_decode( $cache['value'], true ); } private static function set_transient( $cache_key, $value, $expiration = '+12 hours' ): bool { $data = [ 'timeout' => strtotime( $expiration, current_time( 'timestamp' ) ), 'value' => json_encode( $value ), ]; return update_option( $cache_key, $data, false ); } } PK!,  module.phpnu[PK!ܪW#@ classes/transformations-manager.phpnu[PK!/~ "Ztransformations/filter-plugins.phpnu[PK!o@@13transformations/filter-top-section-by-license.phpnu[PK!l  5"transformations/filter-sidebar-upgrade-by-license.phpnu[PK!'C(transformations/create-new-page-url.phpnu[PK!(6{^ ^ ,*transformations/create-site-settings-url.phpnu[PK!1B6transformations/base/transformations-abstract.phpnu[PK!>o68transformations/filter-condition-introduction-meta.phpnu[PK!+m  1@transformations/filter-get-started-by-license.phpnu[PK!u$Dapi.phpnu[PK gL