سؤال

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?

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى wordpress.stackexchange
scroll top