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