Skip to content

Instantly share code, notes, and snippets.

@matheuswd
Last active February 23, 2016 17:42
Show Gist options
  • Save matheuswd/c94be85cfdcd1f7ba3c4 to your computer and use it in GitHub Desktop.
Save matheuswd/c94be85cfdcd1f7ba3c4 to your computer and use it in GitHub Desktop.
Block the plugin update
<?php
function disable_plugin_updates( $value ) {
$plugin_path = 'default-featured-image/set-default-featured-image.php';
if ( (isset($value) ) && (is_object($value) ) ) {
if (isset( $value->response[$plugin_path] )) {
unset( $value->response[$plugin_path] );
}
}
return $value;
}
add_filter( 'site_transient_update_plugins', 'disable_plugin_updates' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment