ACF_Field_User::ajax_query_result
Filters the AJAX Query result.
Метод класса: ACF_Field_User{}
Хуки из метода
Возвращает
Массив.
Использование
$ACF_Field_User = new ACF_Field_User(); $ACF_Field_User->ajax_query_result( $item, $user, $query );
- $item(массив) (обязательный)
- The choice id and text.
- $user(WP_User) (обязательный)
- The user object.
- $query(ACF_Ajax_Query) (обязательный)
- The query object.
Список изменений
| С версии 5.8.8 | Введена. |
Код ACF_Field_User::ajax_query_result() ACF Field User::ajax query result ACF 6.4.2
function ajax_query_result( $item, $user, $query ) {
/**
* Filters the result text.
*
* @date 21/5/19
* @since 5.8.1
*
* @param string The result text.
* @param WP_User $user The user object.
* @param array $field The ACF field related to this query.
* @param (int|string) $post_id The post_id being edited.
*/
$item['text'] = apply_filters( 'acf/fields/user/result', $item['text'], $user, $query->field, $query->post_id );
return $item;
}