wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



remove_serialized_parent_block › WordPress Function

Seit6.6.0
Veraltetn/v
remove_serialized_parent_block ( $serialized_block )
Zugriff:
  • private
Parameter:
  • (string) $serialized_block The serialized markup of a block and its inner blocks.
    Erforderlich: Ja
Gibt zurück:
  • (string) The serialized markup of the inner blocks.
Definiert in:
Codex:

Accepts the serialized markup of a block and its inner blocks, and returns serialized markup of the inner blocks.



Quellcode

function remove_serialized_parent_block( $serialized_block ) {
	$start = strpos( $serialized_block, '-->' ) + strlen( '-->' );
	$end   = strrpos( $serialized_block, '<!--' );
	return substr( $serialized_block, $start, $end - $start );
}