NitroPack icon
Performance & Caching

NitroPack hooks reference

  • By NitroPack
  • v1.20.4 New
  • Updated

NitroPack 1.20.4 has 12 actions and 24 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 NitroPack fires an action
add_action( 'nitropack_integration_purge_all', function() {
	// Your code runs here.
}, 10, 1 );

// Change a value NitroPack is about to use
add_filter( 'active_plugins', function( $active_plugins ) {
	// Change $active_plugins here.
	return $active_plugins;
}, 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

  • classes/WordPress/ActivateDeactivate.php line 51 · used in 11 places
    do_action( 'nitropack_integration_purge_all' );
  • classes/WordPress/Webhooks.php line 97 · used in 9 places
    do_action( 'nitropack_integration_purge_url', $readyUrl );
  • classes/Integration/Plugin/Elementor.php line 10 · used in 7 places
    apply_filters( 'active_plugins', get_option('active_plugins') );
  • classes/WordPress/Scripts.php line 57 · used in 7 places
    apply_filters( 'nitro_script_output', $this->heartbeat_script() );
  • classes/WordPress/NitroPack.php line 609 · used in 3 places
    apply_filters( 'nitropack_current_host', get_site_url() );
  • classes/WordPress/CoreFiles.php line 43 · used in 2 places
    apply_filters( 'nitropack_should_modify_htaccess', false );
  • classes/Integration/Plugin/GeoTargetingWP.php line 37
    apply_filters( 'geot/settings_page/opts', get_option( 'geot_settings' ) );
  • classes/WordPress/Notifications/AppNotifications.php line 53
    apply_filters( 'get_nitropack_notifications', $notifications, $type );
  • classes/Integration/Plugin/AdvancedMathCaptcha.php line 323
    apply_filters( 'math_captcha_title', Math_Captcha()->options['general']['title'] );
  • functions.php line 1344
    do_action( 'nitropack_cacheable_cache_headers' );
  • classes/WordPress/Settings/CPTOptimization.php line 175
    apply_filters( 'nitropack_cacheable_post_types', get_option( "nitropack-cacheableObjectTypes", $this->nitropack_get_default_cacheable_object_types() ) );
  • functions.php line 1361
    do_action( 'nitropack_cachehit_cache_headers' );
  • functions.php line 1341
    apply_filters( 'nitropack_can_serve_cache', true );
  • functions.php line 678
    do_action( 'nitropack_debug_invalidate', $url, $tag, $reason );
  • functions.php line 849
    do_action( 'nitropack_debug_purge', $url, $tag, $reason );
  • classes/WordPress/Webhooks.php line 52
    do_action( 'nitropack_debug_webhook', $_REQUEST );
  • classes/Integration/Theme/Divi.php line 144
    apply_filters( 'nitropack_divi_content_purge_mode', 'invalidate' );
  • classes/Integration/Theme/Divi.php line 127
    apply_filters( 'nitropack_divi_purge_fixed_in_version', self::FIXED_IN_DIVI_VERSION );
  • functions.php line 1313
    do_action( 'nitropack_early_cache_headers' );
  • classes/ModuleHandler.php line 187
    do_action( 'nitropack_execute_purge_all' );
  • classes/ModuleHandler.php line 190
    do_action( 'nitropack_execute_purge_url', $url );
  • classes/WordPress/CoreFiles.php line 152
    apply_filters( 'nitropack_htaccess_rules', [] );
  • classes/Util/Utils.php line 155
    apply_filters( 'nitropack_is_archive_page', is_author() || is_archive() );
  • classes/WordPress/Settings/Logger.php line 292
    apply_filters( 'nitropack_logs_dir_url', $dir_url );
  • classes/Feature/Logger/Logger.php line 186
    apply_filters( 'nitropack_max_log_filesize', 20 * 1024 * 1024 );
  • classes/WordPress/Notifications/Notifications.php line 731
    apply_filters( 'nitropack_needs_htaccess_changes', false );
  • classes/WordPress/Admin.php line 87
    apply_filters( 'nitropack_oneclick_connect_url', "" );
  • classes/WordPress/Notifications/Notifications.php line 711
    apply_filters( 'nitropack_oneclick_safemode_message', $safeModeMessage );
  • classes/WordPress/Admin.php line 79
    apply_filters( 'nitropack_oneclick_vendor_widget', "" );
  • classes/WordPress/Connect.php line 130
    apply_filters( 'nitropack_prevent_connect', $this->prevent_connecting( $nitro ) );
  • classes/WordPress/Cron.php line 61
    apply_filters( 'nitropack_remove_old_logs_interval', $seconds );
  • classes/WordPress/NitroPack.php line 506
    do_action( 'set_nitropack_geo_cache_prefix' );
  • widget_output

    filter
    classes/Integration/Plugin/TheEventsCalendar.php line 100
    apply_filters( 'widget_output', $widget_output, $widget_id_base, $widget_id, $sidebar_id );

Generated from NitroPack'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: