Answers for "Hide all updates from WordPress"

PHP
0

Hide all updates from WordPress

// hide update notifications
add_filter('pre_site_transient_update_core','oepl_remove_core_updates'); //hide updates for WordPress itself
add_filter('pre_site_transient_update_plugins','oepl_remove_core_updates'); //hide updates for all plugins
add_filter('pre_site_transient_update_themes','oepl_remove_core_updates'); //hide updates for all themes
function oepl_remove_core_updates(){
	global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);
}
Posted by: Guest on September-09-2021

Code answers related to "Hide all updates from WordPress"

Browse Popular Code Answers by Language