#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: |
Description
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)
#3
@
11 years ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In 26611:
#4
@
11 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.
Note: See
TracTickets for help on using
tickets.
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.