Updating Wordpress Plugins

Hi, i often customise several plugins that i downloaded for various clients, however when a new update comes out for the plugin, some of my clients update the plugin and this often overwrites my changes.

Is there a way to stop / disable plugins from showing 'Update Available' so that they don't update it?

Thanks in advance...
Who is Participating?
OmniUnlimitedConnect With a Mentor Commented:
There are a number of ways you can disable plugins in WordPress.  Probably the one you are interested in using is the auto_update_plugin filter.  An example of how to disable plugin updates would be:

add_filter( 'auto_update_plugin', '__return_false' );

Open in new window

You can find more examples, descriptions and expanations on the WordPress Codex.  This article points to a marvellous writeup on the subject found at http://make.wordpress.org/core/2013/10/25/the-definitive-guide-to-disabling-auto-updates-in-wordpress-3-7/.

Hope this helps.
oo7mlAuthor Commented:
Thanks, just two quick questions:

01 - where do i add / edit that line of code
02 - is it possible to hide a plugin from showing in the plugins list
OmniUnlimitedConnect With a Mentor Commented:
The filter would be added to your wp_config.php file.

You can use the following function to hide plugins from the plugin list (taken from http://wordpress.org/support/topic/how-to-a-hide-plugin-from-username):

function mytest() {
  global $wp_list_table;
  $hidearr = array('hello.php');  // substitute the main plugin file that you want blocked for hello.php
  $myplugins = $wp_list_table->items;
  foreach ($myplugins as $key => $val) {
    if (in_array($key,$hidearr) {
add_action( 'pre_current_active_plugins', 'mytest' )

Open in new window

This code would go in your theme's functions.php file.
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Jason C. LevineConnect With a Mentor No oneCommented:
I have a different opinion on Omni's solution.  Disabling auto-updating globally for all plugins is probably not the best idea.  Frankly, you modifying someone else's plugin is also not that swift.  Plugins are updated to remove vulnerabilities more often than not so your proposed workflow makes your site less secure and disabling the ability of all plugins to be updated REALLY makes the site less secure.

What I think you should be doing is forking the plugin and creating something new and no longer tied to the original.  This will allow you to break away from the updating of the original while still retaining update capability for all other aspects of the site.
oo7mlAuthor Commented:
Thanks guys...

@Jason - does forking it not contradict what you are saying about updates... as forking will mean that no updates are made too
Jason C. LevineNo oneCommented:
It contradicts that part of the objection but forking a single plugin and never updating it is vastly better than preventing updates to ALL plugins.  

Ideally you would find a way to modify the plugin using a hook or something else that can be placed in functions.php.
oo7mlAuthor Commented:
Ok cool, sorry i misunderstood what you were saying... i only want to disable the plugin for some plugins... what would you suggest is the best way for that, apart from forking... surprised that there is not a plugin for this :-)
Yeah, but if there were a plugin for that, your users would see that plugin (since they appear to have administrative rights) and be able to manipulate that plugin which kind of defeats what it is you were trying to do in the first place.  The advantage to using my coding is that you never need to modify the existing plugins, and they maintain their updatability.  You would simply have to set $hidearr = array(); and all the plugins would appear in the list again where you could update at will.  After updating, just put all the plugin file names back in the array.  Plus your users would need to edit theme files in order to gain access to this function.  Something few, if any, users do.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.