Insert Headers And Footers icon
Analytics & Tracking

Insert Headers And Footers hooks reference

  • By Adnan
  • v3.2.0
  • Updated

Insert Headers And Footers 3.2.0 has 6 actions and 22 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 Insert Headers And Footers fires an action
add_action( 'wp_wpb_sdk_after_uninstall', function( $slug ) {
	// Your code runs here.
}, 10, 1 );

// Change a value Insert Headers And Footers is about to use
add_filter( 'wp_hnf_body_script', 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

  • wp-headers-and-footers.php line 472
    /**
     * Filter to add or exclude scripts to and from the frontend body.
     */
    apply_filters( 'wp_hnf_body_script', true );
  • wp-headers-and-footers.php line 454
    /**
     * Filter to add or exclude scripts to and from the frontend header.
     */
    apply_filters( 'wp_hnf_header_script', true );
  • lib/wpb-sdk/includes/class-wpb-opt-manager.php line 924
    /**
     * Filter allowed SDK opt-out setting keys for AJAX toggles.
     */
    apply_filters( 'wpb_sdk_allowed_opt_out_settings', $allowed, $this->slug );
  • lib/wpb-sdk/includes/wpb-sdk-essential-functions.php line 1032
    /**
     * Filter allowed page slugs for post-opt-in redirect.
     */
    apply_filters( 'wpb_sdk_allowed_redirect_page_slugs', $allowed, $slug, $module );
  • lib/wpb-sdk/includes/class-wpb-sdk-logger.php line 1710
    /**
     * Filter telemetry API base URL for a product.
     */
    apply_filters( 'wpb_sdk_api_endpoint', $endpoint, $slug );
  • lib/wpb-sdk/includes/wpb-sdk-essential-functions.php line 356
    /**
     * Filter products that use a custom opt-in form instead of
     * wpb-sdk-optin-form.php.
     */
    apply_filters( 'wpb_sdk_custom_optin_slugs', $custom, $slug );
  • lib/wpb-sdk/includes/wpb-sdk-essential-functions.php line 638
    /**
     * Filter template variables passed to opt-in view.
     */
    apply_filters( 'wpb_sdk_optin_template_vars', $optin_vars, $slug, $module );
  • lib/wpb-sdk/includes/wpb-sdk-essential-functions.php line 1687
    /**
     * Filter whether visiting the opt-in page should redirect away.
     */
    apply_filters( 'wpb_sdk_should_redirect_from_optin_page', 'yes' === $decision, $slug, $decision );
  • lib/wpb-sdk/includes/class-wpb-sdk-logger.php line 854 · used in 3 places
    do_action( 'wp_wpb_sdk_after_uninstall', $slug );
  • lib/wpb-sdk/includes/wpb-sdk-essential-functions.php line 1073 · used in 3 places
    apply_filters( 'wpb_sdk_optin_redirect_url', $url, $slug, $optin, $redirect_override );
  • lib/wpb-sdk/includes/class-wpb-sdk-logger.php line 192 · used in 2 places
    do_action( 'wpb_sdk_bootstrap_module', $slug );
  • wp-headers-and-footers.php line 92
    do_action( 'whaf_wpb56690683_loaded' );
  • lib/wpb-sdk/includes/wpb-sdk-essential-functions.php line 579
    apply_filters( "wpb_sdk_{$slug}_optin_view_path", $path, $module );
  • lib/wpb-sdk/includes/wpb-sdk-essential-functions.php line 775
    apply_filters( 'wpb_sdk_module_config', $module );
  • lib/wpb-sdk/includes/wpb-sdk-essential-functions.php line 2166
    apply_filters( 'wpb_sdk_optin_admin_user_id', $admin_id, $slug );
  • lib/wpb-sdk/includes/wpb-sdk-essential-functions.php line 477
    apply_filters( "wpb_sdk_optin_logo_url_{$slug}", $logo_url, $module );
  • lib/wpb-sdk/includes/class-wpb-sdk-optin-verification.php line 231
    do_action( 'wpb_sdk_optin_verified', $current_user, $module );
  • lib/wpb-sdk/includes/wpb-sdk-essential-functions.php line 574
    apply_filters( 'wpb_sdk_optin_view_path', $path, $slug, $module );
  • lib/wpb-sdk/includes/wpb-sdk-essential-functions.php line 3291
    apply_filters( 'wpb_sdk_plugin_main_file', '', $slug );
  • lib/wpb-sdk/includes/wpb-sdk-essential-functions.php line 1630
    apply_filters( 'wpb_sdk_should_cleanup_on_uninstall', true, $slug );
  • lib/wpb-sdk/includes/wpb-sdk-essential-functions.php line 2703
    apply_filters( 'wpb_sdk_site_used_centralized_sdk_32', false, $slug, $module );
  • lib/wpb-sdk/includes/wpb-sdk-essential-functions.php line 1613
    apply_filters( 'wpb_sdk_uninstall_option_names', $options, $slug );
  • lib/wpb-sdk/includes/wpb-sdk-essential-functions.php line 1614
    apply_filters( 'wpb_sdk_uninstall_user_meta_keys', array_values( array_unique( array_filter( $user_meta ) ) ), $slug );
  • classes/class-settings-api.php line 618
    do_action( "wsa_form_bottom_{$form['id']}", $form );
  • classes/class-settings-api.php line 615
    do_action( "wsa_form_top_{$form['id']}", $form );

Generated from Insert Headers And Footers'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: