Skip to content

Instantly share code, notes, and snippets.

@Drivingralle
Created September 2, 2015 15:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Drivingralle/0d847232e614209456ed to your computer and use it in GitHub Desktop.
Save Drivingralle/0d847232e614209456ed to your computer and use it in GitHub Desktop.
Hide update notice for non admin
<?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