Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 1.13 KB

settings.media.md

File metadata and controls

59 lines (43 loc) · 1.13 KB

wp-admin.$role.settings.media

Remove settings media 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' => [
        'settings.media',
        'settings.media' => (string) $route,
        'settings.media.title' => (string) $title,
        'settings.media.title.[menu, page]' => (string) $title,
        'settings.media.tabs',
        'settings.media.tabs.[screen-options, help]',
        'settings.media.sizes',
        'settings.media.uploads',
    ],
];

Remove;

Remove from menu;

<?php

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

Remove from menu and enforce a page redirect;

<?php

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

Bug?