Accepts the serialized markup of a block and its inner blocks, and returns serialized markup of the inner blocks.
Parameters
$serialized_block
stringrequired- The serialized markup of a block and its inner blocks.
Source
function remove_serialized_parent_block( $serialized_block ) {
$start = strpos( $serialized_block, '-->' ) + strlen( '-->' );
$end = strrpos( $serialized_block, '<!--' );
return substr( $serialized_block, $start, $end - $start );
}
Changelog
Version | Description |
---|---|
6.6.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.