mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Make sure wp_actions is set before counting.
git-svn-id: http://svn.automattic.com/wordpress/trunk@5413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bbad336b10
commit
627725be1a
@ -173,6 +173,9 @@ function do_action($tag, $arg = '') {
|
|||||||
function did_action($tag) {
|
function did_action($tag) {
|
||||||
global $wp_actions;
|
global $wp_actions;
|
||||||
|
|
||||||
|
if ( empty($wp_actions) )
|
||||||
|
return 0;
|
||||||
|
|
||||||
return count(array_keys($wp_actions, $tag));
|
return count(array_keys($wp_actions, $tag));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user