[WordPress] 外掛分享: i=== URLs Editor

首頁外掛目錄 › i=== URLs Editor
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
10+
安裝啟用
尚無評分
5153 天前
最後更新
問題解決
WordPress 3.2+ v0.1 上架:2012-02-07

內容簡介

之前:
http://example.com/wp-content/themes/twentyten/style.css

之後:
/wp-content/themes/twentyten/style.css

或者:

之前:
http://example.com/wp-content/themes/twentyten/style.css

之後(加上 “https”):
https://example.com/wp-content/themes/twentyten/style.css

如果您正在尋找自動將絕對網址轉換為相對網址的外掛程式,或者尋找可更改 src 和 href URL 屬性的 URLS 的外掛程式,請查看我的其他外掛程式。

我編寫此外掛程式是因為我需要一個 WordPress Multisite 上已上傳圖片的基礎路徑,換句話說,我需要一個沒有域名的伺服器根目錄的 URL。您可能因為相同的原因,或者其他原因,發現這很有用。

在將此代碼複製並添加到您的代碼之前,請記住可能會有未來的更新。將代碼保存在已啟用的外掛程式中,可以確保您收到通知。

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「i=== URLs Editor」→ 直接安裝(推薦)

原文外掛簡介

Before:
http://example.com/wp-content/themes/twentyten/style.css
After:
/wp-content/themes/twentyten/style.css
OR:
Before:
http://example.com/wp-content/themes/twentyten/style.css
After (adding “https”):
https://example.com/wp-content/themes/twentyten/style.css
If you are looking for a plugin that automatically converts absolute URLs to relative URLs, or for a plugin that changes URLS for src & href URL attributes check out my other plugin.
I wrote this plugin because I needed a basepath for uploaded images for my WordPress Multisite. In other words, I needed a URL to the server root without the domain. You may find this useful for the same reason, or perhaps another.
Before you copy this code and add it into your own, keep in mind that there may be future updates. Keeping the code within an activated plugin will make sure you’re notified.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon