Optimization thoughts
-
First off, I want to compliment you on an *excellent* plugin, that does exactly as promised. I’ve got a multisite project I’m working on where we’re setting up site owners as shop managers, so this is quite helpful.
While playing with it this afternoon, I had to make two small tweaks to get the plugin to perform exactly as desired, so I thought I’d share them here so that they could perhaps be integrated into a future version of the plugin.
Item 1: Hiding “Edit CSS” link in Appearance menu
This could just be a new feature since the last update, but the plugin left the “Edit CSS” link visible in the Appearance menu. In an effort to insulate users from potentially breaking their site, it would be nice to remove it. The following line accomplishes that when added to
emwa_new_admin_menu()
:// Hide Edit CSS Submenu remove_submenu_page( 'themes.php', 'editcss-customizer-redirect' );
Item 2: Changing capability required to access the settings panel
My project has some custom admin pages utilizing the Settings API, which necessitates giving the editor/shop manager roles the
manage_options
capability. Would it be possible (perhaps as an option?) to setemwa_add_admin_menu()
to useupdate_core
or some similar admin-level capability unrelated to options to ensure editors don’t accidentally gain access to this panel?
- The topic ‘Optimization thoughts’ is closed to new replies.