[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-core/ -> bp-core-rest-api.php (summary)

Core REST API functions.

File Size: 394 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 16 functions

  bp_rest_is_plugin_active()
  bp_rest_in_buddypress()
  bp_rest_api_is_available()
  bp_rest_api_register_request_script()
  bp_rest_namespace()
  bp_rest_version()
  bp_rest_get_user_url()
  bp_rest_response_add_total_headers()
  bp_rest_prepare_date_response()
  bp_rest_sanitize_member_types()
  bp_rest_validate_member_types()
  bp_rest_sanitize_group_types()
  bp_rest_validate_group_types()
  bp_rest_sanitize_string_list()
  bp_rest_get_user()
  bp_rest_register_field()

Functions
Functions that are not part of a class:

bp_rest_is_plugin_active()   X-Ref
Is the BP REST plugin is active?

since: 5.0.0
return: boolean True if the BP REST plugin is active. False otherwise.

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.

since: 5.0.0
return: bool Whether to use the REST Endpoints of built BuddyPress.

bp_rest_api_is_available()   X-Ref
Check the availability of the BP REST API.

since: 5.0.0
return: boolean True if the BP REST API is available. False otherwise.

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.

since: 5.0.0
return: string

bp_rest_version()   X-Ref
BuddyPress REST API version.

since: 5.0.0
return: string

bp_rest_get_user_url( $user_id )   X-Ref
Get user URL.

since: 5.0.0
return: string
param: int $user_id User ID.

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.

since: 5.0.0
return: WP_REST_Response $response The response data.
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.

since: 5.0.0
return: string|null ISO8601/RFC3339 formatted datetime.
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.

since: 5.0.0
return: array|null
param: string $value Comma-separated list of group types.

bp_rest_validate_member_types( $value )   X-Ref
Validate member_type input.

since: 5.0.0
return: WP_Error|boolean
param: mixed $value Mixed value.

bp_rest_sanitize_group_types( $value )   X-Ref
Clean up group_type input.

since: 5.0.0
return: array|null
param: string $value Comma-separated list of group types.

bp_rest_validate_group_types( $value )   X-Ref
Validate group_type input.

since: 5.0.0
return: WP_Error|bool
param: mixed $value Mixed value.

bp_rest_sanitize_string_list( $list )   X-Ref
Clean up an array, comma- or space-separated list of strings.

since: 5.0.0
return: array Sanitized array of strings.
param: array|string $list List of strings.

bp_rest_get_user( $user_id )   X-Ref
Get the user object, if the ID is valid.

since: 5.0.0
return: WP_User|boolean
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.

since: 5.0.0
return: bool                True if the field has been registered successfully. False otherwise.
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: Thu Apr 2 01:01:33 2020 Cross-referenced by PHPXref 0.7.1