[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

REST API: WP_REST_Font_Families_Controller class

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

Defines 1 class

WP_REST_Font_Families_Controller:: (16 methods):
  get_items_permissions_check()
  get_item_permissions_check()
  validate_font_family_settings()
  sanitize_font_family_settings()
  create_item()
  delete_item()
  prepare_item_for_response()
  get_item_schema()
  get_public_item_schema()
  get_collection_params()
  get_endpoint_args_for_item_schema()
  get_font_face_ids()
  prepare_links()
  prepare_font_face_links()
  prepare_item_for_database()
  get_settings_from_post()


Class: WP_REST_Font_Families_Controller  - X-Ref

Font Families Controller class.

get_items_permissions_check( $request )   X-Ref
Checks if a given request has access to font families.

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

get_item_permissions_check( $request )   X-Ref
Checks if a given request has access to a font family.

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

validate_font_family_settings( $value, $request )   X-Ref
Validates settings when creating or updating a font family.

return: true|WP_Error True if the settings are valid, otherwise a WP_Error object.
param: string          $value   Encoded JSON string of font family settings.
param: WP_REST_Request $request Request object.

sanitize_font_family_settings( $value )   X-Ref
Sanitizes the font family settings when creating or updating a font family.

return: array Decoded array of font family settings.
param: string $value Encoded JSON string of font family settings.

create_item( $request )   X-Ref
Creates a single font family.

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.

delete_item( $request )   X-Ref
Deletes a single font family.

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
Prepares a single font family output for response.

return: WP_REST_Response Response object.
param: WP_Post         $item    Post object.
param: WP_REST_Request $request Request object.

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

return: array Item schema data.

get_public_item_schema()   X-Ref
Retrieves the item's schema for display / public consumption purposes.

return: array Public item schema data.

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

return: array Collection parameters.

get_endpoint_args_for_item_schema( $method = WP_REST_Server::CREATABLE )   X-Ref
Get the arguments used when creating or updating a font family.

return: array Font family create/edit arguments.

get_font_face_ids( $font_family_id )   X-Ref
Get the child font face post IDs.

return: int[] Array of child font face post IDs.
param: int $font_family_id Font family post ID.

prepare_links( $post )   X-Ref
Prepares font family links for the request.

return: array Links for the given post.
param: WP_Post $post Post object.

prepare_font_face_links( $font_family_id )   X-Ref
Prepares child font face links for the request.

return: array Links for the child font face posts.
param: int $font_family_id Font family post ID.

prepare_item_for_database( $request )   X-Ref
Prepares a single font family post for create or update.

return: stdClass|WP_Error Post object or WP_Error.
param: WP_REST_Request $request Request object.

get_settings_from_post( $post )   X-Ref
Gets the font family's settings from the post.

return: array Font family settings array.
param: WP_Post $post Font family post object.



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