{"id":34051,"date":"2015-01-21T05:45:09","date_gmt":"2015-01-21T05:45:09","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/get-filesize-shortcode\/"},"modified":"2025-07-15T06:42:16","modified_gmt":"2025-07-15T06:42:16","slug":"get-filesize-shortcode","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/get-filesize-shortcode\/","author":11862589,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.3.0","stable_tag":"trunk","tested":"6.8.5","requires":"5.8","requires_php":"5.6","requires_plugins":null,"header_name":"Get Filesize Shortcode","header_author":"Kan Ikawa","header_description":"","assets_banners_color":"6a5743","last_updated":"2025-07-15 06:42:16","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/ika-ring.net","header_author_uri":"https:\/\/ika-ring.net","rating":5,"author_block_rating":0,"active_installs":200,"downloads":4583,"num_ratings":3,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"ikaring","date":"2017-03-28 08:58:12"},"1.0.1":{"tag":"1.0.1","author":"ikaring","date":"2017-03-28 09:11:50"},"1.0.10":{"tag":"1.0.10","author":"ikaring","date":"2019-08-07 02:11:59"},"1.0.4":{"tag":"1.0.4","author":"ikaring","date":"2018-08-08 06:58:31"},"1.0.5":{"tag":"1.0.5","author":"ikaring","date":"2018-08-08 08:27:48"},"1.0.6":{"tag":"1.0.6","author":"ikaring","date":"2018-08-08 12:48:12"},"1.0.7":{"tag":"1.0.7","author":"ikaring","date":"2018-08-08 12:51:20"},"1.0.8":{"tag":"1.0.8","author":"ikaring","date":"2018-08-16 04:20:54"},"1.0.9":{"tag":"1.0.9","author":"ikaring","date":"2019-08-07 01:59:51"},"1.1.0":{"tag":"1.1.0","author":"ikaring","date":"2020-06-05 06:36:53"},"1.2.0":{"tag":"1.2.0","author":"ikaring","date":"2023-12-21 10:09:27"},"1.3.0":{"tag":"1.3.0","author":"ikaring","date":"2025-07-15 06:36:23"}},"upgrade_notice":{"":"<p>None.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":3},"assets_icons":{"icon-128x128.jpg":{"filename":"icon-128x128.jpg","revision":1925680,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.jpg":{"filename":"icon-256x256.jpg","revision":1925680,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":1072280,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":{"get-filesize\/get-filesize-block":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"get-filesize\/get-filesize-block","version":"0.1.0","title":"Get filesize","category":"text","icon":"media-document","description":"Block to get file size of a file","example":{},"supports":{"html":false,"align":true,"color":{"text":true,"link":true,"background":true},"spacing":{"blockGap":false,"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":false}},"attributes":{"fileTitle":{"type":"string"},"fileUrl":{"type":"string"},"isEditMode":{"type":"boolean","default":true}},"textdomain":"get-filesize-block","editorScript":"file:.\/index.js","editorStyle":"file:.\/index.css","style":"file:.\/style-index.css","render":"file:.\/render.php","viewScript":"file:.\/view.js"}},"tagged_versions":["1.0","1.0.1","1.0.10","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.3.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[32168,1764,80],"plugin_category":[43,50],"plugin_contributors":[91144],"plugin_business_model":[],"class_list":["post-34051","plugin","type-plugin","status-publish","hentry","plugin_tags-filesize","plugin_tags-pdf","plugin_tags-shortcode","plugin_category-customization","plugin_category-media","plugin_contributors-ikaring","plugin_committers-ikaring"],"banners":{"banner":"https:\/\/ps.w.org\/get-filesize-shortcode\/assets\/banner-772x250.jpg?rev=1072280","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/get-filesize-shortcode\/assets\/icon-128x128.jpg?rev=1925680","icon_2x":"https:\/\/ps.w.org\/get-filesize-shortcode\/assets\/icon-256x256.jpg?rev=1925680","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>\"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.\nNow added Get filesize block to display file link with file size.<\/p>\n\n<h4>Usage<\/h4>\n\n<p>Put <code>[filesize]http:\/\/yoursite.com\/path\/to\/file.pdf[\/filesize]<\/code> anywhere in a post.<\/p>\n\n<p>Or you can use url attr instead. <code>[filesize url='http:\/\/yoursite.com\/path\/to\/file.pdf']<\/code><\/p>\n\n<p>Also you can place <code>&lt;?php echo do_shortcode('[filesize]http:\/\/yoursite.com\/path\/to\/file.pdf[\/filesize]'); ?&gt;<\/code> in your templates.<\/p>\n\n<p>As to \"Get filesize\" block, search 'get filesize' in Text block category and insert it.\nSet file title and file url, and it generates a text link to the file with file size afterwards.\nYou can toggle Preview\/Edit by clicking Preview\/Edit button in toolbar of the block.<\/p>\n\n<h4>Note<\/h4>\n\n<ul>\n<li>File must be in your server<\/li>\n<li>With files larger than 2MB, it might return different number due to the spec of filesize function of PHP.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>get-filesize-shortcode<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>None yet.<\/p>\n\n<!--section=changelog-->\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>2025-7-15<\/li>\n<li>Refactor code and add japanese translation<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>2023-12-21<\/li>\n<li>Add support for Get filesize block<\/li>\n<\/ul>\n\n<h4>1.0.10<\/h4>\n\n<ul>\n<li>2019-08-07<\/li>\n<li>Update readme.txt<\/li>\n<\/ul>\n\n<h4>1.0.8<\/h4>\n\n<ul>\n<li>2018-08-16<\/li>\n<li>Update readme.txt, remove 'Donate link'<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>2018-08-08<\/li>\n<li>Update readme.txt<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>minor bug fix<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>2018-08-08<\/li>\n<li>Support url attribute<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>","raw_excerpt":"&quot;Get Filesize Shortcode&quot; is a simple shortcode to get filesize of a file( eg. PDF, JPG, PNG ... ).","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/34051","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=34051"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/ikaring"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=34051"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=34051"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=34051"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=34051"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=34051"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=34051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}