mirror of
git://develop.git.wordpress.org/
synced 2025-04-07 13:43:25 +02: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. git-svn-id: https://develop.svn.wordpress.org/branches/6.0@53961 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9da39a18bb
commit
f61e5ec2e5
@ -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 )
|
||||
);
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user