Hide WordPress Update Notifications in Admin Panel Easily

How to hide wordpress update notifications; Disable wordpress admin notices; Remove update notifications in wordpress dashboard; Hide plugin update alerts in wordpress; Wordpress disable automatic updates; Suppress admin notices in wordpress; Wordpress hide theme update notifications; Turn off wordpress update alerts; Wordpress dashboard hide updates; Disable update notifications wordpress plugin;

Explanation

If you're looking to keep your WordPress admin panel tidy by hiding those pesky update notifications, this code is just what you need. Here's a simple breakdown of what it does:

  • Hide Update Notifications: The code removes notifications for updates related to WordPress core, plugins, and themes. This means you won't see those alerts in your admin panel anymore.
  • Disable Automatic Updates: It stops WordPress from automatically updating itself, as well as its plugins and themes. This gives you full control over when and what to update.
  • Suppress Admin Notices: All admin notices are suppressed, so your dashboard stays clean and free from distractions.

By using this code, you can focus on managing your site without being constantly reminded about updates. Just remember, while hiding notifications can be convenient, it's important to regularly check for updates to keep your site secure and running smoothly.

Code

<?php
// Function to hide WordPress core, plugin, and theme update notifications
function wp_dudecom_hide_update_notifications() {
    // Remove core update notifications
    remove_action('admin_notices', 'update_nag', 3);

    // Remove plugin update notifications
    add_filter('pre_site_transient_update_plugins', '__return_null');

    // Remove theme update notifications
    add_filter('pre_site_transient_update_themes', '__return_null');

    // Remove core update notifications
    add_filter('pre_site_transient_update_core', '__return_null');
}
add_action('admin_menu', 'wp_dudecom_hide_update_notifications');

// Function to disable automatic updates
function wp_dudecom_disable_automatic_updates() {
    // Disable all automatic updates
    add_filter('automatic_updater_disabled', '__return_true');

    // Disable core updates
    add_filter('auto_update_core', '__return_false');

    // Disable plugin updates
    add_filter('auto_update_plugin', '__return_false');

    // Disable theme updates
    add_filter('auto_update_theme', '__return_false');
}
add_action('init', 'wp_dudecom_disable_automatic_updates');

// Function to suppress admin notices
function wp_dudecom_suppress_admin_notices() {
    // Suppress all admin notices
    remove_all_actions('admin_notices');
    remove_all_actions('all_admin_notices');
}
add_action('admin_init', 'wp_dudecom_suppress_admin_notices');
?>

Instructions

To implement the code for hiding updates in the WordPress admin panel, follow these steps:

File Location: You can add the code to your theme's functions.php file or create a custom plugin file.

Prerequisites: Ensure you have access to your WordPress site's file system, either via FTP or a file manager provided by your hosting service.

Implementation Steps:

  1. Access Your Site's Files: Use an FTP client or your hosting provider's file manager to access your WordPress installation files.
  2. Locate the functions.php File: Navigate to wp-content/themes/your-active-theme/ and open the functions.php file. Alternatively, if you prefer to use a plugin, navigate to wp-content/plugins/ and create a new file, e.g., hide-updates.php.
  3. Add the Code: Copy the provided code and paste it at the end of the functions.php file or into your new plugin file.
  4. Save the Changes: If you're editing functions.php, save the file. If you're creating a plugin, save the file and ensure it has the necessary plugin header comments to be recognized by WordPress.
  5. Activate the Plugin (if applicable): If you created a plugin, go to the WordPress admin panel, navigate to Plugins, find your new plugin, and activate it.
  6. Verify the Changes: Log in to your WordPress admin panel and check that update notifications and admin notices are no longer visible.

By following these steps, you can successfully hide update notifications and suppress admin notices in your WordPress admin panel. If you need assistance with this implementation or require more advanced functionality, consider reaching out to wp-dude.com for expert help.