Skip to content

Instantly share code, notes, and snippets.

@davidsneighbour
Last active October 11, 2021 03:58
Show Gist options
  • Save davidsneighbour/761e06ca8a20598822fff17bf6986e8b to your computer and use it in GitHub Desktop.
Save davidsneighbour/761e06ca8a20598822fff17bf6986e8b to your computer and use it in GitHub Desktop.
Disable Updraft Plus nagging screens
<?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