Question

A simple wp block:

<!-- wp:video {"id":155742} -->
<figure class="wp-block-video"><video controls src="http:vidoe.mp4"></video></figure>
<!-- /wp:video -->

How to achieve something along those lines:

<!-- wp:video {"id":155742, "poster_id":155654 } -->
<figure class="wp-block-video"><video controls src="http:vidoe.mp4"></video></figure>
<!-- /wp:video -->

I’ve been going through many articles on adding custom attributes to blocks but can’t find reference to modify the JSON object that is included in the HTML comment that WP adds to blocks. Is there a hook to modify the JSON object?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top