wpseek.com
WordPress开发者和主题制作者的搜索引擎



remove_serialized_parent_block › WordPress Function

Since6.6.0
已弃用n/a
remove_serialized_parent_block ( $serialized_block )
访问:
  • private
参数:
  • (string) $serialized_block The serialized markup of a block and its inner blocks.
    Required: Yes
返回:
  • (string) The serialized markup of the inner blocks.
定义在:
文档:

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



源码

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