Remove wp-admin theme editor components.
- Parent items remove child items.
- For concise documentation,
option.[x, y]
has been abbreviated fromoption.x, option.y
.
<?php
<?php
return [
'wp-admin.$role|$username' => [
'appearance.theme-editor',
'appearance.theme-editor' => (string) $route,
'appearance.theme-editor.title' => (string) $title,
'appearance.theme-editor.title.[menu, page]' => (string) $title,
'appearance.theme-editor.tabs',
'appearance.theme-editor.tabs.[screen-options, help]',
],
];
Remove from menu;
<?php
return [
'wp-admin.$role|$username' => [
'appearance.theme-editor',
],
];
Remove from menu and enforce a page redirect;
<?php
return [
'wp-admin.$role|$username' => [
'appearance.theme-editor' => 'posts',
],
];