Automattic\WooCommerce\Blocks\BlockTypes
ProductGalleryLargeImage::get_video_html
Get video HTML for the product gallery large image area.
Method of the class: ProductGalleryLargeImage{}
No Hooks.
Returns
string.
Usage
// private - for code of main (parent) class only $result = $this->get_video_html( $media, $context, $inner_block );
- $media(array) (required)
- Video media data.
- $context(array) (required)
- The block context.
- $inner_block(WP_Block) (required)
- The inner block object.
ProductGalleryLargeImage::get_video_html() ProductGalleryLargeImage::get video html code WC 11.1.2
private function get_video_html( $media, $context, $inner_block ) {
$image_html = (
new WP_Block(
$inner_block->parsed_block,
$context
)
)->render( array( 'dynamic' => true ) );
return $this->replace_product_image_with_video( $image_html, $media, $context );
}