-
Notifications
You must be signed in to change notification settings - Fork 107
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
Eliminate varying URL Metrics by logged-in state and discontinue disabling optimization by default for admins #1788
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## trunk #1788 +/- ##
==========================================
- Coverage 57.48% 57.43% -0.06%
==========================================
Files 84 84
Lines 6516 6508 -8
==========================================
- Hits 3746 3738 -8
Misses 2770 2770
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
@westonruter Mostly looks good, just one concern.
// wp_customize_support_script(), which will interfere with the XPath indices. Note that | ||
// od_get_normalized_query_vars() is varied by is_user_logged_in(), so membership sites and e-commerce sites | ||
// will still be able to be optimized for their normal visitors. | ||
( current_user_can( 'customize' ) && ! wp_is_development_mode( '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.
What about the development mode condition here? That seems unrelated to what this PR is doing, so shouldn't it be kept?
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.
The development mode condition was added to force optimization to be performed even when the user is an administrator. However, now optimization applies by default for everyone including administrators, so this is obsolete.
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.
This is the first PR to address #1787.
od_get_normalized_query_vars()
.A subsequent PR will be opened to address the XPath change, since that will be a massive PR touching many tests.
Fixes #1425