wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



remove_serialized_parent_block › WordPress Function

Od6.6.0
Przestarzałyn/a
remove_serialized_parent_block ( $serialized_block )
Dostęp:
  • private
Parametry:
  • (string) $serialized_block The serialized markup of a block and its inner blocks.
    Wymagane: Tak
Powrót:
  • (string) The serialized markup of the inner blocks.
Zdefiniowane na:
Codex:

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



Źródło

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