wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



remove_serialized_parent_block › WordPress Function

Desde6.6.0
Obsoleton/a
remove_serialized_parent_block ( $serialized_block )
Acesso:
  • private
Parâmetros:
  • (string) $serialized_block The serialized markup of a block and its inner blocks.
    Required: Yes
Retorna:
  • (string) The serialized markup of the inner blocks.
Definido em:
Codex:

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



Fonte

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