wp-includes/rest-api/endpoints/class-wp-rest-abilities-v1-run-controller.php:82Executes an ability.
$requestWP_REST_RequestWP_REST_Response|WP_Error public function execute_ability( $request ) { $ability = wp_has_ability( $request['name'] ) ? wp_get_ability( $request['name'] ) : null; if ( ! $ability ) { return new WP_Error( 'rest_ability_not_found', __( 'Ability not found.' ), array( 'status' => 404 ) ); } $input = $this->get_input_from_request( $request ); $result = $ability->execute( $input ); if ( is_wp_error( $result ) ) { return $result; } return rest_ensure_response( $result ); }Introduced in 6.9.0. Unchanged from 6.9.7 through 7.1.0.
Signature, return type and hooks compared across 3 parsed releases.
src/wp-includes/rest-api/endpoints/class-wp-rest-abilities-v1-run-controller.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.