WordPress.org

Make WordPress Core

Changeset 20239


Ignore:
Timestamp:
03/21/2012 05:33:11 PM (10 years ago)
Author:
duck_
Message:

Remove unused $field_no_prefix variable and associated documentation from sanitize_user_field(). Fixes #20274.

File:
1 edited

Legend:

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

    r20085 r20239  
    10621062 *
    10631063 * @since 2.3.0
    1064  * @uses apply_filters() Calls 'edit_$field' and '{$field_no_prefix}_edit_pre' passing $value and
    1065  *  $user_id if $context == 'edit' and field name prefix == 'user_'.
    1066  *
    1067  * @uses apply_filters() Calls 'edit_user_$field' passing $value and $user_id if $context == 'db'.
    1068  * @uses apply_filters() Calls 'pre_$field' passing $value if $context == 'db' and field name prefix == 'user_'.
    1069  * @uses apply_filters() Calls '{$field}_pre' passing $value if $context == 'db' and field name prefix != 'user_'.
    1070  *
     1064 * @uses apply_filters() Calls 'edit_$field' passing $value and $user_id if $context == 'edit'.
     1065 *  $field is prefixed with 'user_' if it isn't already.
     1066 * @uses apply_filters() Calls 'pre_$field' passing $value if $context == 'db'. $field is prefixed with
     1067 *  'user_' if it isn't already.
    10711068 * @uses apply_filters() Calls '$field' passing $value, $user_id and $context if $context == anything
    1072  *  other than 'raw', 'edit' and 'db' and field name prefix == 'user_'.
    1073  * @uses apply_filters() Calls 'user_$field' passing $value if $context == anything other than 'raw',
    1074  *  'edit' and 'db' and field name prefix != 'user_'.
     1069 *  other than 'raw', 'edit' and 'db'. $field is prefixed with 'user_' if it isn't already.
    10751070 *
    10761071 * @param string $field The user Object field name.
     
    10921087        return $value;
    10931088
    1094     $prefixed = false;
    1095     if ( false !== strpos($field, 'user_') ) {
    1096         $prefixed = true;
    1097         $field_no_prefix = str_replace('user_', '', $field);
    1098     }
     1089    $prefixed = false !== strpos( $field, 'user_' );
    10991090
    11001091    if ( 'edit' == $context ) {
Note: See TracChangeset for help on using the changeset viewer.