Remove wp-admin plugin editor 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' => [
'plugins.plugin-editor',
'plugins.plugin-editor' => (string) $route,
'plugins.plugin-editor.title' => (string) $title,
'plugins.plugin-editor.title.[menu, page]' => (string) $title,
'plugins.plugin-editor.tabs',
'plugins.plugin-editor.tabs.[screen-options, help]',
],
];
Remove from menu;
<?php
return [
'wp-admin.$role|$username' => [
'plugins.plugin-editor',
],
];
Remove from menu and enforce a page redirect;
<?php
return [
'wp-admin.$role|$username' => [
'plugins.plugin-editor' => 'posts',
],
];