wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
apply_block_hooks_to_content is private and should not be used in themes or plugins directly.
apply_block_hooks_to_content › WordPress Function
Da6.6.0
Deprecaton/a
› apply_block_hooks_to_content ( $content, $context, $callback = 'insert_hooked_blocks' )
Accedi: |
|
Parametri: (3) |
|
Ritorna: |
|
Definito a: |
|
Codex: |
Runs the hooked blocks algorithm on the given content.
Sorgenti
function apply_block_hooks_to_content( $content, $context, $callback = 'insert_hooked_blocks' ) { $hooked_blocks = get_hooked_blocks(); if ( empty( $hooked_blocks ) && ! has_filter( 'hooked_block_types' ) ) { return $content; } $blocks = parse_blocks( $content ); $before_block_visitor = make_before_block_visitor( $hooked_blocks, $context, $callback ); $after_block_visitor = make_after_block_visitor( $hooked_blocks, $context, $callback ); return traverse_and_serialize_blocks( $blocks, $before_block_visitor, $after_block_visitor ); }