List of WordPress filters and hooks


You can get list of all registered filters and hooks in wordpress using global variables  $wp_filter and $wp_actions. Please see following example.

Example 1
global $wp_filter , $wp_actions;

echo '<pre>';
    print_r( $wp_actions );
    print_r( $wp_filter );
echo '</pre>';

If you want to get list of a specific filter then use as follows example.

Example 2
gloabl $wp_filter;
$spec_filter = 'the_content';

echo '<pre>';
    print_r( $wp_filter[ $spec_filter ] );
echo '</pre>';
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s