Changeset 3012748
- Timestamp:
- 12/21/2023 06:28:54 AM (2 years ago)
- Location:
- get-filesize-shortcode
- Files:
-
- 18 added
- 2 edited
- 3 copied
-
tags/1.2.0 (copied) (copied from get-filesize-shortcode/trunk)
-
tags/1.2.0/build (added)
-
tags/1.2.0/build/block.json (added)
-
tags/1.2.0/build/index.asset.php (added)
-
tags/1.2.0/build/index.css (added)
-
tags/1.2.0/build/index.js (added)
-
tags/1.2.0/build/render.php (added)
-
tags/1.2.0/build/style-index.css (added)
-
tags/1.2.0/build/view.asset.php (added)
-
tags/1.2.0/build/view.js (added)
-
tags/1.2.0/get-filesize-shortcode.php (copied) (copied from get-filesize-shortcode/trunk/get-filesize-shortcode.php) (2 diffs)
-
tags/1.2.0/readme.txt (copied) (copied from get-filesize-shortcode/trunk/readme.txt) (4 diffs)
-
trunk/build (added)
-
trunk/build/block.json (added)
-
trunk/build/index.asset.php (added)
-
trunk/build/index.css (added)
-
trunk/build/index.js (added)
-
trunk/build/render.php (added)
-
trunk/build/style-index.css (added)
-
trunk/build/view.asset.php (added)
-
trunk/build/view.js (added)
-
trunk/get-filesize-shortcode.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
get-filesize-shortcode/tags/1.2.0/get-filesize-shortcode.php
r3012745 r3012748 1 1 <?php 2 /* 3 Plugin Name: Get Filesize Shortcode 4 Plugin URI: http://ika-ring.net 5 Description: 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. 6 Version: 1.1.0 7 Author: Kan Ikawa 8 Author URI: http://ika-ring.net 9 Text Domain: get-filesize-shortcode 10 Domain Path: /languages/ 11 License: GPL2 2 /** 3 * Plugin Name: Get Filesize Shortcode 4 * Plugin URI: http://ika-ring.net 5 * Description: 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. 6 * Version: 1.2.0 7 * Author: Kan Ikawa 8 * Author URI: https://ika-ring.net 9 * Text Domain: get-filesize-shortcode 10 * Domain Path: /languages/ 11 * License: GPL-2.0-or-later 12 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 13 */ 12 14 13 Copyright 2015 Kan Ikawa (email : kan@ika-ring.net) 14 15 This program is free software; you can redistribute it and/or modify 16 it under the terms of the GNU General Public License, version 2, as 17 published by the Free Software Foundation. 18 19 This program is distributed in the hope that it will be useful, 20 but WITHOUT ANY WARRANTY; without even the implied warranty of 21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 GNU General Public License for more details. 23 24 You should have received a copy of the GNU General Public License 25 along with this program; if not, write to the Free Software 26 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 27 */ 28 15 if ( ! defined( 'ABSPATH' ) ) { 16 exit; // Exit if accessed directly. 17 } 29 18 30 19 // Usage: [filesize]http://wordpress.com/path/to/filename.pdf[/filesize] … … 58 47 } 59 48 add_shortcode('filesize', 'ika_get_filesize'); 49 50 51 /** 52 * Registers the block using the metadata loaded from the `block.json` file. 53 * Behind the scenes, it registers also all assets so they can be enqueued 54 * through the block editor in the corresponding context. 55 * 56 * @see https://developer.wordpress.org/reference/functions/register_block_type/ 57 */ 58 if ( ! function_exists( 'get_filesize_block_get_filesize_block_block_init' ) ) { 59 function get_filesize_block_get_filesize_block_block_init() { 60 register_block_type( __DIR__ . '/build' ); 61 } 62 add_action( 'init', 'get_filesize_block_get_filesize_block_block_init' ); 63 } -
get-filesize-shortcode/tags/1.2.0/readme.txt
r3012745 r3012748 3 3 Tags: shortcode, filesize, pdf 4 4 Requires at least: 3.0 5 Tested up to: 6. 3.25 Tested up to: 6.4.2 6 6 Stable tag: trunk 7 7 Requires PHP: 5.6 8 License: GPL v2 orlater9 License URI: http ://www.gnu.org/licenses/gpl-2.0.html8 License: GPL-2.0-or-later 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 11 "Get Filesize Shortcode" is a simple shortcode to get filesize of a file( eg. PDF, JPG, PNG ... ). … … 14 14 15 15 "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. 16 Now added Get filesize block to display file link with file size. 16 17 17 18 #### Usage … … 22 23 23 24 Also you can place `<?php echo do_shortcode('[filesize]http://yoursite.com/path/to/file.pdf[/filesize]'); ?>` in your templates. 25 26 As to "Get filesize" block, search 'get filesize' in Text block category and insert it. 27 Set file title and file url, and it generates a text link to the file with file size afterwards. 28 You can toggle Preview/Edit by clicking Preview/Edit button in toolbar of the block. 24 29 25 30 #### Note … … 47 52 == Changelog == 48 53 54 = 1.2.0 = 55 * 2023-12-21 56 * Add support for Get filesize block 57 49 58 = 1.0.10 = 50 59 * 2019-08-07 -
get-filesize-shortcode/trunk/get-filesize-shortcode.php
r2318705 r3012748 1 1 <?php 2 /* 3 Plugin Name: Get Filesize Shortcode 4 Plugin URI: http://ika-ring.net 5 Description: 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. 6 Version: 1.1.0 7 Author: Kan Ikawa 8 Author URI: http://ika-ring.net 9 Text Domain: get-filesize-shortcode 10 Domain Path: /languages/ 11 License: GPL2 2 /** 3 * Plugin Name: Get Filesize Shortcode 4 * Plugin URI: http://ika-ring.net 5 * Description: 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. 6 * Version: 1.2.0 7 * Author: Kan Ikawa 8 * Author URI: https://ika-ring.net 9 * Text Domain: get-filesize-shortcode 10 * Domain Path: /languages/ 11 * License: GPL-2.0-or-later 12 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 13 */ 12 14 13 Copyright 2015 Kan Ikawa (email : kan@ika-ring.net) 14 15 This program is free software; you can redistribute it and/or modify 16 it under the terms of the GNU General Public License, version 2, as 17 published by the Free Software Foundation. 18 19 This program is distributed in the hope that it will be useful, 20 but WITHOUT ANY WARRANTY; without even the implied warranty of 21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 GNU General Public License for more details. 23 24 You should have received a copy of the GNU General Public License 25 along with this program; if not, write to the Free Software 26 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 27 */ 28 15 if ( ! defined( 'ABSPATH' ) ) { 16 exit; // Exit if accessed directly. 17 } 29 18 30 19 // Usage: [filesize]http://wordpress.com/path/to/filename.pdf[/filesize] … … 58 47 } 59 48 add_shortcode('filesize', 'ika_get_filesize'); 49 50 51 /** 52 * Registers the block using the metadata loaded from the `block.json` file. 53 * Behind the scenes, it registers also all assets so they can be enqueued 54 * through the block editor in the corresponding context. 55 * 56 * @see https://developer.wordpress.org/reference/functions/register_block_type/ 57 */ 58 if ( ! function_exists( 'get_filesize_block_get_filesize_block_block_init' ) ) { 59 function get_filesize_block_get_filesize_block_block_init() { 60 register_block_type( __DIR__ . '/build' ); 61 } 62 add_action( 'init', 'get_filesize_block_get_filesize_block_block_init' ); 63 } -
get-filesize-shortcode/trunk/readme.txt
r2983370 r3012748 3 3 Tags: shortcode, filesize, pdf 4 4 Requires at least: 3.0 5 Tested up to: 6. 3.25 Tested up to: 6.4.2 6 6 Stable tag: trunk 7 7 Requires PHP: 5.6 8 License: GPL v2 orlater9 License URI: http ://www.gnu.org/licenses/gpl-2.0.html8 License: GPL-2.0-or-later 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 11 "Get Filesize Shortcode" is a simple shortcode to get filesize of a file( eg. PDF, JPG, PNG ... ). … … 14 14 15 15 "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. 16 Now added Get filesize block to display file link with file size. 16 17 17 18 #### Usage … … 22 23 23 24 Also you can place `<?php echo do_shortcode('[filesize]http://yoursite.com/path/to/file.pdf[/filesize]'); ?>` in your templates. 25 26 As to "Get filesize" block, search 'get filesize' in Text block category and insert it. 27 Set file title and file url, and it generates a text link to the file with file size afterwards. 28 You can toggle Preview/Edit by clicking Preview/Edit button in toolbar of the block. 24 29 25 30 #### Note … … 47 52 == Changelog == 48 53 54 = 1.2.0 = 55 * 2023-12-21 56 * Add support for Get filesize block 57 49 58 = 1.0.10 = 50 59 * 2019-08-07
Note: See TracChangeset
for help on using the changeset viewer.