-
Notifications
You must be signed in to change notification settings - Fork 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
add setter and getter for comming soon setting to api #45604
Conversation
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
Caution: This PR affects files in the Editing Toolkit Plugin on WordPress.com D49466-code has been created so you can easily test it on your sandbox. See this FieldGuide page about developing the Editing Toolkit Plugin for more info: PCYsg-ly5-p2 |
|
||
return $options; | ||
} | ||
add_filter( 'site_settings_endpoint_get', __NAMESPACE__ . '\add_public_coming_soon_to_settings_endpoint_get' ); |
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.
We're adding this filter like you did in D37770-code.
Any reason not to do it in the Editing Toolkit?
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.
Because of all the async/distributed stuff, It took some days of drawing to figure out the phabricator parts - I'm not familiar with editing toolkit enough to be able to answer your question @ramonjd :(
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.
Tested using https://developer.wordpress.com/docs/api/console-2014/
Confirmed that GET on sites/$site_id/settings
returns settings: { ..., wpcom_public_coming_soon: 0 }
in the body
93c0aaf
to
2acf137
Compare
Changes proposed in this Pull Request
Adds wpcom_public_coming_soon to the setting endpoint GET and POST endpoints
Testing instructions
Apply the generated diff, or checkout this branch and then run
yarn dev --sync
from./apps/editing-toolkit/
to sync to your sandbox.In a rest client calls the settings endpoint:
Test the POST
Test the GET
You should see
"wpcom_public_coming_soon": 1
included in the response