Last active
August 22, 2021 15:19
-
-
Save bagerathan/26b3da7ef0226a32241582053f4431a0 to your computer and use it in GitHub Desktop.
[Disable a plugin or theme upgrade] #wp
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
function disable_unnecessary_notification( $value ) { | |
if ( isset( $value ) && is_object( $value ) ) { | |
unset( $value->response['Impreza'] ); | |
} | |
return $value; | |
} | |
add_filter( 'site_transient_update_themes', 'disable_unnecessary_notification' ); | |
function filter_plugin_updates( $value ) { | |
unset( $value->response['facetwp/index.php'] ); | |
unset( $value->response['facetwp-map-facet/facetwp-map-facet.php'] ); | |
unset( $value->response['revslider/revslider.php'] ); | |
unset( $value->response['custom-facebook-feed-pro/custom-facebook-feed.php'] ); | |
unset( $value->response['advanced-custom-fields-pro/acf.php'] ); | |
return $value; | |
} | |
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' ); | |
add_action('admin_enqueue_scripts', 'hidenotice_admin_theme_style'); | |
add_action('login_enqueue_scripts', 'hidenotice_admin_theme_style'); | |
function hidenotice_admin_theme_style() { | |
echo '<style>#revslider-update{ display: none !important; }</style>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment