Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. To Disable Update WordPress nag :
- Insert the following code to the functions.php file of your active theme. It will remove the WordPress update nag e.g. WordPress 3.9.1 is available! Please update now, from the all users dashboard, admin dashboard & from Updates page as well.
- add_action('after_setup_theme','remove_core_updates');
- function remove_core_updates()
- {
- if(! current_user_can('update_core')){return;}
- add_action('init', create_function('$a',"remove_action( 'init', 'wp_version_check' );"),2);
- add_filter('pre_option_update_core','__return_null');
- add_filter('pre_site_transient_update_core','__return_null');
- }
- 2. To Disable Plugin Update Notifications :
- Insert the following code to the functions.php file of your active theme. It will remove the update notifications of all the installed plugins.
- remove_action('load-update-core.php','wp_update_plugins');
- add_filter('pre_site_transient_update_plugins','__return_null');
- 3. To Disable all the Nags & Notifications :
- Insert the following code the functions.php file of your active theme. This code disables all the updates notifications regarding plugins, themes & WordPress completely.
- function remove_core_updates(){
- global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);
- }
- add_filter('pre_site_transient_update_core','remove_core_updates');
- add_filter('pre_site_transient_update_plugins','remove_core_updates');
- add_filter('pre_site_transient_update_themes','remove_core_updates');
- Apart form these codes there are some WordPress plugins available to Disable WordPress Update Notifications & Nags :
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement