WP_REST_Font_Families_Controller::get_public_item_schema
Retrieves the item's schema for display / public consumption purposes.
Method of the class: WP_REST_Font_Families_Controller{}
No Hooks.
Returns
Array. Public item schema data.
Usage
$WP_REST_Font_Families_Controller = new WP_REST_Font_Families_Controller(); $WP_REST_Font_Families_Controller->get_public_item_schema();
Changelog
| Since 6.5.0 | Introduced. |
WP_REST_Font_Families_Controller::get_public_item_schema() WP REST Font Families Controller::get public item schema code WP 7.0
public function get_public_item_schema() {
$schema = parent::get_public_item_schema();
// Also remove `arg_options' from child font_family_settings properties, since the parent
// controller only handles the top level properties.
foreach ( $schema['properties']['font_family_settings']['properties'] as &$property ) {
unset( $property['arg_options'] );
}
return $schema;
}