Last active
October 11, 2021 03:58
-
-
Save davidsneighbour/761e06ca8a20598822fff17bf6986e8b to your computer and use it in GitHub Desktop.
Disable Updraft Plus nagging screens
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 license notifications | |
// dnb 2020-09-18 | |
// hide updraft plus notices about expired licenses | |
function dnb_remote_updraft_license_notifications() { | |
echo '<style> | |
.updraftupdatesnotice-updatesexpired, | |
.updraftupdatesnotice-updatesexpiringsoon { | |
display: none !important; | |
} | |
</style>'; | |
} | |
add_action('admin_head', 'dnb_remote_updraft_license_notifications'); | |
// Hide plugin update notifications | |
// dnb 2020-09-18 | |
// hide update notifications for non-updatable plugins | |
function dnb_remove_updraft_update_notifications($value){ | |
if (isset($value) && is_object($value)){ | |
unset($value->response['updraftplus/updraftplus.php']); | |
} | |
return $value; | |
} | |
add_filter('site_transient_update_plugins', 'dnb_remove_updraft_update_notifications'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment