This started out as a PHP regex experiment. I wanted to find the WordPress “action” hooks in a particular theme so that I can add my own action function to it.
So instead of searching through the whole lot of files for do_actions I sat down writing a regular expression to do this. I was very satisfied with the results which made me think about creating a tool to do this.
So here you go a standalone PHP script which seeps through the PHP code of the WordPress core, plugins, themes or anything you specify and gets you a list of actions and filters.
I use the word “standalone” because this isn’t a WordPress plugin or anything which requires WordPress functions. This is a script which uses a regex in preg_match_all() to find all “tag” names in the do_action() and apply_filters() function. This does not even require WordPress, if you want to find the hooks in a plugin just download the plugin, unzip it to a directory readable by this tool.
Download WordPress Hooks Search Tool | GitHubContinue Reading…