acf/fields/user/search_columns
Filters the column names to be searched.
Использование
add_filter( 'acf/fields/user/search_columns', 'wp_kama_acf_fields_user_search_columns_filter', 10, 4 ); /** * Function for `acf/fields/user/search_columns` filter-hook. * * @param array $columns An array of column names to be searched. * @param string $search The search term. * @param WP_User_Query $WP_User_Query The WP_User_Query instance. * @param array $field The ACF field related to this query. * * @return array */ function wp_kama_acf_fields_user_search_columns_filter( $columns, $search, $WP_User_Query, $field ){ // filter... return $columns; }
- $columns(массив)
- An array of column names to be searched.
- $search(строка)
- The search term.
- $WP_User_Query(WP_User_Query)
- The WP_User_Query instance.
- $field(массив)
- The ACF field related to this query.
Список изменений
С версии 5.8.1 | Введена. |
Где вызывается хук
acf/fields/user/search_columns
acf/includes/fields/class-acf-field-user.php 425
return apply_filters( 'acf/fields/user/search_columns', $columns, $search, $WP_User_Query, $query->field );