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
807                 * The default columns depend on the search term, and include 'user_email',
808                 * 'user_login', 'ID', 'user_url', 'display_name', and 'user_nicename'.
809                 *
810                 * @since 3.6.0
811                 *
812                 * @param array         $search_columns Array of column names to be searched.
813                 * @param string        $search         Text being searched.
814                 * @param WP_User_Query $this           The current WP_User_Query instance.
815                 */
816                $search_columns = apply_filters( 'user_search_columns', $search_columns, $search, $this );
817
818                $this->query_where .= $this->get_search_sql( $search, $search_columns, $wild );
819           }
820
821           if ( ! empty( $include ) ) {
822                // Sanitized earlier.
823                $ids = implode( ',', $include );
824                $this->query_where .= " AND $wpdb->users.ID IN ($ids)";
825           } elseif ( ! empty( $qv['exclude'] ) ) {