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