Download the PHP package wp-hooks/wordpress-core without Composer
On this page you can find all versions of the php package wp-hooks/wordpress-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wp-hooks/wordpress-core
More information about wp-hooks/wordpress-core
Files in wp-hooks/wordpress-core
Package wordpress-core
Short Description All the actions and filters from WordPress core in machine-readable JSON format.
License GPL-3.0-or-later
Informations about the package wordpress-core
WordPress Hooks Reference
All the actions and filters from WordPress core in machine-readable JSON format.
Last updated for WordPress 7.0.
Installation
-
As a Composer package for use in PHP:
- As an npm package for use in JavaScript or TypeScript:
Usage in PHP
Usage in JavaScript
Importing in TypeScript
Interfaces for the components of the hooks can be imported too, if you need them:
Actions, Filters, and Schemas
- The actions can be found in hooks/actions.json
- The filters can be found in hooks/filters.json
- The JSON schema can be found in hooks/schema.json
- The TypeScript interfaces can be found in interface/index.d.ts
What can I use this for?
Anything that needs programmatic access to a list of available hooks, for example:
- Autocomplete WordPress action and filter names in VS Code
- Autocomplete WordPress action and filter names in Vim
- WordPress plugin for Psalm
Regenerating the Hook Files
Change the roots/wordpress-full version in composer.json to one of:
- The required major version, such as
6.8 dev-mainfor nightlies prior to RC- An RC version, such as
6.9-RC1
Install the dependencies:
Then run:
During generation, a change and data integrity issues are saved in CHANGELOG.md and ISSUES.md respectively.
Hook Files for Plugins
Do you want the same hook files for your favourite plugins? The hook files in this repo are generated using wp-hooks-generator. It can generate hook files for WordPress plugins and themes as well as core.
Sponsors
The time that I spend maintaining this library and others is in part sponsored by:
Plus all my kind sponsors on GitHub:
Click here to find out about supporting my open source tools and plugins.
