Changeset 53157 for trunk/src/wp-includes/blocks/post-date.php
- Timestamp:
- 04/12/2022 03:10:30 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/post-date.php
r50929 r53157 22 22 $align_class_name = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}"; 23 23 $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) ); 24 $formatted_date = get_the_date( isset( $attributes['format'] ) ? $attributes['format'] : '', $post_ID );24 $formatted_date = get_the_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID ); 25 25 if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) { 26 26 $formatted_date = sprintf( '<a href="%1s">%2s</a>', get_the_permalink( $post_ID ), $formatted_date ); … … 30 30 '<div %1$s><time datetime="%2$s">%3$s</time></div>', 31 31 $wrapper_attributes, 32 get_the_date( 'c', $post_ID),32 esc_attr( get_the_date( 'c', $post_ID ) ), 33 33 $formatted_date 34 34 );
Note: See TracChangeset
for help on using the changeset viewer.