I'm building a plugin that contains a simple editor for a particular file format. This will only be accessible in the admin menu's for the plugin, no frontend access. I've started looking at the actual editor layout and it needs some more real estate on the admin side, so I want to hide the admin menu panels. It would also be cleaner and reduce any unnecessary clutter, like the Gutenberg editor, or the customise theme page. Here's a few options that I'm thinking of:
- I could make the editor completely full screen and have a "back to WordPress" button to go back to admin screen
- It could work equally well to hide the left admin menu and leave in the top bar, although this would be a waste of space on mobile.
Are there any built in WordPress functions that hide the admin menu? I think my preferred way to add the editor is to use the add_submenu_page() so that it has it's own page in the menu. However I don't know if there are any standard methods to hide the default admin menu panels on a particular page?
Otherwise I could create the editor in it's own standalone file that the user visits but then I'll have to add a lot of WordPress functions such as checking that the user is logged in, and providing standard WordPress functionality.
I want all the code to be contained within the plugin, so I don't want to edit any pages in wp-admin.