Make sure wp_actions is set before counting.
git-svn-id: https://develop.svn.wordpress.org/trunk@5413 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3ae3baa8ff
commit
23018b434d
@ -173,6 +173,9 @@ function do_action($tag, $arg = '') {
|
||||
function did_action($tag) {
|
||||
global $wp_actions;
|
||||
|
||||
if ( empty($wp_actions) )
|
||||
return 0;
|
||||
|
||||
return count(array_keys($wp_actions, $tag));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user