-
Notifications
You must be signed in to change notification settings - Fork 843
Janitorial: use wp_admin_notice function introduced in WP 6.4 #37051
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
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
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 appearing at the bottom of this PR are passing or skipped. Beta plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. 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. Debug Helper plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Backup plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Vaultpress plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Boost plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Search plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Social plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Starter Plugin plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Protect plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Videopress plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Super Cache plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Migration plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Automattic For agencies client plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
| <p><?php echo esc_html( $message ); ?></p> | ||
| </div> | ||
| <?php | ||
| wp_admin_notice( |
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.
@sergeymitr I wasn't able to trigger this notice (using the Jetpack Debug helper). Do you know how those notices are triggered, by any chance?
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.
fgiannar
left a comment
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! Tested with most of the notices and they all display fine 🚢
Do not use the wp_admin_notice function to display that wp-admin notice. The notice is meant to be displayed on sites running an outdated version of WordPress, and it's possible that this version is 6.3-, which does not include the wp_admin_notice function. Internal reference: p1728598216425289-slack-C03M3KD520Zd Related PR, where wp_admin_notice was introduced: #37051


Proposed changes:
Start using the
wp_admin_notice()function that was introduced in WordPress 6.4, since we now require WordPress 6.4.=> Dev note
Other information:
Jetpack product discussion
Epic: #33615
Does this pull request change what data or activity we track or use?
Testing instructions:
This wasn't easy to test, as I'm not familiar with all the notices displayed, and all the plugins. I mostly made changes to my local environment to force-trigger the notices. I would suggest doing the same with testing.