Socket
Socket
Sign inDemoInstall

@wordpress/hooks

Package Overview
Dependencies
Maintainers
8
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/hooks - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

7

build-module/createRunHook.js

@@ -47,9 +47,2 @@ /**

if (!hooks[hookName]) {
hooks[hookName] = {
runs: 0,
handlers: []
};
}
while (hookInfo.currentIndex < handlers.length) {

@@ -56,0 +49,0 @@ var handler = handlers[hookInfo.currentIndex];

@@ -54,9 +54,2 @@ "use strict";

if (!hooks[hookName]) {
hooks[hookName] = {
runs: 0,
handlers: []
};
}
while (hookInfo.currentIndex < handlers.length) {

@@ -63,0 +56,0 @@ var handler = handlers[hookInfo.currentIndex];

4

package.json
{
"name": "@wordpress/hooks",
"version": "2.0.2",
"version": "2.0.3",
"description": "WordPress hooks library.",

@@ -31,3 +31,3 @@ "author": "The WordPress Contributors",

},
"gitHead": "0aa5c4340f57a69ab935f9e819d74958aad2e022"
"gitHead": "308f6aa950705531ef9d360dc88bb9f4194542f5"
}

@@ -25,3 +25,3 @@ # Hooks

In the WordPress context, API functions can be called via the global `wp.hooks` like this `wp.hooks.addAction()`, etc.
In the WordPress context, API functions can be called via the global `wp.hooks` like this `wp.hooks.addAction()`, etc. One notable difference from the PHP API is that `addAction()` and `addFilter()` also need to include a namespace as the second argument.

@@ -31,6 +31,6 @@ ### API Usage

* `createHooks()`
* `addAction( 'hookName', 'functionName', callback, priority )`
* `addFilter( 'hookName', 'functionName', callback, priority )`
* `removeAction( 'hookName', 'functionName' )`
* `removeFilter( 'hookName', 'functionName' )`
* `addAction( 'hookName', 'namespace', 'functionName', callback, priority )`
* `addFilter( 'hookName', 'namespace', 'functionName', callback, priority )`
* `removeAction( 'hookName', 'namespace', 'functionName' )`
* `removeFilter( 'hookName', 'namespace', 'functionName' )`
* `removeAllActions( 'hookName' )`

@@ -37,0 +37,0 @@ * `removeAllFilters( 'hookName' )`

@@ -46,9 +46,2 @@ /**

if ( ! hooks[ hookName ] ) {
hooks[ hookName ] = {
runs: 0,
handlers: [],
};
}
while ( hookInfo.currentIndex < handlers.length ) {

@@ -55,0 +48,0 @@ const handler = handlers[ hookInfo.currentIndex ];

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc