Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hide the WordPress update notifications from all users except administrators
- The plugin
- Create a new folder under the wp-content/plugins folder of your installation and name it hide-update-notification or something similar. Inside it create a file called hide-update-notification.php or something similar. Inside the file paste this code.
- <?php
- /**
- * Plugin Name: Hide Update Notifications
- * Plugin URI: https://cssigniter.com
- * Description: A small plugin to hide WordPress core update notifications from all users except administrators.
- * Version: 1.0
- * Author: cssigniter
- * Author URI: https://cssigniter.com
- * License: GPLv2 or later
- * License URI: http://www.gnu.org/licenses/gpl-2.0.html
- */
- function hide_core_update_notifications_from_users() {
- if ( ! current_user_can( 'update_core' ) ) {
- remove_action( 'admin_notices', 'update_nag', 3 );
- }
- }
- add_action( 'admin_head', 'hide_core_update_notifications_from_users', 1 );
- ============================
- https://www.cssigniter.com/hide-the-wordpress-update-notifications-from-all-users-except-administrators/
Advertisement
Add Comment
Please, Sign In to add comment