Blog Single

28 Mar

Disable all update in wordpress

remove_action(‘load-update-core.php’, ‘wp_update_plugins’);
add_filter(‘pre_site_transient_update_plugins’, ‘__return_null’);

function remove_core_updates()
{
global $wp_version;
return(object) array(‘last_checked’ => time(), ‘version_checked’ => $wp_version,);
}

add_filter(‘pre_site_transient_update_core’, ‘remove_core_updates’);
add_filter(‘pre_site_transient_update_plugins’, ‘remove_core_updates’);
add_filter(‘pre_site_transient_update_themes’, ‘remove_core_updates’);

Related Posts