-
Notifications
You must be signed in to change notification settings - Fork 798
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
User Queries: update parameters to take into account changes in WP 5.9 #22559
Conversation
Fixes #22558 In https://core.trac.wordpress.org/ticket/16841 , WP_User_Query was updated to accept a new parameter, capability, to look for specific users. In turn, the "who" parameter (in use in Jetpack) was deprecated. Let's support both parameters for now.
Caution: This PR has changes that must be merged to WordPress.com |
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:
|
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.
All three scenarios tested well for me, great testing instructions 👍
@jeherve Is there a specific way you manage/remember the "todo" tasks like this?
I don't know that I have great tips about this. When the time comes to look at updating WordPress requirements for Jetpack, I look for all instances of "WordPress x.x", "x.x", in the codebase, see what comes up. So I guess the most important to me is to add an inline comment mentioning the WordPress version, so it's easier to find afterwards. |
Great news! One last step: head over to your WordPress.com diff, D74041-code, and commit it. Thank you! |
r239482-wpcom |
…s WP 5.9 (#24086) * General: remove backwards compatibility code for user queries See #22559 * Update PHPUnit setup to remove WP < 5.9 oddities See #21175, #21157 Primary issue: #24082 * Update docs/examples/bootstrap.php Co-authored-by: Brad Jorsch <[email protected]> * Remove speed trap listener loder * Update doc to remove mention of temporary PHPUnit situation * Remove temporary line break workaround See #15595 * Remove custom function in favor of the one that ships with core * Remove old workaround for the Jetpack sidebar plugin icon See #14327 * Remove PHP 5.2 workaround See 99fffd8 * Add back necessary _wp_specialchars wrapping Co-authored-by: Brad Jorsch <[email protected]> Co-authored-by: Brandon Kraft <[email protected]>
…Jetpack requires WP 5.9 (#24086) * General: remove backwards compatibility code for user queries See #22559 * Update PHPUnit setup to remove WP < 5.9 oddities See #21175, #21157 Primary issue: #24082 * Update docs/examples/bootstrap.php Co-authored-by: Brad Jorsch <[email protected]> * Remove speed trap listener loder * Update doc to remove mention of temporary PHPUnit situation * Remove temporary line break workaround See #15595 * Remove custom function in favor of the one that ships with core * Remove old workaround for the Jetpack sidebar plugin icon See #14327 * Remove PHP 5.2 workaround See 99fffd8 * Add back necessary _wp_specialchars wrapping Co-authored-by: Brad Jorsch <[email protected]> Co-authored-by: Brandon Kraft <[email protected]>
Fixes #22558
Changes proposed in this Pull Request:
In this core ticket,
WP_User_Query
was updated to accept a new parameter,capability
, to look for specific users.In turn, the
who
parameter (in use in Jetpack) was deprecated.Let's support both parameters for now, with a note to get rid of the backwards compatible code once WordPress 5.9 is required to use Jetpack.
After auditing the codebase, those changes apply to 3 different areas of Jetpack:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
Widget Visibility
Authors Widget
WPCOM API
Once you've done all that, you should not see any PHP notices when checking the site's error log.