diff --git a/packages/block-library/src/post-date/edit.js b/packages/block-library/src/post-date/edit.js index cfb5c572106008..14b28553ff4812 100644 --- a/packages/block-library/src/post-date/edit.js +++ b/packages/block-library/src/post-date/edit.js @@ -181,9 +181,7 @@ export default function PostDateEdit( { } ) } checked={ displayType === 'modified' } - help={ __( - 'Only shows if the post has been modified' - ) } + help={ __( "Show the post's last modified date" ) } /> diff --git a/packages/block-library/src/post-date/index.php b/packages/block-library/src/post-date/index.php index bcfff02fc178d7..0f45f394ddfc28 100644 --- a/packages/block-library/src/post-date/index.php +++ b/packages/block-library/src/post-date/index.php @@ -33,17 +33,12 @@ function render_block_core_post_date( $attributes, $content, $block ) { } /* - * If the "Display last modified date" setting is enabled, - * only display the modified date if it is later than the publishing date. + * If the "Display last modified date" setting is enabled. */ if ( isset( $attributes['displayType'] ) && 'modified' === $attributes['displayType'] ) { - if ( get_the_modified_date( 'Ymdhi', $post_ID ) > get_the_date( 'Ymdhi', $post_ID ) ) { - $formatted_date = get_the_modified_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID ); - $unformatted_date = esc_attr( get_the_modified_date( 'c', $post_ID ) ); - $classes[] = 'wp-block-post-date__modified-date'; - } else { - return ''; - } + $formatted_date = get_the_modified_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID ); + $unformatted_date = esc_attr( get_the_modified_date( 'c', $post_ID ) ); + $classes[] = 'wp-block-post-date__modified-date'; } $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) );