[WordPress] 外掛分享: Slugbit

首頁 › 外掛目錄 › Slugbit
WordPress 外掛 Slugbit 的封面圖片
全新外掛
安裝啟用
—
尚無評分
剛更新
最後更新
—
問題解決
WordPress 5.8+ PHP 7.4+ v0.0.4 上架:2026-11-29

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.0.4) 或搜尋安裝

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

原文外掛簡介

Slugbit is a lightweight, standalone WordPress plugin created to manage clean, memorable, trackable short redirect links on whatever domain WordPress runs on (e.g., https://example.com/wa or https://example.com/wa-group) without relying on external URL shorteners.
It operates completely independently of parent themes and active plugins, ensuring zero runtime coupling and full data preservation.
Key Features

Domain-Aware Short URLs: Derives short URLs dynamically from home_url('/' . $slug) so links automatically adapt across production, staging, and local domains.
Configurable Redirect Status Codes: Supports 302 Temporary (default), 301 Permanent, and 307 Temporary Preserve Method redirects.
Dedicated Custom Table: Stores links cleanly in {$wpdb->prefix}slugbit_links via dbDelta, tracking slug, target_url, status_code, is_active, clicks, last_clicked_at, notes, created_at, and updated_at.
Atomic Click Tracking: Increments clicks = clicks + 1 and updates last_clicked_at (UTC) atomically in SQL without race-condition lost counts.
Hostinger & LiteSpeed Cache Bypass: Emits nocache_headers() and X-LiteSpeed-Cache-Control: no-cache on every redirect response so edge/page caches never swallow clicks or stale targets.
WordPress Route & Security Safety: Intercepts only unmatched frontend 404 paths after WordPress query resolution; never breaks /wp-admin, /wp-json, wp-login.php, feeds, or existing posts, pages, custom post types, or taxonomies. Enforces reserved-slug checks and strict http/https target validation.
Unified WP Admin Directory: Manage links via a native WP_List_Table featuring 1-click Short URL copying, status badges, active toggles, search, status tabs, bulk actions, and nonce-protected Add/Edit forms.
Filter-Aware CSV Export: Stream the short links directory directly to CSV. Export respects active search terms, status tabs (“Active” / “Paused”), and HTTP redirect code filters.
Intelligent CSV Import with Conflict Strategy: Upload CSVs with auto-detected delimiters and auto-mapped column headers. Choose between safe “Skip Existing Slugs” (default) or “Update / Overwrite” (preserves historical clicks).
Unconditional Data Retention: Preserves all short links, click statistics, and options automatically on deactivation or deletion.

Import & Export Documentation
Exporting Links
The Export CSV button located on the directory table toolbar provides flexible exporting:
* Current Filter Respect: If you filter links by searching “promo” or selecting “Active” or HTTP 301, only matching links are exported. If no filters are active, your entire link catalog is exported.
* Compatibility: Exported CSV files include UTF-8 Byte Order Mark (BOM) ensuring flawless opening in Microsoft Excel, Apple Numbers, and Google Sheets.
* Columns Exported: id, slug, target_url, status_code, is_active, clicks, notes, created_at.
Importing Links
Click the Import button on the directory toolbar to open the slide-down import panel.
* Required Columns: slug and target_url.
* Optional Columns: status_code (defaults to 302), is_active (defaults to 1), notes, and clicks (defaults to 0 for new links).
* Sample Template: Download a ready-to-use CSV template directly from the import panel.
* Third-Party Migration: Automatically maps columns exported from Pretty Links (url), Redirection (source_url, action_data), Bitly (bitlink, long_url), and Simple 301 Redirects (request, destination).
Conflict Resolution Strategy Scenarios
When importing CSV files, Slugbit evaluates each row against your existing links:
* Scenario A (New Slug): The slug does not exist. It is created immediately and becomes active right away.
* Scenario B (Duplicate with “Skip Existing Slugs” – Default): The slug already exists. Slugbit skips the row. Existing live redirect rules, target URLs, and accumulated historical click counts are 100% preserved without any alteration.
* Scenario C (Duplicate with “Update / Overwrite Existing Slugs”): The slug already exists. Slugbit updates the destination URL, HTTP status code, and notes with the CSV values. Existing click totals and creation records are safely preserved.
* Scenario D (WordPress Route Conflict): The slug matches a core WordPress route (/wp-admin, /wp-json, login, feeds, or existing posts/pages). The row is automatically blocked to prevent breaking site functionality.
* Scenario E (Invalid Data / Scheme): Missing slug, missing destination, or dangerous URL schemes (javascript:, file paths) are rejected; only http:// and https:// URLs are accepted.

延伸相關外掛

文章
Filter
Mastodon