[WordPress] 外掛分享: Unique Uploaded Media Name

首頁外掛目錄 › Unique Uploaded Media Name
WordPress 外掛 Unique Uploaded Media Name 的封面圖片
100+
安裝啟用
★★★★★
5/5 分(1 則評價)
2486 天前
最後更新
問題解決
WordPress 3.5+ PHP 5.3+ v1.0.1 上架:2018-03-06

內容簡介

透過在檔名後加上一些隨機字串使每個上傳的媒體名稱變得獨特。

預設情況下,WordPress 上傳檔案名稱使用slug。 如果有任何檔案名稱衝突,WordPress 會在slug名稱末端添加額外的後綴。

範例: my-image.jpg,如果檔案名稱相似, 則會出現 my-image-1.jpg、my-image-2.jpg,以此類推。

安裝此外掛程式後,每個上傳的媒體名稱會在結尾附帶獨特的數值後綴。默認上傳的字串值為15個字符,且具有零衝突的可能性。 Uploaded file name + Unique String

範例

my-image-475445-SIu7oQGW.jpg
my-image-311629-TFuNSyHH.jpg

功能

在上傳的檔案名稱末端添加獨特後綴,例如:my-image-311629-W3dRonmw.jpg
生成的字串非常獨特,且長度不容易出現衝突
移除重音符號,转换为 ASCII 字符
使用openssl_random_pseudo_bytes 加密
增加了更多的切換條件來使用其他字串生成器。 (Numeric, Alpha Numeric, No Zero Numeric, All String, Hexadecimal, Capital, Alpha 以及 Distinct),只需編輯第75行和76行。
將不必要的空格、下劃線和特殊字符轉換為連字符。
消耗非常低的記憶體
單個檔案大小 3.02KB
開放原始碼授權,可根據自己的要求進行修改和分發。 GPLv2或更高版本
已與 WordPress 5.2.1 測試

外掛標籤

開發者團隊

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

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

原文外掛簡介

Unique uploaded media names by adding some extra random string.
By default, WordPress upload file name slugs at it are. Sometimes if any file name conflicts, WordPress adds extra suffix at the end of the slug name.
Example: my-image.jpg and if the file name is similar, my-image-1.jpg my-image-2.jpg and so on.
By installing this plugin, every uploaded media will have unique values as a suffix at the end of the uploaded media name. Default uploaded string value is 15 character and have zero possibility of file name confliction. Uploaded file name + Unique String
Example

my-image-475445-SIu7oQGW.jpg
my-image-311629-TFuNSyHH.jpg

Features

Adds unique suffix at the end of the uploaded file name. e.g.: my-image-311629-W3dRonmw.jpg
Generated strings are very unique and less possibility of confliction
Remove Accents Convert to ASCII
Crypto Rand Secure with openssl_random_pseudo_bytes
Added more extra switch conditions to use other string generator. (Numeric, Alpha Numeric, No Zero Numeric, All String, Hexadecimal, Capital, Alpha and Distinct). Just edit line number 75 and 76.
converts unnecessary space, underscore and special characters to hyphen character.
Consumes very low memory
Single file 3.02KB
Open source license, modify and distribute with your own. GPLv2 or later
Tested with WordPress 5.2.1

延伸相關外掛

文章
Filter
Apply Filters
Mastodon