[WordPress] 外掛分享: Webknit Environment Indicator

首頁 › 外掛目錄 › Webknit Environment Indicator
WordPress 外掛 Webknit Environment Indicator 的封面圖片
全新外掛
安裝啟用
—
尚無評分
剛更新
最後更新
—
問題解決
WordPress 6.0+ PHP 7.4+ v1.0.0 上架:2026-10-29

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Webknit Environment Indicator」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Webknit Environment Indicator puts a clear, colored badge on every copy of your site that isn’t production:

Dashboard badge on every wp-admin screen, with the same style as the front-end badge and its own position setting, below the admin bar. Has its own on/off switch.
Public front-end badge on the live site that shifts clockwise around the edges of the screen so it can’t go unnoticed (or stays in one corner of your choice), visible to logged-out visitors too, so clients you share a staging link with can see it.
Login page badge and a faint watermark of the environment name across the login screen, so you know which copy you’re signing in to. Has its own on/off switch.
Per-environment label and color for Production, Staging, Development and Local.
No badge on production unless you ask for one.
Search engine warnings, both ways. “Search engine visibility” is copied along with the database, so it warns when a staging, development or local copy is open to search engines, and when your production site is hidden from them after a push from staging.
No JavaScript at all: the badges, the shifting animation and the settings page are plain HTML and CSS, and the front end loads no extra files.

How the environment is decided

The environment you choose on the settings page for this site URL.
Otherwise, WordPress’s own WP_ENVIRONMENT_TYPE setting.
Otherwise, Local if the site runs on a local-only address: localhost, 127.0.0.1, or a domain ending in .local, .test, .localhost, .example or .invalid.
Otherwise, production (no badge).

Developers can override the result with the webknit_environment_indicator_environment filter.
Settings are saved per site URL
When you clone a site, its database (and this plugin’s settings) goes with it. To stop a “Staging” setting from ending up on your live site after a push to production, settings are stored separately for each site URL. Settings saved for a different URL are never applied; the settings page shows a URL mismatch warning and asks you to configure the site again.

延伸相關外掛

文章
Filter
Mastodon