Created
July 23, 2013 19:21
-
-
Save lunaroja/6065343 to your computer and use it in GitHub Desktop.
WordPress: Do not show plugin update notifications
This file contains hidden or 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
function run_chk_usr_lvl($matches) { | |
global $userdata; | |
if (!current_user_can('update_plugins')) { | |
remove_action('admin_notices', 'update_nag', 3); | |
remove_action( 'load-update-core.php', 'wp_update_plugins' ); | |
} | |
} | |
add_filter('pre_site_transient_update_plugins', create_function( '$a', "return null;" )); | |
add_action('admin_init', 'run_chk_usr_lvl'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment