Skip to content

Latest commit

 

History

History
68 lines (52 loc) · 1.6 KB

appearance.menus.md

File metadata and controls

68 lines (52 loc) · 1.6 KB

wp-admin.$role.appearance.menus

Remove wp-admin menu components.

Options;

  • Parent items remove child items.
  • For concise documentation, option.[x, y] has been abbreviated from option.x, option.y.
<?php

return [
    'wp-admin.$role|$username' => [
        'appearance.menus',
        'appearance.menus' => (string) $route,
        'appearance.menus.title' => (string) $title,
        'appearance.menus.title.[menu, page]' => (string) $title,
        'appearance.menus.title-link',
        'appearance.menus.tabs',
        'appearance.menus.tabs.[screen-options, help]',
        'appearance.menus.nag',
        'appearance.menus.add',
        'appearance.menus.add.[custom, post, page, category, tag]',
        'appearance.menus.item',
        'appearance.menus.item.[target, title, classes, xfn, description, remove]',
        'appearance.menus.settings',
        'appearance.menus.settings.[auto-add, location]',
        'appearance.menus.delete',
        'appearance.menus.max-depth' => (int) $depth,
        'appearance.menus.max-depth.$name' => (int) $depth,
    ],
];

Remove;

Remove from menu;

<?php

return [
    'wp-admin.$role|$username' => [
        'appearance.menus',
    ],
];

Remove from menu and enforce a page redirect;

<?php

return [
    'wp-admin.$role|$username' => [
        'appearance.menus' => 'posts',
    ],
];

Bug?