acf/ajax/query_users/search_columns
Filters the column names to be searched.
Использование
add_filter( 'acf/ajax/query_users/search_columns', 'wp_kama_acf_ajax_query_users_search_columns_filter', 10, 4 ); /** * Function for `acf/ajax/query_users/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 ACF_Ajax_Query $query The query object. * * @return array */ function wp_kama_acf_ajax_query_users_search_columns_filter( $columns, $search, $WP_User_Query, $query ){ // 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.
- $query(ACF_Ajax_Query)
- The query object.
Список изменений
С версии 5.8.1 | Введена. |
Где вызывается хук
acf/ajax/query_users/search_columns
acf/includes/ajax/class-acf-ajax-query-users.php 269
return apply_filters( 'acf/ajax/query_users/search_columns', $columns, $search, $WP_User_Query, $this );
Где используется хук в Advanced Custom Fields PRO
acf/includes/fields/class-acf-field-user.php 342
add_filter( 'acf/ajax/query_users/search_columns', array( $this, 'ajax_query_search_columns' ), 10, 4 );