Created
June 6, 2017 08:53
-
-
Save goruha/64d88f92e35c5888d461a4b40aaef87b to your computer and use it in GitHub Desktop.
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
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