[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
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 |
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. 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 a font family. 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. |
validate_font_family_settings( $value, $request ) X-Ref |
Validates settings when creating or updating a font family. param: string $value Encoded JSON string of font family settings. param: WP_REST_Request $request Request object. return: true|WP_Error True if the settings are valid, otherwise a WP_Error object. |
sanitize_font_family_settings( $value ) X-Ref |
Sanitizes the font family settings when creating or updating a font family. param: string $value Encoded JSON string of font family settings. return: array Decoded array of font family settings. |
create_item( $request ) X-Ref |
Creates a single font family. 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. |
delete_item( $request ) X-Ref |
Deletes a single font family. 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. |
prepare_item_for_response( $item, $request ) X-Ref |
Prepares a single font family output for response. param: WP_Post $item Post object. param: WP_REST_Request $request Request object. return: WP_REST_Response Response 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. param: int $font_family_id Font family post ID. return: int[] Array of child font face post IDs. |
prepare_links( $post ) X-Ref |
Prepares font family links for the request. param: WP_Post $post Post object. return: array Links for the given post. |
prepare_font_face_links( $font_family_id ) X-Ref |
Prepares child font face links for the request. param: int $font_family_id Font family post ID. return: array Links for the child font face posts. |
prepare_item_for_database( $request ) X-Ref |
Prepares a single font family post for create or update. param: WP_REST_Request $request Request object. return: stdClass|WP_Error Post object or WP_Error. |
get_settings_from_post( $post ) X-Ref |
Gets the font family's settings from the post. param: WP_Post $post Font family post object. return: array Font family settings array. |
Generated : Thu Nov 21 08:20:01 2024 | Cross-referenced by PHPXref |