Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#26392 closed defect (bug) (fixed)

Can't Remove Site Content and WordPress News Dashboard Panels

Reported by: cookiesfordevo Owned by: nacin
Milestone: 3.8 Priority: normal
Severity: normal Version: 3.8
Component: Administration Keywords:
Focuses: Cc:


Previously the following code (3.7.1 and earlier) would remove all the dashboard panels and still works with the exception of Site Content and WordPress News.

Tried attaching it to other actions (wp, init, current_screen) without any change.

add_action('admin_menu', 'remove_dashboard_panels');
function remove_dashboard_panels () {

	remove_meta_box('dashboard_secondary', 'dashboard', 'normal' ); //Other Wordpress News
	remove_meta_box('dashboard_activity', 'dashboard', 'normal' ); 
	remove_meta_box('dashboard_right_now', 'dashboard', 'normal' );
	remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal' ); 
	remove_meta_box('dashboard_plugins', 'dashboard', 'normal' ); 
	remove_meta_box('dashboard_quick_press', 'dashboard', 'normal' ); 
	remove_meta_box('dashboard_primary', 'dashboard', 'normal' ); //Wordpress Blog
	remove_meta_box('dashboard_recent_drafts', 'dashboard', 'normal' );
	remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal' );


We're not against WordPress news, but clients get easily confused, and we like to keep things as minimal as possible.

Change History (7)

#1 @SergeyBiryukov
8 years ago

  • Milestone changed from Awaiting Review to 3.8

#2 @sabreuse
8 years ago

  • Keywords needs-codex added

The Site Content widget can be removed by adding it to your list using its ID, site-right-now. We should update the instructions in the Codex to reflect that change, and also to remove the widgets that were removed from the Codex list.

BUT - something different is going on with the WordPress News widget -- it uses the same ID, dashboard_primary, as the old version, but it isn't being removed, although I can still show and hide it from the checkboxes in Site Options.

#3 @nacin
8 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 26611:

Restore original properties of the right now (activity) and primary (news) dashboard widgets.

This avoids issues with those trying to remove/disable core meta boxes.

fixes #26392.

#4 @nacin
8 years ago

Two separate issues here.

  • The right now widget was renamed. This renames it back to its original name.
  • The news widget was set to "low" priority. This means it loses its special "core" priority designation, which add_meta_box() specifically checks for to see if it needs to block the widget.

Sacrificing low priority is not that big of a deal. This restores 3.7 behavior.

#5 @helen
8 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Renaming the widget broke some CSS.

#6 @helen
8 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 26656:

Restore CSS for the Site Content, née Right Now, Dashboard widget. Removes a nice large swath of unnecessary styles. fixes #26392, see #25824.

#7 @bcworkz
8 years ago

  • Keywords needs-codex removed

Codex updated to reflect 3.8 widget inventory

Note: See TracTickets for help on using tickets.