[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/rest-api/endpoints/ -> class-wp-rest-font-collections-controller.php (summary)

Rest Font Collections Controller. This file contains the class for the REST API Font Collections Controller.

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

Defines 1 class

WP_REST_Font_Collections_Controller:: (9 methods):
  __construct()
  register_routes()
  get_items()
  get_item()
  prepare_item_for_response()
  get_item_schema()
  prepare_links()
  get_collection_params()
  get_items_permissions_check()


Class: WP_REST_Font_Collections_Controller  - X-Ref

Font Library Controller class.

__construct()   X-Ref
Constructor.


register_routes()   X-Ref
Registers the routes for the objects of the controller.


get_items( $request )   X-Ref
Gets the font collections available.

return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.

get_item( $request )   X-Ref
Gets a font collection.

return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
param: WP_REST_Request $request Full details about the request.

prepare_item_for_response( $item, $request )   X-Ref
Prepare a single collection output for response.

return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
param: WP_Font_Collection $item    Font collection object.
param: WP_REST_Request    $request Request object.

get_item_schema()   X-Ref
Retrieves the font collection's schema, conforming to JSON Schema.

return: array Item schema data.

prepare_links( $collection )   X-Ref
Prepares links for the request.

return: array Links for the given font collection.
param: WP_Font_Collection $collection Font collection data

get_collection_params()   X-Ref
Retrieves the search params for the font collections.

return: array Collection parameters.

get_items_permissions_check( $request )   X-Ref
Checks whether the user has permissions to use the Fonts Collections.

return: true|WP_Error True if the request has write access for the item, WP_Error object otherwise.



Generated : Sat Dec 21 08:20:01 2024 Cross-referenced by PHPXref