Matt L How to hide it completely? And how to have it show for only one role, ie. Administrator only? Thanks!
Calvin Alkan Matt L By default, CUI is only loaded for users that have the publish_posts capability (author, editor, admin). Nobody else can see/use it. Is that sufficient for your use case? Or do you need to further lock it down?
Matt L I'd like to restrict all usage of the plugin, including admin bar visibility, to Admin only. So an author or editor couldn't access it even if they accidentally typed the keyboard shortcut.
Calvin Alkan Matt L Gotcha. You can drop this into your favorite code snippet plugin (or child theme): /** * Disable CommandUI for all users, unless they have the manage_options capability. */ add_filter('commandui/load-js', fn() => current_user_can('manage_options'));