in WordPress

Disable Wordpress Version Update Message

Wordpress Every couple of months Wordpress will release a new version of Wordpress which improves on the previous version. You should always keep your Wordpress version up to date as it will fix problems on the previous version. But updating your Wordpress version can cause problems, if any of your plugins are using old functions then they will no longer work on the new version. For this reason you always need to test and backup your site when you update your Wordpress version. For this reason it's a good idea to make sure only the admin user can update your Wordpress version. Add the following in your functions.php file to make sure only the admin user can update Wordpress.


<?php
if ( !current_user_can('administrator') ) {
    add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );
    add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) );
}
?>

Upgrade to access all content on Paulund

Members unlock all tutorials and snippets

Access to all downloadable content

Access to code examples before others

Sign Up Now

Already a member? Login here

Subscribe To The Weekly Newsletter

Get weekly updates to your email