Remove settings writing 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.writing',
'settings.writing' => (string) $route,
'settings.writing.title' => (string) $title,
'settings.writing.title.[menu, page]' => (string) $title,
'settings.writing.tabs',
'settings.writing.tabs.[screen-options, help]',
'settings.writing.default-category',
'settings.writing.default-post-format',
'settings.writing.post-via-email',
'settings.writing.update-services',
],
];
Remove from menu;
<?php
return [
'wp-admin.$role|$username' => [
'settings.writing',
],
];
Remove from menu and enforce a page redirect;
<?php
return [
'wp-admin.$role|$username' => [
'settings.writing' => 'posts',
],
];