Discuss your project
Wordpress Backoffice

WordPress: Remove update notifications

Place in the functions.php file: $func = function ($a) { global $wp_version; return (object) array( 'last_checked' => time(), 'version_checked' => $wp_version, ); }; add_filter('pre_site_transient_update_core', $func); add_filter('pre_site_tra...

WordPress: Remove update notifications


Place in the functions.php file:

$func = function ($a) {
global $wp_version;
return (object) array(
'last_checked' => time(),
'version_checked' => $wp_version,
);
};
add_filter('pre_site_transient_update_core', $func);
add_filter('pre_site_transient_update_plugins', $func);
add_filter('pre_site_transient_update_themes', $func);

Reproduce this customization today

The principle of the hook remains useful, but the administration screens and WordPress APIs have evolved since the publication. Test the code in a staging environment with the exact version of the site's core, theme, and plugins.

  • Save the files and the database before making any changes.
  • Control user capabilities, nonces, input validation, and output escaping.
  • Place customizations in a dedicated plugin or a child theme to preserve updates.

Reference: official WordPress plugin development manual.

Share this article