-
Notifications
You must be signed in to change notification settings - Fork 799
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
Site Settings API: Expose show_context
and show_date
options
#28251
Conversation
Are you an Automattician? You can now test your Pull Request on WordPress.com. On your sandbox, run |
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Jetpack plugin:
Backup plugin:
Boost plugin:
Search plugin:
Social plugin:
Starter Plugin plugin:
Protect plugin:
Videopress plugin:
|
* Remove selection of complete plan in connection flow as it's broken and not used anywhere anyway.
* VideoPress: Add selector for privacy in edit page * changelog
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.
Nice! Works as expected. 🙂👍🏼
Details:
- Tested on Simple, Jetpack and Atomic (both
GET
andPOST
for each) - Shared one tiny suggestion in a comment below.
- Did not notice any PHP errors / warnings.
- We noticed that when we change e.g.
show_context
tofalse
, it will switchshow_headline
andshow_thumbnails
tofalse
as well. This is currently expected behavior, although probably better addressed in a different PR - as we discussed in p1673355980792549/1673349549.496449-slack-C02TCEHP3HA.
projects/plugins/jetpack/changelog/update-expose-related-posts-show-date-option
Outdated
Show resolved
Hide resolved
…-show-date-option Co-authored-by: Ivan Ottinger <25105483+ivan-ottinger@users.noreply.github.com>
projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php
Outdated
Show resolved
Hide resolved
* [not verified] set Video URL based on privacy * changelog * fix private URL
OMG 🤦♂️ @ivan-ottinger and @jeherve I am so sorry for this mayhem I have caused with my late night (trying to make myself feel better) latest trunk rebase. This PR branch just became too big of a mess to be fixing it here. Instead I have just created a new branch out of my last commit I did before the fatal rebase. The new PR: #28305 |
Pull request was closed
No worries, Maciej! I am going to take a look at the new PR. :) |
Fixes Automattic/wp-calypso#71593
It is necessary to expose those options to implement the Related posts setting in the new Reading Settings page.
Proposed changes:
show_context
andshow_date
related posts options for both reading (GET /sites/%s/settings
) and writing (POST /sites/%s/settings
)Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
No
Testing instructions:
public-api.wordpress.com
Testing
POST /sites/%s/settings/
WP.COM API
-v1.1
-POST
-/sites/$site/settings
where$site
can be your test site's domain or site IDshow_context
and/orshow_date
body args to eithertrue
orfalse
GET /sites/%s/settings/
. See below for instructions.Testing
GET /sites/%s/settings/
WP.COM API
-v1.1
-GET
-/sites/$site/settings
where$site
can be your test site's domain or site IDjetpack_relatedposts_show_context
and thejetpack_relatedposts_show_date
are returned with the correct values