Return to Snippet

Revision: 52460
at October 24, 2011 13:32 by krembo99


Initial Code
/**        --1 ---  **/

if ( !current_user_can( 'install_themes' ) ) {
  add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );
  add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) );
}

/**        --2 ---  **/

<?php
function wp_hide_update() {
	        global $current_user;
	        get_currentuserinfo();
 
	        if ($current_user->ID != 1) { // only admin will see it
	            remove_action( 'admin_notices', 'update_nag', 3 );
	        }
	    }
	    add_action('admin_menu','wp_hide_update');
?>

Initial URL


Initial Description


Initial Title
Wordpress - remove update nag and version to all but admin (2 snippets)

Initial Tags


Initial Language
PHP