W3cubDocs

/WordPress

WP_REST_Font_Faces_Controller::get_public_item_schema(): array

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

Return

array Public item schema data.

Source

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;
}

Changelog

Version Description
6.5.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_font_faces_controller/get_public_item_schema