Since I use git on a lot of my projects, I don’t want to update WordPress in the production environment. So I wrote a few lines of code, that hides the update message. Add it to functions.php if you want to use it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hide update nag on the production server | |
$production = 'http://PRODUCTIONURL.com'; | |
$check_url = home_url(); | |
function hideUpdateNag() { | |
remove_action( 'admin_notices', 'update_nag', 3 ); | |
} | |
if ( $production == $check_url ) { | |
add_action('admin_menu','hideUpdateNag'); | |
} |
If you find some issues, or have some great ideas on how to improve it, just fork the gist.