Created
February 18, 2021 07:31
-
-
Save barrd/b0529e8a8ba9380dc2eceac050a17e1b to your computer and use it in GitHub Desktop.
WordPress hide jQuery migration notice and disable admin email
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Hide jQuery Migration notice | |
* | |
* Temp fix until plugin can be removed | |
* | |
* @return void | |
*/ | |
function removes_migrate_warning() { | |
?> | |
<style type="text/css"> | |
.jquery-migrate-dashboard-notice { | |
display: none !important; | |
} | |
</style> | |
<?php | |
} | |
add_filter( | |
'admin_footer', | |
'removes_migrate_warning', | |
99 | |
); | |
// Stop admin email being sent. | |
add_filter( | |
'jqmh_email_message', | |
'_return_null' | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment