WP_REST_URL_Details_Controller::prepare_metadata_for_output()privateWP 5.9.0

Prepares the metadata by:

- stripping all HTML tags and tag entities.
- converting non-tag entities into characters.

Method of the class: WP_REST_URL_Details_Controller{}

No Hooks.

Return

String. The prepared metadata.

Usage

// private - for code of main (parent) class only
$result = $this->prepare_metadata_for_output( $metadata );
$metadata(string) (required)
The metadata content to prepare.

Changelog

Since 5.9.0 Introduced.

WP_REST_URL_Details_Controller::prepare_metadata_for_output() code WP 6.6.2

private function prepare_metadata_for_output( $metadata ) {
	$metadata = html_entity_decode( $metadata, ENT_QUOTES, get_bloginfo( 'charset' ) );
	$metadata = wp_strip_all_tags( $metadata );
	return $metadata;
}