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