[WordPress] 外掛分享: Simple Relative Content

首頁外掛目錄 › Simple Relative Content
10+
安裝啟用
★★★★★
5/5 分(1 則評價)
4353 天前
最後更新
問題解決
v1.0 上架:2012-11-18

內容簡介

當您使用 WordPress 編輯器將媒體插入到內容欄位中時,它會儲存對絕對路徑的引用。
因此,如果更改您的網站位置(例如從暫存區切換到生產環境),則所有路徑都會不正確。
此外掛將相對路徑儲存在資料庫中,而不是絕對路徑。
請注意:必須在將媒體插入內容欄位之前啟用此插件。對於啟用之前儲存的媒體,此插件無效。
此外掛主要基於 WP_SITEURL 常數,該常數應在 wp_config.php 檔案中定義。如果未定義此常數,則使用 “siteurl” 選項值。
如果插件檢測到您從最初定義的 “siteurl” 之外的位置訪問網站,它可以在資料庫中更正大多數錯誤的 URL。
此外掛已翻譯成法語。

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Simple Relative Content」→ 直接安裝(推薦)

原文外掛簡介

When you use the WordPress editor to insert a media in the content field it stores a reference to the absolute path.
So if you change the location of your site (by switching from staging to production environment for example) all your paths will be incorrect.
This plugin stores relative pathes in the db instead of an absolute path.
Beware: this plugin must be activated BEFORE inserting a media into the content field. It has no effect on the medias stored before the activation.
It’s mostly based on the WP_SITEURL constant which should be defined in the wp_config.php file. If this constant isn’t defined it uses the “siteurl” option value instead.
If the plugin detects that you access the website from another location than the “siteurl” defined initially it can correct most of the wrong urls in the database.
Localisation of the plugin into french.

文章
Filter
Apply Filters
Mastodon