Skip to content

Instantly share code, notes, and snippets.

@shameemreza
Last active October 30, 2022 11:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shameemreza/d181084763e0beb099d07f2c4af8753f to your computer and use it in GitHub Desktop.
Save shameemreza/d181084763e0beb099d07f2c4af8753f to your computer and use it in GitHub Desktop.
/**
* Disable WordPress Update nag
* https://orixlab.net/disable-updates-for-specific-plugin-in-wordpress
* Place at bottom in theme functions.php
*/
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');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment