WordPress Hooks Intellisense for VS Code
This extension provides intellisense and autocomplete for WordPress hooks, actions, and filters.
Start typing the name of a WordPress action or filter within
Autocomplete is also provided for the callback function. It's contextually aware and provides options for a function, a class method, a closure, an arrow function, and WordPress' built-in utility functions:
An autocompleted closure callback looks like this:
Hover information for an action or filter name looks like this:
Which functions does the autocomplete list and hover information work with?
How can I trigger the autocomplete list if it doesn't show up?
Place your cursor within the first parameter of one of the supported functions, eg
Can I disable or adjust the type declarations / type hints / docblock?
Yes, open the preferences for VS Code and go to the Extensions -> WordPress Hooks Intellisense section.
Where does the list of hook names come from?
They're generated directly from the WordPress core software and updated in time for each new release. They're bundled with this extension so there's no requirement for your project to include WordPress if you don't want to, and the extension doesn't scan the files in your project looking for actions and filters.
The time that I spend maintaining this extension and other tools is in part sponsored by:
Plus all my kind sponsors on GitHub:
Click here to find out about supporting this extension and my other WordPress development tools and plugins.
This extension is free and open source software. It's licensed under the GNU GPL version 3.