Plugin breaks InnerBlocks template functionality

[ad_1]

Plugin Author
kubiq

(@kubiq)

Hello,

is it this plugin?
https://projectdmc.org/plugins/lazy-blocks/
or do I need PRO version?

Can you replicate the issue in some sandbox, or can you give me step-by-step instructions how to replicate this on my own?

Yes, that’s the one.

No need for PRO version.

  1. Install Lazy Blocks
  2. Create a block and use PHP as Output method
  3. In php use template as provided in the Lazy Blocks docs:
<InnerBlocks
  template="[
    [ 'core/heading', { content: 'Blocks locking example:', level: 4 } ],
    [ 'core/paragraph', {
      content: 'This paragraph you can\'t move and remove',
      className: 'custom-classname-here',
      lock: {
        remove: true,
        move: true,
      }
    } ],
    [ 'core/paragraph', { content: 'This one can be freely removed' } ],
  ]"
/>

4. Use block in a post, try with and without Block Editor Bootstrap Blocks active

If above does not work, let me know to give you access to a staging site I’m working on.

Thank you!

Plugin Author
kubiq

(@kubiq)

I did what you wrote and everything works for me:

Take my sincere apology, I made a mistake in the code… I forgot to wrap the template with additional [].

Sorry again and thank you for your good work!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer