Changeset 5409
- Timestamp:
- 05/07/07 23:22:50 (1 year ago)
- Files:
-
- trunk/wp-includes/plugin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/plugin.php
r5393 r5409 139 139 global $wp_filter, $wp_actions; 140 140 141 if ( is_array($wp_actions) ) 142 $wp_actions[] = $tag; 143 else 144 $wp_actions = array($tag); 145 141 146 $args = array(); 142 147 if ( is_array($arg) && 1 == count($arg) && is_object($arg[0]) ) // array(&$this) … … 159 164 } while ( next($wp_filter[$tag]) ); 160 165 161 if ( is_array($wp_actions) ) 162 $wp_actions[] = $tag; 163 else 164 $wp_actions = array($tag); 165 } 166 167 /** 168 * Return the number of functions hooked to a specific action hook. 166 } 167 168 /** 169 * Return the number times an action is fired. 169 170 * @param string $tag The name of the action hook. 170 * @return int The number of functions hooked to action hook <tt>$tag</tt>171 * @return int The number of times action hook <tt>$tag</tt> is fired 171 172 */ 172 173 function did_action($tag) {
