-
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
Protect: introduce new wp_robots_no_robots when available #18897
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 🤖 If you are an automattician, once your PR is ready for review add the "[Status] Needs Team review" label and ask someone from your team review the code. jetpack plugin:
|
wp_robots_no_robots() replaces wp_no_robots() in WP 5.7: https://core.trac.wordpress.org/ticket/51511#comment:13
c404052
to
d4fef95
Compare
projects/plugins/jetpack/modules/protect/blocked-login-page.php
Outdated
Show resolved
Hide resolved
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.
Seems ok, other than that with WP 5.7-beta3-50398 it complains about is_embed
and is_search
being called incorrectly.
Notice: is_embed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /srv/users/user75dff923/apps/user75dff923/public/wp-includes/functions.php on line 5313
Notice: is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /srv/users/user75dff923/apps/user75dff923/public/wp-includes/functions.php on line 5313
Ah yes, seeing it too now. That's problematic, we're getting rid of one notice for 2 others, because we're trying to use I'd be tempted to hardcode the meta tag in this case. I don't think we need the flexibility and filterability in this specific case. What do you think? I just pushed 024b5f5 as an option. |
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.
LGTM. I agree it's fine and much simpler to hardcode the meta tags here.
Changes proposed in this Pull Request:
wp_robots_no_robots()
replaceswp_no_robots()
in WP 5.7:https://core.trac.wordpress.org/ticket/51511#comment:13
Jetpack product discussion
Primary issue: #18842
Does this pull request change what data or activity we track or use?
Testing instructions:
define( 'JETPACK_ALWAYS_PROTECT_LOGIN', true );
<meta name='robots' content
meta tag in the page'shead
.Proposed changelog entry for your changes: