Changeset 59072 for trunk/src/wp-includes/blocks/comment-date.php
- Timestamp:
- 09/20/2024 01:53:52 AM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/comment-date.php
r58187 r59072 29 29 30 30 $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) ); 31 $formatted_date = get_comment_date( 32 isset( $attributes['format'] ) ? $attributes['format'] : '', 33 $comment 34 ); 35 $link = get_comment_link( $comment ); 31 if ( isset( $attributes['format'] ) && 'human-diff' === $attributes['format'] ) { 32 // translators: %s: human-readable time difference. 33 $formatted_date = sprintf( __( '%s ago' ), human_time_diff( get_comment_date( 'U', $comment ) ) ); 34 } else { 35 $formatted_date = get_comment_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $comment ); 36 } 37 $link = get_comment_link( $comment ); 36 38 37 39 if ( ! empty( $attributes['isLink'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.