Ticket #41653: 41653.3.diff
File 41653.3.diff, 1.3 KB (added by , 6 years ago) |
---|
-
src/wp-includes/post-template.php
1018 1018 if ( $keys = get_post_custom_keys() ) { 1019 1019 echo "<ul class='post-meta'>\n"; 1020 1020 foreach ( (array) $keys as $key ) { 1021 $keyt = trim( $key);1022 if ( is_protected_meta( $keyt, 'post' ) ) 1021 $keyt = trim( $key ); 1022 if ( is_protected_meta( $keyt, 'post' ) ) { 1023 1023 continue; 1024 $values = array_map('trim', get_post_custom_values($key)); 1025 $value = implode($values,', '); 1024 } 1026 1025 1026 $values = array_map( 'trim', get_post_custom_values( $key ) ); 1027 $value = implode( $values, ', ' ); 1028 1029 $html = sprintf( "<li><span class='post-meta-key'>%s</span> %s</li>\n", 1030 /* translators: %s: Post custom field name */ 1031 sprintf( _x( '%s:', 'Post custom field name' ), $key ), 1032 $value 1033 ); 1034 1027 1035 /** 1028 1036 * Filters the HTML output of the li element in the post custom fields list. 1029 1037 * … … 1033 1041 * @param string $key Meta key. 1034 1042 * @param string $value Meta value. 1035 1043 */ 1036 echo apply_filters( 'the_meta_key', "<li><span class='post-meta-key'>$key:</span> $value</li>\n", $key, $value );1044 echo apply_filters( 'the_meta_key', $html, $key, $value ); 1037 1045 } 1038 1046 echo "</ul>\n"; 1039 1047 }