WPDev.one
Core Class

WP_REST_Font_Faces_Controller

class WP_REST_Font_Faces_Controller // Constructor: function Object() { [native code] }

Class to access font faces through the REST API.

Methods 22 methods

Method / Return Description
register_routes()
void

Registers the routes for posts.

get_items_permissions_check()
(true

Checks if a given request has access to font faces.

Parameters: $request: mixed
get_item_permissions_check()
(true

Checks if a given request has access to a font face.

Parameters: $request: mixed
validate_create_font_face_settings()
(true

Validates settings when creating a font face.

Parameters: $value: mixed, $request: mixed
sanitize_font_face_settings()
array

Sanitizes the font face settings when creating a font face.

Parameters: $value: mixed
get_items()
(WP_REST_Response

Retrieves a collection of font faces within the parent font family.

Parameters: $request: mixed
get_item()
(WP_REST_Response

Retrieves a single font face within the parent font family.

Parameters: $request: mixed
create_item()
(WP_REST_Response

Creates a font face for the parent font family.

Parameters: $request: mixed
delete_item()
(WP_REST_Response

Deletes a single font face.

Parameters: $request: mixed
prepare_item_for_response()
WP_REST_Response

Prepares a single font face output for response.

Parameters: $item: mixed, $request: mixed
get_item_schema()
array

Retrieves the post's schema, conforming to JSON Schema.

get_public_item_schema()
array

Retrieves the item's schema for display / public consumption purposes.

get_collection_params()
array

Retrieves the query params for the font face collection.

get_create_params()
array

Get the params used when creating a new font face.

get_parent_font_family_post()
(WP_Post

Get the parent font family, if the ID is valid.

Parameters: $font_family_id: mixed
prepare_links()
array

Prepares links for the request.

Parameters: $post: mixed
prepare_item_for_database()
stdClass

Prepares a single font face post for creation.

Parameters: $request: mixed
sanitize_src()
string

Sanitizes a single src value for a font face.

Parameters: $value: mixed
handle_font_file_upload()
(array

Handles the upload of a font file using wp_handle_upload().

Parameters: $file: mixed
handle_font_file_upload_error()
WP_Error

Handles file upload error.

Parameters: $file: mixed, $message: mixed
relative_fonts_path()
string

Returns relative path to an uploaded font file.

Parameters: $path: mixed
get_settings_from_post()
array

Gets the font face's settings from the post.

Parameters: $post: mixed

Properties

Property / Type Description
$allow_batch
mixed
public
No description available.

Class Information

Source File
wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php
Advertisement