-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block patterns REST endpoint: use snake case for field names #40254
Conversation
There is also #40252 from @ntsekouras that changes the namespace for endpoints. |
lib/compat/wordpress-6.0/class-wp-rest-block-patterns-controller.php
Outdated
Show resolved
Hide resolved
Size Change: +59 B (0%) Total Size: 1.22 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the formatting small changes, this looks good. Thanks!
I landed #40252 so there are conflicts to resolve now. |
019b6fd
to
ab8fe2a
Compare
rebased and resolved ✅ |
Nice, thank you. Let's wait for the CI checks and land it afterward. |
* Block patterns REST endpoint: use camel case for field names * fix formatting Co-authored-by: ntsekouras <ntsekouras@outlook.com>
This was cherry-picked to 13.0 RC3 |
Backports the same changes applied in Gutenberg: WordPress/gutenberg#40254. Follow-up for [53152]. Props jsnajdr, timothyblynjacobs. See #55505. git-svn-id: https://develop.svn.wordpress.org/trunk@53154 602fd350-edb4-49c9-b593-d223f7449a82
Backports the same changes applied in Gutenberg: WordPress/gutenberg#40254. Follow-up for [53152]. Props jsnajdr, timothyblynjacobs. See #55505. Built from https://develop.svn.wordpress.org/trunk@53154 git-svn-id: http://core.svn.wordpress.org/trunk@52743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Backports the same changes applied in Gutenberg: WordPress/gutenberg#40254. Follow-up for [53152]. Props jsnajdr, timothyblynjacobs. See #55505. Built from https://develop.svn.wordpress.org/trunk@53154 git-svn-id: https://core.svn.wordpress.org/trunk@52743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Updates the patterns response fields to use
snake_case
. The objects stored inWP_Block_Patterns_Registry
usecamelCase
, then they are converted to snake case when writing the REST response, and then they are converted back to camel case when receiving into thecore
data store.Addresses review comment by @TimothyBJacobs here: https://github.com/WordPress/wordpress-develop/pull/2488/files/a3e5009510fc4bc1d1a14a51a1cc16bc637ddf10#r846393041