Home / Disable Update Notice for Non-admin Users
Duplicate Snippet

Embed Snippet on Your Site

Disable Update Notice for Non-admin Users

Don't show WordPress version update notices to users that can't update the site.

800+
Code Preview
php
<?php
add_action( 'admin_head', function () {
	if ( current_user_can( 'update_core' ) ) {
		return;
	}
	remove_action( 'admin_notices', 'update_nag', 3 );
}, 1 );

Comments

Add a Comment