[WordPress] 外掛分享: Simple Relative Urls

首頁外掛目錄 › Simple Relative Urls
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
全新外掛
安裝啟用
尚無評分
1515 天前
最後更新
問題解決
WordPress 5.0+ PHP 7.0+ v1.0.4 上架:2022-01-22

內容簡介

簡單相對路徑外掛程式會更改:

主頁(home)和網站網址(siteurl)
腳本引用(src)網址
樣式連結(link)網址
圖片引用(src)網址

它使用 WordPress 過濾器。
它不會與數據庫互動。
它速度快,不會搜索和替換生成的 HTML。
它不會更改硬編碼的網址(例如在文章內容中)。
它非常靈活。

此外掛程式最初是為了讓 WordPress 能夠與localtunnel npm 套件配合使用而被創建。

localtunnel可將您的本地主機暴露給全世界進行測試和共享!無需為 DNS 或部署而煩惱,只需讓他人測試您的更改。

使用範例

如果您的開發任務不涉及圖片,就不需要從伺服器上下載它們。只需安裝此外掛並將此行代碼添加到wp-config.php文件中

define( 'SRU_IMG_SRC_RELATIVE', false );

您的本地副本將從其原始位置顯示圖片。

外掛標籤

開發者團隊

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

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

原文外掛簡介

Simple Relative Urls plugin changes:

home and siteurl
script src urls
style link urls
images src urls

It uses wordpress filters.
It doesn’t interact with database.
It is fast, it doesn’t search and replace generated html.
It doesn’t change hardcoded urls (for example in post content).
It is flexible.
Plugin was originally created to enable wordpress to work with a localtunnel npm package

localtunnel exposes your localhost to the world for easy testing and sharing! No need to mess with DNS or deploy just to have others test out your changes.

Example use cases
If Your development tasks don’t involve images, don’t download them from a server. Just install the plugin and add this line of code to your wp-config.php file
define( 'SRU_IMG_SRC_RELATIVE', false );

Your local copy will then display images from their oryginal source.

文章
Filter
Apply Filters
Mastodon