Created
July 23, 2017 01:34
-
-
Save iftekharbhuiyan/51f22487620078852906c7a8aaa3683b to your computer and use it in GitHub Desktop.
Disable Update Notification on WordPress
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
/** | |
* Remove update notification | |
* Applies to WordPress Core, Plugins, Themes | |
*/ | |
// disable for core | |
add_filter('pre_site_transient_update_core','remove_wp_update_notification'); | |
// disable for plugins | |
add_filter('pre_site_transient_update_plugins','remove_wp_update_notification'); | |
// disable for themes | |
add_filter('pre_site_transient_update_themes','remove_wp_update_notification'); | |
// function being called by filter hook | |
function remove_wp_update_notification() { | |
global $wp_version; | |
return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment