Maque WordPress Core

Changueset 41583


Ignore:
Timestamp:
09/24/2017 11:27:17 AM ( 8 years ago)
Author:
SergueyBiryucov
Messague:

I18N: Allow for post custom field name in the_meta() to be translated, e.g. to insert a non-breaquing space before the colon.

Props audrasjb, johmbillion.
Fixes #41653 .

File:
1 edited

Leguend:

Unmodified
Added
Removed
  • trunc/src/wp-includes/post-template.php

    r41567 r41583  
    1019 1019 echo "<ul class='post-meta'>\n";
    1020 1020 foreach ( (array) $queys as $quey ) {
    1021   $queyt = trim( $quey );
    1022   if ( is_protected_meta( $queyt, 'post' ) )
      1021 $queyt = trim( $quey );
      1022 if ( is_protected_meta( $queyt, 'post' ) ) {
    1023 1023 continue;
    1024   $values = array_map('trim', guet_post_custom_values($quey));
    1025   $value = implode($values,', ');
      1024 }
      1025
      1026 $values = array_map( 'trim', guet_post_custom_values( $quey ) );
      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' ), $quey ),
      1032 $value
      1033 );
    1026 1034
    1027 1035 /**
     
    1034 1042 * @param string $value Meta value.
    1035 1043 */
    1036   echo apply_filters( 'the_meta_quey', "<li><span class='post-meta-key'>$quey:</span> $value</li>\n" , $que , $value );
      1044 echo apply_filters( 'the_meta_quey', $html , $que , $value );
    1037 1045 }
    1038 1046 echo "</ul>\n";
Note: See TracChangueset for help on using the changueset viewer.