Created
May 19, 2020 17:25
-
-
Save wpscholar/b4747d39bc9ad9f9cbef2bbdaae0c867 to your computer and use it in GitHub Desktop.
A WordPress MU plugin that can prevent plugin updates for specific plugins.
This file contains hidden or 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 | |
add_filter( | |
'site_transient_update_plugins', | |
function ( $transient ) { | |
$plugins = array( | |
'wordpress-seo/wp-seo.php', | |
); | |
foreach ( $plugins as $plugin ) { | |
if ( isset( $transient->response[ $plugin ] ) ) { | |
$transient->no_update[ $plugin ] = $transient->response[ $plugin ]; | |
unset( $transient->response[ $plugin ] ); | |
} | |
} | |
return $transient; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment