Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: user_search_columns

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
469                 * The default columns depend on the search term, and include 'user_email',
470                 * 'user_login', 'ID', 'user_url', 'display_name', and 'user_nicename'.
471                 *
472                 * @since 3.6.0
473                 *
474                 * @param array         $search_columns Array of column names to be searched.
475                 * @param string        $search         Text being searched.
476                 * @param WP_User_Query $this           The current WP_User_Query instance.
477                 */
478                $search_columns = apply_filters( 'user_search_columns', $search_columns, $search, $this );
479
480                $this->query_where .= $this->get_search_sql( $search, $search_columns, $wild );
481           }
482
483           if ( ! empty( $include ) ) {
484                // Sanitized earlier.
485                $ids = implode( ',', $include );
486                $this->query_where .= " AND $wpdb->users.ID IN ($ids)";
487           } elseif ( ! empty( $qv['exclude'] ) ) {