wp-includes/rest-api/endpoints/class-wp-rest-abilities-v1-list-controller.php:19Core controller used to access abilities via the REST API.
Every hook that fires from inside WP_REST_Abilities_V1_List_Controller, in the order it appears in the class, grouped by the method that fires it.
$namespacestringprotected$rest_basestringprotectedclass WP_REST_Abilities_V1_List_Controller extends WP_REST_Controller { /** * REST API namespace. * * @since 6.9.0 * @var string */ protected $namespace = 'wp-abilities/v1'; /** * REST API base route. * * @since 6.9.0 * @var string */ protected $rest_base = 'abilities'; /** * Registers the routes for abilities. * * @since 6.9.0 * * @see register_rest_route() */ public function register_routes(): void { register_rest_route( $this->namespace, '/' . $this->rest_base, array( array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_items' ), 'permission_callback' => array( $this, 'get_items_permissions_check' ), 'args' => $this->get_collection_params(), ), 'schema' => array( $this, 'get_public_item_schema' ), ) ); register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<name>[a-zA-Z0-9\-\/]+)', array( 'args' => array( 'name' => array( 'description' => __( 'Unique identifier for the ability.' ), 'type' => 'string', 'pattern' => '^[a-zA-Z0-9\-\/]+$', ), ), array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_item' ), 'permission_callback' => array( $this, 'get_item_permissions_check' ), ), 'schema' => array( $this, 'get_public_item_schema' ), ) ); } /** * Retrieves all abilities. * * @since 6.9.0 * * @param WP_REST_Request $request Full details about the request. * @return WP_REST_Response Response object on success. */ public function get_items( $request ) { $query_args = array( 'meta' => array( 'show_in_rest' => true ), ); if ( ! empty( $request['category'] ) ) { $query_args['category'] = $request['category']; } if ( ! empty( $request['namespace'] ) ) { $query_args['namespace'] = $request['namespace'];Introduced in 6.9.0. 3 changes between 6.9.7 and 7.1.0.
Signature, return type and hooks compared across 3 parsed releases.
normalize_schema_empty_object_defaults() removed.verified against sourcestrip_internal_schema_keywords() removed.verified against sourcestrip_internal_schema_keywords() added.verified against sourcesrc/wp-includes/rest-api/endpoints/class-wp-rest-abilities-v1-list-controller.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.