[WordPress] 外掛分享: Get Filesize Shortcode

WordPress 外掛 Get Filesize Shortcode 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Get Filesize Shortcode」是 2015-01-20 上架。
  • 目前有 300 個安裝啟用數。
  • 上一次更新是 2023-12-21,距離現在已有 506 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 5.8 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 5.6 以上。
  • 有 2 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

ikaring |

外掛標籤

pdf | filesize | shortcode |

內容簡介

「Get Filesize Shortcode」是一個簡單的短碼外掛,可以以可讀的格式以最大可讀單位顯示文件(例如 PDF、JPG、PNG 等)的檔案大小。

使用方法

在文章中的任何地方輸入[filesize]http://yoursite.com/path/to/file.pdf[/filesize]。

你也可以使用 url 屬性代替,輸入[filesize url='http://yoursite.com/path/to/file.pdf']

同時,你也可以把 放到你的樣本中。

注意事項

檔案必須存放在你的伺服器上
對於超過 2MB 的文件,可能會因 PHP 的檔案大小規範而返回不同的數字。

原文外掛簡介

“Get Filesize Shortcode” is a simple shortcode to get filesize of a file( eg. PDF, JPG, PNG … ) with a human readable format, using the largest unit the bytes will fit into.
Now added Get filesize block to display file link with file size.
Usage
Put [filesize]http://yoursite.com/path/to/file.pdf[/filesize] anywhere in a post.
Or you can use url attr instead. [filesize url='http://yoursite.com/path/to/file.pdf']
Also you can place in your templates.
As to “Get filesize” block, search ‘get filesize’ in Text block category and insert it.
Set file title and file url, and it generates a text link to the file with file size afterwards.
You can toggle Preview/Edit by clicking Preview/Edit button in toolbar of the block.
Note

File must be in your server
With files larger than 2MB, it might return different number due to the spec of filesize function of PHP.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Get Filesize Shortcode」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0 | 1.0.1 | 1.0.4 | 1.0.5 | 1.0.6 | 1.0.7 | 1.0.8 | 1.0.9 | 1.1.0 | 1.2.0 | 1.0.10 |

延伸相關外掛(你可能也想知道)

  • Max upload filesize 》這個外掛可以幫助你增加上傳檔案大小的限制。。
  • WP Media Size 》這個外掛會在WordPress多媒體庫的列表頁面新增一欄,顯示檔案大小。目前此外掛不支援在網格視圖中顯示檔案大小。。
  • Add Image File Sizes to Table List View 》以下是文章的總結:, 這款「將圖片文件大小添加到表格列表視圖」外掛通過添加新列來增強您的WordPress媒體庫,顯示圖片的文件大小。這個功能能讓您快速評估媒...。

文章
Filter
Apply Filters
Mastodon