One of the great things about WordPress is that it is regularly updated with improvements and security patches. But for many people, it can be annoying. And if you develop websites for clients, you may want to hide updates. In this code below, I’m going to show you how to disable all update notifications in WordPress.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
// Disable core update add_filter( 'pre_site_transient_update_core', 'remove_core_updates' ); // Disable plugins update add_filter( 'pre_site_transient_update_plugins', 'remove_core_updates' ); // Disable themes update add_filter( 'pre_site_transient_update_themes', 'remove_core_updates' ); function remove_core_updates() { global $wp_version; return (object) array( 'last_checked' => time(), 'version_checked' => $wp_version, ); } |
Before ending this article, I recommend you should still keep updating your WordPress site. Because it prevents security vulnerabilities and make your site working stability.