lists', $should_purge ); } return $response; } /** * Schedule cron to update dynamic lists weekly. * * @return void */ public function schedule_lists_update() { /* CL. if ( ! wp_next_scheduled( 'rocket_update_dynamic_lists' ) ) { wp_schedule_event( time(), 'weekly', 'rocket_update_dynamic_lists' ); } */ } /** * Clear dynamic lists update event. */ public function clear_schedule_lists_update() { wp_clear_scheduled_hook( 'rocket_update_dynamic_lists' ); } /** * Displays the dynamic lists update section on tools tab * * @note CL * @return void */ public function display_update_lists_section() { /* CL. if ( ! current_user_can( 'rocket_manage_options' ) ) { return; } $data = [ 'beacon' => $this->beacon->get_suggest( 'dynamic_lists' ), ]; echo $this->generate( 'settings/dynamic-lists-update', $data ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ } /** * Get the cached ignored parameters * * @return array */ public function get_cache_ignored_parameters(): array { $lists = $this->providers['defaultlists']->data_manager->get_lists(); return isset( $lists->cache_ignored_parameters ) ? array_flip( $lists->cache_ignored_parameters ) : []; } /** * Get the JS minify excluded external paths * * @return array */ public function get_js_minify_excluded_external(): array { $lists = $this->providers['defaultlists']->data_manager->get_lists(); return isset( $lists->js_minify_external ) ? $lists->js_minify_external : []; } /** * Get the patterns to move after the combine JS file * * @return array */ public function get_js_move_after_combine(): array { $lists = $this->providers['defaultlists']->data_manager->get_lists(); return isset( $lists->js_move_after_combine ) ? $lists->js_move_after_combine : []; } /** * Get the inline JS excluded from combine JS * * @return array */ public function get_combine_js_excluded_inline(): array { $lists = $this->providers['defaultlists']->data_manager->get_lists(); return isset( $lists->js_excluded_inline ) ? $lists->js_excluded_inline : []; } /** * Get the preload exclusions * * @return array */ public function get_preload_exclusions(): array { $lists = $this->providers['defaultlists']->data_manager->get_lists(); return isset( $lists->preload_exclusions ) ? $lists->preload_exclusions : []; } /** * Get Delay JS dynamic list. * * @return object */ public function get_delayjs_list() { return $this->providers['delayjslists']->data_manager->get_lists(); } /** * Get the JS minify excluded files * * @return array */ public function get_js_exclude_files(): array { $lists = $this->providers['defaultlists']->data_manager->get_lists(); return isset( $lists->exclude_js_files ) ? $lists->exclude_js_files : []; } /** * Get the incompatible plugins list * * @return array */ public function get_incompatible_plugins() { $lists = $this->providers['incompatible_plugins']->data_manager->get_plugins_list(); return isset( $lists ) ? $lists : []; } /** * Get the staging list * * @return array */ public function get_stagings(): array { $lists = $this->providers['defaultlists']->data_manager->get_lists(); return isset( $lists->staging_domains ) ? $lists->staging_domains : []; } /** * Get the JS minify excluded templates * * @return array */ public function get_exclude_js_templates(): array { $lists = $this->providers['defaultlists']->data_manager->get_lists(); return $lists->exclude_js_template ?? []; } /** * Get the lazy rendered exclusions. * * @return array */ public function get_lrc_exclusions(): array { $lists = $this->providers['defaultlists']->data_manager->get_lists(); return $lists->lazy_rendering_exclusions ?? []; } /** * Updates the lists from JSON files * * @return void */ public function update_lists_from_files() { foreach ( $this->providers as $provider ) { $provider->data_manager->remove_lists_cache(); $provider->data_manager->get_lists(); } } /** * Get the host fonts excluded templates * * @return array */ public function get_exclude_media_fonts(): array { $lists = $this->providers['defaultlists']->data_manager->get_lists(); return $lists->host_fonts ?? []; } /** * Get the MixPanel tracked options * * @return array */ public function get_mixpanel_tracked_options(): array { $lists = $this->providers['defaultlists']->data_manager->get_lists(); return $lists->mixpanel_tracked_settings ?? []; } /** * Get the external font exclusions * * @since 3.19.1 * @return array */ public function get_external_font_exclusions(): array { $lists = $this->providers['defaultlists']->data_manager->get_lists(); return $lists->external_font_exclusions ?? []; } /** * Get the Rocket Insights auto-add homepage expiry interval. * * Returns the number of days before license expiry to automatically * add homepage to Rocket Insights. Value of 0 disables the feature. * * @since 3.20.3 * * @return int Number of days before expiry, or 0 to disable. */ public function get_rocket_insights_add_homepage_expiry_interval(): int { $lists = $this->providers['defaultlists']->data_manager->get_lists(); return $lists->rocket_insights_add_homepage_expiry_interval ?? 1; } }