Last active
December 28, 2015 18:39
-
-
Save afragen/d8c3c0e7552aec6eab39 to your computer and use it in GitHub Desktop.
Remove plugin update nags
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 | |
//https://dd32.id.au/2011/03/01/disable-plugin-update-notification-for-a-specific-plugin-in-wordpress-3-1/ | |
add_filter( 'site_transient_update_plugins', 'dd_remove_update_nag' ); | |
function dd_remove_update_nag( $value ) { | |
$hide_update_nags = array( | |
'akismet/akismet.php', | |
); | |
foreach ( $hide_update_nags as $plugin ) { | |
if ( isset( $value->response[ $plugin ] ) ) { | |
unset( $value->response[ $plugin ] ); | |
} | |
} | |
return $value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment