mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-13 06:07:23 +01:00
Posts, Post Types: Escape output within the_meta()
.
Convert markup to entities when displaying on the front end. Deprecates `the_meta()` in favor of `get_post_meta()`. Props tykoted, martinkrcho, xknown, dd32, peterwilsoncc, paulkevan, timothyblynjacobs. Merges [53958] to the 6.0 branch. Built from https://develop.svn.wordpress.org/branches/6.0@53961 git-svn-id: http://core.svn.wordpress.org/branches/6.0@53520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
802c58df13
commit
24ccd7f9a3
@ -1088,9 +1088,10 @@ function post_custom( $key = '' ) {
|
||||
*
|
||||
* @since 1.2.0
|
||||
*
|
||||
* @internal This will probably change at some point...
|
||||
* @deprecated 6.0.2 Use get_post_meta() to retrieve post meta and render manually.
|
||||
*/
|
||||
function the_meta() {
|
||||
_deprecated_function( __FUNCTION__, '6.0.2', 'get_post_meta()' );
|
||||
$keys = get_post_custom_keys();
|
||||
if ( $keys ) {
|
||||
$li_html = '';
|
||||
@ -1106,8 +1107,8 @@ function the_meta() {
|
||||
$html = sprintf(
|
||||
"<li><span class='post-meta-key'>%s</span> %s</li>\n",
|
||||
/* translators: %s: Post custom field name. */
|
||||
sprintf( _x( '%s:', 'Post custom field name' ), $key ),
|
||||
$value
|
||||
esc_html( sprintf( _x( '%s:', 'Post custom field name' ), $key ) ),
|
||||
esc_html( $value )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0.2-RC1-53932';
|
||||
$wp_version = '6.0.2-RC1-53961';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user