WP BrowserUpdate

外掛說明

許多使用者仍在使用過期的瀏覽器,而沒有注意到這當中的風險。升級瀏覽器可以確保更高的安全性及可靠性,這個外掛會顯示提醒網站訪客更新瀏覽器的通知,啟用外掛後便會開始執行。

WP BrowserUpdate is based on the browser-update.org detection logic. The plugin now runs independently from browser-update.org at display time: the visitor-facing notification is served from the plugin’s own bundled runtime files, so sites do not need to load scripts, styles, or default notification links from browser-update.org. browser-update.org remains the credited upstream source for the bundled detection logic, and future runtime refreshes are tracked with source URLs and hashes in the plugin assets.

請造訪 browserupdate.org 以進一步了解上層專案的相關資訊。

如果想要將這個外掛的介面本地化為你的母語版本,請造訪 WordPress 本地化專案頁面。

外掛運作方式

WP BrowserUpdate bundles browser-update.org detection logic for WordPress. After activation, the plugin loads the local notification runtime from the plugin directory and passes your configured browser-version thresholds to those scripts. The notification is shown only when the bundled detection logic matches a browser to your settings.

The settings page is available under Settings > WP BrowserUpdate. You can define browser versions for every browser key supported by the bundled browser-update.org runtime, choose where the message appears and which element should contain it, enable testing mode, decide whether mobile or unsupported browsers should be notified, customize links, language and message text, and add trusted custom CSS for the notification.

Browser version fields accept major versions such as 115 and positive dotted versions such as 137.0.3912.63. Dotted versions are passed exactly to the bundled runtime instead of being reduced to their major version; exact comparison depends on the bundled browser-update.org logic and the browser key used by that runtime. A value of 0 uses the default bundled outdated-browser detection. Negative whole numbers are passed to the bundled runtime as relative offsets from the current bundled upstream version.

Microsoft Edge and Microsoft Internet Explorer have separate settings now.

This local runtime design avoids frontend blocking of external script URLs on sites with strict Content Security Policies or tracker blocking. WP BrowserUpdate ships only the local runtime and CSP adapter files needed by the plugin.

重要注意事項

6.0 版重大變更
– 需要 WordPress 6.0 或更新版本。
– 導入新式結構化設定模組以支援 WP BrowserUpdate 所使用的 browser-update.org 自訂介面。
– 將以網站訪客為主的 browser-update.org 執行階段移至外掛套件,因此嚴格的內容安全性政策及追蹤攔截器不再需要允許執行來自 browser-update.org 的指令碼。
– 會自動移轉現有的 WP BrowserUpdate 5.x 設定。

5.0 版重大變更
– 需要 PHP 7.4 或更新版本。
– 在升級至 5.0 或更新版本前,請先確認目前使用的主機已升級至 PHP 7.4 或更新版本。
– 不再支援執行舊版 PHP 的伺服器。
– 如果目前使用的伺服器執行較舊的 PHP 版本,請下載 4.8.1 版

安裝方式

透過 WordPress 外掛搜尋安裝 (推薦)

這是最簡單快速的外掛安裝方式:
1. 登入 WordPress 網站的管理後台。
2. 前往 [外掛]→[安裝外掛]
3. 在搜尋框中輸入「WP BrowserUpdate」
4. 在搜尋結果中找到正確的外掛。
5. 點擊外掛名稱旁的 [立即安裝]
6. 安裝成功後,點擊 [啟用] 便能啟用外掛。

手動安裝

如果想要透過 SFTP 或 Virtualmin 主機管理面板安裝外掛,請依照以下步驟:
1. 下載外掛安裝套件 ZIP 壓縮檔
– 從 WordPress.org 外掛目錄下載最新版本
2. 解壓縮外掛安裝套件 ZIP 壓縮檔
– 在個人裝置上找到下載的 ZIP 檔案並解壓縮。
– 解壓縮後會得到 wp-browser-update 資料夾。
3. 將外掛上傳至網站
– 使用 FTP 用戶端 (例如 FileZilla) 連線至網站,或使用網站主機控制面板的檔案管理功能存取網站。
– 前往 WordPress 網站的 /wp-content/plugins/目錄。
– 上傳解壓縮所得的 wp-browser-update 資料夾。
4. 啟用外掛
– 登入 WordPress 網站管理後台。
– 前往 [外掛]→[已安裝外掛]
– 在清單中找到 WP BrowserUpdate,然後點擊 [啟用]

透過 WordPress 管理面板安裝

如果已下載外掛安裝套件 ZIP 壓縮檔,網站管理員可以透過 WordPress 管理後台安裝外掛:
1. 登入 WordPress 網站管理後台。
2. 前往 [外掛]→[安裝外掛]
3. 在頁面頂端點擊 [上傳外掛]
4. 點擊 [選擇檔案],然後在個人裝置上選取 wp-browser-update.zip,並點擊 [立即安裝]
5. 安裝成功後,點擊 [啟用] 便能啟用外掛。

使用者評論

2022 年 6 月 3 日
Thank you for your plugin! One vote more for customization of the text 😉
2022 年 4 月 6 日 2 則留言
Thanks, this plugin is really very important. Will you also put the possibility to edit the message
2022 年 3 月 7 日 1 則留言
Crystal clear, low impact plugin that deflects a lot of support issues. All sites should uses this plugin and the browser-update.org service.
2021 年 9 月 17 日
Doesn’t work for IE11 which is the main reason I tried this plugin. Also doesn’t work if the browser is using uBlock. Good idea but needs much more testing and tweaking.
2020 年 12 月 8 日
But it is missing customization, I think you should be able to change the link and the text
閱讀全部 16 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈WP BrowserUpdate〉的開發相關工作。

