Last active
February 23, 2016 17:42
-
-
Save matheuswd/c94be85cfdcd1f7ba3c4 to your computer and use it in GitHub Desktop.
Block the plugin update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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