[Resolved] Disable Editor roles acces to Elements

Home Forums Support [Resolved] Disable Editor roles acces to Elements

Home Forums Support Disable Editor roles acces to Elements

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2044421
    trebere

    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!

    #2045326
    Tom
    Lead Developer
    Lead Developer
    #2045525
    trebere

    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!

    #2046041
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.