wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
get_comment_delimited_block_content › WordPress Function
Seit5.3.1
Veraltetn/v
› get_comment_delimited_block_content ( $block_name, $block_attributes, $block_content )
Parameter: (3) |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Returns the content of a block, including comment delimiters.
Ähnliche Funktionen: get_media_embedded_in_content, filter_block_content, get_comment_pages_count, get_comment_count, get_comment_excerpt
Quellcode
function get_comment_delimited_block_content( $block_name, $block_attributes, $block_content ) { if ( is_null( $block_name ) ) { return $block_content; } $serialized_block_name = strip_core_block_namespace( $block_name ); $serialized_attributes = empty( $block_attributes ) ? '' : serialize_block_attributes( $block_attributes ) . ' '; if ( empty( $block_content ) ) { return sprintf( '<!-- wp:%s %s/-->', $serialized_block_name, $serialized_attributes ); } return sprintf( '<!-- wp:%s %s-->%s<!-- /wp:%s -->', $serialized_block_name, $serialized_attributes, $block_content, $serialized_block_name ); }