10Web Booster icon
Performance & Caching

10Web Booster hooks reference

  • By 10Web
  • v2.34.11
  • Updated

10Web Booster 2.34.11 has 15 actions and 20 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 10Web Booster fires an action
add_action( 'two_page_optimized_removed', function( $critical_page ) {
	// Your code runs here.
}, 10, 1 );

// Change a value 10Web Booster is about to use
add_filter( 'two_save_settings_code', 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

  • OptimizerAdmin.php line 111 · used in 5 places
    do_action( 'two_page_optimized_removed', $critical_page['id'] );
  • includes/OptimizerMain.php line 1129 · used in 3 places
    do_action( 'tenweb_purge_all_caches' );
  • OptimizerAdmin.php line 1083 · used in 2 places
    apply_filters( 'two_save_settings_code', 0 );
  • includes/OptimizerUtils.php line 1948
    do_action( 'breeze_clear_all_cache' );
  • includes/OptimizerCriticalCss.php line 661
    do_action( 'bwg_hompage_optimized' );
  • includes/OptimizerSettings.php line 1146
    apply_filters( 'get_two_enable_htaccess_caching_headers', $this->get_settings('two_enable_htaccess_caching_headers') );
  • includes/OptimizerSettings.php line 1106
    apply_filters( 'get_two_enable_htaccess_webp_delivery', $this->get_settings('two_enable_htaccess_webp_delivery') );
  • includes/OptimizerUtils.php line 1952
    do_action( 'litespeed_purge_all' );
  • OptimizerAdmin.php line 1315
    do_action( 'two_after_clear_cache', debug_backtrace() );
  • includes/OptimizerCriticalCss.php line 666
    do_action( 'two_after_create_critical_css', debug_backtrace() );
  • includes/OptimizerCriticalCss.php line 503
    do_action( 'two_after_generate_critical_css', debug_backtrace() );
  • OptimizerAdmin.php line 1256
    do_action( 'two_before_clear_cache', debug_backtrace() );
  • includes/OptimizerCriticalCss.php line 521
    do_action( 'two_before_create_critical_css', debug_backtrace() );
  • includes/OptimizerCriticalCss.php line 450
    do_action( 'two_before_generate_critical_css', debug_backtrace() );
  • includes/OptimizerMain.php line 1068
    apply_filters( 'two_content_after_optimization', $content, 10, 1 );
  • includes/OptimizerMain.php line 846
    apply_filters( 'two_content_before_optimization', $content, 10, 1 );
  • tenweb_speed_optimizer.php line 292
    do_action( 'two_main_authorization_failed' );
  • includes/OptimizerScripts.php line 503
    apply_filters( 'two_modify_delay_execution', $this->delayed_js, 10, 1 );
  • includes/OptimizerScripts.php line 475
    apply_filters( 'two_modify_exclude_js_from_aggregation', $this->dontmove, 10, 1 );
  • includes/ExcludeJsFromDelay.php line 3649
    apply_filters( 'two_modify_exclude_js_from_delay', $exclude_data, 10, 1 );
  • includes/WebPageCache/OptimizerWebPageValidations.php line 45
    apply_filters( 'two_override_donotcachepage', false );
  • includes/OptimizerUrl.php line 723
    apply_filters( 'two_override_donotoptimizepage', false );
  • includes/OptimizerCriticalCss.php line 657
    do_action( 'two_page_optimized', $page_id );
  • OptimizerAdmin.php line 1082
    apply_filters( 'two_save_settings_message', __('Success!', 'tenweb-speed-optimizer') );
  • includes/OptimizerMain.php line 1053
    apply_filters( 'twoptimize_html_after_minify', $content );
  • includes/OptimizerMain.php line 1061
    apply_filters( 'twoptimize_html_after_minify_iframe', $content );
  • includes/OptimizerMain.php line 1057
    apply_filters( 'twoptimize_html_after_minify_video', $content );
  • includes/OptimizerMain.php line 1063
    apply_filters( 'twoptimize_html_images', $content );
  • wp_meta

    action
    includes/OptimizerMain.php line 135
    do_action( 'wp_meta' );
  • includes/OptimizerUtils.php line 1720
    apply_filters( 'wpml_active_languages', '' );
  • includes/OptimizerUtils.php line 1818
    apply_filters( 'wpml_default_language', null );
  • includes/OptimizerUtils.php line 1723
    apply_filters( 'wpml_object_id', $element_id, $element_type, false, $lang_code );
  • includes/OptimizerUtils.php line 1820
    apply_filters( 'wpml_post_language_details', null, $post_id );
  • wpml_setting

    filter
    includes/OptimizerBase.php line 106
    apply_filters( 'wpml_setting', [], 'language_domains' );
  • OptimizerAdmin.php line 1645
    do_action( 'wpml_switch_language', 'all' );

Generated from 10Web Booster'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: