Site logo

Archived topic

Disable Editor roles acces to Elements

3 replies · Started by trebere on December 10, 2021

Viewing posts 1–4 of 4

Hello,

I've noticed when a user's role is Editor, editing a post, the Active Elements info panel appears in the sidebar but it hasn't access to Elements through the admin Menu>Appearance>Elements. I'd like completely disable access to this role or hide the panel info to this role.

I've tried using wp.data.dispatch('core/edit-post').removeEditorPanel('meta-box-gpp-elements-info-panel'); but I couldn't guess the exact panel id.

Could you point me how to do it?

Thank you!

Hi,

Yes, I could make it work at least with the domReady option by now.

wp.domReady( function() {
  var unregisterPlugin = wp.plugins.unregisterPlugin;

  unregisterPlugin( 'generatepress-elements-info-panel' );
} );

Thank you!

You're welcome :)

This archived topic is closed to new replies.