Repository navigation
Abilities API: Rename the local date sub-field of core/content-query to site - #15000
jorgefilipecosta wants to merge 2 commits into
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
gziolo
left a comment
There was a problem hiding this comment.
Thanks for this, the rename looks good! One small suggestion: I would drop the date.local and modified.local cases from data_unknown_field_paths(). These names never shipped in a release, and the bogus_field case already covers the same validation. Keeping the original single test is simpler, and it doesn't keep the old name around in the tests.
|
Hi @gziolo, thank you for the review! The suggestion was applied, the unknown field test is back to the single |
4a6528c to
1d40d0c
Compare
…ry` to `site`. The `date` and `modified` fields of a `core/content-query` post now return the date in the site's timezone as `site` instead of `local`, next to `gmt`. The `date.local` and `modified.local` field paths are no longer accepted. Follow-up to [64388]. See #66268.
…uery`. The `local` date sub-field paths never shipped in a release, and the `bogus_field` case already covers the unknown field validation.
1d40d0c to
e0f5674
Compare
…ry` to `site`. The `date` and `modified` fields now return `site` and `gmt` sub-fields, and the `fields` input accepts `date.site` and `modified.site`. Developed in #15000. Follow-up to r64388. Props jorgefilipecosta, gziolo. See #66268. git-svn-id: https://develop.svn.wordpress.org/trunk@64907 602fd350-edb4-49c9-b593-d223f7449a82
…ry` to `site`. The `date` and `modified` fields now return `site` and `gmt` sub-fields, and the `fields` input accepts `date.site` and `modified.site`. Developed in WordPress/wordpress-develop#15000. Follow-up to r64388. Props jorgefilipecosta, gziolo. See #66268. Built from https://develop.svn.wordpress.org/trunk@64907 git-svn-id: http://core.svn.wordpress.org/trunk@64057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Follow up to https://core.trac.wordpress.org/changeset/64388.
This PR renames the
localsub-field of thecore/content-querydate fields tosite:dateandmodifiednow return{ site, gmt }instead of{ local, gmt }. The values are unchanged.fieldsinput acceptsdate.siteandmodified.site;date.localandmodified.localare rejected as unknown fields.site,gmtorder.Trac ticket: https://core.trac.wordpress.org/ticket/66268
Testing
Verify unit tests are passing:
Or run the ability in the editor console:
Each item should have
dateandmodifiedobjects withsiteandgmtkeys.AI disclosure: the change and tests were drafted with AI assistance (Claude Code) and reviewed by me.