Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/plugin.php

    r17638 r16955  
    136136
    137137    $args = array();
     138    $wp_current_filter[] = $tag;
    138139
    139140    // Do 'all' actions first
    140141    if ( isset($wp_filter['all']) ) {
    141         $wp_current_filter[] = $tag;
    142142        $args = func_get_args();
    143143        _wp_call_all_hook($args);
     
    145145
    146146    if ( !isset($wp_filter[$tag]) ) {
    147         if ( isset($wp_filter['all']) )
    148             array_pop($wp_current_filter);
     147        array_pop($wp_current_filter);
    149148        return $value;
    150149    }
    151 
    152     if ( !isset($wp_filter['all']) )
    153         $wp_current_filter[] = $tag;
    154150
    155151    // Sort
     
    198194    global $wp_filter, $merged_filters, $wp_current_filter;
    199195
     196    $wp_current_filter[] = $tag;
     197
    200198    // Do 'all' actions first
    201199    if ( isset($wp_filter['all']) ) {
    202         $wp_current_filter[] = $tag;
    203200        $all_args = func_get_args();
    204201        _wp_call_all_hook($all_args);
     
    206203
    207204    if ( !isset($wp_filter[$tag]) ) {
    208         if ( isset($wp_filter['all']) )
    209             array_pop($wp_current_filter);
     205        array_pop($wp_current_filter);
    210206        return $args[0];
    211207    }
    212 
    213     if ( !isset($wp_filter['all']) )
    214         $wp_current_filter[] = $tag;
    215208
    216209    // Sort
     
    368361        ++$wp_actions[$tag];
    369362
     363    $wp_current_filter[] = $tag;
     364
    370365    // Do 'all' actions first
    371366    if ( isset($wp_filter['all']) ) {
    372         $wp_current_filter[] = $tag;
    373367        $all_args = func_get_args();
    374368        _wp_call_all_hook($all_args);
     
    376370
    377371    if ( !isset($wp_filter[$tag]) ) {
    378         if ( isset($wp_filter['all']) )
    379             array_pop($wp_current_filter);
     372        array_pop($wp_current_filter);
    380373        return;
    381374    }
    382 
    383     if ( !isset($wp_filter['all']) )
    384         $wp_current_filter[] = $tag;
    385375
    386376    $args = array();
     
    457447        ++$wp_actions[$tag];
    458448
     449    $wp_current_filter[] = $tag;
     450
    459451    // Do 'all' actions first
    460452    if ( isset($wp_filter['all']) ) {
    461         $wp_current_filter[] = $tag;
    462453        $all_args = func_get_args();
    463454        _wp_call_all_hook($all_args);
     
    465456
    466457    if ( !isset($wp_filter[$tag]) ) {
    467         if ( isset($wp_filter['all']) )
    468             array_pop($wp_current_filter);
     458        array_pop($wp_current_filter);
    469459        return;
    470460    }
    471 
    472     if ( !isset($wp_filter['all']) )
    473         $wp_current_filter[] = $tag;
    474461
    475462    // Sort
Note: See TracChangeset for help on using the changeset viewer.