Last active
August 29, 2015 13:57
-
-
Save manchumahara/9910185 to your computer and use it in GitHub Desktop.
Search user in wordpress sidewide (at least at backend and if you use wp user query any where ) for user's display name , if you are here you know why I used this filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('user_search_columns', 'user_search_columns_bd' , 10, 3); | |
function user_search_columns_bd($search_columns, $search, $this){ | |
//if(!in_array($search_columns, 'display_name')){ | |
if(!in_array('display_name', $search_columns)){ | |
$search_columns[] = 'display_name'; | |
} | |
return $search_columns; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment