Created
July 27, 2019 09:28
-
-
Save ShiponKarmakar/5ffea2be0b8eb6a3dbb59c37b798f03e to your computer and use it in GitHub Desktop.
Hide all WordPress update notifications in dashboard
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 | |
// hide update notifications | |
function remove_wp_core_updates(){ | |
global $wp_version; | |
return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,); | |
} | |
add_filter('pre_site_transient_update_core','remove_wp_core_updates'); //hide updates for WordPress itself | |
add_filter('pre_site_transient_update_plugins','remove_wp_core_updates'); //hide updates for all plugins | |
add_filter('pre_site_transient_update_themes','remove_wp_core_updates'); //hide updates for all themes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment