$blocks,
'report' => array(
'changed' => ! empty( self::$conversion_report ),
'events' => self::$conversion_report,
'event_count' => count( self::$conversion_report ),
),
);
}
/**
* Convert HTML string or serialized WordPress block markup to block data arrays.
*
* @param string $html Raw HTML input or WordPress block markup.
* @return array Array of block data arrays.
*/
private static function convert_internal( $html ) {
if ( empty( trim( $html ) ) ) {
return array();
}
// Detect native WordPress block markup and parse it directly.
$native_markup = self::extract_native_block_markup( $html );
if ( null !== $native_markup ) {
return self::convert_native_blocks( $native_markup );
}
if ( false === stripos( $html, '