Make WordPress Core


Ignore:
Timestamp:
07/01/2017 02:21:50 PM (8 years ago)
Author:
boonebgorges
Message:

Allow user searches to match the display_name field.

Props bcole808, pcarvalho.
Fixes #39643.

File:
1 edited

Legend:

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

    r39915 r40982  
    523523
    524524            $search_columns = array();
    525             if ( $qv['search_columns'] )
    526                 $search_columns = array_intersect( $qv['search_columns'], array( 'ID', 'user_login', 'user_email', 'user_url', 'user_nicename' ) );
     525            if ( $qv['search_columns'] ) {
     526                $search_columns = array_intersect( $qv['search_columns'], array( 'ID', 'user_login', 'user_email', 'user_url', 'user_nicename', 'display_name' ) );
     527            }
    527528            if ( ! $search_columns ) {
    528529                if ( false !== strpos( $search, '@') )
Note: See TracChangeset for help on using the changeset viewer.