Changeset 12464 for trunk/wp-includes/plugin.php
- Timestamp:
- 12/21/2009 08:47:34 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/plugin.php
r12090 r12464 300 300 global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter; 301 301 302 if ( is_array($wp_actions) ) 303 $wp_actions[] = $tag; 302 if ( ! isset($wp_actions) ) 303 $wp_actions = array(); 304 305 if ( ! isset($wp_actions[$tag]) ) 306 $wp_actions[$tag] = 1; 304 307 else 305 $wp_actions = array($tag);308 ++$wp_actions[$tag]; 306 309 307 310 $wp_current_filter[] = $tag; … … 358 361 global $wp_actions; 359 362 360 if ( empty($wp_actions) )363 if ( ! isset( $wp_actions ) || ! isset( $wp_actions[$tag] ) ) 361 364 return 0; 362 365 363 return count(array_keys($wp_actions, $tag));366 return $wp_actions[$tag]; 364 367 } 365 368 … … 383 386 global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter; 384 387 385 if ( !is_array($wp_actions) ) 386 $wp_actions = array($tag); 388 if ( ! isset($wp_actions) ) 389 $wp_actions = array(); 390 391 if ( ! isset($wp_actions[$tag]) ) 392 $wp_actions[$tag] = 1; 387 393 else 388 $wp_actions[] = $tag;394 ++$wp_actions[$tag]; 389 395 390 396 $wp_current_filter[] = $tag;
Note: See TracChangeset
for help on using the changeset viewer.