Skip to content

Latest commit

 

History

History
53 lines (38 loc) · 900 Bytes

media.md

File metadata and controls

53 lines (38 loc) · 900 Bytes

wp-admin.$role.media

Update, remove or redirect the media menu item.

Options;

<?php

return [
    'wp-admin.$role|$username' => [
        'media',
        'media' => (string) $route,
        'media.title' => (string) $title,
        'media.icon' => (string) $dashicon,
    ],
];

Remove;

Remove from menu;

<?php

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

Remove from menu and enforce a page redirect;

<?php

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

Bug?