[ Index ] |
PHP Cross Reference of BuddyPress |
[Source view] [Print] [Project Stats]
Core REST API functions.
File Size: | 391 lines (10 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
bp_rest_is_plugin_active() X-Ref |
Is the BP REST plugin is active? return: boolean True if the BP REST plugin is active. False otherwise. since: 5.0.0 |
bp_rest_in_buddypress() X-Ref |
Should we use the REST Endpoints of built BuddyPress? If the BP REST plugin is active, it overrides BuddyPress REST enpoints. This allows us to carry on maintaining all the BP REST API endpoints from the BP REST plugin on GitHub. return: bool Whether to use the REST Endpoints of built BuddyPress. since: 5.0.0 |
bp_rest_api_is_available() X-Ref |
Check the availability of the BP REST API. return: boolean True if the BP REST API is available. False otherwise. since: 5.0.0 |
bp_rest_api_register_request_script() X-Ref |
Register the jQuery.ajax wrapper for BP REST API requests. since: 5.0.0 |
bp_rest_namespace() X-Ref |
BuddyPress REST API namespace. return: string since: 5.0.0 |
bp_rest_version() X-Ref |
BuddyPress REST API version. return: string since: 5.0.0 |
bp_rest_get_object_url( $object_id, $object_path ) X-Ref |
Get a REST API object URL from a component. return: string since: 9.0.0 param: integer $object_id Object ID. param: string $object_path Path of the component endpoint. |
bp_rest_response_add_total_headers( WP_REST_Response $response, $total = 0, $per_page = 0 ) X-Ref |
Set headers to let the Client Script be aware of the pagination. return: WP_REST_Response $response The response data. since: 5.0.0 param: WP_REST_Response $response The response data. param: integer $total The total number of found items. param: integer $per_page The number of items per page of results. |
bp_rest_prepare_date_response( $date_gmt, $date = null ) X-Ref |
Convert the input date to RFC3339 format. return: string|null ISO8601/RFC3339 formatted datetime. since: 5.0.0 param: string $date_gmt Date GMT format. param: string|null $date Optional. Date object. |
bp_rest_sanitize_member_types( $value ) X-Ref |
Clean up member_type input. return: array|null since: 5.0.0 param: string $value Comma-separated list of group types. |
bp_rest_validate_member_types( $value ) X-Ref |
Validate member_type input. return: WP_Error|boolean since: 5.0.0 param: mixed $value Mixed value. |
bp_rest_sanitize_group_types( $value ) X-Ref |
Clean up group_type input. return: array|null since: 5.0.0 param: string $value Comma-separated list of group types. |
bp_rest_validate_group_types( $value ) X-Ref |
Validate group_type input. return: WP_Error|bool since: 5.0.0 param: mixed $value Mixed value. |
bp_rest_sanitize_string_list( $list ) X-Ref |
Clean up an array, comma- or space-separated list of strings. return: array Sanitized array of strings. since: 5.0.0 param: array|string $list List of strings. |
bp_rest_get_user( $user_id ) X-Ref |
Get the user object, if the ID is valid. return: WP_User|boolean since: 5.0.0 param: int $user_id Supplied user ID. |
bp_rest_register_field( $component_id, $attribute, $args = array() X-Ref |
Registers a new field on an existing BuddyPress object. return: bool True if the field has been registered successfully. False otherwise. since: 5.0.0 param: string $component_id The name of the *active* component (eg: `activity`, `groups`, `xprofile`). param: string $attribute The attribute name. Required. param: array $args { param: string $object_type The xProfile object type to get. This parameter is only required for |
Generated: Wed Feb 5 01:01:01 2025 | Cross-referenced by PHPXref 0.7.1 |