The SEO Framework

★︎ My account
  • Extensions
  • Documentation
  • Blog
  • Pricing
Home › Documentation › Plugin API Documentation › Actions

Actions

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' );

Commercial

The SEO Framework
Trademark of CyberWire B.V.
Leidse Schouw 2
2408 AE Alphen a/d Rijn
The Netherlands
KvK: 83230076
BTW/VAT: NL862781322B01

Twitter  GitHub

Professional

Pricing
About
Support
Press

Rational

Privacy Policy
Terms and Conditions
Refund Policy

Practical

Documentation
TSF on WordPress
TSF on GitHub
TSFEM on here
TSFEM on GitHub
Feature Highlights

More likes in 2023 › The SEO Framework