Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion backport-changelog/6.9/9299.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
https://github.com/WordPress/wordpress-develop/pull/9299

* https://github.com/WordPress/gutenberg/pull/70585
* https://github.com/WordPress/gutenberg/pull/70585
* https://github.com/WordPress/gutenberg/pull/70982
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.9/post-data-block-bindings.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function gutenberg_block_bindings_post_data_get_value( array $source_args, $bloc

if ( 'modified' === $source_args['key'] ) {
// Only return the modified date if it is later than the publishing date.
if ( get_the_modified_date( 'Ymdhi', $post_id ) > get_the_date( 'Ymdhi', $post_id ) ) {
if ( get_the_modified_date( 'U', $post_id ) > get_the_date( 'U', $post_id ) ) {
return esc_attr( get_the_modified_date( 'c', $post_id ) );
} else {
return '';
Expand Down
5 changes: 3 additions & 2 deletions packages/editor/src/bindings/post-data.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { store as coreDataStore } from '@wordpress/core-data';

/**
Expand Down Expand Up @@ -41,12 +42,12 @@ function getPostDataFields( select, context ) {
);
dataFields = {
date: {
label: 'Post Date',
label: __( 'Post Date' ),
value: entityDataValues?.date,
type: 'string',
},
modified: {
label: 'Post Modified Date',
label: __( 'Post Modified Date' ),
value: entityDataValues?.modified,
type: 'string',
},
Expand Down
Loading