Skip to content

Instantly share code, notes, and snippets.

@afragen
Last active December 28, 2015 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afragen/d8c3c0e7552aec6eab39 to your computer and use it in GitHub Desktop.
Save afragen/d8c3c0e7552aec6eab39 to your computer and use it in GitHub Desktop.
Remove plugin update nags
<?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