Created
September 2, 2015 15:06
-
-
Save Drivingralle/0d847232e614209456ed to your computer and use it in GitHub Desktop.
Hide update notice for non admin
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
<?php | |
/* | |
* Plugin Name: Hide update notice for non admin | |
* Description: Hide the information about updates for non-admin | |
* Version: 1.0 | |
* Author: Cross Media Cloud | |
* Author URI: https://www.cross-media-cloud.de | |
* License: GPL | |
*/ | |
add_action( 'admin_init', 'cmc_hide_update_msg', 1 ); | |
function cmc_hide_update_msg() { | |
if ( ! current_user_can( 'install_plugins' ) ) { | |
remove_action( 'admin_notices', 'update_nag', 3 ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment