Wordpress/tests/qunit
Adam Silverstein 1b7475645a Add `wp.hooks` - JavaScript actions and filters.
Add a JavaScript hooks library with an API that mirrors the WordPress Plugin API; provides similar functionality and API to PHP hooks.

Called via the global `wp.hooks`, eg: `wp.hooks.addAction()`, etc. Adds:

* `addAction( 'hook', 'vendor/plugin/function', callback, priority )`
* `addFilter( 'hook', 'vendor/plugin/function', callback, priority )`
* `removeAction( 'hook', 'vendor/plugin/function' )`
* `removeFilter( 'hook',  'vendor/plugin/function' )`
* `removeAllActions( 'hook' )`
* `removeAllFilters( 'hook' )`
* `doAction( 'hook', arg1, arg2, moreArgs, finalArg )`
* `applyFilters( 'hook', content, arg1, arg2, moreArgs, finalArg )`
* `doingAction( 'hook' )`
* `doingFilter( 'hook' )`
* `didAction( 'hook' )`
* `didFilter( 'hook' )`
* `hasAction( 'hook' )`
* `hasFilter( 'hook' )`

Props adamsilverstein, jnylen0, aduth, kadamwhite, youknowriad, schlessera, mikeschinkel, azaozz, vhauri, CaptainN, scribu, carldanley, chetanchauhan, mgibbs189, stephenharris, justnorris, koopersmith, gcorne, TV productions, atimmer.

Fixes #21170.



git-svn-id: https://develop.svn.wordpress.org/trunk@41375 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-12 12:53:21 +00:00
..
fixtures REST API: Update the fixture data for `wp-api.js` tests. 2017-07-26 03:52:41 +00:00
vendor Customizer: Add QUnit tests for menus. 2015-08-03 19:27:27 +00:00
wp-admin/js Customize: Add global notifications area. 2017-09-12 07:02:49 +00:00
wp-includes/js Add `wp.hooks` - JavaScript actions and filters. 2017-09-12 12:53:21 +00:00
.jshintrc Various JSHint fixes. see #26446. 2014-02-08 00:51:14 +00:00
index.html Add `wp.hooks` - JavaScript actions and filters. 2017-09-12 12:53:21 +00:00