PHP Class WP_REST_Taxonomies_Controller, wordpress

See also: WP_REST_Controller
Since: 4.7.0
Inheritance: extends WP_REST_Controller
ファイルを表示 Open project: johnpbloch/wordpress Class Usage Examples

Public Methods

Method Description
__construct ( ) Constructor.
get_collection_params ( ) : array Retrieves the query params for collections.
get_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Retrieves a specific taxonomy.
get_item_permissions_check ( WP_REST_Request $request ) : true | WP_Error Checks if a given request has access to a taxonomy.
get_item_schema ( ) : array Retrieves the taxonomy's schema, conforming to JSON Schema.
get_items ( WP_REST_Request $request ) : WP_REST_Response Retrieves all public taxonomies.
get_items_permissions_check ( WP_REST_Request $request ) : true | WP_Error Checks whether a given request has permission to read taxonomies.
prepare_item_for_response ( stdClass $taxonomy, WP_REST_Request $request ) : WP_REST_Response Prepares a taxonomy object for serialization.
register_routes ( ) Registers the routes for the objects of the controller.

Method Details

__construct() public method

Constructor.
Since: 4.7.0
public __construct ( )

get_collection_params() public method

Retrieves the query params for collections.
Since: 4.7.0
public get_collection_params ( ) : array
return array Collection parameters.

get_item() public method

Retrieves a specific taxonomy.
Since: 4.7.0
public get_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
return WP_REST_Response | WP_Error Response object on success, or WP_Error object on failure.

get_item_permissions_check() public method

Checks if a given request has access to a taxonomy.
Since: 4.7.0
public get_item_permissions_check ( WP_REST_Request $request ) : true | WP_Error
$request WP_REST_Request Full details about the request.
return true | WP_Error True if the request has read access for the item, otherwise false or WP_Error object.

get_item_schema() public method

Retrieves the taxonomy's schema, conforming to JSON Schema.
Since: 4.7.0
public get_item_schema ( ) : array
return array Item schema data.

get_items() public method

Retrieves all public taxonomies.
Since: 4.7.0
public get_items ( WP_REST_Request $request ) : WP_REST_Response
$request WP_REST_Request Full details about the request.
return WP_REST_Response Response object on success, or WP_Error object on failure.

get_items_permissions_check() public method

Checks whether a given request has permission to read taxonomies.
Since: 4.7.0
public get_items_permissions_check ( WP_REST_Request $request ) : true | WP_Error
$request WP_REST_Request Full details about the request.
return true | WP_Error True if the request has read access, WP_Error object otherwise.

prepare_item_for_response() public method

Prepares a taxonomy object for serialization.
Since: 4.7.0
public prepare_item_for_response ( stdClass $taxonomy, WP_REST_Request $request ) : WP_REST_Response
$taxonomy stdClass Taxonomy data.
$request WP_REST_Request Full details about the request.
return WP_REST_Response Response object.

register_routes() public method

Registers the routes for the objects of the controller.
See also: register_rest_route()
Since: 4.7.0
public register_routes ( )