Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

WP_REST_URL_Details_Controller::prepare_metadata_for_output() WordPress Method

The prepare_metadata_for_output() method is used to prepare the metadata for output. This is used to make sure that the correct data is outputted for the given context.

WP_REST_URL_Details_Controller::prepare_metadata_for_output( string $metadata ) #

Prepares the metadata by: – stripping all HTML tags and tag entities.


Description

  • converting non-tag entities into characters.

Top ↑

Parameters

$metadata

(string)(Required)The metadata content to prepare.


Top ↑

Return

(string) The prepared metadata.


Top ↑

Source

File: wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php

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


Top ↑

Changelog

Changelog
VersionDescription
5.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.