68c8b9cf0f
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 |
||
---|---|---|
.. | ||
phpunit | ||
qunit |