WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/14/2010 03:50:02 PM (9 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/user.php

    r16353 r16365  
    11491149 *
    11501150 * @since 2.3.0
    1151  * @uses apply_filters() Calls 'edit_$field' and '${field_no_prefix}_edit_pre' passing $value and
     1151 * @uses apply_filters() Calls 'edit_$field' and '{$field_no_prefix}_edit_pre' passing $value and
    11521152 *  $user_id if $context == 'edit' and field name prefix == 'user_'.
    11531153 *
    11541154 * @uses apply_filters() Calls 'edit_user_$field' passing $value and $user_id if $context == 'db'.
    11551155 * @uses apply_filters() Calls 'pre_$field' passing $value if $context == 'db' and field name prefix == 'user_'.
    1156  * @uses apply_filters() Calls '${field}_pre' passing $value if $context == 'db' and field name prefix != 'user_'.
     1156 * @uses apply_filters() Calls '{$field}_pre' passing $value if $context == 'db' and field name prefix != 'user_'.
    11571157 *
    11581158 * @uses apply_filters() Calls '$field' passing $value, $user_id and $context if $context == anything
     
    11871187    if ( 'edit' == $context ) {
    11881188        if ( $prefixed ) {
    1189             $value = apply_filters("edit_$field", $value, $user_id);
     1189            $value = apply_filters("edit_{$field}", $value, $user_id);
    11901190        } else {
    1191             $value = apply_filters("edit_user_$field", $value, $user_id);
     1191            $value = apply_filters("edit_user_{$field}", $value, $user_id);
    11921192        }
    11931193
     
    11981198    } else if ( 'db' == $context ) {
    11991199        if ( $prefixed ) {
    1200             $value = apply_filters("pre_$field", $value);
     1200            $value = apply_filters("pre_{$field}", $value);
    12011201        } else {
    1202             $value = apply_filters("pre_user_$field", $value);
     1202            $value = apply_filters("pre_user_{$field}", $value);
    12031203        }
    12041204    } else {
     
    12071207            $value = apply_filters($field, $value, $user_id, $context);
    12081208        else
    1209             $value = apply_filters("user_$field", $value, $user_id, $context);
     1209            $value = apply_filters("user_{$field}", $value, $user_id, $context);
    12101210    }
    12111211
Note: See TracChangeset for help on using the changeset viewer.