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.
// 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
-
do_action( 'nitropack_integration_purge_all' ); -
do_action( 'nitropack_integration_purge_url', $readyUrl ); -
active_plugins
filterapply_filters( 'active_plugins', get_option('active_plugins') ); -
nitro_script_output
filterapply_filters( 'nitro_script_output', $this->heartbeat_script() ); -
nitropack_current_host
filterapply_filters( 'nitropack_current_host', get_site_url() ); -
apply_filters( 'nitropack_should_modify_htaccess', false ); -
geot/settings_page/opts
filterapply_filters( 'geot/settings_page/opts', get_option( 'geot_settings' ) ); -
get_nitropack_notifications
filterapply_filters( 'get_nitropack_notifications', $notifications, $type ); -
math_captcha_title
filterapply_filters( 'math_captcha_title', Math_Captcha()->options['general']['title'] ); -
do_action( 'nitropack_cacheable_cache_headers' ); -
apply_filters( 'nitropack_cacheable_post_types', get_option( "nitropack-cacheableObjectTypes", $this->nitropack_get_default_cacheable_object_types() ) ); -
do_action( 'nitropack_cachehit_cache_headers' ); -
nitropack_can_serve_cache
filterapply_filters( 'nitropack_can_serve_cache', true ); -
nitropack_debug_invalidate
actiondo_action( 'nitropack_debug_invalidate', $url, $tag, $reason ); -
nitropack_debug_purge
actiondo_action( 'nitropack_debug_purge', $url, $tag, $reason ); -
nitropack_debug_webhook
actiondo_action( 'nitropack_debug_webhook', $_REQUEST ); -
apply_filters( 'nitropack_divi_content_purge_mode', 'invalidate' ); -
apply_filters( 'nitropack_divi_purge_fixed_in_version', self::FIXED_IN_DIVI_VERSION ); -
do_action( 'nitropack_early_cache_headers' ); -
nitropack_execute_purge_all
actiondo_action( 'nitropack_execute_purge_all' ); -
nitropack_execute_purge_url
actiondo_action( 'nitropack_execute_purge_url', $url ); -
nitropack_htaccess_rules
filterapply_filters( 'nitropack_htaccess_rules', [] ); -
nitropack_is_archive_page
filterapply_filters( 'nitropack_is_archive_page', is_author() || is_archive() ); -
nitropack_logs_dir_url
filterapply_filters( 'nitropack_logs_dir_url', $dir_url ); -
nitropack_max_log_filesize
filterapply_filters( 'nitropack_max_log_filesize', 20 * 1024 * 1024 ); -
apply_filters( 'nitropack_needs_htaccess_changes', false ); -
apply_filters( 'nitropack_oneclick_action_links', $nitroLinks ); -
apply_filters( 'nitropack_oneclick_connect_url', "" ); -
apply_filters( 'nitropack_oneclick_safemode_message', $safeModeMessage ); -
apply_filters( 'nitropack_oneclick_vendor_widget', "" ); -
apply_filters( 'nitropack_passes_cookie_requirements', $safeCookie && ( ! $isItemsInCart || $useCartOverride ) && ( ! $isUserLoggedIn ) ); -
nitropack_prevent_connect
filterapply_filters( 'nitropack_prevent_connect', $this->prevent_connecting( $nitro ) ); -
apply_filters( 'nitropack_remove_old_logs_interval', $seconds ); -
np_set_cookie_filter
actiondo_action( 'np_set_cookie_filter' ); -
do_action( 'set_nitropack_geo_cache_prefix' ); -
widget_output
filterapply_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: