Make WordPress Core


Ignore:
Timestamp:
11/14/2010 03:50:02 PM (13 years ago)
Author:
scribu
Message:

Improve hook readability via curly brackets. Props jjj for initial patch. Fixes #15422

File:
1 edited

Legend:

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

    r16322 r16365  
    13841384
    13851385    if ( 'edit' == $context ) {
    1386         $value = apply_filters("edit_term_$field", $value, $term_id, $taxonomy);
    1387         $value = apply_filters("edit_${taxonomy}_$field", $value, $term_id);
     1386        $value = apply_filters("edit_term_{$field}", $value, $term_id, $taxonomy);
     1387        $value = apply_filters("edit_{$taxonomy}_{$field}", $value, $term_id);
    13881388        if ( 'description' == $field )
    13891389            $value = format_to_edit($value);
     
    13911391            $value = esc_attr($value);
    13921392    } else if ( 'db' == $context ) {
    1393         $value = apply_filters("pre_term_$field", $value, $taxonomy);
    1394         $value = apply_filters("pre_${taxonomy}_$field", $value);
     1393        $value = apply_filters("pre_term_{$field}", $value, $taxonomy);
     1394        $value = apply_filters("pre_{$taxonomy}_{$field}", $value);
    13951395        // Back compat filters
    13961396        if ( 'slug' == $field )
     
    13981398
    13991399    } else if ( 'rss' == $context ) {
    1400         $value = apply_filters("term_${field}_rss", $value, $taxonomy);
    1401         $value = apply_filters("${taxonomy}_${field}_rss", $value);
     1400        $value = apply_filters("term_{$field}_rss", $value, $taxonomy);
     1401        $value = apply_filters("{$taxonomy}_{$field}_rss", $value);
    14021402    } else {
    14031403        // Use display filters by default.
    1404         $value = apply_filters("term_$field", $value, $term_id, $taxonomy, $context);
    1405         $value = apply_filters("${taxonomy}_$field", $value, $term_id, $context);
     1404        $value = apply_filters("term_{$field}", $value, $term_id, $taxonomy, $context);
     1405        $value = apply_filters("{$taxonomy}_{$field}", $value, $term_id, $context);
    14061406    }
    14071407
Note: See TracChangeset for help on using the changeset viewer.