Actions allow you to hook into the plugin conditionally, so to add extra content, checks, or other functionality.
As of v4.2.0, The SEO Framework registers over 80 actions.
We urge checking out the code because it’s difficult to explain when and why any action runs.
So, instead of listing each action, you’ll only find the most essential action hooks below.
Last update: November 10th, 2021
Plugin loaded
These action hooks are for your convenience. So you won’t have to perform function_exists( 'tsf' )
checks in your plugins. They also allow you to unhook things from The SEO Framework before they get a chance to execute.
These hooks run before the theme is loaded; so, you must register these in plugins.
/**
* Runs after TSF is loaded in the admin.
* @since 3.1.0
*/
do_action( 'the_seo_framework_admin_loaded' );
/**
* Runs after TSF is loaded.
* @since 3.1.0
*/
do_action( 'the_seo_framework_loaded' );
Plugin init
These actions are for your convenience, too. Next to alleviating you from performing function_exists( 'the_seo_framework' )
checks, they allow you to register and deregister plugin actions.
They run after the theme is loaded, on init
, specifically; so, you can register these in themes, too.
/**
* Runs before the plugin is initialized.
* @since 2.8.0
*/
do_action( 'the_seo_framework_init' );
/**
* Runs after the plugin is initialized.
* Use this to remove filters and actions.
* @since 3.1.0
*/
do_action( 'the_seo_framework_after_init' );
/**
* Runs before the plugin is initialized in the admin screens.
* @since 2.8.0
*/
do_action( 'the_seo_framework_admin_init' );
/**
* Runs after the plugin is initialized in the admin screens.
* Use this to remove actions.
* @since 2.9.4
*/
do_action( 'the_seo_framework_after_admin_init' );
/**
* Runs before the plugin is initialized on the front-end.
* @since 2.8.0
*/
do_action( 'the_seo_framework_front_init' );
/**
* Runs after the plugin is initialized on the front-end.
* Use this to remove actions.
* @since 2.9.4
*/
do_action( 'the_seo_framework_after_front_init' );