Title: Print all WordPress hooks
Author: Alex Kirk
Published: January 11, 2021

---

# Print all WordPress hooks

January 11, 2021

Ever needed to print out all the hooks in the sequence they are being called (for
example to find a good hook to modify a particular behavior)?

    ```wp-block-code
    add_filter( 'all', function( $tag ) {
    	echo "apply_filters($tag)<br/>";
    } );
    add_action( 'all', function( $tag ) {
    	echo "do_action($tag)<br/>";
    } );
    ```

Is a quick and easy way to do this via a small modification in `wp-settings.php`(
after `plugin.php` is included).

###### Fediverse reactions

[Web](https://alex.kirk.at/category/web/)

Read this next

[Previous Post](https://alex.kirk.at/2020/12/22/290352/)

![Alex Kirk](https://alex.kirk.at/wp-content/uploads/sites/2/2025/06/cropped-2025.
Alex-512x512-1-120x120.jpg)

Alex Kirk

@alex@alex.kirk.at

 **272** posts

 **279** followers

### Leave a Reply 󠀁[Cancel reply](https://alex.kirk.at/2021/01/11/print-all-wordpress-hooks/?output_format=md#respond)󠁿

Your email address will not be published. Required fields are marked *

Comment *

Name *

Email *

Website

Δ

This site uses Akismet to reduce spam. [Learn how your comment data is processed.](https://akismet.com/privacy/)