Changeset 53329 for trunk/src/wp-includes/blocks/comments-title.php
- Timestamp:
- 05/02/2022 10:36:45 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks/comments-title.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/comments-title.php
r53278 r53329 30 30 } 31 31 32 $single_default_comment_label = $show_post_title ? __( 'One response to' ) : __( 'One response' ); 33 $single_comment_label = ! empty( $attributes['singleCommentLabel'] ) ? $attributes['singleCommentLabel'] : $single_default_comment_label; 32 $single_default_comment_label = $show_post_title ? __( 'Response to' ) : __( 'Response' ); 33 if ( $show_comments_count ) { 34 $single_default_comment_label = $show_post_title ? __( 'One response to' ) : __( 'One response' ); 35 } 36 $single_comment_label = ! empty( $attributes['singleCommentLabel'] ) ? $attributes['singleCommentLabel'] : $single_default_comment_label; 34 37 35 38 $multiple_default_comment_label = $show_post_title ? __( 'Responses to' ) : __( 'Responses' ); 36 $multiple_comment_label = ! empty( $attributes['multipleCommentsLabel'] ) ? $attributes['multipleCommentsLabel'] : $multiple_default_comment_label; 39 if ( $show_comments_count ) { 40 $multiple_default_comment_label = $show_post_title ? __( 'responses to' ) : __( 'responses' ); 41 } 42 43 $multiple_comment_label = ! empty( $attributes['multipleCommentsLabel'] ) ? $attributes['multipleCommentsLabel'] : $multiple_default_comment_label; 37 44 38 45 $comments_title = '%1$s %2$s %3$s'; … … 54 61 } 55 62 56 /**57 * Registers the `core/comments-title` block on the server.58 */63 /** 64 * Registers the `core/comments-title` block on the server. 65 */ 59 66 function register_block_core_comments_title() { 60 67 register_block_type_from_metadata( … … 66 73 } 67 74 68 add_action( 'init', 'register_block_core_comments_title' );75 add_action( 'init', 'register_block_core_comments_title' );
Note: See TracChangeset
for help on using the changeset viewer.