Created
September 12, 2020 22:03
-
-
Save luizlopescom/1db61372eb6ac11d9d542131250564a0 to your computer and use it in GitHub Desktop.
List of WP Autoptimize plugin hooks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Change AO folder and file prefix | |
//It's mandatory to have an underline | |
//serve files from e.g. /wp-content/resources/aggregated_12345.css | |
//wp_config.php | |
define('AUTOPTIMIZE_CACHE_CHILD_DIR','/resources/'); | |
define('AUTOPTIMIZE_CACHEFILE_PREFIX','aggregated_'); | |
//Enable non-ASCII characters | |
add_filter('autoptimize_filter_main_use_mbstring', '__return_true'); | |
//Gzip AO files | |
add_filter(''autoptimize_filter_cache_create_static_gzip','true'); | |
//Don't clear AO cache on cache purges | |
add_filter('autoptimize_filter_main_hookpagecachepurge','__return_false'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment