PHP Callback

You can use custom PHP code to render Frontend and Editor blocks output. Each Lazy Block has a filter for custom output callback. This output will be used instead of Frontend Code and Editor Code in the block Constructor.

These callbacks helpful when you want to put block output code inside your custom plugin or inside the theme code (functions.php).

  • Replace my_block_slug to your block name
  • Replace my_block_output to something unique, so it will not conflict with other functions

Frontend Output Wrapper

Lazy blocks automatically add a wrapper to your frontend output code. If you want to add your own wrapper implementation with custom attributes, you can easily disable default wrapper for your block using this filter:

Look at this code part to see what exactly added to the wrapper.

Was this page helpful?