[WordPress] 外掛分享: Clean Filenames

首頁外掛目錄 › Clean Filenames
3,000+
安裝啟用
★★★★
4.6/5 分(8 則評價)
339 天前
最後更新
問題解決
WordPress 4.9+ PHP 5.6+ v1.2.4 上架:2011-02-16

內容簡介

功能
以下是獲得更乾淨且安全的檔名所需的步驟:

移除或替換會使檔名不符合不支援國際語言和檔名的伺服器或第三方服務的特殊/國際字符(例如“España.png”會變成“Espana.png”,“prüfen”會變成“prufen”)。
將檔名中的任何“+”替換為“-”(例如“A+nice+picture.png”會變成“A-nice-picture.png”)。
將檔名中用於檔案擴展名之前的任何“.”字符替換為“-”(例如“A.nice.picture.png”將變成“A-nice-picture.png”)。
在運行所有字符替換篩檢器之後,將套用一個篩檢器,以確保檔名僅包含字母、數字、下劃線、短橫線和點。將從檔名中刪除任何其他字符。
最後,將檔名中的所有字母設置為小寫,以防止與大小寫不敏感的系統出現問題。

這減少了一些服務器、服務、外掛程式可能有問題處理擁有特殊或國際字符的檔名的問題。

這個外掛程式會在檔案上傳流程中執行,因此它只會在啟用外掛後上傳的檔案更改檔名。

它支援大量的國際字符,包括但不限於,白俄羅斯文、西里爾字母、捷克語、德語、希伯來語、匈牙利語、俄語、波蘭語、西班牙語、烏克蘭語和一些其他特殊字符(例如“№”,“@”,“$”等)。

如果您有任何問題或需要支援,請在提問之前查閱常見問題回答中的額外資訊。

要求

WordPress 3.0或更高版本

外掛標籤

開發者團隊

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

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

原文外掛簡介

Features
It takes the following steps for getting cleaner and safe to use filenames

Removes or replace special/international characters that can make your filenames not compliant with servers that don’t have support for international locales and filenames, or third-party services. (e.g. ‘España.png’ will become ‘Espana.png’, ‘prüfen’ will become ‘prufen’).
Replaces any ‘+’ in the filename with ‘-‘ (e.g. ‘A+nice+picture.png’ will become ‘A-nice-picture.png’).
Replaces any ‘.’ character before the one used for file extension with ‘-‘(e.g. ‘A.nice.picture.png’ will become ‘A-nice-picture.png’).
After running all character replacement filters, a filter is applied to ensure that the filename only contains letters, numbers, underscores, dashes, and dots. Any other character will be removed from the filename.
And finally all letters in the filename are set to lowercase to prevent issues with case insensitive systems.

This reduces problems with some servers, services, plugins… That may have problems handling filenames with special or international characters.
The plugin does its job during file upload process, so it’ll change only filenames for files being uploaded after plugin activation.
It supports a large number of international characters, including but not only, characters from belarusian, cyrillic alphabet, czech, german, hebrew, hungarian, russian, polish, spanish, ukrainian, and some other special characters (e.g. №, @, $, etc.).
If you have any questions or need support, please check FAQ for additional information before asking.
Requirements

WordPress 3.0 or higher

延伸相關外掛

文章
Filter
Apply Filters
Mastodon