문제

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