diff --git a/src/blocks/interactive/movie-like-icon/render.php b/src/blocks/interactive/movie-like-icon/render.php index 47dbabf..8eb1a80 100644 --- a/src/blocks/interactive/movie-like-icon/render.php +++ b/src/blocks/interactive/movie-like-icon/render.php @@ -8,6 +8,7 @@ $post = get_post(); $wrapper_attributes = get_block_wrapper_attributes(); $play_icon = file_get_contents( get_template_directory() . '/assets/empty-heart.svg' ); +$context = array( 'post' => array( 'id' => $post->ID ) ); wp_interactivity_state( 'wpmovies', @@ -21,7 +22,7 @@
- data-wp-context='{ "post": { "id": ID; ?> } }' + >
ID, '_wpmovies_images', true ), true ); $videos = json_decode( get_post_meta( $post->ID, '_wpmovies_videos', true ), true ); +$context = array( 'tab' => 'images' ); wp_interactivity_state( 'wpmovies', @@ -25,7 +26,7 @@
- data-wp-context='{ "tab": "images" }' + >
  • @@ -82,8 +83,9 @@ class="wpmovies-tab-button" $video_id ); ?> -
    +
    >