getAttribute( 'style' ) ); $background = $styles['background'] ?? $styles['background-color'] ?? ''; if ( $background ) { $styles['--wp--custom--video--background'] = $background; unset( $styles['background'], $styles['background-color'] ); } $figure->setAttribute( 'style', css_array_to_string( $styles ) ); $html = $dom->saveHTML(); add_action( 'wp_enqueue_scripts', NS . 'video_scripts_styles' ); return $html; } /** * Enqueue media element scripts and styles. * * @since 0.0.2 * * @return void */ function video_scripts_styles(): void { $js = <<