Remove plugins add-new 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.add',
'plugins.add' => (string) $route,
'plugins.add.title' => (string) $title,
'plugins.add.title.[menu, page]' => (string) $title,
'plugins.add.title-link',
'plugins.add.tabs',
'plugins.add.tabs.help',
'plugins.add.filter',
'plugins.add.filter.[featured, popular, recommended, favorites]',
'plugins.add.search',
'plugins.add.popular-tags',
'plugins.add.item',
'plugins.add.item.[actions, meta]',
],
];
Remove from menu;
<?php
return [
'wp-admin.$role|$username' => [
'plugins.add',
],
];
Remove from menu and enforce a page redirect;
<?php
return [
'wp-admin.$role|$username' => [
'plugins.add' => 'posts',
],
];