[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
REST API run controller for Abilities API.
File Size: | 244 lines (7 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_REST_Abilities_V1_Run_Controller:: (7 methods):
register_routes()
execute_ability()
validate_request_method()
check_ability_permissions()
get_input_from_request()
get_run_args()
get_run_schema()
Class: WP_REST_Abilities_V1_Run_Controller - X-Ref
Core controller used to execute abilities via the REST API.register_routes() X-Ref |
Registers the routes for ability execution. |
execute_ability( $request ) X-Ref |
Executes an ability. 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. |
validate_request_method( string $request_method, array $annotations ) X-Ref |
Validates if the HTTP method matches the expected method for the ability based on its annotations. return: true|WP_Error True on success, or WP_Error object on failure. param: string $request_method The HTTP method of the request. param: array<string, (null|bool)> $annotations The ability annotations. |
check_ability_permissions( $request ) X-Ref |
Checks if a given request has permission to execute a specific ability. return: true|WP_Error True if the request has execution permission, WP_Error object otherwise. param: WP_REST_Request $request Full details about the request. |
get_input_from_request( $request ) X-Ref |
Extracts input parameters from the request. return: mixed|null The input parameters. param: WP_REST_Request $request The request object. |
get_run_args() X-Ref |
Retrieves the arguments for ability execution endpoint. return: array<string, mixed> Arguments for the run endpoint. |
get_run_schema() X-Ref |
Retrieves the schema for ability execution endpoint. return: array<string, mixed> Schema for the run endpoint. |
Generated : Thu Oct 23 08:20:05 2025 | Cross-referenced by PHPXref |