mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
did_action() returns true the moment a hook is initially run, leaving you no way to tell if the hook is still in progress. Hooks can be nested and this checks the entire stack, versus current_filter() which only identifies the final hook in the stack. This commit also introduces current_action() for parity. To tell if a hook has completed, one can use did_action() and ! doing_action() together. The functions do not require an argument. In that situation, they indicate whether the stack is empty. props ericmann for the initial unit tests. fixes #14994. git-svn-id: https://develop.svn.wordpress.org/trunk@27294 602fd350-edb4-49c9-b593-d223f7449a82 |
||
|---|---|---|
| src | ||
| tests | ||
| tools/i18n | ||
| .editorconfig | ||
| .gitignore | ||
| .jshintrc | ||
| .travis.yml | ||
| Gruntfile.js | ||
| package.json | ||
| phpunit.xml.dist | ||
| wp-config-sample.php | ||
| wp-tests-config-sample.php | ||