Gutenberg block editor – customise block’s metadata in JSON object
-
20-05-2021 - |
문제
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?
올바른 솔루션이 없습니다
제휴하지 않습니다 wordpress.stackexchange