
Blackbams Blog
development – digital arts – internet
Knowledge is free. No one may take possession of it.
12. July 2012
The automatic upgrade function of WordPress is usefull for most bloggers, as they always are reminded to keep WordPress and its extensions up to date. Anyhow, it can be very annoying for developers when customers and end-user make updates by their own, usually destroying something.
It is often recomendable to disable this notifications: Sometimes a Plugin or Theme must be extended or changed by the developer - automatic upgrades would destroy these changes. Some Plugins like Mailpress do not disable the automatic upgrade, though automatic upgrading usually leeds to huge data losses 🙁 Recently I had to learn this the hard way, but this is no excuse for incomplete backups, of course.
However the following functions can help:
It is often recomendable to disable this notifications: Sometimes a Plugin or Theme must be extended or changed by the developer - automatic upgrades would destroy these changes. Some Plugins like Mailpress do not disable the automatic upgrade, though automatic upgrading usually leeds to huge data losses 🙁 Recently I had to learn this the hard way, but this is no excuse for incomplete backups, of course.
However the following functions can help:
1. Disable Plugin upgrades
You can disable special Plugins by pasting the following code into the Plugin itself:
add_filter('site_transient_update_plugins', 'cis_remove_plugin_update');
function cis_remove_plugin_update($value) {
unset($value-\>response[ plugin_basename(__FILE__) ]);
return $value;
}
You can alternativley paste some code into your functions.php-file of your Theme:
add_filter('site_transient_update_plugins', 'cis_remove_plugin_update');
function cis_remove_plugin_update($value) {
$plugin_relative_path = "plugin_relative_path"; // this could be "akismet/akismet.php" for example
unset($value->response[ $plugin_relative_path]);
return $value;
}
You also can disable all Plugin upgrades, for example if you want to prevent customers from doing that:
remove_action ('load-update-core.php', 'wp_update_plugins');
add_filter ('pre_site_transient_update_plugins',create_function ('$a', "return null;"));
2. Disabling Theme Upgrades
Disable all Theme updgrades:
remove_action ('load-update-core.php', 'wp_update_themes');
add_filter ('pre_site_transient_update_themes',create_function ('$a', "return null;"));
3. Disable Core Updgrade
Note: You never should disable the Core-Upgrade of WordPress, as important security upgrades will be missed. However, if you need to do it for some reason:
add_filter ('pre_site_transient_update_core',create_function ('$a', "return null;"));
Dieser Eintrag wurde am 12. July 2012 um 18:18 in der Kategorie WordPress, WP Scripts veröffentlicht. You can book the comments for this article RSS 2.0. Feedback, discussion, commendation and critics are welcome: Write a comment or trackback.
Warning: Use of undefined constant Ext_related_links - assumed 'Ext_related_links' (this will throw an Error in a future version of PHP) in /home/.sites/609/site1266/web/blackbams-blog/wp-content/themes/SilentWoodsByBlackbam/single.php on line 75
Already 6 comments belonging to "Disabling (specific) WordPress update notifications in Backend for Core, Themes and Plugins":
Kommentare abonnieren (RSS) or URL Trackback
Hernan
says:
on 19. July 2013 at 12:26 on clock
1. Disable Plugin upgrades In what file insert that code?
Hernan
says:
on 19. July 2013 at 19:20 on clock
1. Disable Plugin upgrades In what file insert that code?
Hernan
says:
on 26. August 2013 at 22:48 on clock
1. Disable Plugin upgrades In what file insert that code?
Hernan
says:
on 09. September 2013 at 16:21 on clock
1. Disable Plugin upgrades In what file insert that code?
Hernan
says:
on 17. February 2015 at 13:46 on clock
1. Disable Plugin upgrades In what file insert that code?
Hernan
says:
on 11. April 2015 at 21:46 on clock
1. Disable Plugin upgrades In what file insert that code?
Leave a comment: