Remove dashboard home components.
- Parent items remove child items.
- For concise documentation,
option.[x, y]
has been abbreviated fromoption.x, option.y
.
<?php
return [
'wp-admin.$role|$username' => [
'dashboard.home',
'dashboard.home' => (string) $route,
'dashboard.home.title' => (string) $title,
'dashboard.home.title.[menu, page]' => (string) $title,
'dashboard.home.tabs',
'dashboard.home.tabs.[screen-options, help]',
'dashboard.home.cols' => (int) $num_of_cols,
'dashboard.home.welcome',
'dashboard.home.notices',
'dashboard.home.activity',
'dashboard.home.right-now',
'dashboard.home.recent-comments',
'dashboard.home.incoming-links',
'dashboard.home.plugins',
'dashboard.home.quick-draft',
'dashboard.home.drafts',
'dashboard.home.news',
'dashboard.home.site-health',
],
];
Remove from menu;
<?php
return [
'wp-admin.$role|$username' => [
'dashboard.home',
],
];
Remove from menu and enforce a page redirect;
<?php
return [
'wp-admin.$role|$username' => [
'dashboard.home' => 'posts',
],
];