BP_REST_XProfile_Search_Form_Fields_Endpoint:: get_item (WP_REST_Request美元的请求

检索XProfile搜索表单字段。

描述

参数

美元的请求

WP_REST_Request(必需)关于请求的完整数据。

返回

(WP_REST_Response)

文件:bp-xprofile /类/ class-bp-rest-xprofile-search-form-fields-endpoint.php

Public function get_items($request) {if (empty($request['form_id']) {$args['form_id'] = bp_profile_search_main_form(); / /获取用户信息} /** *过滤请求的查询参数。* * @param array $args查询变量的关键值数组。@param WP_REST_Request $request发送给API的请求。* * @since 0.1.0 */ $args = apply_filters('bp_rest_xprofile_search_form_fields_get_items_query_args', $args, $request);//实际上,查询它。$f = bp_profile_search_escaped_form_data($args['form_id']);$response = rest_ensure_response($f);/** *通过REST API获取字段列表后触发。* * @param array $field_groups获取字段组。 * @param WP_REST_Response $response The response data. * @param WP_REST_Request $request The request sent to the API. * * @since 0.1.0 */ do_action( 'bp_rest_xprofile_search_form_fields_get_items', $response, $request ); return $response; }

更新日志

更新日志
版本 描述
0.1.0 介绍了。

问题吗?

我们总是很乐意帮助您解决代码或其他问题!搜索我们的开发人员文档联络支持,或与我们联系销售团队