Changeset 59498
- Timestamp:
- 12/08/2024 11:42:00 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r59183 r59498 962 962 */ 963 963 function get_comments_number_text( $zero = false, $one = false, $more = false, $post = 0 ) { 964 $comments_number = get_comments_number( $post );964 $comments_number = (int) get_comments_number( $post ); 965 965 966 966 if ( $comments_number > 1 ) { … … 997 997 $comments_number_text = str_replace( '%', number_format_i18n( $comments_number ), $more ); 998 998 } 999 } elseif ( 0 == $comments_number ) {999 } elseif ( 0 === $comments_number ) { 1000 1000 $comments_number_text = ( false === $zero ) ? __( 'No Comments' ) : $zero; 1001 1001 } else { // Must be one. … … 1649 1649 $post_id = get_the_ID(); 1650 1650 $post_title = get_the_title(); 1651 $comments_number = get_comments_number( $post_id );1651 $comments_number = (int) get_comments_number( $post_id ); 1652 1652 1653 1653 if ( false === $zero ) { … … 1676 1676 } 1677 1677 1678 if ( 0 == $comments_number && ! comments_open() && ! pings_open() ) {1678 if ( 0 === $comments_number && ! comments_open() && ! pings_open() ) { 1679 1679 printf( 1680 1680 '<span%1$s>%2$s</span>', … … 1690 1690 } 1691 1691 1692 if ( 0 == $comments_number ) {1692 if ( 0 === $comments_number ) { 1693 1693 $respond_link = get_permalink() . '#respond'; 1694 1694 /** … … 1774 1774 $args = wp_parse_args( $args, $defaults ); 1775 1775 1776 if ( 0 == $args['depth'] || $args['max_depth'] <= $args['depth'] ) { 1776 $args['max_depth'] = (int) $args['max_depth']; 1777 $args['depth'] = (int) $args['depth']; 1778 1779 if ( 0 === $args['depth'] || $args['max_depth'] <= $args['depth'] ) { 1777 1780 return; 1778 1781 }
Note: See TracChangeset
for help on using the changeset viewer.