Automattic\WooCommerce\EmailEditor\Integrations\Core\Renderer\Blocks
Video::extract_poster_url
Extract poster URL from block attributes.
Method of the class: Video{}
No Hooks.
Returns
String. Poster URL or empty string.
Usage
// private - for code of main (parent) class only $result = $this->extract_poster_url( $block_attrs, $block_content ): string;
- $block_attrs(array) (required)
- Block attributes.
- $block_content(string) (required)
- Original block content (unused, kept for consistency).
Video::extract_poster_url() Video::extract poster url code WC 10.4.3
private function extract_poster_url( array $block_attrs, string $block_content ): string {
// Check for poster attribute.
if ( ! empty( $block_attrs['poster'] ) ) {
return esc_url( $block_attrs['poster'] );
}
return '';
}