Support » Plugins and Hacks » Stop plugin from showing update warning

  • Is there a way to disable the warning on a plugin that it needs to be updated? I don’t want a client to upgrade a few plugins that have been customized.

    Thanks, Brad

Viewing 7 replies - 1 through 7 (of 7 total)
  • function cws_hidden_plugin_12345( $r, $url ) {
    	if ( 0 !== strpos( $url, 'http://api.wordpress.org/plugins/update-check' ) )
    		return $r; // Not a plugin update request. Bail immediately.
    	$plugins = unserialize( $r['body']['plugins'] );
    	unset( $plugins->plugins[ plugin_basename( __FILE__ ) ] );
    	unset( $plugins->active[ array_search( plugin_basename( __FILE__ ), $plugins->active ) ] );
    	$r['body']['plugins'] = serialize( $plugins );
    	return $r;
    }
    
    add_filter( 'http_request_args', 'cws_hidden_plugin_12345', 5, 2 );

    I found that somewhere (sadly I can’t recall where), and I have yet to test it.

    Rich,

    Thanks man. That was fast!

    Question: That looks like it stops the update plugin function entirely. So will that block ALL plugins from showing the warning?

    Thanks,

    Brad

    add it into the plugin itself, pretty sure it only blocks erm, itself.

    Cool. I just gave it a shot to no avail. Any other ideas?

    Probably would be far easier to just edit the plugin version to 9999

    I found a similar function (virtually the same) here:
    http://developersmind.com/2010/06/12/preventing-wordpress-from-checking-for-updates-for-a-plugin/

    So it might be worth rechecking with the version found there.

    Just want to say that his worked like a charm:

    Probably would be far easier to just edit the plugin version to 9999

    Thanks Pross!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Stop plugin from showing update warning’ is closed to new replies.