[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

REST API: WP_REST_Icons_Controller class

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

Defines 1 class

WP_REST_Icons_Controller:: (10 methods):
  __construct()
  register_routes()
  get_items_permissions_check()
  get_item_permissions_check()
  get_items()
  get_item()
  get_icon()
  prepare_item_for_response()
  get_item_schema()
  get_collection_params()


Class: WP_REST_Icons_Controller  - X-Ref

Controller which provides a REST endpoint for the editor to read registered
icons. Icons are grouped into collections (the default one being `core`).

__construct()   X-Ref
Constructs the controller.


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


get_items_permissions_check($request)   X-Ref
Checks whether a given request has permission to read icons.

param: WP_REST_Request $request Full details about the request.
return: true|WP_Error True if the request has read access, WP_Error object otherwise.

get_item_permissions_check( $request )   X-Ref
Checks if a given request has access to read a specific icon.

param: WP_REST_Request $request Full details about the request.
return: true|WP_Error True if the request has read access for the item, WP_Error object otherwise.

get_items( $request )   X-Ref
Retrieves all icons, optionally scoped to a collection.

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

get_item( $request )   X-Ref
Retrieves a specific icon.

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

get_icon( $name )   X-Ref
Retrieves a specific icon from the registry.

param: string $name Icon name.
return: array|WP_Error Icon data on success, or WP_Error object on failure.

prepare_item_for_response( $item, $request )   X-Ref
Prepare a raw icon before it gets output in a REST API response.

param: array           $item    Raw icon as registered, before any changes.
param: WP_REST_Request $request Request object.
return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.

get_item_schema()   X-Ref
Retrieves the icon schema, conforming to JSON Schema.

return: array Item schema data.

get_collection_params()   X-Ref
Retrieves the query params for the icons collection.

return: array Collection parameters.



Generated : Fri Jul 24 08:20:19 2026 Cross-referenced by PHPXref