WP-Optimize icon
Performance & Caching

WP-Optimize hooks reference

  • By David Anderson / Team Updraft
  • v4.7.1 New
  • Updated

WP-Optimize 4.7.1 has 50 actions and 151 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.

How to use these hooks

Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.

functions.phpyour child theme
// Run your own code when WP-Optimize fires an action
add_action( 'wpo_cache_flush', function() {
	// Your code runs here.
}, 10, 1 );

// Change a value WP-Optimize is about to use
add_filter( 'wpo_cache_show_cached_by_comment', function( $value ) {
	// Change $value here.
	return $value;
}, 10, 1 );

Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.

All hooks

  • cache/class-wpo-page-cache.php line 666 · used in 2 places
    /**
     * Fires after purging the cache
     */
    do_action( 'wpo_cache_flush' );
  • cache/file-based-page-cache-functions.php line 226 · used in 2 places
    /**
     * Filter whether to display the html comment <!-- Cached by WP-Optimize ...
     * -->
     */
    apply_filters( 'wpo_cache_show_cached_by_comment', true );
  • cache/class-wp-optimize-page-cache-preloader.php line 527 · used in 2 places
    /**
     * Filters the mapped domain name
     */
    apply_filters( 'wpo_get_mapped_domain', $domain, $blog_id );
  • cache/class-wp-optimize-page-cache-preloader.php line 494 · used in 2 places
    /**
     * Filters if Multisite Domain mapping is enabled. Currently, we can only
     * detect if the WordPress MU Domain Mapping plugin is in use. Using the WP
     * Core functionality should not require this, unless if the domain name is set
     * somewhere else but in the site url option.
     */
    apply_filters( 'wpo_is_domain_mapping_enabled', $enabled );
  • minify/class-wp-optimize-minify-front-end.php line 772 · used in 2 places
    /**
     * Filters the array of stylesheets before processing them
     */
    apply_filters( 'wpo_minify_stylesheets', $header, 'header' );
  • includes/class-wpo-ajax.php line 223 · used in 2 places
    /**
     * Filters the commands allowed to the sub site admins. Other commands are only
     * available to network admin. Only used in a multisite context.
     */
    apply_filters( 'wpo_multisite_allowed_commands', array('check_server_status', 'compress_single_image', 'restore_single_image') );
  • cache/class-wp-optimize-page-cache-preloader.php line 336 · used in 2 places
    /**
     * Filter the URLs which will be preloaded
     */
    apply_filters( 'wpo_preload_get_site_urls', $urls );
  • includes/backward-compatibility-functions.php line 71
    /**
     * Filter to preflight or hijack clearing all events attached to the hook.
     */
    apply_filters( 'pre_unschedule_hook', null, $hook );
  • minify/class-wp-optimize-minify-cache-functions.php line 345
    /**
     * Minify cache lifespan
     */
    apply_filters( 'wp_optimize_minify_cache_expiry_time', time() - 86400 * $cache_lifespan );
  • minify/class-wp-optimize-minify-functions.php line 1006
    /**
     * Filters the default IE specific / blacklisted items
     */
    apply_filters( 'wp-optimize-minify-blacklist', $default_ie_blacklist );
  • minify/class-wp-optimize-minify-functions.php line 949
    /**
     * Filters the default exclusions
     */
    apply_filters( 'wp-optimize-minify-default-exclusions', $default_exclusions );
  • includes/class-wp-optimize-preloader.php line 69
    /**
     * Filters the interval between each preload attempt, in seconds.
     */
    apply_filters( "wpo_{$this->preload_type}_preload_continue_interval", 600 );
  • includes/class-wp-optimize-preloader.php line 223
    /**
     * Filters the minimum memory required before stopping a queue. Default: 10MB
     */
    apply_filters( "wpo_{$this->preload_type}_preload_memory_threshold", 10485760 );
  • wp-optimize.php line 354
    /**
     * Action executed when an active theme or plugin was updated
     */
    do_action( 'wpo_active_plugin_or_theme_updated' );
  • cache/class-wpo-cache-rules.php line 141
    /**
     * Filters whether to add a cookie when a comment is posted, in order to
     * exclude the page from caching. Regular comments have the property
     * comment_type set to ''  or 'comment'. So by default, only add the cookie in
     * those cases.
     */
    apply_filters( 'wpo_add_commented_post_cookie', '' === $comment->comment_type || 'comment' === $comment->comment_type, $comment );
  • cache/class-wp-optimize-page-cache-preloader.php line 664
    /**
     * Filters if a cache should systematically be regenerated when running a
     * manual preload. Default: false
     */
    apply_filters( 'wpo_always_regenerate_file_if_preload_is_manual', false );
  • cache/class-wp-optimize-page-cache-preloader.php line 669
    /**
     * Filters if a cache should systematically be regenerated when running a
     * scheduled preload. Default: false
     */
    apply_filters( 'wpo_always_regenerate_file_if_preload_is_scheduled', false );
  • includes/class-wp-optimize-admin.php line 854
    /**
     * The "purge cache" menu items
     */
    apply_filters( 'wpo_cache_admin_bar_menu_items', array(), $wp_admin_bar );
  • cache/class-wpo-cache-config.php line 95
    /**
     * Filters the cookies used to set cache file names
     */
    apply_filters( 'wpo_cache_cookies', array(), $config );
  • cache/file-based-page-cache.php line 20
    /**
     * Action triggered when the cache extensions are all loaded. Allows to execute
     * code depending on an other extension, without knowing the order in which the
     * files are loaded.
     */
    do_action( 'wpo_cache_extensions_loaded' );
  • includes/class-wp-optimize-preloader.php line 385
    /**
     * Filter the sitemap file used to collect the URLs to preload
     */
    apply_filters( 'wpo_cache_preload_sitemap_filename', $sitemap_filename );
  • cache/class-wpo-cache-rules.php line 349
    /**
     * Adds a way to exit the purge of terms permalink using the provided
     * parameters.
     */
    apply_filters( 'wpo_cache_purge_related_elements_on_post_terms_change', true, $object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids );
  • cache/class-wpo-cache-config.php line 104
    /**
     * Filters the query variables used to set cache file names
     */
    apply_filters( 'wpo_cache_query_variables', array(), $config );
  • cache/file-based-page-cache-functions.php line 113
    /**
     * Defines if the page can be cached or not
     */
    apply_filters( 'wpo_can_cache_page', $can_cache_page );
  • includes/class-updraft-smush-task.php line 129
    /**
     * Filters the options for a single image to compress. Currently, supports: -
     * 'quality': Will use the image quality set in this filter, instead of the one
     * defined in the settings.
     */
    apply_filters( 'wpo_image_compression_single_image_options', array(), $attachment_id, $file_path, $size );
  • compatibility/class-wp-optimize-server-compatibility.php line 86
    /**
     * Filter whether the server is detected as Kinsta.
     */
    apply_filters( 'wpo_is_kinsta_server', $is_kinsta );
  • cache/class-wp-optimize-page-cache-preloader.php line 659
    /**
     * Expiry threshold: the current file will be considered stale if within the
     * threshold. Default: 600s (10min)
     */
    apply_filters( 'wpo_lifespan_expiry_threshold', 600 );
  • minify/class-wp-optimize-minify-cache-functions.php line 268
    /**
     * Action triggered when purging other plugins cache, and nothing was triggered
     */
    do_action( 'wpo_min_after_purge_others' );
  • minify/class-wp-optimize-minify-cache-functions.php line 126
    /**
     * Action triggered after purging temporary files
     */
    do_action( 'wpo_min_after_purge_temp_files' );
  • minify/class-wp-optimize-minify-cache-functions.php line 142
    /**
     * Action triggered before purging other plugins cache
     */
    do_action( 'wpo_min_before_purge_others' );
  • minify/class-wp-optimize-minify-config.php line 195
    /**
     * Filters the result of always_purge_everything
     */
    apply_filters( 'wpo_minify_always_purge_everything', 0 === intval($this->get('cache_lifespan')) || (defined('WPO_ADVANCED_CACHE') && defined('WP_CACHE') && WP_CACHE) );
  • minify/class-wp-optimize-minify-front-end.php line 455
    /**
     * Filters whether to use the defer attribute or async.
     */
    apply_filters( 'wpo_minify_defer_or_async', 'defer', $tag, $handle, $src );
  • minify/class-wp-optimize-minify-functions.php line 1067
    /**
     * Filters the arguments passed to wp_remote_get when downloading the scripts.
     */
    apply_filters( 'wpo_minify_download_request_args', $args, $url );
  • minify/class-wp-optimize-minify-functions.php line 917
    /**
     * Whether to exclude the content or not from the minifying process.
     */
    apply_filters( 'wpo_minify_exclude_contents', false );
  • minify/class-wp-optimize-minify-functions.php line 486
    /**
     * Filters the imported CSS
     */
    apply_filters( 'wpo_minify_get_css', $css, $url, $enable_css_minification );
  • minify/class-wp-optimize-minify-functions.php line 324
    /**
     * Filters the imported JavaScript
     */
    apply_filters( 'wpo_minify_get_js', $js . "\n", $url, $enable_js_minification );
  • minify/class-wp-optimize-minify-fonts.php line 58
    /**
     * Filters whether to add display=swap to Google fonts urls
     */
    apply_filters( 'wpo_minify_gfont_display_swap', $config->get('enable_display_swap') );
  • minify/class-wp-optimize-minify-fonts.php line 64
    /**
     * Filters the value of the display parameter.
     */
    apply_filters( 'wpo_minify_gfont_display_type', 'swap' );
  • minify/class-wp-optimize-minify-front-end.php line 2626
    /**
     * Filters whether to ignore the order of the CSS files, and group them by
     * media type
     */
    apply_filters( 'wpo_minify_maintain_css_order', true );
  • minify/class-wp-optimize-minify-front-end.php line 140
    /**
     * Filters whether the functionality is run on the current page.
     */
    apply_filters( 'wpo_minify_run_on_page', !is_admin() && (!defined('SCRIPT_DEBUG') || !SCRIPT_DEBUG) && !is_preview() && (!function_exists('is_customize_preview') || !is_customize_preview()) && !($this->options['disable_when_logged_in'] && is_user_logged_in()) && !(function_exists('is_amp_endpoint') && is_amp_endpoint()) && !WP_Optimize_Minify_Functions::exclude_contents(), $context );
  • templates/minify/settings-tab.php line 121
    /**
     * Called before outputting the submit button in the setting fields in Minify >
     * Advanced
     */
    do_action( 'wpo_minify_settings_tabs', $wpo_minify_options );
  • cache/class-wpo-cache-rules.php line 182
    /**
     * Purge the whole cache if set to true, only the edited post otherwise.
     * Default is false.
     */
    apply_filters( 'wpo_purge_all_cache_on_update', false, $post_id );
  • cache/class-wpo-page-cache.php line 649
    /**
     * Filters whether activating / deactivating a plugin will purge the cache.
     */
    apply_filters( 'wpo_purge_page_cache_on_activate_deactivate_plugin', true );
  • cache/class-wp-optimize-page-cache-preloader.php line 674
    /**
     * Filters if a cache should systematically be regenerated when running a
     * preload and no schedule is set, and cache does not expire. Default: true
     */
    apply_filters( 'wpo_regenerate_file_when_no_expiry_date', true );
  • minify/class-wp-optimize-minify-commands.php line 197
    /**
     * Filters the data before saving it
     */
    apply_filters( 'wpo_save_minify_settings', $new_data );
  • wp-optimize.php line 2049
    /**
     * Filters whether data should be included in certain templates or not.
     */
    apply_filters( 'wpo_template_should_include_data', $this->is_updraft_central_request() );
  • minify/class-wp-optimize-minify-load-url-task.php line 45
    /**
     * Action triggered after preloading a single url
     */
    do_action( 'wpoptimize_after_minify_preload_url', $url, $minify_preloader );
  • cache/class-wpo-load-url-task.php line 44
    /**
     * Action triggered after preloading a single url
     */
    do_action( 'wpoptimize_after_preload_url', $url, $cache_preloader );
  • includes/class-wp-optimize-http-error-codes-trait.php line 136
    /**
     * Filters wp_remote_get parameters, when checking if browser cache is enabled.
     */
    apply_filters( 'wpoptimize_get_stylesheet_headers_args', array('timeout' => 10) );
  • minify/class-wp-optimize-minify-load-url-task.php line 52
    /**
     * Allows to change the delay between each URL preload, to reduce server load.
     */
    apply_filters( 'wpoptimize_minify_preload_delay', 500000 );
  • cache/class-wpo-load-url-task.php line 51
    /**
     * Allows to change the delay between each URL preload, to reduce server load.
     */
    apply_filters( 'wpoptimize_preload_delay', 500000 );
  • cache/class-wpo-page-cache.php line 1270 · used in 6 places
    do_action( 'wpo_delete_cache_by_url', $url, $recursive );
  • cache/class-wp-optimize-page-cache-preloader.php line 273 · used in 3 places
    apply_filters( 'wpo_preload_headers', array() );
  • cache/class-wpo-page-cache.php line 1272 · used in 3 places
    do_action( 'wpo_preload_url', $url );
  • includes/class-wpo-analytics-provider.php line 301 · used in 3 places
    apply_filters( 'wpo_premium_buy_url', WP_Optimize()->premium_version_link . '&utm_content=analytics-tab', 'analytics_tab' );
  • includes/class-wp-optimize-commands.php line 905 · used in 2 places
    do_action( 'wp_optimize_after_optimizations' );
  • includes/class-wp-optimize-admin.php line 197 · used in 2 places
    do_action( 'wp_optimize_register_admin_content' );
  • minify/class-wp-optimize-minify-front-end.php line 306 · used in 2 places
    apply_filters( 'wp_optimize_skip_inlining', false === $file_size || $file_size > 20480, $file_size, $href );
  • cache/file-based-page-cache-functions.php line 258 · used in 2 places
    apply_filters( 'wpo_allow_cache_gzip_files', true );
  • includes/class-wp-optimize-commands.php line 1841 · used in 2 places
    apply_filters( 'wpo_cron_next_event', $next_optimization_timestamp );
  • includes/class-updraft-smush-manager.php line 1011 · used in 2 places
    apply_filters( 'wpo_get_uncompressed_images_args', $args );
  • cache/class-wp-optimize-page-cache-preloader.php line 73 · used in 2 places
    apply_filters( 'wpo_page_cache_schedule_preload_use_nighttime', 1 );
  • cache/file-based-page-cache-functions.php line 171 · used in 2 places
    do_action( 'wpo_page_not_cached', $no_cache_because );
  • includes/class-wp-optimize-commands.php line 1730 · used in 2 places
    apply_filters( 'wpo_run_button_caption', __('Optimize all', 'wp-optimize') );
  • includes/class-updraft-smush-manager-commands.php line 317 · used in 2 places
    do_action( 'wpo_save_images_settings' );
  • cache/class-wpo-page-cache.php line 514 · used in 2 places
    apply_filters( 'wpo_serve_cache_via_htaccess', false );
  • cache/class-wp-optimize-page-cache-preloader.php line 291 · used in 2 places
    apply_filters( 'wpo_should_preload_amp', false, $url );
  • includes/class-updraft-smush-task.php line 386
    apply_filters( 'allowed_task_stages', $stages );
  • includes/class-wp-optimize-options.php line 262
    do_action( 'auto_option_settings', $settings );
  • minify/class-wp-optimize-minify-cache-functions.php line 188
    do_action( 'autoptimize_action_cachepurged' );
  • minify/class-wp-optimize-minify-cache-functions.php line 202
    do_action( 'ce_clear_cache' );
  • includes/class-wp-optimization.php line 281
    apply_filters( 'get_optimization_blogs', $objects );
  • includes/class-updraft-smush-manager-commands.php line 471
    apply_filters( 'mark_all_as_uncompressed_images_per_request', 100 );
  • includes/class-wp-optimize-admin.php line 621
    apply_filters( 'show_cloudflare_settings', $is_cloudflare_site );
  • includes/class-updraft-smush-task.php line 365
    do_action( 'ud_smush_task_failed', $this, $error_code, $error_message );
  • includes/class-updraft-smush-task.php line 36
    do_action( 'ud_task_initialised', $this );
  • includes/class-updraft-smush-task.php line 48
    do_action( 'ud_task_started', $this );
  • includes/class-updraft-smush-manager.php line 805
    apply_filters( 'updraft_smush_js_translations', array( 'all_images_compressed' => __('No uncompressed images were found.', 'wp-optimize'), 'error_unexpected_response' => __('An unexpected response was received from the server.', 'wp-optimize') . ' ' . __('More information has been logged in the browser console.', 'wp-optimize'), 'compress_single_image_dialog' => __('Please wait: compressing the selected image.', 'wp-optimize'), 'error_try_ag... );
  • includes/class-updraft-smush-manager.php line 995
    apply_filters( 'updraft_smush_posts_per_page', 1000 );
  • includes/updraftcentral/updraftcentral.php line 36
    apply_filters( 'updraftcentral_command_base_class_at', UPDRAFTPLUS_DIR.'/central/commands.php' );
  • includes/class-wp-optimize-admin.php line 157
    apply_filters( "wp_optimize_admin_{$page}_default_tab", $tab_keys[0] );
  • includes/class-wp-optimize-admin.php line 186
    do_action( "wp_optimize_admin_after_page_{$page}", $active_tab );
  • includes/class-wp-optimize-admin.php line 162
    do_action( "wp_optimize_admin_page_{$page}", $active_tab );
  • includes/class-wp-optimize-admin.php line 176
    do_action( "wp_optimize_admin_page_{$page}_{$tab_id}" );
  • includes/class-wp-optimize-admin.php line 92
    apply_filters( "wp_optimize_admin_page_{$page}_tabs", $tabs );
  • includes/class-wp-optimize-commands.php line 442
    do_action( "wp_optimize_admin_page_{$section}_{$tab_id}" );
  • includes/class-wp-optimizer.php line 262
    do_action( 'wp_optimize_after_optimization', $which_optimization, $optimization );
  • wp-optimize.php line 1442
    do_action( 'wp_optimize_after_template', $path, $template_file, $return_instead_of_echo, $extract_these );
  • wp-optimize.php line 1425
    do_action( 'wp_optimize_before_template', $path, $template_file, $return_instead_of_echo, $extract_these );
  • includes/class-wpo-page-optimizer.php line 41
    apply_filters( 'wp_optimize_buffer', $buffer, $flags );
  • wp-optimize.php line 1007
    apply_filters( 'wp_optimize_capability_required', $capability );
  • wp-optimize.php line 139
    apply_filters( 'wp_optimize_db_update_hooks', $import_done_hooks );
  • includes/class-wp-optimizer.php line 244
    apply_filters( 'wp_optimize_do_optimization', true, $which_optimization, $optimization );
  • includes/class-wp-optimizer.php line 181
    apply_filters( 'wp_optimize_get_optimizations', $optimization_objects );
  • includes/class-wp-optimizer.php line 99
    apply_filters( 'wp_optimize_get_optimizations_list', $optimizations );
  • includes/class-wp-optimizer.php line 519
    apply_filters( 'wp_optimize_get_table', $table );
  • includes/class-wp-optimizer.php line 368
    apply_filters( 'wp_optimize_get_table_prefix', $prefix );
  • includes/class-wp-optimizer.php line 494
    apply_filters( 'wp_optimize_get_tables', $table_status );
  • includes/class-wp-optimizer.php line 460
    apply_filters( 'wp_optimize_get_tables_include_table', $include_table, $table_name, $table_prefix );
  • includes/class-wp-optimize-heartbeat.php line 79
    apply_filters( 'wp_optimize_heartbeat_ajax', $command );
  • includes/class-wp-optimize-notices.php line 264
    apply_filters( 'wp_optimize_is_backup_plugin_installed', false );
  • includes/class-wp-optimize-heartbeat.php line 78
    apply_filters( 'wp_optimize_is_heartbeat_valid_ajax_command', $command );
  • wp-optimize.php line 1776
    apply_filters( 'wp_optimize_loggers', $loggers );
  • wp-optimize.php line 1792
    apply_filters( 'wp_optimize_loggers_classes', $loggers_classes );
  • includes/class-wp-optimizer.php line 195
    apply_filters( 'wp_optimize_optimization_class', 'WP_Optimization_'.$which_optimization );
  • includes/class-wp-optimizer.php line 201
    apply_filters( 'wp_optimize_optimization_class_file', $optimization_file );
  • includes/class-wp-optimization.php line 105
    do_action( 'wp_optimize_optimization_query', $sql, $this );
  • includes/class-wp-optimization.php line 107
    apply_filters( 'wp_optimize_optimization_query_result', $result, $sql, $this );
  • includes/class-wp-optimization.php line 432
    apply_filters( 'wp_optimize_optimization_results', $results, $this->id, $this );
  • includes/class-wp-optimize-options.php line 126
    apply_filters( 'wp_optimize_option_keys', $keys );
  • wp-optimize.php line 56
    apply_filters( 'wp_optimize_schedule_types', $schedule_types );
  • includes/class-wp-optimize-admin.php line 999
    apply_filters( 'wp_optimize_sub_menu_items', $sub_menu_items );
  • wp-optimize.php line 1423
    apply_filters( 'wp_optimize_template', $template_file, $path );
  • wp-optimize.php line 1467
    apply_filters( 'wp_optimize_template_directories', $template_directories );
  • wp-optimize.php line 1384
    apply_filters( 'wp_optimize_templates_dir', $templates_dir );
  • wp-optimize.php line 1395
    apply_filters( 'wp_optimize_templates_url', $templates_url );
  • includes/class-wp-optimize-preloader.php line 365
    apply_filters( "wpo_{$this->preload_type}_preloader_amp_args", $amp_args, $url );
  • includes/class-wp-optimize-preloader.php line 339
    apply_filters( "wpo_{$this->preload_type}_preloader_desktop_args", $desktop_args, $url );
  • includes/class-wp-optimize-preloader.php line 179
    apply_filters( "wpo_{$this->preload_type}_preloader_dont_close_browser_connection", $this->dont_close_browser_connection );
  • templates/database/optimize-table.php line 48
    do_action( 'wpo_additional_options' );
  • includes/class-wp-optimize-admin.php line 118
    do_action( 'wpo_admin_after_header' );
  • includes/class-wp-optimize-admin.php line 130
    do_action( 'wpo_admin_before_closing_wrap' );
  • templates/cache/page-cache-advanced.php line 133
    do_action( 'wpo_after_cache_conditional_tags' );
  • templates/cache/page-cache-advanced.php line 82
    do_action( 'wpo_after_cache_exception_urls' );
  • templates/cache/page-cache-advanced.php line 86
    do_action( 'wpo_after_cache_exception_urls_fieldgroup' );
  • templates/cache/page-cache-advanced.php line 100
    do_action( 'wpo_after_cache_ignore_query_variables' );
  • templates/cache/page-cache-advanced.php line 104
    do_action( 'wpo_after_cache_ignore_query_variables_fieldgroup' );
  • templates/cache/page-cache.php line 100
    do_action( 'wpo_after_cache_settings' );
  • templates/settings/settings.php line 12
    do_action( 'wpo_after_general_settings' );
  • templates/minify/js-settings-tab.php line 62
    do_action( 'wpo_after_minify_javascript_options' );
  • cache/file-based-page-cache-functions.php line 1382
    apply_filters( 'wpo_allowed_conditional_tags_exceptions', $allowed_functions );
  • includes/class-wp-optimize-preloader.php line 107
    do_action( "wpo_before_{$this->preload_type}_preload" );
  • cache/file-based-page-cache-functions.php line 325
    apply_filters( 'wpo_cache_can_output_gzip_content', $wpo_cache_can_output_gzip_content );
  • cache/class-wpo-cache-config.php line 118
    do_action( 'wpo_cache_config_updated', $config );
  • cache/class-wpo-cache-config.php line 257
    apply_filters( 'wpo_cache_defaults', $defaults );
  • cache/file-based-page-cache-functions.php line 511
    apply_filters( 'wpo_cache_filename', $filename );
  • cache/file-based-page-cache-functions.php line 289
    apply_filters( 'wpo_cache_gzip_level', 6 );
  • cache/file-based-page-cache-functions.php line 854
    apply_filters( 'wpo_cache_modified_time', $modified_time, $path );
  • cache/file-based-page-cache-functions.php line 1012
    apply_filters( 'wpo_cache_page_force', false );
  • cache/class-wpo-page-cache.php line 1203
    apply_filters( 'wpo_cache_size_expiration', DAY_IN_SECONDS );
  • cache/class-wpo-page-cache.php line 1217
    apply_filters( 'wpo_cache_size_files_to_ignore', $this->files_to_ignore );
  • cache/class-wpo-cache-config.php line 110
    apply_filters( 'wpo_cache_update_config', $config );
  • webp/class-wpo-webp-test-run.php line 82
    apply_filters( 'wpo_converters_with_shell', $converters_with_shell );
  • webp/class-wpo-webp-test-run.php line 65
    apply_filters( 'wpo_converters_without_shell', $converters_without_shell );
  • includes/class-wp-optimize-options.php line 526
    apply_filters( 'wpo_default_auto_options', $new_auto_options );
  • cache/class-wpo-cache-rules.php line 185
    apply_filters( 'wpo_delete_cached_homepage_on_post_update', true, $post_id );
  • webp/class-wpo-webp-alter-html.php line 46
    apply_filters( 'wpo_disable_webp_alter_html', false );
  • includes/class-updraft-smush-task.php line 73
    apply_filters( 'wpo_dont_smush_sizes', array() );
  • wpo_faq_url

    filter
    optimizations/optimizetables.php line 173
    apply_filters( 'wpo_faq_url', 'https://teamupdraft.com/documentation/wp-optimize/topics/database-optimization/faqs/' );
  • cache/file-based-page-cache-functions.php line 2022
    apply_filters( 'wpo_feeds_caching_enabled', true );
  • webp/class-wp-optimize-webp.php line 258
    apply_filters( 'wpo_force_webp_serve_using_altered_html', false );
  • cache/file-based-page-cache-functions.php line 1352
    apply_filters( 'wpo_get_cache_include_urls', $cache_include_urls );
  • includes/class-wp-optimize-utils.php line 505
    apply_filters( 'wpo_get_cache_purge_params', $original_purge_params );
  • includes/class-wp-optimize-database-information.php line 651
    apply_filters( 'wpo_get_plugin_json_file_path', trailingslashit($uploads_dir['basedir']).'wpo/wpo-plugins-tables-list.json' );
  • includes/class-wp-optimize-commands.php line 868
    apply_filters( 'wpo_get_tables_data', $tables_data );
  • cache/file-based-page-cache-functions.php line 1324
    apply_filters( 'wpo_get_url_exceptions', $exceptions );
  • includes/class-updraft-smush-manager.php line 948
    apply_filters( 'wpo_image_compressed_by_another_plugin', false );
  • includes/class-updraft-smush-task.php line 441
    apply_filters( 'wpo_image_compression_accepted_mime_types', array('image/png', 'image/jpeg', 'image/jpg', 'image/gif', 'image/webp') );
  • wp-optimize.php line 1118
    apply_filters( 'wpo_js_translations', $translations );
  • compatibility/class-wpo-wp-kses-compatibility.php line 101
    apply_filters( 'wpo_kses_allowed_attrs', self::$allowed_attrs );
  • wp-optimize.php line 412
    do_action( 'wpo_load_compatibilities' );
  • includes/class-wp-optimize-utils.php line 419
    apply_filters( 'wpo_max_file_size', 600000 );
  • cache/class-wp-optimize-page-cache-preloader.php line 608
    apply_filters( 'wpo_maybe_clear_files_list', $files );
  • minify/class-wp-optimize-minify-functions.php line 531
    apply_filters( 'wpo_minfy_remove_print_mediatypes_import', true, $url, $media_query, $matches[0], $file_url );
  • minify/class-wp-optimize-minify-functions.php line 261
    apply_filters( 'wpo_minify_css_string', $css );
  • minify/class-wp-optimize-minify-config.php line 181
    apply_filters( 'wpo_minify_defaults', $defaults );
  • minify/class-wp-optimize-minify-functions.php line 1266
    apply_filters( 'wpo_minify_file_modification_time', $modification_time, $abs_file_path );
  • minify/class-wp-optimize-minify-admin.php line 172
    apply_filters( 'wpo_minify_found_incompatible_plugins', $found_incompatible_plugins );
  • minify/class-wp-optimize-minify-functions.php line 382
    apply_filters( 'wpo_minify_inline_css', true );
  • minify/class-wp-optimize-minify-functions.php line 385
    apply_filters( 'wpo_minify_inline_js', true );
  • minify/class-wp-optimize-minify-functions.php line 355
    apply_filters( 'wpo_minify_inline_js_string', $js );
  • minify/class-wp-optimize-minify-functions.php line 335
    apply_filters( 'wpo_minify_js_string', $js );
  • minify/class-wp-optimize-minify-admin.php line 363
    apply_filters( 'wpo_minify_status_show_files_on_load', true );
  • cache/class-wpo-cache-config.php line 65
    apply_filters( "wpo_option_key_{$option_key}", ($options[$option_key] ?? $default) );
  • templates/cache/page-cache-advanced.php line 149
    do_action( 'wpo_page_cache_advanced_settings', $wpo_cache_options );
  • cache/class-wpo-page-cache.php line 613
    do_action( 'wpo_page_cache_disabled' );
  • cache/class-wp-optimize-page-cache-preloader.php line 304
    apply_filters( 'wpo_page_cache_preloader_amp_args', $amp_args, $url );
  • cache/class-wp-optimize-page-cache-preloader.php line 276
    apply_filters( 'wpo_page_cache_preloader_mobile_args', $mobile_args, $url );
  • templates/cache/page-cache.php line 117
    do_action( 'wpo_page_cache_settings_after', $wpo_cache_options );
  • cache/file-based-page-cache-functions.php line 157
    apply_filters( 'wpo_pre_cache_buffer', $buffer, $flags );
  • cache/class-wp-optimize-page-cache-preloader.php line 172
    apply_filters( 'wpo_preload_allowed_time_difference', $time_limit );
  • cache/class-wp-optimize-page-cache-preloader.php line 696
    apply_filters( 'wpo_preloader_should_regenerate_file', $result, $path, $preload_type );
  • includes/class-wpo-ajax.php line 296
    apply_filters( 'wpo_premium_ajax_commands', new WP_Optimize_Commands() );
  • wp-optimize.php line 589
    do_action( 'wpo_premium_scripts_styles', $min_or_not_internal, $min_or_not, $enqueue_version );
  • cache/class-wpo-cache-rules.php line 77
    apply_filters( 'wpo_purge_cache_hooks', $actions );
  • cache/file-based-page-cache-functions.php line 55
    apply_filters( 'wpo_restricted_cache_page_type', false );
  • cache/class-wp-optimize-cache-commands.php line 43
    apply_filters( 'wpo_save_cache_settings_validation', $data['cache-settings'] );
  • cache/class-wpo-page-cache.php line 1316
    do_action( 'wpo_single_post_cache_deleted', $post_id );
  • cache/class-wpo-page-cache.php line 1390
    do_action( 'wpo_single_post_feed_cache_deleted', $post_id );
  • templates/database/tables-body.php line 75
    apply_filters( 'wpo_tables_list_additional_column_data', '', $tablestatus );
  • templates/database/tables.php line 18
    do_action( 'wpo_tables_list_before' );
  • includes/class-wp-optimize-database-information.php line 728
    apply_filters( 'wpo_update_plugin_json', true );
  • includes/class-wpo-uninstall.php line 97
    apply_filters( 'wpo_uploads_sub_folders', $sub_folders );
  • cache/file-based-page-cache-functions.php line 61
    apply_filters( 'wpo_url_in_conditional_tags_exceptions', false );
  • includes/class-wp-optimize-utils.php line 324
    apply_filters( 'wpo_user_agent', $user_agent, $type );
  • includes/class-updraft-smush-manager.php line 1386
    apply_filters( 'wpo_write_server_info_in_smush_log', false );
  • includes/class-wp-optimize-admin.php line 800
    apply_filters( 'wpoptimize_admin_node_title', 'WP-Optimize' );
  • wp-optimize.php line 1652
    apply_filters( 'wpoptimize_maybe_add_affiliate_params', $url );

Generated from WP-Optimize's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Can't find the right hook?

We can build the customisation for you. Describe what you need: