Plugin Directory

Changeset 3012748


Ignore:
Timestamp:
12/21/2023 06:28:54 AM (2 years ago)
Author:
ikaring
Message:

Tag 1.2.0

Location:
get-filesize-shortcode
Files:
18 added
2 edited
3 copied

Legend:

Unmodified
Added
Removed
  • get-filesize-shortcode/tags/1.2.0/get-filesize-shortcode.php

    r3012745 r3012748  
    11<?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 */
    1214
    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 
     15if ( ! defined( 'ABSPATH' ) ) {
     16  exit; // Exit if accessed directly.
     17}
    2918
    3019// Usage: [filesize]http://wordpress.com/path/to/filename.pdf[/filesize]
     
    5847}
    5948add_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 */
     58if ( ! 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  
    33Tags: shortcode, filesize, pdf
    44Requires at least: 3.0
    5 Tested up to: 6.3.2
     5Tested up to: 6.4.2
    66Stable tag: trunk
    77Requires PHP: 5.6
    8 License: GPLv2 or later
    9 License URI: http://www.gnu.org/licenses/gpl-2.0.html
     8License: GPL-2.0-or-later
     9License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    1111"Get Filesize Shortcode" is a simple shortcode to get filesize of a file( eg. PDF, JPG, PNG ... ).
     
    1414
    1515"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.
     16Now added Get filesize block to display file link with file size.
    1617
    1718#### Usage
     
    2223
    2324Also you can place `<?php echo do_shortcode('[filesize]http://yoursite.com/path/to/file.pdf[/filesize]'); ?>` in your templates.
     25
     26As to "Get filesize" block, search 'get filesize' in Text block category and insert it.
     27Set file title and file url, and it generates a text link to the file with file size afterwards.
     28You can toggle Preview/Edit by clicking Preview/Edit button in toolbar of the block.
    2429
    2530#### Note
     
    4752== Changelog ==
    4853
     54= 1.2.0 =
     55* 2023-12-21
     56* Add support for Get filesize block
     57
    4958= 1.0.10 =
    5059* 2019-08-07
  • get-filesize-shortcode/trunk/get-filesize-shortcode.php

    r2318705 r3012748  
    11<?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 */
    1214
    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 
     15if ( ! defined( 'ABSPATH' ) ) {
     16  exit; // Exit if accessed directly.
     17}
    2918
    3019// Usage: [filesize]http://wordpress.com/path/to/filename.pdf[/filesize]
     
    5847}
    5948add_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 */
     58if ( ! 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  
    33Tags: shortcode, filesize, pdf
    44Requires at least: 3.0
    5 Tested up to: 6.3.2
     5Tested up to: 6.4.2
    66Stable tag: trunk
    77Requires PHP: 5.6
    8 License: GPLv2 or later
    9 License URI: http://www.gnu.org/licenses/gpl-2.0.html
     8License: GPL-2.0-or-later
     9License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    1111"Get Filesize Shortcode" is a simple shortcode to get filesize of a file( eg. PDF, JPG, PNG ... ).
     
    1414
    1515"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.
     16Now added Get filesize block to display file link with file size.
    1617
    1718#### Usage
     
    2223
    2324Also you can place `<?php echo do_shortcode('[filesize]http://yoursite.com/path/to/file.pdf[/filesize]'); ?>` in your templates.
     25
     26As to "Get filesize" block, search 'get filesize' in Text block category and insert it.
     27Set file title and file url, and it generates a text link to the file with file size afterwards.
     28You can toggle Preview/Edit by clicking Preview/Edit button in toolbar of the block.
    2429
    2530#### Note
     
    4752== Changelog ==
    4853
     54= 1.2.0 =
     55* 2023-12-21
     56* Add support for Get filesize block
     57
    4958= 1.0.10 =
    5059* 2019-08-07
Note: See TracChangeset for help on using the changeset viewer.