WP_REST_Abilities_V1_Categories_Controller::get_item_schema
Retrieves the ability category's schema, conforming to JSON Schema.
Method of the class: WP_REST_Abilities_V1_Categories_Controller{}
No Hooks.
Returns
Array
Usage
$WP_REST_Abilities_V1_Categories_Controller = new WP_REST_Abilities_V1_Categories_Controller(); $WP_REST_Abilities_V1_Categories_Controller->get_item_schema(): array;
Changelog
| Since 6.9.0 | Introduced. |
WP_REST_Abilities_V1_Categories_Controller::get_item_schema() WP REST Abilities V1 Categories Controller::get item schema code WP 6.9.1
public function get_item_schema(): array {
$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'title' => 'ability-category',
'type' => 'object',
'properties' => array(
'slug' => array(
'description' => __( 'Unique identifier for the ability category.' ),
'type' => 'string',
'context' => array( 'view', 'edit', 'embed' ),
'readonly' => true,
),
'label' => array(
'description' => __( 'Display label for the category.' ),
'type' => 'string',
'context' => array( 'view', 'edit', 'embed' ),
'readonly' => true,
),
'description' => array(
'description' => __( 'Description of the category.' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'meta' => array(
'description' => __( 'Meta information about the category.' ),
'type' => 'object',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
),
);
return $this->add_additional_fields_schema( $schema );
}