Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 1.17 KB

appearance.theme-editor.md

File metadata and controls

58 lines (42 loc) · 1.17 KB

wp-admin.$role.appearance.theme-editor

Remove wp-admin theme editor components.

Options;

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

return [
    'wp-admin.$role|$username' => [
        'appearance.theme-editor',
        'appearance.theme-editor' => (string) $route,
        'appearance.theme-editor.title' => (string) $title,
        'appearance.theme-editor.title.[menu, page]' => (string) $title,
        'appearance.theme-editor.tabs',
        'appearance.theme-editor.tabs.[screen-options, help]',
    ],
];

Remove;

Remove from menu;

<?php

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

Remove from menu and enforce a page redirect;

<?php

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

Bug?