Retrieves a specific ability category.
Parameters
$requestWP_REST_Requestrequired- Full details about the request.
Source
public function get_item( $request ) {
$category = wp_get_ability_category( $request['slug'] );
if ( ! $category ) {
return new WP_Error(
'rest_ability_category_not_found',
__( 'Ability category not found.' ),
array( 'status' => 404 )
);
}
$data = $this->prepare_item_for_response( $category, $request );
return rest_ensure_response( $data );
}
Changelog
| Version | Description |
|---|---|
| 6.9.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.