[WordPress] 外掛分享: Relative URL

首頁外掛目錄 › Relative URL
WordPress 外掛 Relative URL 的封面圖片
3,000+
安裝啟用
★★★★
4.2/5 分(26 則評價)
1677 天前
最後更新
問題解決
WordPress 2.1.0+ v0.1.8 上架:2012-09-15

內容簡介

相對網址 (Relative URL) 外掛可將鏈接(文章、分類、頁面等)應用 wp_make_link_relative 函數來轉換為相對網址。開發人員在手機設備(iPad、iPhone 等)上調試本地 WordPress 實例時非常有用。

注意:此插件僅適用於本地開發。我沒有在生產環境上測試過,可能會出現問題,例如 RSS 資訊中出現不必要的網址或共用網址轉換為相對網址等問題。

更多信息,請訪問我的 網站。

例如:

http://localhost:8080/wp/

會被轉換為:

/wp/

而且..

http://localhost:8080/wp/2012/09/01/hello-world/

會被轉換為:

/wp/2012/09/01/hello-world/

同樣的,

http://localhost:8080/wp/wp-content/themes/twentyeleven/style.css

會被轉換為:

/wp/wp-content/themes/twentyeleven/style.css

啟用此插件後,您可以使用 http://10.0.1.5:8888/wp/ 在 iPad 或其他移動設備上輕鬆訪問本地實例,而無需擔心樣式和導航問題。

外掛標籤

開發者團隊

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

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

原文外掛簡介

Relative URL applies the wp_make_link_relative function to links (posts, categories, pages, etc.) to convert them to relative URLs. Useful for developers when debugging local WordPress instance on a mobile device (iPad, iPhone, etc.).
Notice: This plugin SHOULD be used for local development only. I haven’t tested on a production environment; it may work with some issues, like unwanted URLs in RSS feed or sharing URLs are replaced with relative URLs, etc.
More information please visit my site.
For example:
http://localhost:8080/wp/

Will be converted to:
/wp/

And..
http://localhost:8080/wp/2012/09/01/hello-world/

Will be converted to:
/wp/2012/09/01/hello-world/

And..
http://localhost:8080/wp/wp-content/themes/twentyeleven/style.css

Will be converted to:
/wp/wp-content/themes/twentyeleven/style.css

Then after activating this plugin, you can simply access your local instance using http://10.0.1.5:8888/wp/ on your iPad or other mobile devices without having styles and navigation issue.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon