diff --git a/co-authors-plus.php b/co-authors-plus.php index dde170db..0f7cfb30 100644 --- a/co-authors-plus.php +++ b/co-authors-plus.php @@ -1176,9 +1176,7 @@ public function search_authors( $search = '', $ignored_authors = array() ) { ), 'fields' => 'all_with_meta', ); - add_action( 'pre_user_query', array( $this, 'action_pre_user_query' ) ); $found_users = get_users( $args ); - remove_action( 'pre_user_query', array( $this, 'action_pre_user_query' ) ); foreach ( $found_users as $found_user ) { $term = $this->get_author_term( $found_user ); @@ -1223,17 +1221,6 @@ public function search_authors( $search = '', $ignored_authors = array() ) { return (array) $found_users; } - /** - * Modify get_users() to search display_name instead of user_nicename - */ - function action_pre_user_query( $user_query ) { - - if ( is_object( $user_query ) ) { - $user_query->query_where = str_replace( 'user_nicename LIKE', 'display_name LIKE', $user_query->query_where ); - } - - } - /** * Modify get_terms() to LIKE against the term description instead of the term name *