Skip to content

Instantly share code, notes, and snippets.

@goruha
Created June 6, 2017 08:53
Show Gist options
  • Save goruha/64d88f92e35c5888d461a4b40aaef87b to your computer and use it in GitHub Desktop.
Save goruha/64d88f92e35c5888d461a4b40aaef87b to your computer and use it in GitHub Desktop.
diff --git a/disable-updates.php b/disable-updates.php
index c25ed2f..46352d8 100644
--- a/disable-updates.php
+++ b/disable-updates.php
@@ -139,8 +139,10 @@ class OS_Disable_WordPress_Updates {
*/
function admin_init() {
if ( !function_exists("remove_action") ) return;
-
-
+
+ global $current_user;
+ $current_user->allcaps['update_plugins'] = false;
+
/*
* Hide maintenance and update nag
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment