Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there a way to disable update notifications for specific plugins?

As a plugin developer, I have some plugins installed on my personal site using the svn trunk version for testing, but the same plugins are available from the plugin site. In these cases WP considers the latest version to be the most recently published version and constantly tries to warn me that updates are available.

I still want to see notifications for updates on other plugins, but it's anoying to constantly ignore the Updates (2) notice in the header!

share|improve this question
    
Simply open up the plugin file and change the version number to something like 9.9.9 –  Bainternet Jun 21 '11 at 14:53
    
Sorry @Bainternet but that would have been too hackish because the site is an svn-checkout and the plugin comes from an svn:external reference to the plugin development code. Having a locally modified file on a production server is not an option. Hameedullah's filter works because it gets saved in the code repository for the site. –  Caleb Jun 21 '11 at 15:22
    
Yeah i missed the part about the site running on svn –  Bainternet Jun 21 '11 at 16:26
    
You can also just use the Disable Updates Manager plugin by Websiteguy on WordPress.org. –  Matthew May 30 '14 at 19:03

2 Answers 2

up vote 21 down vote accepted

For example if you don't want Wordpress to show update notifications for akismet, you will do it like:

function filter_plugin_updates( $value ) {
    unset( $value->response['akismet/akismet.php'] );
    return $value;
}
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );
share|improve this answer
    
I placed that at the end of ./wp-config.php, replaced the plugin file path and it did the job. –  Caleb Jun 21 '11 at 15:20
2  
You can put that in your theme's functions.php if not possible then you can put in a separate plugin file. In my view putting this into wp-config.php is not a good idea. –  Hameedullah Khan Jun 21 '11 at 17:07
    
I don't really want my function tied to the theme, and adding a plugin seems like as much of a hack as just hacking the plugin I've got. Can you explain why you think wp-config.php is not a good place to put site specific configuration hacks? –  Caleb Jun 22 '11 at 13:20
    
Very good solution, which worked fine for me in functions.php. It is easy to add more plugins to the list simply by adding another unset()... Good tip Hameedullah.. –  Lars Koudal Nov 13 '11 at 10:28
    
Glad to see you here. :) I hope you remember me still. Wonderful that this tip worked for you. –  Hameedullah Khan Nov 14 '11 at 6:18

Hameedullah Khan's answer will throw a PHP warning. Include this if clause to check to make sure it's an object before unsetting the response for that plugin.

'Warning: Attempt to modify property of non-object'

Try this to avoid the warnings (code for the plugin file itself):

//remove update notice for forked plugins
function remove_update_notifications($value) {
    if ( isset( $value ) && is_object( $value ) ) {
        unset($value->response[ plugin_basename(__FILE__) ]);
    }
}
add_filter('site_transient_update_plugins', 'remove_update_notifications');

I like to put this in the actual plugin. Since I've only ever disabled updates on a plugin because I've edited or forked the code and don't want to lose my edits on an update, I've already edited the plugin and thus don't mind editing it more. It keeps my functions file a bit cleaner. But if you wish you can put it in the functions file and a benefit to that method is you can remove multiple plugins from updates by adding another unset line for that plugin like so (code for functions.php):

//remove update notice for forked plugins
function remove_update_notifications($value) {
    if ( isset( $value ) && is_object( $value ) ) {
        unset($value->response[ 'hello.php' ]);
        unset($value->response[ 'akismet/akismet.php' ]);
    }
}
add_filter('site_transient_update_plugins', 'remove_update_notifications');
share|improve this answer

protected by toscho 2 days ago

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.