Skip to content

Latest commit

 

History

History
91 lines (75 loc) · 1.84 KB

posts.item.md

File metadata and controls

91 lines (75 loc) · 1.84 KB

wp-admin.$role.posts.item

Remove posts item 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' => [
        'posts.item',
        'posts.item' => (string) $route,
        // block-editor
        'posts.item.add',
        'posts.item.add.[
            search,
            preview,
            headers,
            tips,
            grid,
            icons,
        ],'
        'posts.item.add.blocks',
        'posts.item.add.blocks.[
            text,
            media,
            design,
            widgets,
            theme,
            embeds,
        ],'
        'posts.item.editor',
        'posts.item.author',
        'posts.item.excerpt',
        'posts.item.trackbacks',
        'posts.item.custom-fields',
        'posts.item.discussion',
        'posts.item.link',
        'posts.item.revisions',
        'posts.item.featured-image',
        'posts.item.editor',
        'posts.item.categories',
        'posts.item.tags',
        'posts.item.sticky',
        'posts.item.revisions',
        'posts.item.format',
        // classic
        'posts.item.tabs',
        'posts.item.tabs.[screen-options, help]',
    ],
];

Remove;

Remove from menu;

<?php

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

Remove from menu and enforce a page redirect;

<?php

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

Bug?