Remove wp-admin themes 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' => [
'appearance.themes',
'appearance.themes' => (string) $route,
'appearance.themes.title' => (string) $title,
'appearance.themes.title.[menu, page]' => (string) $title,
'appearance.themes.title-count',
'appearance.themes.title-link',
'appearance.themes.search',
'appearance.themes.tabs',
'appearance.themes.inactive',
'appearance.themes.theme',
'appearance.themes.theme.[actions, nag]',
'appearance.themes.theme.actions.[activate, customize]',
],
];
Remove from menu;
<?php
return [
'wp-admin.$role|$username' => [
'appearance.themes',
],
];
Remove from menu and enforce a page redirect;
<?php
return [
'wp-admin.$role|$username' => [
'appearance.themes' => 'posts',
],
];