wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



remove_serialized_parent_block › WordPress Function

Depuis6.6.0
Dépréciéen/a
remove_serialized_parent_block ( $serialized_block )
Accès:
  • private
Paramètres:
  • (string) $serialized_block The serialized markup of a block and its inner blocks.
    Requis: Oui
Retourne:
  • (string) The serialized markup of the inner blocks.
Défini(e) dans:
Codex:

Accepts the serialized markup of a block and its inner blocks, and returns serialized markup of the 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 );
}