'; print_r(OptimizeCommon::getAlreadyMarkedAsMinified()); echo ''; exit(); } if (isset($_GET['wpacu_remove_already_minified']) && Menu::userCanManageAssets()) { echo '
'; print_r(OptimizeCommon::removeAlreadyMarkedAsMinified()); echo '
'; exit(); } if (isset($_GET['wpacu_limit_already_minified']) && Menu::userCanManageAssets()) { OptimizeCommon::limitAlreadyMarkedAsMinified(); echo '
'; print_r(OptimizeCommon::getAlreadyMarkedAsMinified()); echo '
'; exit(); } } ); } } /** * */ public function showDebugOptionsFront() { if (! Menu::userCanManageAssets()) { return; } $markedCssListForUnload = array_unique(Main::instance()->allUnloadedAssets['styles']); $markedJsListForUnload = array_unique(Main::instance()->allUnloadedAssets['scripts']); $allDebugOptions = array( // [For CSS] 'wpacu_no_css_unload' => 'Do not apply any CSS unload rules', 'wpacu_no_css_minify' => 'Do not minify any CSS', 'wpacu_no_css_combine' => 'Do not combine any CSS', 'wpacu_no_css_preload_basic' => 'Do not preload any CSS (Basic)', // [/For CSS] // [For JS] 'wpacu_no_js_unload' => 'Do not apply any JavaScript unload rules', 'wpacu_no_js_minify' => 'Do not minify any JavaScript', 'wpacu_no_js_combine' => 'Do not combine any JavaScript', 'wpacu_no_js_preload_basic' => 'Do not preload any JS (Basic)', // [/For JS] // Others 'wpacu_no_frontend_show' => 'Do not show the bottom CSS/JS managing list', 'wpacu_no_admin_bar' => 'Do not show the admin bar', 'wpacu_no_html_changes' => 'Do not alter the HTML DOM (this will also load all assets non-minified and non-combined)', ); ?>

View the page with the following options disabled (for debugging purposes):

    $debugText) { ?>
CSS handles marked for unload:  '.esc_html($handle).''; }, $markedCssListForUnload); echo implode('  /  ', $markedCssListForUnloadFiltered); } else { echo 'None'; } ?>
JS handles marked for unload:  '.esc_html($handle).''; }, $markedJsListForUnload); echo implode('  /  ', $markedJsListForUnloadFiltered); } else { echo 'None'; } ?>

  • Dequeue any chosen styles (.css):
  • Dequeue any chosen scripts (.js):
  • Prepare CSS files to optimize: {wpacu_prepare_optimize_files_css_exec_time} ({wpacu_prepare_optimize_files_css_exec_time_sec})
  • Prepare JS files to optimize: {wpacu_prepare_optimize_files_js_exec_time} ({wpacu_prepare_optimize_files_js_exec_time_sec})
  • OptimizeCommon - HTML alteration via wp_loaded: {wpacu_alter_html_source_exec_time} ({wpacu_alter_html_source_exec_time_sec})
    •  OptimizeCSS: {wpacu_alter_html_source_for_optimize_css_exec_time} ({wpacu_alter_html_source_for_optimize_css_exec_time_sec})
      • Google Fonts Optimization/Removal: {wpacu_alter_html_source_for_google_fonts_optimization_removal_exec_time}
      • From CSS file to Inline: {wpacu_alter_html_source_for_inline_css_exec_time}
      • Update Original to Optimized: {wpacu_alter_html_source_original_to_optimized_css_exec_time}
      • Preloads: {wpacu_alter_html_source_for_preload_css_exec_time}
      • Combine: {wpacu_alter_html_source_for_combine_css_exec_time}
      • Minify Inline Tags: {wpacu_alter_html_source_for_minify_inline_style_tags_exec_time}
      • Unload (ignore dependencies): {wpacu_alter_html_source_unload_ignore_deps_css_exec_time}
    • OptimizeJs: {wpacu_alter_html_source_for_optimize_js_exec_time} ({wpacu_alter_html_source_for_optimize_js_exec_time_sec})
      • Update Original to Optimized: {wpacu_alter_html_source_original_to_optimized_js_exec_time}
      • Preloads: {wpacu_alter_html_source_for_preload_js_exec_time}
      • Combine: {wpacu_alter_html_source_for_combine_js_exec_time}
      • Unload (ignore dependencies): {wpacu_alter_html_source_unload_ignore_deps_js_exec_time}
      • Move any inline wih jQuery code after jQuery library: {wpacu_alter_html_source_move_inline_jquery_after_src_tag_exec_time}
    • HTML CleanUp: {wpacu_alter_html_source_cleanup_exec_time}
      • Strip HTML Comments: {wpacu_alter_html_source_for_remove_html_comments_exec_time}
      • Remove Generator Meta Tags: {wpacu_alter_html_source_for_remove_meta_generators_exec_time}
  • Output CSS & JS Management List: {wpacu_output_css_js_manager_exec_time} ({wpacu_output_css_js_manager_exec_time_sec})
'.WPACU_PLUGIN_TITLE.': Caching Directory Stats'; if (is_dir($assetCleanUpCacheDir)) { $printCacheDirOutput = ''.str_replace($assetCleanUpCacheDirRel, ''.$assetCleanUpCacheDirRel.'', $assetCleanUpCacheDir).''; if (! is_writable($assetCleanUpCacheDir)) { echo ''. 'The '.wp_kses($printCacheDirOutput, array('em' => array(), 'strong' => array())).' directory is not writable.'. '

'; } else { echo 'The '.wp_kses($printCacheDirOutput, array('em' => array(), 'strong' => array())).' directory is writable.' . '

'; } $dirItems = new \RecursiveDirectoryIterator( $assetCleanUpCacheDir, \RecursiveDirectoryIterator::SKIP_DOTS ); $totalFiles = 0; $totalSize = 0; foreach ( new \RecursiveIteratorIterator( $dirItems, \RecursiveIteratorIterator::SELF_FIRST, \RecursiveIteratorIterator::CATCH_GET_CHILD ) as $item ) { if ($item->isDir()) { echo '
'; $appendAfter = ' - '; if (is_writable($item)) { $appendAfter .= ' writable directory'; } else { $appendAfter .= ' not writable directory'; } } elseif ($item->isFile()) { $appendAfter = '('.Misc::formatBytes($item->getSize()).')'; echo ' - '; } echo wp_kses($item.' '.$appendAfter, array( 'em' => array(), 'strong' => array('style' => array()), 'br' => array(), 'span' => array('style' => array()) )) .'
'; if ( $item->isFile() ) { $totalSize += $item->getSize(); $totalFiles ++; } } echo '
'.'Total Files: '.$totalFiles.' / Total Size: '.Misc::formatBytes($totalSize).''; } else { echo 'The directory does not exists.'; } exit(); } }