Skip to content

Commit

Permalink
Rename next and previous to newer an older (#38143)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbravobernal committed Jan 24, 2022
1 parent 2484854 commit 99c72bf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/comments-pagination-next/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export default function CommentsPaginationNextEdit( {
<PlainText
__experimentalVersion={ 2 }
tagName="span"
aria-label={ __( 'Next comments page link' ) }
placeholder={ __( 'Next Comments' ) }
aria-label={ __( 'Newer comments page link' ) }
placeholder={ __( 'Newer Comments' ) }
value={ label }
onChange={ ( newLabel ) =>
setAttributes( { label: newLabel } )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function render_block_core_comments_pagination_next( $attributes, $content, $blo
}
$comments_number = (int) get_comments_number();
$max_page = 0 !== $per_page ? (int) floor( $comments_number / $per_page ) : 0;
$default_label = __( 'Next Comments' );
$default_label = __( 'Newer Comments' );
$label = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? $attributes['label'] : $default_label;
$pagination_arrow = get_comments_pagination_arrow( $block, 'next' );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export default function CommentsPaginationPreviousEdit( {
<PlainText
__experimentalVersion={ 2 }
tagName="span"
aria-label={ __( 'Previous comments page link' ) }
placeholder={ __( 'Previous Comments' ) }
aria-label={ __( 'Older comments page link' ) }
placeholder={ __( 'Older Comments' ) }
value={ label }
onChange={ ( newLabel ) =>
setAttributes( { label: newLabel } )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @return string Returns the previous posts link for the comments pagination.
*/
function render_block_core_comments_pagination_previous( $attributes, $content, $block ) {
$default_label = __( 'Previous Comments' );
$default_label = __( 'Older Comments' );
$label = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? $attributes['label'] : $default_label;
$pagination_arrow = get_comments_pagination_arrow( $block, 'previous' );
if ( $pagination_arrow ) {
Expand Down

0 comments on commit 99c72bf

Please sign in to comment.