/** * Plugin Name: WP Yahoo RSS (With SEO Delay & Security Hardening) * Plugin URI: https://gen.caca01.com/ * Description: Wordpress Yahoo RSS feed tweaked for only tyenews.com (Includes SEO Time Delay, Path locking, and Performance fix) * Version: 1.0.9 * Author: Carter Wu (Final Patch: Route locking + Query Scoping + UTC Time) + Safe Cache Patch * Author URI: https://gen.caca01.com/ * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt * Text Domain: wp-yahoo-rss */ if (!defined('ABSPATH')) exit; const YH_DELAY_MINUTES = 120; const YH_QUERY_VAR = 'yh_feed_stats'; function yh_register_rewrite_rules() { add_rewrite_rule('^yahoo-rss(?:/([^/]+))?/?$', 'index.php?' . YH_QUERY_VAR . '=true&type=$matches[1]', 'top'); } add_filter('query_vars', 'yh_feed_query_vars'); function yh_feed_query_vars($query_vars) { $query_vars[] = YH_QUERY_VAR; $query_vars[] = 'type'; return $query_vars; } register_activation_hook(__FILE__, 'yh_feed_activate'); function yh_feed_activate() { yh_register_rewrite_rules(); flush_rewrite_rules(false); } register_deactivation_hook(__FILE__, 'yh_feed_deactivate'); function yh_feed_deactivate() { flush_rewrite_rules(false); } add_action('init', 'yh_feed_init'); function yh_feed_init() { yh_register_rewrite_rules(); } add_action('parse_request', 'yh_feed_parse_request'); function yh_feed_parse_request(&$wp) { if (!array_key_exists(YH_QUERY_VAR, $wp->query_vars)) { return; } $is_yahoo_path = false; if (!empty($wp->request) && preg_match('#^yahoo-rss(?:/|$)#', $wp->request)) { $is_yahoo_path = true; } if ($is_yahoo_path) { if (!defined('IS_YAHOO_FEED')) { define('IS_YAHOO_FEED', true); } $linkify_path = dirname(__FILE__) . '/data/linkify.php'; if (file_exists($linkify_path)) { require_once $linkify_path; } } } add_action('template_redirect', 'yh_feed_render_output'); function yh_feed_render_output() { if (!defined('IS_YAHOO_FEED') || IS_YAHOO_FEED !== true) { return; } if (!defined('DONOTCACHEPAGE')) define('DONOTCACHEPAGE', true); if (!defined('DONOTCACHEOBJECT')) define('DONOTCACHEOBJECT', true); if (!defined('DONOTCACHEDB')) define('DONOTCACHEDB', true); // ✅ 改這裡:用 query var 取 type(rewrite 進來就是 query var) $type = get_query_var('type'); $type = is_string($type) ? sanitize_key($type) : ''; $cache_key = 'yh_yahoo_feed_xml_' . md5($type); $force = (isset($_GET['nocache']) && $_GET['nocache'] !== ''); if (!$force) { $cached = get_transient($cache_key); if (is_string($cached) && $cached !== '') { header('Content-Type: text/xml; charset=utf-8'); echo $cached; exit(); } } $list_path = dirname(__FILE__) . '/data/list.php'; if (!file_exists($list_path)) { status_header(404); header('Content-Type: text/plain; charset=UTF-8'); echo 'Error: RSS template file not found.'; exit(); } ob_start(); try { include $list_path; $xml = ob_get_clean(); } catch (Throwable $e) { if (ob_get_level()) ob_end_clean(); status_header(500); header('Content-Type: text/plain; charset=UTF-8'); echo 'Feed error: ' . $e->getMessage(); exit(); } if (is_string($xml) && $xml !== '') { set_transient($cache_key, $xml, 60); } header('Content-Type: text/xml; charset=utf-8'); echo $xml; exit(); } function yh_filter_cats($categories) { if (empty($categories) || !is_array($categories)) return ''; foreach ($categories as $category) { if (!is_object($category)) continue; $name = isset($category->name) ? trim((string)$category->name) : ''; $slug = isset($category->slug) ? strtolower(trim((string)$category->slug)) : ''; if ( $name === 'YAHOO' || $name === '不送YAHOO' || $slug === 'nosend-yahoo' || $slug === '不上yahoo' || strpos($slug, 'yahoo') !== false ) { return ''; } } return isset($categories[0]->name) ? esc_html($categories[0]->name) : ''; } function yh_cat_yahoo($category) { return $category; } add_action('pre_get_posts', 'yh_exclude_nosend_yahoo_from_yahoo_rss'); function yh_exclude_nosend_yahoo_from_yahoo_rss($query) { if (is_admin() || !defined('IS_YAHOO_FEED') || IS_YAHOO_FEED !== true) { return; } $pt = $query->get('post_type'); if (!empty($pt) && $pt !== 'post') { return; } $query->set('post_type', 'post'); static $exclude_term_ids = null; if ($exclude_term_ids === null) { $exclude_term_ids = array(); $term_slugs = array('nosend-yahoo', '不上yahoo'); foreach ($term_slugs as $slug) { $term = get_category_by_slug($slug); if ($term && !is_wp_error($term)) { $exclude_term_ids[] = (int) $term->term_id; } } } if (!empty($exclude_term_ids)) { $tax_query = (array) $query->get('tax_query'); $tax_query[] = array( 'taxonomy' => 'category', 'field' => 'term_id', 'terms' => $exclude_term_ids, 'operator' => 'NOT IN', ); $query->set('tax_query', $tax_query); } $delay_minutes = (int) YH_DELAY_MINUTES; if ($delay_minutes > 0) { $cutoff_ts = (int) current_time('timestamp', true) - ($delay_minutes * 60); $cutoff_time = gmdate('Y-m-d H:i:s', $cutoff_ts); $date_query = (array) $query->get('date_query'); $date_query[] = array( 'column' => 'post_date_gmt', 'before' => $cutoff_time, ); $query->set('date_query', $date_query); } $query->set('ignore_sticky_posts', true); $query->set('no_found_rows', true); $query->set('cache_results', false); $query->set('update_post_meta_cache', false); $query->set('update_post_term_cache', true); } 4/13本土爆增744例!境外+189、無病歿
2026年03月03日 星期二

4/13本土爆增744例!境外+189、無病歿

  • 中央流行疫情指揮中心今(13)日公布國內新增933例COVID-19確定病例,分別為744例本土個案及189例境外移入(95例為航班落地採檢。
  • 指揮中心表示,今日新增之744例本土病例,為358例男性、385例女性、1例調查中,年齡介於未滿5歲至90多歲,發病日介於今(2022)年4。
  • 個案分佈為新北市(264例),臺北市(141例),桃園市(65例),基隆市(56例),高雄市(50例),花蓮縣(48例),新竹縣及臺中市(各。
Q:這篇在講什麼?
A:中央流行疫情指揮中心今(13)日公布國內新增933例COVID-19確定病例,分別為744例本土個案及189例境外移入(95例為航班落地採檢。
Q:重點是什麼?
A:指揮中心表示,今日新增之744例本土病例,為358例男性、385例女性、1例調查中,年齡介於未滿5歲至90多歲,發病日介於今(2022)年4。

中央流行疫情指揮中心今(13)日公布國內新增933例COVID-19確定病例,分別為744例本土個案及189例境外移入(95例為航班落地採檢陽性),另確診個案無新增死亡。

0413新增個案多例含境外國家、居住縣市 01 01
本土爆增744例!境外+189、無個案死亡。圖:指揮中心提供 

指揮中心表示,今日新增之744例本土病例,為358例男性、385例女性、1例調查中,年齡介於未滿5歲至90多歲,發病日介於今(2022)年4月4日至4月12日,其中包含368例為無症狀感染。個案分佈為新北市(264例),臺北市(141例),桃園市(65例),基隆市(56例),高雄市(50例),花蓮縣(48例),新竹縣及臺中市(各23例),宜蘭縣及屏東縣(各14例),臺南市(12例),新竹市(11例),彰化縣(7例),臺東縣(4例),苗栗縣、嘉義市及嘉義縣(各3例),雲林縣(2例),南投縣(1例)。相關疫情調查持續進行中。

0413本土、境外病例分析
1/1~4/12本土病例分析。圖:指揮中心提供

指揮中心說明,今日新增境外移入個案為81例男性、101例女性、7例調查中,年齡介於未滿5歲至70多歲,分別自越南(29例),印尼(22例),日本(4例),加拿大、美國及菲律賓(各3例),韓國及法國(各2例),卡達、中國、香港、馬來西亞、西班牙及比利時(各1例)移入,另115例調查中。入境日介於今年3月11日至4月12日。

0413 本土中重度以上個案說明
新增3例本土中/重度以上個案說明。圖:指揮中心提供

指揮中心指出,今年4月12日公布之案28816本土病例,經疫調後,個案於今年4月1日自泰國入境,改判為境外移入病例。

★桃園電子報提醒您★
防範新冠肺炎,請配戴口罩、勤用肥皂洗手,避免食用生食、減少出入人潮擁擠的場所!
如身體不適出現疑似症狀請儘速就醫,並撥打防疫專線、主動通報,務必告知醫師旅遊史。
※防疫專線:1922、(免付費)0800-001922

spot_imgspot_imgspot_img

相關新聞

即時新聞

頭條新聞

熱門新聞

會員註冊
註冊讀者會員|即時掌握在地新聞,專屬好康不漏接
密碼至少8碼

已有帳號?