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.

{} It's a 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.

Code of WP_REST_URL_Details_Controller::prepare_metadata_for_output() WP 6.0

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