
Security News
arXiv Is Rate Limiting Authors Following a Flood of AI Slop Submissions
arXiv now limits authors to two submissions a month as AI slop overwhelms moderators, delays good papers, and sparks debate over applying the limit to everyone.
@johnbillion/wp-hooks
Advanced tools
All the actions and filters from WordPress core in machine-readable JSON format.
All the actions and filters from WordPress core in machine-readable JSON format.
Last updated for WordPress 6.0.
composer require wp-hooks/wordpress-core
npm install @johnbillion/wp-hooks
// Get hooks as JSON:
$actions_json = file_get_contents( 'vendor/wp-hooks/wordpress-core/hooks/actions.json' );
$filters_json = file_get_contents( 'vendor/wp-hooks/wordpress-core/hooks/filters.json' );
// Convert hooks to PHP:
$actions = json_decode( $actions_json, true )['hooks'];
$filters = json_decode( $filters_json, true )['hooks'];
// Search for filters matching a string:
$search = 'permalink';
$results = array_filter( $filters, function( array $hook ) use ( $search ) {
return ( false !== strpos( $hook['name'], $search ) );
} );
var_dump( $results );
// Get hooks as array of objects:
const actions = require('@johnbillion/wp-hooks/hooks/actions.json').hooks;
const filters = require('@johnbillion/wp-hooks/hooks/filters.json').hooks;
// Search for actions matching a string:
const search = 'menu';
const results = actions.filter( hook => ( null !== hook.name.match( search ) ) );
console.log(results);
import { hooks as actions } from '@johnbillion/wp-hooks/hooks/actions.json';
import { hooks as filters } from '@johnbillion/wp-hooks/hooks/filters.json';
Interfaces for the components of the hooks can be imported too, if you need them:
import { Hooks, Hook, Doc, Tags, Tag } from '@johnbillion/wp-hooks/interface';
Anything that needs programmatic access to a list of available hooks, for example:
Change the roots/wordpress-full version in composer.json to the required WordPress version, or dev-nightly for nightly.
Install the dependencies:
npm i && composer i
Then run:
composer generate
Some scripts are available for checking the data:
npm run check
@since tags:
jq '.hooks[] | . as $d | .doc .tags | map(.name) | select( contains(["since"]) | not ) | $d' hooks/filters.json
jq '.hooks[] | . as $d | .doc .tags | map(.name) | select( contains(["since"]) | not ) | $d' hooks/actions.json
@param tags (not completely accurate, not sure why):
jq '.hooks[] | select( .args == ( .doc.tags | map(.name) | select( contains(["param"]) ) | length ) ) | .name' hooks/filters.json
jq '.hooks[] | select( .args == ( .doc.tags | map(.name) | select( contains(["param"]) ) | length ) ) | .name' hooks/actions.json
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.
The time that I spend maintaining this library and others is in part sponsored by:
Plus all my kind sponsors on GitHub:
FAQs
All the actions and filters from WordPress core in machine-readable JSON format.
The npm package @johnbillion/wp-hooks receives a total of 3 weekly downloads. As such, @johnbillion/wp-hooks popularity was classified as not popular.
We found that @johnbillion/wp-hooks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
arXiv now limits authors to two submissions a month as AI slop overwhelms moderators, delays good papers, and sparks debate over applying the limit to everyone.

Research
/Security News
A new GhostAction wave hits hundreds of GitHub repos, expanding CI/CD secret theft to cloud and AI credentials in source code and git history.

Research
/Security News
Tensorlake npm SDK version 0.5.144 was compromised in a ChainDrop / Shai-Hulud attack, delivering credential-stealing malware.