/** * 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); } 銀行搬運5千萬鉅款 壢警全程護送「鈔」安心
2026年03月03日 星期二

銀行搬運5千萬鉅款 壢警全程護送「鈔」安心

  • 農曆春節將至,為因應民眾兌換新鈔的需求,許多金融機構陸續在近日進行相關前置作業,將新鈔運送至指定分行。
  • 中壢警分局員警2月4日巡邏時,接獲聯邦銀行內壢分行請求協助護送新鈔至健行分行,總金額高達5千萬元的新鈔,在員警全程謹慎戒備下,安全送達。
  • 中壢警分局2月4日接獲內壢分行請求協助護送新鈔,總金額高達5千萬元的新鈔。
Q:這篇在講什麼?
A:農曆春節將至,為因應民眾兌換新鈔的需求,許多金融機構陸續在近日進行相關前置作業,將新鈔運送至指定分行。
Q:重點是什麼?
A:中壢警分局員警2月4日巡邏時,接獲聯邦銀行內壢分行請求協助護送新鈔至健行分行,總金額高達5千萬元的新鈔,在員警全程謹慎戒備下,安全送達。

農曆春節將至,為因應民眾兌換新鈔的需求,許多金融機構陸續在近日進行相關前置作業,將新鈔運送至指定分行。中壢警分局員警2月4日巡邏時,接獲聯邦銀行內壢分行請求協助護送新鈔至健行分行,總金額高達5千萬元的新鈔,在員警全程謹慎戒備下,安全送達。

IMG 3993
中壢警分局2月4日接獲內壢分行請求協助護送新鈔,總金額高達5千萬元的新鈔。圖:警方提供

內壢派出所表示,日前執行巡邏勤務,行經內壢分行時,接獲行員請求協助護鈔,經了解,是銀行有一筆5千萬的現金臨時需要運送到健行分行,但保全公司臨時有狀況無法提供協助,又擔心自己運送大量現金會遭到不肖人士覬覦有危險,才會緊急向警方尋求協助。為求謹慎,員警全程荷槍實彈,戰戰兢兢全神戒備,絲毫不敢掉以輕心,直到護送此筆5千多萬元的新鈔至指定處所安全入庫,才放鬆緊繃的心情,順利結束這次護鈔勤務。

IMG 3991
民眾若有提領大額現金,需要警方協助護送,可直接向地方派出所提出申請。圖:警方提供

警方提醒,春節前後金流往來熱絡,為遏制歹徒覬覦,守護民眾財產安全,安心過好年,除加強金融機構安全維護措施,民眾若有提領大額現金,需要警方協助護送,可直接向地方派出所提出申請,員警即會提供服務。另外,建議民眾最好能事先預約,讓派出所妥善安排勤務,避免臨時申請,調派不出警力,影響民眾寶貴的時間。

spot_imgspot_imgspot_img

相關新聞

即時新聞

頭條新聞

熱門新聞

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

已有帳號?