What problem does this address?
I would like to retrieve the poster image URL from the core/video block but the only way to do is through regex of the entire inner HTML.
\includes\global\loop.php:40:
array (size=5)
'blockName' => string 'core/video' (length=10)
'attrs' =>
array (size=1)
'id' => int 356
'innerBlocks' =>
array (size=0)
empty
'innerHTML' => string '
<figure class="wp-block-video"><video controls poster="POSTER URL" preload="auto" src="VIDEO URL" playsinline></video><figcaption>This is a video caption</figcaption></figure>
' (length=319)
'innerContent' =>
array (size=1)
0 => string '
<figure class="wp-block-video"><video controls poster="POSTER URL" preload="auto" src="VIDEO URL" playsinline></video><figcaption>This is a video caption</figcaption></figure>
What is your proposed solution?
Make "poster," specifically the URL of the image, an accessible object. It may be useful to access the caption as its own object as well.
What problem does this address?
I would like to retrieve the poster image URL from the core/video block but the only way to do is through regex of the entire inner HTML.
What is your proposed solution?
Make "poster," specifically the URL of the image, an accessible object. It may be useful to access the caption as its own object as well.