diff --git a/backport-changelog/6.9/9299.md b/backport-changelog/6.9/9299.md index 033dd6d234ee72..a1cefa33829bd6 100644 --- a/backport-changelog/6.9/9299.md +++ b/backport-changelog/6.9/9299.md @@ -1,3 +1,4 @@ https://github.com/WordPress/wordpress-develop/pull/9299 -* https://github.com/WordPress/gutenberg/pull/70585 \ No newline at end of file +* https://github.com/WordPress/gutenberg/pull/70585 +* https://github.com/WordPress/gutenberg/pull/70982 \ No newline at end of file diff --git a/lib/compat/wordpress-6.9/post-data-block-bindings.php b/lib/compat/wordpress-6.9/post-data-block-bindings.php index d86af59289ad28..7541b2f564eb17 100644 --- a/lib/compat/wordpress-6.9/post-data-block-bindings.php +++ b/lib/compat/wordpress-6.9/post-data-block-bindings.php @@ -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 ''; diff --git a/packages/editor/src/bindings/post-data.js b/packages/editor/src/bindings/post-data.js index d5eacfbe8dd51c..ca9d0088fc533a 100644 --- a/packages/editor/src/bindings/post-data.js +++ b/packages/editor/src/bindings/post-data.js @@ -1,6 +1,7 @@ /** * WordPress dependencies */ +import { __ } from '@wordpress/i18n'; import { store as coreDataStore } from '@wordpress/core-data'; /** @@ -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', },