Support » Plugin: Gutenberg Blocks Library & Toolkit - Editor Plus by Extendify » Is it possible to turn off the library?

  • Resolved steve-pheriche


    Hi, this is a great plugin but I really need to turn off the Library for using it on any client sites. Is there any way to deactivate that? A hook perhaps?

    You can understand that while I’m happy with clients having access to additional format options – what I really want them to access is their internal patterns and templates. I really DO NOT want them filling their designed site with “Dog Groomer” and “Yoga Studio” layouts. That would be a disaster.

    So, is there a place to turn that Library off? Or can we set it to point at a local list of patterns and templates ONLY?


Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support mohammedeisa



    The template library is based on JS and REACT. So, unfortunately, there is no available hook for that.

    You can use CSS to hide the library button.

    Please add the following code to your theme freuntions.php file to hide the library button.

    add_action('admin_head', 'my_custom_fonts');
    function my_custom_fonts()
    	echo '<style>
    	display: none!important;
    Thread Starter steve-pheriche


    Hi, Thanks for the prompt response.

    Yeah, I did have a look through the code and couldn’t see a hook or filter.
    I’d considered the CSS route, it feels a bit “hacky” to have the library in memory but hidden.

    It might be good to provide a way for users to turn that feature off. I understand for small businesses with one person making their own site it’s probably good – but for web-devs supplying a concise editor to a client with 20 staff who have access to the Editor role … it’s a recipe for disaster!

    I investigated forking to see if I can make the enqueue conditional on user role and an options page, or current_user_can().

    For example: /plugins/editorplus/index.php (line 16)
    require_once plugin_dir_path(__FILE__) . 'extendify-templates-sdk/class-templates-sdk.php';

    But for now I’ve done a rather brutal local fork by commenting out the require_once , but thanks again for your work here with this plugin and the quick response.

    – Steve

    Thread Starter steve-pheriche


    Hi, what I did today is a different horrible fork, but it would be a better place for you to put a filter.

    Line 90 of class-templates-sdk.php on my development version now looks like this, and will probably stay this way.

                  if ( current_user_can( 'manage_options' ) ) {
                    self::$instance = new Self();

    Naturally that’s not idea for you guys, but I suggest some conditional there from your options-general.php?page=editor_plus#/general might be a good idea.

    Otherwise everyone will be forking like I did!

    thanks again

    Plugin Support mohammedeisa


    Thanks for your investigation. I will forward this to the development team.

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