$schema['properties'
][ $base ] = array
( /* translators: %s: Taxonomy name. */
'description' =>
sprintf( __( 'The terms assigned to the post in the %s taxonomy.'
),
$taxonomy->name
),
'type' => 'array',
'items' => array
( 'type' => 'integer',
),
'context' => array
( 'view', 'edit'
),
);
} $schema_links =
$this->
get_schema_links();
if ( $schema_links ) { $schema['links'
] =
$schema_links;
} // Take a snapshot of which fields are in the schema pre-filtering.
$schema_fields =
array_keys( $schema['properties'
] );
/**
* Filters the post's schema.
*
* The dynamic portion of the filter, `$this->post_type`, refers to the
* post type slug for the controller.
*
* Possible hook names include:
*
* - `rest_post_item_schema`
* - `rest_page_item_schema`
* - `rest_attachment_item_schema`
*
* @since 5.4.0
*
* @param array $schema Item schema data.
*/