Remove settings reading 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.reading',
'settings.reading' => (string) $route,
'settings.reading.title' => (string) $title,
'settings.reading.title.[menu, page]' => (string) $title,
'settings.reading.tabs',
'settings.reading.tabs.[screen-options, help]',
'settings.reading.front-page',
'settings.reading.front-page.posts',
'settings.reading.posts-per-page',
'settings.reading.posts-per-rss',
'settings.reading.rss-excerpt',
'settings.reading.discourage-search',
],
];
Remove from menu;
<?php
return [
'wp-admin.$role|$username' => [
'settings.reading',
],
];
Remove from menu and enforce a page redirect;
<?php
return [
'wp-admin.$role|$username' => [
'settings.reading' => 'posts',
],
];