-
Notifications
You must be signed in to change notification settings - Fork 841
Forms: remove related-posts from API calls #45928
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
base: trunk
Are you sure you want to change the base?
Conversation
|
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 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Code Coverage SummaryCoverage changed in 2 files.
|
|
Should we make sure that related posts never return an array of "non" public post types or have some sort of allow list of post types vs return everything ? |
|
I'm hesitant to limit it to specific list since people might've built all sorts of things around this with custom post types — but many of the known custom post types by us we could limit it, sure. Different PR for that, tho! |
| * | ||
| * @param array $post_types The post types that are allowed to have related posts. | ||
| */ | ||
| $post_types = apply_filters( 'jetpack_related_posts_allowed_post_types', $post_types ); |
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.
Thinking if the filter should mention rest_api somewhere, e.g. jetpack_related_posts_rest_api_allowed_post_types
Proposed changes:
Before, related posts hooks into these:
After the change, it tries to hook into these:
API responses before:
API responses after:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions: