From e6873f61512fc5a715e89c7a857405da56f865cf Mon Sep 17 00:00:00 2001 From: Will Haynes Date: Wed, 3 Jun 2015 15:51:19 -0500 Subject: [PATCH] Don't show notices to users who can't do anything about them. --- inc/plugin-init.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/inc/plugin-init.php b/inc/plugin-init.php index 972b4ee0d..5667a4dcb 100644 --- a/inc/plugin-init.php +++ b/inc/plugin-init.php @@ -148,4 +148,13 @@ function largo_register_required_plugins() { tgmpa( $plugins, $config ); + + // Hide notices from users that can't do anything about them. + // A future update to TGMPA intends to fix this issue on multisites. + // @see: https://github.com/TGMPA/TGM-Plugin-Activation/pull/247 + // + // This should be removed after TGMPA is updated to version 3.0 + if( !current_user_can('activate_plugins') ) + TGM_Plugin_Activation::$instance->has_notices = false; + } \ No newline at end of file