Changeset 37987 for trunk/src/wp-includes/comment-template.php
- Timestamp:
- 07/06/2016 02:45:55 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r37985 r37987 894 894 } else { 895 895 // % Comments 896 /* translators: If comment number in your language requires declension, 897 * translate this to 'on'. Do not translate into your own language. 898 */ 899 if ( 'on' === _x( 'off', 'Comment number declension: on or off' ) ) { 900 $text = preg_replace( '#<span class="screen-reader-text">.+?</span>#', '', $more ); 901 $text = preg_replace( '/&.+?;/', '', $text ); // Kill entities 902 $text = trim( strip_tags( $text ), '% ' ); 903 904 // Replace '% Comments' with a proper plural form 905 if ( $text && ! preg_match( '/[0-9]+/', $text ) && false !== strpos( $more, '%' ) ) { 906 /* translators: %s: number of comments */ 907 $new_text = _n( '%s Comment', '%s Comments', $number ); 908 $new_text = trim( sprintf( $new_text, '' ) ); 909 910 $more = str_replace( $text, $new_text, $more ); 911 if ( false === strpos( $more, '%' ) ) { 912 $more = '% ' . $more; 913 } 914 } 915 } 916 896 917 $output = str_replace( '%', number_format_i18n( $number ), $more ); 897 918 }
Note: See TracChangeset
for help on using the changeset viewer.