• Resolved rinart73

    (@rinart73)


    Could we get an option (toggle maybe) to process Inner Blocks field manually inside block PHP code?
    Basically I have lazy block that is supposed to act as a wrapper and display its inner blocks conditionally. So there is no point in process Inner Blocks if they’re not gonna be displayed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nikita

    (@nko)

    Hey.

    Try the simple if condition in the PHP. For example with check for toggle field value:

    <p>
      <?php
      if ($attributes['toggle_control']) {
        echo $attributes['inner_blocks_control'];
      }
      ?>
    </p>
    

    Regards, nK.

    Thread Starter rinart73

    (@rinart73)

    I know about this, but the problem here is that all inner blocks are parsed and processed by WordPress in any case, even if the condition is not met.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Inner Blocks late processing request’ is closed to new replies.