Méthode | Description | |
---|---|---|
__construct ( ) | Constructor. | |
get_collection_params ( ) : array | Retrieves the query params for collections. | |
get_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | Retrieves a specific post status. | |
get_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | Checks if a given request has access to read a post status. | |
get_item_schema ( ) : array | Retrieves the post status' schema, conforming to JSON Schema. | |
get_items ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | Retrieves all post statuses, depending on user context. | |
get_items_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | Checks whether a given request has permission to read post statuses. | |
prepare_item_for_response ( stdClass $status, WP_REST_Request $request ) : WP_REST_Response | Prepares a post status object for serialization. | |
register_routes ( ) | Registers the routes for the objects of the controller. |
Méthode | Description | |
---|---|---|
check_read_permission ( object $status ) : boolean | Checks whether a given post status should be visible. |
protected check_read_permission ( object $status ) : boolean | ||
$status | object | Post status. |
Résultat | boolean | True if the post status is visible, otherwise false. |
public get_collection_params ( ) : array | ||
Résultat | array | Collection parameters. |
public get_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | ||
$request | WP_REST_Request | Full details about the request. |
Résultat | WP_Error | WP_REST_Response | Response object on success, or WP_Error object on failure. |
public get_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | ||
$request | WP_REST_Request | Full details about the request. |
Résultat | WP_Error | boolean | True if the request has read access for the item, WP_Error object otherwise. |
public get_item_schema ( ) : array | ||
Résultat | array | Item schema data. |
public get_items ( WP_REST_Request $request ) : WP_Error | WP_REST_Response | ||
$request | WP_REST_Request | Full details about the request. |
Résultat | WP_Error | WP_REST_Response | Response object on success, or WP_Error object on failure. |
public get_items_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | ||
$request | WP_REST_Request | Full details about the request. |
Résultat | WP_Error | boolean | True if the request has read access, WP_Error object otherwise. |
public prepare_item_for_response ( stdClass $status, WP_REST_Request $request ) : WP_REST_Response | ||
$status | stdClass | Post status data. |
$request | WP_REST_Request | Full details about the request. |
Résultat | WP_REST_Response | Post status data. |
public register_routes ( ) |