From 15403ac65218f9e86882329a7f32b75282a02cd2 Mon Sep 17 00:00:00 2001 From: M_Viper Date: Thu, 19 Mar 2026 23:52:28 +0100 Subject: [PATCH] Upload file archive-video.php via GUI --- Minecraft-Modern-Theme/archive-video.php | 290 +++++++++++++++++++++++ 1 file changed, 290 insertions(+) create mode 100644 Minecraft-Modern-Theme/archive-video.php diff --git a/Minecraft-Modern-Theme/archive-video.php b/Minecraft-Modern-Theme/archive-video.php new file mode 100644 index 0000000..22ddb71 --- /dev/null +++ b/Minecraft-Modern-Theme/archive-video.php @@ -0,0 +1,290 @@ + + + + +
+
+ +
+ + + + 'mm_video', + 'posts_per_page' => -1, + 'orderby' => 'menu_order date', + 'order' => 'ASC', + ) ); + + if ( $query->have_posts() ) : ?> + +
+ have_posts() ) : $query->the_post(); + $url = get_post_meta( get_the_ID(), '_mm_video_url', true ); + $category = get_post_meta( get_the_ID(), '_mm_video_category', true ); + $thumb = get_the_post_thumbnail_url( get_the_ID(), 'medium_large' ); + $type = $url ? mm_video_get_type( $url ) : 'unknown'; + + if ( ! $thumb && $url && $type === 'youtube' ) { + if ( preg_match( '/(?:youtube\.com\/(?:watch\?v=|shorts\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/', $url, $m ) ) { + $thumb = 'https://img.youtube.com/vi/' . $m[1] . '/maxresdefault.jpg'; + } + } + + $platform_icons = array( + 'youtube' => array( 'icon' => 'fab fa-youtube', 'color' => '#ff0000' ), + 'vimeo' => array( 'icon' => 'fab fa-vimeo-v', 'color' => '#1ab7ea' ), + 'twitch' => array( 'icon' => 'fab fa-twitch', 'color' => '#9146ff' ), + 'mp4' => array( 'icon' => 'fas fa-film', 'color' => '#aaa' ), + ); + $platform = isset( $platform_icons[$type] ) ? $platform_icons[$type] : array( 'icon' => 'fas fa-play', 'color' => '#aaa' ); + ?> +
+
+ + <?php echo esc_attr( get_the_title() ); ?> + +
+ +
+ +
+ + + +
+
+

+ +

+ + + + +
+
+ +
+ + + + + +
+ +

+ + + + + +
+ + +
+
+
+ + + + + + \ No newline at end of file