Index: wp-includes/post-template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/post-template.php (revision )
+++ wp-includes/post-template.php (revision )
@@ -1016,22 +1016,22 @@
*/
function the_meta() {
if ( $keys = get_post_custom_keys() ) {
- echo "
\n";
+ $li_html = '';
foreach ( (array) $keys as $key ) {
$keyt = trim( $key );
if ( is_protected_meta( $keyt, 'post' ) ) {
continue;
}
-
+
$values = array_map( 'trim', get_post_custom_values( $key ) );
- $value = implode( $values, ', ' );
-
+ $value = implode( $values, ', ' );
+
$html = sprintf( "- %s %s
\n",
/* translators: %s: Post custom field name */
sprintf( _x( '%s:', 'Post custom field name' ), $key ),
$value
);
-
+
/**
* Filters the HTML output of the li element in the post custom fields list.
*
@@ -1041,9 +1041,12 @@
* @param string $key Meta key.
* @param string $value Meta value.
*/
- echo apply_filters( 'the_meta_key', $html, $key, $value );
+ $li_html .= apply_filters( 'the_meta_key', $html, $key, $value );
}
- echo "
\n";
+
+ if ( $li_html ) {
+ echo "\n";
+ }
}
}