Remove “Updates” link from WordPress Admin Dashboard

Does anyone knows how to remove the menu link named “Updates”, found under the “Dashboard” section of the WordPress Administration Menu?

I added the following actions & filters, which stop the core, theme & plugins updates, but the menu link is still there, although there is nothing to update:

Read More
# Disable WP>3.0 core updates
add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) );

# Disable WP>3.0 plugin updates
remove_action( 'load-update-core.php', 'wp_update_plugins' );
add_filter( 'pre_site_transient_update_plugins', create_function( '$a', "return null;" ) );

# Disable WP>3.0 theme updates
remove_action( 'load-update-core.php', 'wp_update_themes' );
add_filter( 'pre_site_transient_update_themes', create_function( '$a', "return null;" ) );

# disable edit plugin and theme files:
define('DISALLOW_FILE_EDIT',true);

# disable core updates:
add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) );

Thank you,

Ciprian

Related posts

Leave a Reply

3 comments

  1. @wunderdojo wasn’t “wrong”, but WordPress has a bit of a better built in mechanism to handle this.

    What you want (or anyone else viewing this these days) is a function called remove_submenu_page
    Codex link: https://codex.wordpress.org/Function_Reference/remove_submenu_page

    add_action( 'admin_menu', 'control_menu_items_shown' );
    function control_menu_items_shown() {
        remove_submenu_page( 'index.php', 'update-core.php' );
    }
    

    index.php is the name for the “Dashboard” menu item and update-core.php is the name for the “Updates” menu sub item.

    Please note the naming mechanisms of these change quite a bit depending on the plugin, theme, etc.

    Example from the Mandrill plugin:
    remove_submenu_page( 'options-general.php', 'wpmandrill' );

    They may not end in .php

    It’s also worth noting a similiar function remove_menu_page
    Codex link: https://codex.wordpress.org/Function_Reference/remove_menu_page

    Hope someone finds this useful in the future.

  2. The update options comes in two places in back-end. One as the message on top and second in the ‘AT a glance’ window in dashboard. Place the below code in your functions.php. This code will hide the update options from these two areas.

    add_action('admin_menu','wphidenag');
    function wphidenag() {
    remove_action( 'admin_notices', 'update_nag', 3 );
    }
    function admin_style() { ?>
      <style>
      #wp-version-message a.button{
      display:none;
      }
      </style>
      <?php 
    }
    add_action('admin_enqueue_scripts', 'admin_style'); 
    
  3. This should do it:

    function edit_admin_menus() {  
    global $submenu;  
    unset($submenu['index.php'][10]);
    return $submenu;
    }  
    add_action( 'admin_menu', 'edit_admin_menus' ); 
    

    Put that in your theme’s functions.php file or in your plugin code.