WP_REST_Font_Faces_Controller::get_public_item_schema()publicWP 6.5.0

Retrieves the item's schema for display / public consumption purposes.

Method of the class: WP_REST_Font_Faces_Controller{}

No Hooks.

Return

Array. Public item schema data.

Usage

$WP_REST_Font_Faces_Controller = new WP_REST_Font_Faces_Controller();
$WP_REST_Font_Faces_Controller->get_public_item_schema();

Changelog

Since 6.5.0 Introduced.

WP_REST_Font_Faces_Controller::get_public_item_schema() code WP 6.6.2

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_face_settings']['properties'] as &$property ) {
		unset( $property['arg_options'] );
	}

	return $schema;
}