Ticket #9548: comments-translated-args-by-default.diff
| File comments-translated-args-by-default.diff, 3.3 KB (added by , 17 years ago) |
|---|
-
wp-includes/comment-template.php
640 640 * @param string $trackbacktxt The string to display for trackback type 641 641 * @param string $pingbacktxt The string to display for pingback type 642 642 */ 643 function comment_type($commenttxt = 'Comment', $trackbacktxt = 'Trackback', $pingbacktxt = 'Pingback') { 643 function comment_type($commenttxt = false, $trackbacktxt = false, $pingbacktxt = false) { 644 if ( false === $commenttxt ) $commenttxt = _x( 'Comment', 'noun' ); 645 if ( false === $trackbacktxt ) $trackbacktxt = __( 'Trackback' ); 646 if ( false === $pingbacktxt ) $pingbacktxt = __( 'Pingback' ); 644 647 $type = get_comment_type(); 645 648 switch( $type ) { 646 649 case 'trackback' : … … 841 844 $overridden_cpage = TRUE; 842 845 } 843 846 844 define('COMMENTS_TEMPLATE', true); 847 if ( !defined('COMMENTS_TEMPLATE') || !COMMENTS_TEMPLATE) 848 define('COMMENTS_TEMPLATE', true); 845 849 846 850 $include = apply_filters('comments_template', STYLESHEETPATH . $file ); 847 851 if ( file_exists( $include ) ) … … 902 906 * @param string $none The string to display when comments have been turned off 903 907 * @return null Returns null on single posts and pages. 904 908 */ 905 function comments_popup_link( $zero = 'No Comments', $one = '1 Comment', $more = '% Comments', $css_class = '', $none = 'Comments Off') {909 function comments_popup_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false ) { 906 910 global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post; 907 911 912 if ( false === $zero ) $zero = __( 'No Comments' ); 913 if ( false === $one ) $one = __( '1 Comment' ); 914 if ( false === $more ) $more = __( '% Comments' ); 915 if ( false === $none ) $none = __( 'Comments Off' ); 916 908 917 $number = get_comments_number( $id ); 909 918 910 919 if ( 0 == $number && 'closed' == $post->comment_status && 'closed' == $post->ping_status ) { … … 1104 1113 * @param string $replytext Optional. Text to display when replying to a comment. Accepts "%s" for the author of the comment being replied to. 1105 1114 * @param string $linktoparent Optional. Boolean to control making the author's name a link to their comment. 1106 1115 */ 1107 function comment_form_title( $noreplytext = 'Leave a Reply', $replytext = 'Leave a Reply to %s', $linktoparent = TRUE ) {1116 function comment_form_title( $noreplytext = false, $replytext = false, $linktoparent = TRUE ) { 1108 1117 global $comment; 1118 1119 if ( false === $noreplytext ) $noreplytext = __( 'Leave a Reply' ); 1120 if ( false === $replytext ) $replytext = __( 'Leave a Reply to %s' ); 1109 1121 1110 1122 $replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0; 1111 1123 -
wp-includes/query.php
2296 2296 2297 2297 // Put sticky posts at the top of the posts array 2298 2298 $sticky_posts = get_option('sticky_posts'); 2299 if ( $this->is_home && $page <= 1 && !empty($sticky_posts) && !$q['caller_get_posts'] ) {2299 if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['caller_get_posts'] ) { 2300 2300 $num_posts = count($this->posts); 2301 2301 $sticky_offset = 0; 2302 2302 // Loop over posts and relocate stickies to the front.