Make WordPress Core


Ignore:
Timestamp:
09/20/2024 01:53:52 AM (6 months ago)
Author:
noisysocks
Message:

Editor: Update packages for 6.7 Beta 1.

Syncs @wordpress/* packages to the wp-6.7 npm tag.

Fixes #61906.
Props peterwilsoncc, gziolo, kevin940726.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/comment-date.php

    r58187 r59072  
    2929
    3030    $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 );
    3638
    3739    if ( ! empty( $attributes['isLink'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.