Super Page Cache 5.3.10 has 22 actions and 36 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 Super Page Cache fires an action
add_action( 'spc_after_settings_update', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Super Page Cache is about to use
add_filter( 'spc_max_critical_css_payload_bytes', 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
-
/** * Filter the maximum encoded critical CSS payload size. */ apply_filters( 'spc_max_critical_css_payload_bytes', self::MAX_CRITICAL_CSS_PAYLOAD_BYTES ); -
spc_preloader_excluded_urls
filter/** * Filters the URL patterns the preloader skips. */ apply_filters( 'spc_preloader_excluded_urls', is_array( $excluded_urls ) ? $excluded_urls : [] ); -
swcfpc_cacheable_media_types
filter/** * Filter the non-HTML media types Cloudflare may cache on cache-eligible URLs. */ apply_filters( 'swcfpc_cacheable_media_types', self::PUBLIC_DOCUMENT_MEDIA_TYPES ); -
swcfpc_download_media_types
filter/** * Filter the media types treated as file downloads on cache-eligible URLs. */ apply_filters( 'swcfpc_download_media_types', self::DOWNLOAD_MEDIA_TYPES ); -
/** * Filters whether a theme-level change should purge the whole cache. */ apply_filters( 'swcfpc_purge_cache_on_theme_edit', true, $current_action, $auto_purge_whole ); -
swcfpc_set_wp_cache_define
filter/** * Filter allow to change the value of WP_CACHE constant */ apply_filters( 'swcfpc_set_wp_cache_define', $turn_it_on ); -
product_spc_license_key
filterapply_filters( 'product_spc_license_key', false ); -
product_spc_license_plan
filterapply_filters( 'product_spc_license_plan', 0 ); -
product_spc_license_status
filterapply_filters( 'product_spc_license_status', 'invalid' ); -
apply_filters( 'swcfpc_fallback_cache_skip_unslashed', true, $_SERVER['REQUEST_URI'] ); -
apply_filters( 'swcfpc_normal_fallback_cache_html', $html, $cache_key ); -
{$handle}_inline_style
filterapply_filters( "{$handle}_inline_style", $inline_style, $handle ); -
apply_filters( 'spc_additional_settings_fields', $fields ); -
spc_after_settings_update
actiondo_action( 'spc_after_settings_update' ); -
apply_filters( 'spc_asset_manager_localization', array( 'api' => rest_url( Rest_Server::REST_NAMESPACE ), 'nonce' => wp_create_nonce( 'wp_rest' ), 'assets' => $this->get_current_page_assets(), 'currentContext' => $current_context, 'availableContexts' => $this->get_available_contexts( $current_context ), 'existingRules' => $this->get_existing_asset_rules(), 'otherExclusions' => ( new Asset_Exclusion_Handler() )->get_other_context_exclusions(),... ); -
apply_filters( 'spc_cache_tags_orchestrator_factory', null ); -
spc_dashboard_localization
filterapply_filters( 'spc_dashboard_localization', [ 'api' => rest_url( Rest_Server::REST_NAMESPACE ), 'nonce' => wp_create_nonce( 'wp_rest' ), 'version' => SWCFPC_VERSION, 'isPro' => defined( 'SPC_PRO_PATH' ), 'licenseData' => get_option( $this->sdk_service->get_license_option_key(), (object) [] ), 'logoURL' => Assets_Handler::get_image_url( 'logo.svg' ), 'i18n' => I18n::get_dashboard_translations(), 'displayWizard' => ! Settings_Store::get_in... ); -
apply_filters( 'spc_html_minifier_preserved_comment_markers', self::PRESERVED_COMMENT_MARKERS ); -
spc_html_modifier_parser_img
filterapply_filters( 'spc_html_modifier_parser_img', $parser, $id ); -
spc_lazyload_behaviours
filterapply_filters( 'spc_lazyload_behaviours', [ self::LAZY_LOAD_BEHAVIOUR_ALL => true, self::LAZY_LOAD_BEHAVIOUR_FIXED => true, ] ); -
spc_lazyload_bg_lazyload_css
filterapply_filters( 'spc_lazyload_bg_lazyload_css', strip_tags( implode( ",\n", $formatted_selectors ) . ' { background-image: none !important; }' ), $selectors ); -
spc_loaded_modules
filterapply_filters( 'spc_loaded_modules', $this->modules ); -
spc_purge_post_tags
actiondo_action( 'spc_purge_post_tags', (int) $post_id, $args ); -
spc_settings_override_map
filterapply_filters( 'spc_settings_override_map', [] ); -
apply_filters( 'spc_settings_overrides_enabled', false ); -
apply_filters( 'spc_speculative_loading_active', $is_available ); -
swcfpc_{$current_hook}
actiondo_action( "swcfpc_{$current_hook}" ); -
apply_filters( 'swcfpc_admin_third_party_compatibilities_view_map', [ 'woocommerce' => is_plugin_active( 'woocommerce/woocommerce.php' ), 'edd' => is_plugin_active( 'easy-digital-downloads/easy-digital-downloads.php' ), 'autoptimize' => is_plugin_active( 'autoptimize/autoptimize.php' ), 'w3tc' => is_plugin_active( 'w3-total-cache/w3-total-cache.php' ), 'litespeed_cache' => is_plugin_active( 'litespeed-cache/litespeed-cache.php' ), 'hummingbird' => is_plugin_act... ); -
do_action( 'swcfpc_advanced_cache_after_disable' ); -
do_action( 'swcfpc_advanced_cache_after_enable' ); -
do_action( 'swcfpc_after_create_cache_rule' ); -
do_action( 'swcfpc_after_delete_cache_rule' ); -
do_action( 'swcfpc_after_free_deactivation' ); -
do_action( 'swcfpc_after_plugin_upgrader_run' ); -
do_action( 'swcfpc_before_cache_rule_sync_start' ); -
apply_filters( 'swcfpc_bypass_cache_metabox_post_types', $allowed_post_types ); -
apply_filters( 'swcfpc_bypass_redirect_cache_buster', false, $location ); -
swcfpc_cache_bypass
filterapply_filters( 'swcfpc_cache_bypass', false ); -
do_action( 'swcfpc_cf_purge_cache_by_tags_after', $tags ); -
do_action( 'swcfpc_cf_purge_cache_by_tags_before', $tags ); -
do_action( 'swcfpc_cf_purge_cache_by_urls_after', $urls ); -
do_action( 'swcfpc_cf_purge_cache_by_urls_before', $urls ); -
do_action( 'swcfpc_cf_purge_whole_cache_after' ); -
do_action( 'swcfpc_cf_purge_whole_cache_before' ); -
apply_filters( 'swcfpc_curl_fallback_cache_html', $body, $cache_key ); -
do_action( 'swcfpc_fallback_cache_expired_url', $cache_key ); -
apply_filters( 'swcfpc_fallback_cache_ignored_query_params', $ignored_query_params ); -
do_action( 'swcfpc_fallback_cache_purged_all' ); -
do_action( 'swcfpc_fallback_cache_purged_url', $cache_key ); -
swcfpc_fc_modify_current_url
filterapply_filters( 'swcfpc_fc_modify_current_url', $current_uri ); -
swcfpc_ignored_query_params
filterapply_filters( 'swcfpc_ignored_query_params', Constants::IGNORED_QUERY_PARAMS ); -
swcfpc_purge_all
actiondo_action( 'swcfpc_purge_all' ); -
swcfpc_purge_urls
actiondo_action( 'swcfpc_purge_urls', $urls ); -
themeisle_internal_page
actiondo_action( 'themeisle_internal_page', SWCFPC_PRODUCT_SLUG, $hook ); -
apply_filters( 'themeisle_sdk_license_process_spc', $fields['key'], $fields['action'] ); -
themeisle_sdk_secret_masking
filterapply_filters( 'themeisle_sdk_secret_masking', $license ); -
wp_lazy_loading_enabled
filterapply_filters( 'wp_lazy_loading_enabled', true, 'img', 'spc_default_native_lazyloading' );
Generated from Super Page Cache'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: