| | |
| | | $date = date('c',strtotime($post->post_date)); |
| | | $title = $attributes['title'] ?? $post->post_title; |
| | | $description = $attributes['description'] ?? $post->post_excerpt; |
| | | |
| | | $title = "Legacy Tattoo Removal"; |
| | | $description="A video of Madi Rawson performing laser tattoo removal treatments."; |
| | | // If no video sources, return empty |
| | | if (empty($video_sources)) { |
| | | return ''; |
| | |
| | | $html .= ' poster="' . esc_url($poster_url) . '"'; |
| | | } |
| | | |
| | | $html .= '>'; |
| | | $html .= ' fetch-priority="high">'; |
| | | |
| | | // Add mobile sources first (lower resolution) |
| | | foreach ($mobile_sources as $source) { |
| | | if (!empty($source['url']) && !empty($source['mime'])) { |
| | | $html .= '<source'; |
| | | $html .= ' src="' . esc_url($source['url']) . '"'; |
| | | $html .= ' data-src="' . esc_url($source['url']) . '"'; |
| | | $html .= ' type="' . esc_attr($source['mime']) . '"'; |
| | | $html .= ' media="(max-width: 767px)"'; |
| | | $html .= '>'; |
| | |
| | | foreach ($video_sources as $source) { |
| | | if (!empty($source['url']) && !empty($source['mime'])) { |
| | | $html .= '<source'; |
| | | $html .= ' src="' . esc_url($source['url']) . '"'; |
| | | $html .= ' data-src="' . esc_url($source['url']) . '"'; |
| | | $html .= ' type="' . esc_attr($source['mime']) . '"'; |
| | | |
| | | // Add media query for desktop if mobile sources exist |