fix(post-date): use block bindings instead of deprecated displayType#430
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the theme’s post-meta block patterns to represent “Modified Date” using the WordPress Block Bindings API (instead of the deprecated displayType attribute), aligning the patterns with modern core block schema/UI behavior.
Changes:
- Replaces
core/post-date’s deprecateddisplayType:"modified"attribute withmetadata.bindingspointingdatetimetocore/post-datafieldmodified. - Adds
wp-block-post-date__modified-dateclass to the modified-datecore/post-dateblocks for styling/detection consistency. - Applies the update across all 5 post-meta patterns.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| patterns/post-meta/post-meta-single-line.php | Updates modified date block to use block bindings + adds modified-date class. |
| patterns/post-meta/post-meta-single-line-avatar.php | Same binding/class update for the single-line avatar variant. |
| patterns/post-meta/post-meta-multiple-lines.php | Same binding/class update for the multiple-lines variant (with date format preserved). |
| patterns/post-meta/post-meta-multiple-lines-avatar.php | Same binding/class update for the multiple-lines avatar variant (with date format preserved). |
| patterns/post-meta/post-meta-compact.php | Same binding/class update for the compact variant (with font size preserved). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
laurelfulford
left a comment
There was a problem hiding this comment.
Looks good, @rbcorrales! 🙌
# [1.28.0-alpha.1](v1.27.0...v1.28.0-alpha.1) (2026-04-16) ### Bug Fixes * improve pagination, linking directly to comments ([#431](#431)) ([461def0](461def0)) * **post-date:** use block bindings instead of deprecated displayType ([#430](#430)) ([b65b8c3](b65b8c3)) ### Features * add newsletters templates ([#437](#437)) ([cc8d244](cc8d244)) * copy newsletters compatibility ([#436](#436)) ([214f73a](214f73a)) * swap in Overlay Menu block to replace template parts ([30be676](30be676))
|
🎉 This PR is included in version 1.28.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [1.28.0](v1.27.0...v1.28.0) (2026-05-04) ### Bug Fixes * improve pagination, linking directly to comments ([#431](#431)) ([461def0](461def0)) * **post-date:** use block bindings instead of deprecated displayType ([#430](#430)) ([b65b8c3](b65b8c3)) ### Features * add newsletters templates ([#437](#437)) ([cc8d244](cc8d244)) * copy newsletters compatibility ([#436](#436)) ([214f73a](214f73a)) * swap in Overlay Menu block to replace template parts ([30be676](30be676))
|
🎉 This PR is included in version 1.28.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [1.28.0-alpha.1](Automattic/newspack-block-theme@v1.27.0...v1.28.0-alpha.1) (2026-04-16) ### Bug Fixes * improve pagination, linking directly to comments ([#431](Automattic/newspack-block-theme#431)) ([faa85d9](Automattic/newspack-block-theme@faa85d9)) * **post-date:** use block bindings instead of deprecated displayType ([#430](Automattic/newspack-block-theme#430)) ([4c744ad](Automattic/newspack-block-theme@4c744ad)) ### Features * add newsletters templates ([#437](Automattic/newspack-block-theme#437)) ([76c12f5](Automattic/newspack-block-theme@76c12f5)) * copy newsletters compatibility ([#436](Automattic/newspack-block-theme#436)) ([fb28b94](Automattic/newspack-block-theme@fb28b94)) * swap in Overlay Menu block to replace template parts ([cb4a94b](Automattic/newspack-block-theme@cb4a94b))
# [1.28.0](Automattic/newspack-block-theme@v1.27.0...v1.28.0) (2026-05-04) ### Bug Fixes * improve pagination, linking directly to comments ([#431](Automattic/newspack-block-theme#431)) ([faa85d9](Automattic/newspack-block-theme@faa85d9)) * **post-date:** use block bindings instead of deprecated displayType ([#430](Automattic/newspack-block-theme#430)) ([4c744ad](Automattic/newspack-block-theme@4c744ad)) ### Features * add newsletters templates ([#437](Automattic/newspack-block-theme#437)) ([76c12f5](Automattic/newspack-block-theme@76c12f5)) * copy newsletters compatibility ([#436](Automattic/newspack-block-theme#436)) ([fb28b94](Automattic/newspack-block-theme@fb28b94)) * swap in Overlay Menu block to replace template parts ([cb4a94b](Automattic/newspack-block-theme@cb4a94b))
All Submissions:
Changes proposed in this Pull Request:
Follow-up to #428. Updates all 5 post-meta patterns to use the modern WordPress Block Bindings API for the modified date block instead of the deprecated
displayTypeattribute.Before:
<!-- wp:post-date {"displayType":"modified"} /-->After:
<!-- wp:post-date {"metadata":{"bindings":{"datetime":{"source":"core/post-data","args":{"field":"modified"}}}},"className":"wp-block-post-date__modified-date"} /-->The
displayTypeattribute was superseded by Block Bindings in WordPress/gutenberg#70585. WordPress still renders it via a legacy fallback, but the attribute is no longer in the block schema and the editor UI doesn't recognize it as the "Modified Date" variation.The
wp-block-post-date__modified-dateCSS class is included for styling and detection purposes.Closes NPPD-1278.
How to test the changes in this Pull Request:
wp-block-post-date__modified-dateclass on the modified date block.Other information: