Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.