apply_block_hooks_to_content


apply_block_hooks_to_content ( $content, $context, $callback = 'insert_hooked_blocks' )

Access:
  • private
Parameters:
  • (string) content Serialized content.
  • (WP_Block_Template|WP_Post|array) context A block template, template part, `wp_navigation` post object, or pattern that the blocks belong to.
  • (callable) callback A function that will be called for each block to generate the markup for a given list of blocks that are hooked to it. Default: 'insert_hooked_blocks'.
Returns:
  • (string) The serialized markup.
Defined at:

Description

Runs the hooked blocks algorithm on the given content.

Related Functions

filter_block_content, render_block_core_post_content, register_block_core_post_content, render_block_core_comment_content, register_block_core_comment_content

Top Google Results

User discussions

wpseek mobile