Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

ajkfkajshfkjahsfhk

Notice the ->set_render_callback() method. This allows you to set the output that will be generated from this block both in Preview mode and on the frontend.

->set_render_callback() accepts a callback, which should output the HTML markup for the block. The callback function will be called with the following arguments:

  • $fields, an array with the entered data in the block.
  • $attributes, an array with the attributes of the block like custom CSS class, alignment, etc.
  • $inner_blocks, a string with the content of all nested blocks.

Related posts

1 comment

Leave your comment