For those who don't know, WordPress 2.9.1 was released a couple days ago. As a result, the "WordPress 2.9.1 is available! Please update now." nag is plastered at the top of the admin interface. Since installing yet another unnecessary WordPress plug-in for something so simple seems pointless, I came up with a quick and easy to implement WordPress hack. Don't even bother continuing unless you're comfortable editing a core WordPress file.
Locating the "hook"
[nullamatix.com http]:# grep -lir 'update_nag' wp-admin/ wp-admin/includes/update.php [nullamatix.com http]:# vim wp-admin/includes/update.php
Removing the "hook"
Once update.php is open, find this line (around 135 or so):
add_action( 'admin_notices', 'update_nag', 3 );
Then, just make the line a comment; either of the following will work:
// add_action( 'admin_notices', 'update_nag', 3 ); /* add_action( 'admin_notices', 'update_nag', 3 ); */
Save the changes and check out the admin panel. Ta-da, no more WordPress update nag and we didn't even have to worry about some silly plug-in...
Wat? No Updates?
Wrong. There are still a number of ways to tell whether or not WordPress needs an update. Here are a few:
- Check the footer of the admin interface (Get Version 2.9.1)
- Check the "Right Now" box in the admin dashboard
- Subscribe to the WordPress "Releases" category RSS feed
WordPress Security Updates Only
Unrelated, but still worth mentioning, Steve Taylor asked the following question on the wp-hackers mailing list today,
I can't find any information on this, but out of curiosity, is it possible to get *just* security fixes for old WP version? So, say when 3.0 comes out and it jumps up from 2.9.4, would there be a "2.9.5" for the security fixes? My guess is no, but I thought I'd check.
That is a fantastic idea. On my production Debian servers, *only* the security repos are enabled so *only* the security updates are applied. Why couldn't this also work for WordPress? For me, updating WordPress is a royal pain in the ass due to the core
fixes hacks/edits. As a result, WordPress gets updated once every four or five major releases, with the exception of manually applied security patches (of course). But a security-updates only feature for WordPress? Count me in. Hell, I'll even help with patching the older branches if necessary.
To some, security patches are more of a concern than a "Trash Can" (wait, wat?) feature for posts/comments. I'll save that rant for another post. Fckin WordPress trash can, geez...
Potential Search Terms
Remove the WordPress Update Nag Without a Plugin
Remove the WordPress Update Message Without a Plugin
Get rid of the WordPress Update Message Without a Plugin
Get rid of the WordPress Update Nag Without a Plugin
WordPress Update Nag Admin Hack
Word Count: 529