參與者

〈WP BrowserUpdate〉外掛目前已有 12 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈WP BrowserUpdate〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

6.0.1

  • Fixed:
    • Corrects the original plugin source strings to en-US so WordPress.org translations can provide locale-specific variants such as en-GB.

6.0.0

  • Breaking:
    • Requires WordPress 6.0 or newer.
    • Replaces the legacy space-separated settings storage with the structured wp_browserupdate_options option.
    • Migrates existing wp_browserupdate_browsers, wp_browserupdate_js, and wp_browserupdate_css_buorg values automatically.
    • Removes the old normal-render-path conversion of negative browser versions; values are now passed predictably to the bundled runtime.
    • Removes developer callback settings from the admin UI and saved settings model.
  • Added:
    • Adds interface coverage for the browser-update.org customization options used by WP BrowserUpdate: all runtime browser keys, reminderClosed, notify_esr, noclose, no_permanent_hide, container, url, url_permanent_hide, burl, fixed language, and text overrides.
  • Changed:
    • Takes the long-postponed step of making the browser-update.org integration CSP-compatible by shipping the complete runtime with the plugin, so sites on shared hosting or strict Content Security Policies no longer need to allow scripts from browser-update.org.
    • Adds the required browser-update.org runtime/adapter asset files intentionally, with upstream source URLs and hashes documented for attribution and review.
    • Loads bundled browser-update.org runtime files from the plugin directory through the WordPress script queue.
    • Removes browser-update.org runtime requests from the frontend by loading only same-origin plugin assets.
    • Uses WP BrowserUpdate CSP adapter files for the notification and test-mode scripts so the runtime can avoid generated inline styles.
    • Moves the frontend browser-update.org configuration and notification styles to local, enqueueable assets for better compatibility with stricter Content Security Policies.
    • Uses the WordPress HTTP API with a host allowlist for remote browser-version checks.
    • Uses the WordPress Settings API for the admin settings page.
    • Splits admin settings handling into smaller validation, migration and rendering steps.
    • Documents the bundled browser-update.org runtime, local frontend loading, and expected visitor-facing behavior.
    • Passes dotted browser versions such as 137.0.3912.63 to the bundled runtime without reducing them to major versions.
    • Adds separate Microsoft Edge and Microsoft Internet Explorer thresholds.
    • Ships only the loaded runtime/adapter files in the release package; upstream reference copies are documented by URL and hash rather than duplicated in the plugin ZIP.
  • Security:
    • Adds stricter settings validation before saving options.
    • Sanitizes custom CSS before saving and before frontend output.
    • Hardens external admin links with rel="noopener noreferrer".

5.1.1

  • Added:
    • Support for free-text input of browser versions (replaces dropdown selection)
    • Browser version check and caching
    • Cache duration filter: Added a wpbu_browser_version_cache_hours filter to allow developers to adjust the browser version cache duration (default: 6 hours).
  • Changed:
    • Admin settings page follows WordPress admin standards
    • Cleaner field structure: Improved markup and consistency of settings form fields
    • Security: Improved sanitization and nonce handling for all settings fields
    • Performance: Fewer unnecessary remote lookups when opening the admin settings page
  • Fixed:
    • Prevented a frontend “Uncaught Error” caused by invalid/unexpected browser version strings by hardening version parsing and normalization. Thanks to @danyloliptuha for pointing out.

5.0.0

  • Breaking Changes: PHP 7.4 now required.
  • Updated to follow WordPress Coding Standards.
  • Improved security and sanitization.
  • Integrated WordPress Settings API.
  • Added customization filters.
  • Optimized script and style handling.
  • Updated outdated browser versions.

4.8.1

  • Optimized code.
  • Fixed bug.
  • Updated outdated browser versions.

4.6.1

  • Removed redundant colons.
  • Updated outdated browser versions.

4.6.0

  • Fixed Cross-Site Scripting (XSS) vulnerability.
  • Updated outdated browser versions.

4.5.0

  • Fixed Cross-Site Request Forgery (CSRF) vulnerability.
  • Updated outdated browser versions.

4.4.0

  • Updated source URL.
  • Updated outdated browser versions.

4.3.0

  • Fixed plugin activation issue (thanks @Naveen).
  • Updated outdated browser versions.

4.0.0

  • Fixed bugs (thanks to forum commenters).
  • Updated JavaScript.

3.2.0

  • Corrected version typo causing plugin issues.

3.1.0

  • Fixed bugs (thanks @tristanmason).
  • Updated outdated browser versions.

3.0.3

  • Fixed initialization error.
  • Changed protocol to HTTPS.
  • Updated outdated browser versions.

3.0.0

  • Overhauled functions.
  • Updated JavaScript.
  • Updated outdated browser versions.

2.4.0

  • Fixed functions.

2.3.0

  • Overhauled functions.
  • Updated translation files.
  • Minor fixes.

2.2.0

  • Changed license to GPLv3.
  • Added text domain to header.
  • Added POT file for easier translations.

2.1.3

  • Included minified JavaScript.
  • Minor fixes to notification messages.

2.1.0

  • Added JavaScript customization options.

2.0.3

  • Updated outdated browser versions.
  • Added settings link.
  • Minor fixes.

2.0.0

  • Added admin settings panel.
  • Added uninstall function.

1.0.0

  • Initial stable version.