From db2ca8713549b12b5b85a2842ce5f5bdfd7462c4 Mon Sep 17 00:00:00 2001 From: M_Viper Date: Mon, 30 Mar 2026 18:42:39 +0000 Subject: [PATCH] Upload via Git Manager GUI - test-filter.php --- Minecraft-Modern-Theme/test-filter.php | 104 ++++++++++++------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/Minecraft-Modern-Theme/test-filter.php b/Minecraft-Modern-Theme/test-filter.php index dc3fbd0..812c713 100644 --- a/Minecraft-Modern-Theme/test-filter.php +++ b/Minecraft-Modern-Theme/test-filter.php @@ -1,52 +1,52 @@ - 'mm_livestream', - 'posts_per_page' => -1, - 'post_status' => 'publish', -); - -$query = new WP_Query($args); - -if ($query->have_posts()) { - while ($query->have_posts()) { - $query->the_post(); - $post_id = get_the_ID(); - - $profile_url = get_post_meta($post_id, '_mm_livestream_url', true); - $player_url = get_post_meta($post_id, '_mm_livestream_player_url', true); - $youtube_channel_id = get_post_meta($post_id, '_mm_livestream_youtube_channel_id', true); - $owner = get_post_meta($post_id, '_mm_livestream_owner', true); - - echo "Post #$post_id: " . get_the_title() . "\n"; - echo " Owner: $owner\n"; - echo " Profile: $profile_url\n"; - echo " Player: $player_url\n"; - echo " Channel ID: $youtube_channel_id\n"; - - $stream = mm_video_get_livestream_data($profile_url, $player_url, $youtube_channel_id); - - echo " Platform: " . $stream['platform'] . "\n"; - echo " Video ID: " . ($stream['video_id'] ?? 'EMPTY') . "\n"; - echo " Embed URL: " . ($stream['embed_url'] ?? 'EMPTY') . "\n"; - - if ($stream['platform'] === 'youtube') { - $video_id = $stream['video_id'] ?? ''; - if ($video_id) { - $is_live = mm_video_check_youtube_live_status($video_id); - echo " Live Status Check: " . ($is_live ? 'LIVE ✓' : 'NOT LIVE ✗') . "\n"; - } else { - echo " Live Status Check: SKIPPED (no video_id)\n"; - } - } - - echo "\n"; - } - wp_reset_postdata(); -} else { - echo "No livestream posts found!\n"; -} + 'mm_livestream', + 'posts_per_page' => -1, + 'post_status' => 'publish', +); + +$query = new WP_Query($args); + +if ($query->have_posts()) { + while ($query->have_posts()) { + $query->the_post(); + $post_id = get_the_ID(); + + $profile_url = get_post_meta($post_id, '_mm_livestream_url', true); + $player_url = get_post_meta($post_id, '_mm_livestream_player_url', true); + $youtube_channel_id = get_post_meta($post_id, '_mm_livestream_youtube_channel_id', true); + $owner = get_post_meta($post_id, '_mm_livestream_owner', true); + + echo "Post #$post_id: " . get_the_title() . "\n"; + echo " Owner: $owner\n"; + echo " Profile: $profile_url\n"; + echo " Player: $player_url\n"; + echo " Channel ID: $youtube_channel_id\n"; + + $stream = mm_video_get_livestream_data($profile_url, $player_url, $youtube_channel_id); + + echo " Platform: " . $stream['platform'] . "\n"; + echo " Video ID: " . ($stream['video_id'] ?? 'EMPTY') . "\n"; + echo " Embed URL: " . ($stream['embed_url'] ?? 'EMPTY') . "\n"; + + if ($stream['platform'] === 'youtube') { + $video_id = $stream['video_id'] ?? ''; + if ($video_id) { + $is_live = mm_video_check_youtube_live_status($video_id); + echo " Live Status Check: " . ($is_live ? 'LIVE ✓' : 'NOT LIVE ✗') . "\n"; + } else { + echo " Live Status Check: SKIPPED (no video_id)\n"; + } + } + + echo "\n"; + } + wp_reset_postdata(); +} else { + echo "No livestream posts found!\n"; +}