* '.esc_html__('read', 'wp-asset-clean-up').'' : ' '.esc_html__('unread', 'wp-asset-clean-up').''; $showSettingsType = isset($_GET['wpacu_show_all']) ? 'all' : 'tabs'; $selectedTabArea = $selectedSubTabArea = ''; if ($showSettingsType === 'tabs') { $settingsTabs = array( 'wpacu-setting-strip-the-fat' => esc_html__( 'Stripping the "fat"', 'wp-asset-clean-up' ) . ' ' . $wikiStatus, 'wpacu-setting-plugin-usage-settings' => esc_html__( 'Plugin Usage Preferences', 'wp-asset-clean-up' ), 'wpacu-setting-test-mode' => esc_html__( 'Test Mode', 'wp-asset-clean-up' ), 'wpacu-setting-optimize-css' => esc_html__( 'Optimize CSS', 'wp-asset-clean-up' ), 'wpacu-setting-optimize-js' => esc_html__( 'Optimize JavaScript', 'wp-asset-clean-up' ), 'wpacu-setting-cdn-rewrite-urls' => esc_html__( 'CDN: Rewrite assets URLs', 'wp-asset-clean-up' ), 'wpacu-setting-common-files-unload' => esc_html__( 'Site-Wide Common Unloads', 'wp-asset-clean-up' ), 'wpacu-setting-html-source-cleanup' => esc_html__( 'HTML Source CleanUp', 'wp-asset-clean-up' ), 'wpacu-setting-local-fonts' => esc_html__( 'Local Fonts', 'wp-asset-clean-up' ), 'wpacu-setting-google-fonts' => esc_html__( 'Google Fonts', 'wp-asset-clean-up' ), 'wpacu-setting-disable-rss-feed' => esc_html__( 'Disable RSS Feed', 'wp-asset-clean-up' ), 'wpacu-setting-disable-xml-rpc' => esc_html__( 'Disable XML-RPC', 'wp-asset-clean-up' ) ); $settingsSubTabs = array( 'wpacu-google-fonts-optimize', 'wpacu-google-fonts-remove' ); $settingsTabActive = 'wpacu-setting-plugin-usage-settings'; // Is 'Stripping the "fat"' marked as read? Mark the "General & Files Management" as the default tab $defaultTabArea = ($data['wiki_read'] == 1) ? 'wpacu-setting-plugin-usage-settings' : 'wpacu-setting-strip-the-fat'; $selectedTabArea = isset($_REQUEST['wpacu_selected_tab_area']) && array_key_exists($_REQUEST['wpacu_selected_tab_area'], $settingsTabs) // the tab id area has to be one within the list above ? $_REQUEST['wpacu_selected_tab_area'] // after update : $defaultTabArea; // default if ($selectedTabArea && array_key_exists($selectedTabArea, $settingsTabs)) { $settingsTabActive = $selectedTabArea; } $selectedSubTabArea = isset($_REQUEST['wpacu_selected_sub_tab_area']) && in_array($_REQUEST['wpacu_selected_sub_tab_area'], $settingsSubTabs) // the sub tab id area has to be one within the list above ? $_REQUEST['wpacu_selected_sub_tab_area'] : ''; // default } ?>
'; $wpacuOptionOff = ''; foreach ($settingsTabs as $settingsTabKey => $settingsTabText) { $wpacuActiveTab = ($settingsTabActive === $settingsTabKey) ? 'active' : ''; $wpacuNavTextSub = ''; if ($settingsTabKey === 'wpacu-setting-test-mode') { $testModeStatus = ($data['test_mode'] == 1) ? $wpacuOptionOn : $wpacuOptionOff; $wpacuNavTextSub = '
'.$testModeStatus.'
'; } if ($settingsTabKey === 'wpacu-setting-optimize-css') { $cssMinifyStatus = ($data['minify_loaded_css'] == 1 && empty($data['is_optimize_css_enabled_by_other_party'])) ? $wpacuOptionOn : $wpacuOptionOff; $cssCombineStatus = ($data['combine_loaded_css'] == 1 && empty($data['is_optimize_css_enabled_by_other_party'])) ? $wpacuOptionOn : $wpacuOptionOff; $wpacuNavTextSub = '
' . $cssMinifyStatus . ' '.__('Minify', 'wp-asset-clean-up').'    ' . $cssCombineStatus . ' '.__('Combine', 'wp-asset-clean-up').'  + Defer, Inline
'; if (! empty($data['is_optimize_css_enabled_by_other_party']) || (defined('WPACU_WP_ROCKET_REMOVE_UNUSED_CSS_ENABLED') && WPACU_WP_ROCKET_REMOVE_UNUSED_CSS_ENABLED)) { $wpacuNavTextSub .= '
Status: Partially locked, already enabled in other plugin(s)
'; } } if ($settingsTabKey === 'wpacu-setting-optimize-js') { $jsMinifyStatus = ($data['minify_loaded_js'] == 1 && empty($data['is_optimize_js_enabled_by_other_party'])) ? $wpacuOptionOn : $wpacuOptionOff; $jsCombineStatus = ($data['combine_loaded_js'] == 1 && empty($data['is_optimize_js_enabled_by_other_party'])) ? $wpacuOptionOn : $wpacuOptionOff; $wpacuNavTextSub = '
' . $jsMinifyStatus . ' '.__('Minify', 'wp-asset-clean-up').'    ' . $jsCombineStatus . ' '.__('Combine', 'wp-asset-clean-up').'  + Defer, Inline
'; if (! empty($data['is_optimize_js_enabled_by_other_party']) || (defined('WPACU_WP_ROCKET_DELAY_JS_ENABLED') && WPACU_WP_ROCKET_DELAY_JS_ENABLED)) { $wpacuNavTextSub .= '
Status: Partially locked, already enabled in other plugin(s)
'; } } if ($settingsTabKey === 'wpacu-setting-cdn-rewrite-urls') { $cdnRewriteStatus = ($data['cdn_rewrite_enable'] == 1) ? $wpacuOptionOn : $wpacuOptionOff; $wpacuNavTextSub = '
'.$cdnRewriteStatus.'
'; } if ($settingsTabKey === 'wpacu-setting-local-fonts') { $wpacuNavTextSub .= '
Font-Display, Preload
'; } if ($settingsTabKey === 'wpacu-setting-google-fonts') { $wpacuNavTextSub .= '
Combine, Async Load, Font-Display, Preconnect, Preload, Removal
'; } ?>