Plugin Directory

Changeset 2836004


Ignore:
Timestamp:
12/19/2022 11:19:42 AM (3 years ago)
Author:
Tkama
Message:

Update to version 3.5.0 from GitHub

Location:
kama-thumbnail
Files:
20 added
20 deleted
9 edited
1 copied

Legend:

Unmodified
Added
Removed
  • kama-thumbnail/assets/icon-128x128.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • kama-thumbnail/assets/icon-256x256.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • kama-thumbnail/assets/screenshot-1.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • kama-thumbnail/tags/3.5.0/functions.php

    r2810486 r2836004  
    11<?php
    22
     3use Kama_Thumbnail\Cache;
     4use Kama_Thumbnail\Plugin;
     5use Kama_Thumbnail\Options;
     6use Kama_Thumbnail\Make_Thumb;
     7
    38/**
    4  * Use following code instead of same-named functions where you want to show thumbnail:
     9 * Use following code instead of same-named functions where you want to show thumbnails:
    510 *
     11 *     ```php
    612 *     echo apply_filters( 'kama_thumb_src',   '', $args, $src );
    713 *     echo apply_filters( 'kama_thumb_img',   '', $args, $src );
    814 *     echo apply_filters( 'kama_thumb_a_img', '', $args, $src );
     15 *     ```
     16 *
     17 * NOTE: The first empty parameter is needed so that if we remove the plugin,
     18 * the hook will return an empty string, not what is defined in $args.
    919 */
    1020add_filter( 'kama_thumb_src',   'kama_thumb_hook_cb', 0, 3 );
     
    5363 * Make thumbnail and gets it URL.
    5464 *
    55  * @param array  $args
    56  * @param string $src
    57  *
    58  * @return string
     65 * @param array|string $args
     66 * @param string|int   $src  Image URL or attachment ID.
    5967 */
    60 function kama_thumb_src( $args = [], $src = 'notset' ){
     68function kama_thumb_src( $args = [], $src = 'notset' ): string {
    6169
    62     return ( new Kama_Make_Thumb( $args, $src ) )->src();
     70    return ( new Make_Thumb( $args, $src ) )->src();
    6371}
    6472
     
    6674 * Make thumbnail and gets it IMG tag.
    6775 *
    68  * @param array  $args
    69  * @param string $src
    70  *
    71  * @return string
     76 * @param array|string $args
     77 * @param string|int   $src  Image URL or attachment ID.
    7278 */
    73 function kama_thumb_img( $args = [], $src = 'notset' ){
     79function kama_thumb_img( $args = [], $src = 'notset' ): string {
    7480
    75     return ( new Kama_Make_Thumb( $args, $src ) )->img();
     81    return ( new Make_Thumb( $args, $src ) )->img();
    7682}
    7783
     
    7985 * Make thumbnail and gets it IMG tag wrapped with A tag.
    8086 *
    81  * @param array  $args
    82  * @param string $src
    83  *
    84  * @return mixed|string|void
     87 * @param array|string $args
     88 * @param string|int   $src  Image URL or attachment ID.
    8589 */
    86 function kama_thumb_a_img( $args = [], $src = 'notset' ){
     90function kama_thumb_a_img( $args = [], $src = 'notset' ): string {
    8791
    88     return ( new Kama_Make_Thumb( $args, $src ) )->a_img();
     92    return ( new Make_Thumb( $args, $src ) )->a_img();
    8993}
    9094
    9195/**
    92  * Reference to the last Kama_Make_Thumb instance to read some properties: height, width, or other...
     96 * Reference to the last Make_Thumb instance to read some properties: height, width, or other...
    9397 *
    94  * @param string $deprecated
     98 * @param string $deprecated Make_Thumb Property name.
    9599 *
    96  * @return mixed|Kama_Make_Thumb|null The value of specified property or
    97  *                                    `Kama_Make_Thumb` object if no property is specified.
     100 * @return Make_Thumb `Make_Thumb` object. Deprecated: the value of specified property of the object.
    98101 */
    99102function kama_thumb( $deprecated = '' ) {
    100103
    101     $instance = Kama_Make_Thumb::$last_instance;
     104    $instance = Make_Thumb::$last_instance;
    102105
    103106    if( $deprecated ){
    104107        _deprecated_argument( __FUNCTION__, '3.4.12', '`$optname` parameter is deprecated use returned object properties instead.' );
     108
     109        if( property_exists( $instance, $deprecated ) ){
     110            return $instance->$deprecated;
     111        }
     112
     113        return null;
    105114    }
    106115
    107     if( ! $deprecated ){
    108         return $instance;
    109     }
    110 
    111     if( property_exists( $instance, $deprecated ) ){
    112         return $instance->$deprecated;
    113     }
    114 
    115     return null;
     116    return $instance;
    116117}
    117118
    118119/**
    119  * Gets instance of Kama_Thumbnail class.
    120  *
    121  * @return Kama_Thumbnail
     120 * Gets instance of the Plugin main class.
    122121 */
    123 function kama_thumbnail(){
    124     return Kama_Thumbnail::instance();
     122function kama_thumbnail(): Plugin {
     123    return Plugin::instance();
    125124}
    126125
    127126/**
    128  * @return Kama_Thumbnail_Options
     127 * Gets instance of the Plugin options object.
    129128 */
    130 function kthumb_opt(){
    131     return Kama_Thumbnail::$opt;
     129function kthumb_opt(): Options {
     130    return Plugin::$opt;
    132131}
    133132
    134133/**
    135  * @return Kama_Thumbnail_Cache
     134 * Gets instance of the Plugin cache object.
    136135 */
    137 function kthumb_cache(){
    138     return Kama_Thumbnail::$cache;
     136function kthumb_cache(): Cache {
     137    return Plugin::$cache;
    139138}
    140139
     140
     141function _kama_thumb_check_php_version( array $data ): bool {
     142
     143    if( version_compare( PHP_VERSION, $data['req_php'], '>=' ) ){
     144        return true;
     145    }
     146
     147    $message = sprintf( '%s requires PHP %s+, but current one is %s.',
     148        $data['plug_name'],
     149        $data['req_php'],
     150        PHP_VERSION
     151    );
     152
     153    if( defined( 'WP_CLI' ) ){
     154        \WP_CLI::error( $message );
     155    }
     156    else {
     157        add_action( 'admin_notices', static function() use ( $message ){
     158            echo '<div id="message" class="notice notice-error"><p>' . $message . '</p></div>';
     159        } );
     160    }
     161
     162    return false;
     163}
  • kama-thumbnail/tags/3.5.0/kama_thumbnail.php

    r2810486 r2836004  
    1212 * Author URI: https://wp-kama.ru/
    1313 *
    14  * Requires PHP: 7.2
     14 * Requires PHP: 7.1
    1515 * Requires at least: 4.7
    1616 *
    17  * Version: 3.4.2
     17 * Version: 3.5.0
    1818 */
    1919
    20 $ktdata = (object) get_file_data( __FILE__, [
     20defined( 'ABSPATH' ) || exit;
     21
     22$ktdata = get_file_data( __FILE__, [
    2123    'ver'       => 'Version',
    2224    'req_php'   => 'Requires PHP',
     
    2426] );
    2527
    26 // check is php compatible
    27 if( ! version_compare( phpversion(), $ktdata->req_php, '>=' ) ){
     28define( 'KTHUMB_DIR', realpath( wp_normalize_path( __DIR__ ) ) );
     29define( 'KTHUMB_VER', $ktdata['ver'] );
    2830
    29     $message = sprintf( '%s requires PHP %s+, but current one is %s.',
    30         $ktdata->plug_name,
    31         $ktdata->req_php,
    32         phpversion()
    33     );
     31// load files
    3432
    35     if( defined( 'WP_CLI' ) ){
    36         WP_CLI::error( $message );
     33spl_autoload_register( static function( $class ){
     34
     35    if( false !== strpos( $class, 'Kama_Thumbnail\\' ) ){
     36        $relpath = explode( '\\', $class, 2 )[1];
     37        require KTHUMB_DIR . "/classes/{$relpath}.php";
    3738    }
    38     else {
    39         add_action( 'admin_notices', static function() use ( $message ){
    40             echo '<div id="message" class="notice notice-error"><p>' . $message . '</p></div>';
    41         } );
    42     }
     39} );
    4340
     41require_once KTHUMB_DIR . '/functions.php';
     42
     43if( ! _kama_thumb_check_php_version( $ktdata ) ){
    4444    return;
    4545}
    4646
    47 define( 'KTHUMB_VER', $ktdata->ver );
    4847unset( $ktdata );
    4948
    50 define( 'KTHUMB_DIR', wp_normalize_path( __DIR__ ) );
    51 
    52 // as plugin
     49// Set KTHUMB_URL constant
     50// in plugin
    5351if(
    54     false !== strpos( KTHUMB_DIR, wp_normalize_path( WP_PLUGIN_DIR ) )
     52    false !== strpos( KTHUMB_DIR, realpath( wp_normalize_path( WP_PLUGIN_DIR ) ) )
    5553    ||
    56     false !== strpos( KTHUMB_DIR, wp_normalize_path( WPMU_PLUGIN_DIR ) )
     54    false !== strpos( KTHUMB_DIR, realpath( wp_normalize_path( WPMU_PLUGIN_DIR ) ) )
    5755){
    5856    define( 'KTHUMB_URL', plugins_url( '', __FILE__ ) );
     
    6058// in theme
    6159else {
    62     define( 'KTHUMB_URL', strtr( KTHUMB_DIR, [ wp_normalize_path( get_template_directory() ) => get_template_directory_uri() ] ) );
     60    define( 'KTHUMB_URL', str_replace(
     61        realpath( wp_normalize_path( get_stylesheet_directory() ) ),
     62        get_stylesheet_directory_uri(),
     63        KTHUMB_DIR
     64    ) );
    6365}
    6466
    6567
    66 // load files
     68/**
     69 * INIT
     70 */
    6771
    68 spl_autoload_register( static function( $name ){
    69 
    70     if( false !== strpos( $name, 'Kama_Make_Thumb' ) || false !== strpos( $name, 'Kama_Thumbnail' ) ){
    71 
    72         require KTHUMB_DIR . "/classes/$name.php";
    73     }
    74 } );
    75 
    76 require KTHUMB_DIR . '/functions.php';
    77 
    78 
    79 // stop if this file loads from uninstall.php file
     72// Don't INIT if loads from uninstall.php
    8073if( defined( 'WP_UNINSTALL_PLUGIN' ) ){
    8174    return;
     
    8376
    8477
    85 // init
    86 
    8778if( defined( 'WP_CLI' ) ){
    8879
    89     WP_CLI::add_command( 'kthumb', 'Kama_Thumbnail_CLI_Command', [
     80    WP_CLI::add_command( 'kthumb', \Kama_Thumbnail\CLI_Command::class, [
    9081        'shortdesc' => 'Kama Thumbnail Plugin CLI Commands',
    9182    ] );
     
    9384
    9485
    95 /**
    96  * Initialize the plugin later, so that we can use some hooks from the theme.
    97  */
     86// Initialize later to allow use hooks from theme.
    9887add_action( 'init', 'kama_thumbnail_init' );
    9988
  • kama-thumbnail/tags/3.5.0/readme.txt

    r2810486 r2836004  
    11=== Plugin Name ===
    22Stable tag:   trunk
    3 Tested up to: 6.1
     3Tested up to: 6.1.1
    44
    55License:      GPLv2 or later
     
    312312== Changelog ==
    313313
     314= 3.5.0 =
     315- CHG: !IMPORTANT All core classes moved under `Kama_Thumbnail` namespace. So if you use such classes as `Kama_Thumbnail` or `Kama_Make_Thumb` directly - You need to update your code to use namespase. Example: `Kama_Thumbnail_Helpers::parse_main_dom()` >>> `\Kama_Thumbnail\Helpers::parse_main_dom()` OR `new Kama_Make_Thumb()` >>> `new \Kama_Thumbnail\Make_Thumb()`.
     316- CHG: CHMOD Options moved: `Kama_Make_Thumb::$CHMOD_DIR` >>> `kthumb_opt()->CHMOD_DIR` and `Kama_Make_Thumb::$CHMOD_FILE` >>> `kthumb_opt()->CHMOD_FILE`
     317- NEW: `$src` parameter now understand Attachment ID|Attachment Object|WP_Post.
     318- NEW: `no_photo_url` option now supports attachment ID as a value.
     319- NEW: Delete cached thumbnails of deleted attachment.
     320- IMP: Unit test improvements.
     321- IMP: `src` value moved to `srcset` and `src` now contains the original URL.
     322- IMP: `decoding="async"` by default for kama_thumb_img().
     323- IMP: Checks the cache_dir path before deleting all files. This is to avoid accidentally deleting files in another directory. Now cache folder must contain one of substring `cache` or `thumb`.
     324- BUG: Type hint in get_src_from_text() method.
     325- BUG: `kama_thumb__img_attrs` hook support `srcset` attribute bugfix.
     326- BUG: stub need to be created when url with not allowed domain was passed. But the stub was created in the path of the normal image.
     327- BUG: Bug fix with symbolic links in WP_PLUGIN_DIR|WPMU_PLUGIN_DIR paths.
     328
    314329= 3.4.2 =
    315330- NEW: Option to delete single IMG cache by image/thumb URL or attachment ID.
  • kama-thumbnail/trunk/functions.php

    r2810486 r2836004  
    11<?php
    22
     3use Kama_Thumbnail\Cache;
     4use Kama_Thumbnail\Plugin;
     5use Kama_Thumbnail\Options;
     6use Kama_Thumbnail\Make_Thumb;
     7
    38/**
    4  * Use following code instead of same-named functions where you want to show thumbnail:
     9 * Use following code instead of same-named functions where you want to show thumbnails:
    510 *
     11 *     ```php
    612 *     echo apply_filters( 'kama_thumb_src',   '', $args, $src );
    713 *     echo apply_filters( 'kama_thumb_img',   '', $args, $src );
    814 *     echo apply_filters( 'kama_thumb_a_img', '', $args, $src );
     15 *     ```
     16 *
     17 * NOTE: The first empty parameter is needed so that if we remove the plugin,
     18 * the hook will return an empty string, not what is defined in $args.
    919 */
    1020add_filter( 'kama_thumb_src',   'kama_thumb_hook_cb', 0, 3 );
     
    5363 * Make thumbnail and gets it URL.
    5464 *
    55  * @param array  $args
    56  * @param string $src
    57  *
    58  * @return string
     65 * @param array|string $args
     66 * @param string|int   $src  Image URL or attachment ID.
    5967 */
    60 function kama_thumb_src( $args = [], $src = 'notset' ){
     68function kama_thumb_src( $args = [], $src = 'notset' ): string {
    6169
    62     return ( new Kama_Make_Thumb( $args, $src ) )->src();
     70    return ( new Make_Thumb( $args, $src ) )->src();
    6371}
    6472
     
    6674 * Make thumbnail and gets it IMG tag.
    6775 *
    68  * @param array  $args
    69  * @param string $src
    70  *
    71  * @return string
     76 * @param array|string $args
     77 * @param string|int   $src  Image URL or attachment ID.
    7278 */
    73 function kama_thumb_img( $args = [], $src = 'notset' ){
     79function kama_thumb_img( $args = [], $src = 'notset' ): string {
    7480
    75     return ( new Kama_Make_Thumb( $args, $src ) )->img();
     81    return ( new Make_Thumb( $args, $src ) )->img();
    7682}
    7783
     
    7985 * Make thumbnail and gets it IMG tag wrapped with A tag.
    8086 *
    81  * @param array  $args
    82  * @param string $src
    83  *
    84  * @return mixed|string|void
     87 * @param array|string $args
     88 * @param string|int   $src  Image URL or attachment ID.
    8589 */
    86 function kama_thumb_a_img( $args = [], $src = 'notset' ){
     90function kama_thumb_a_img( $args = [], $src = 'notset' ): string {
    8791
    88     return ( new Kama_Make_Thumb( $args, $src ) )->a_img();
     92    return ( new Make_Thumb( $args, $src ) )->a_img();
    8993}
    9094
    9195/**
    92  * Reference to the last Kama_Make_Thumb instance to read some properties: height, width, or other...
     96 * Reference to the last Make_Thumb instance to read some properties: height, width, or other...
    9397 *
    94  * @param string $deprecated
     98 * @param string $deprecated Make_Thumb Property name.
    9599 *
    96  * @return mixed|Kama_Make_Thumb|null The value of specified property or
    97  *                                    `Kama_Make_Thumb` object if no property is specified.
     100 * @return Make_Thumb `Make_Thumb` object. Deprecated: the value of specified property of the object.
    98101 */
    99102function kama_thumb( $deprecated = '' ) {
    100103
    101     $instance = Kama_Make_Thumb::$last_instance;
     104    $instance = Make_Thumb::$last_instance;
    102105
    103106    if( $deprecated ){
    104107        _deprecated_argument( __FUNCTION__, '3.4.12', '`$optname` parameter is deprecated use returned object properties instead.' );
     108
     109        if( property_exists( $instance, $deprecated ) ){
     110            return $instance->$deprecated;
     111        }
     112
     113        return null;
    105114    }
    106115
    107     if( ! $deprecated ){
    108         return $instance;
    109     }
    110 
    111     if( property_exists( $instance, $deprecated ) ){
    112         return $instance->$deprecated;
    113     }
    114 
    115     return null;
     116    return $instance;
    116117}
    117118
    118119/**
    119  * Gets instance of Kama_Thumbnail class.
    120  *
    121  * @return Kama_Thumbnail
     120 * Gets instance of the Plugin main class.
    122121 */
    123 function kama_thumbnail(){
    124     return Kama_Thumbnail::instance();
     122function kama_thumbnail(): Plugin {
     123    return Plugin::instance();
    125124}
    126125
    127126/**
    128  * @return Kama_Thumbnail_Options
     127 * Gets instance of the Plugin options object.
    129128 */
    130 function kthumb_opt(){
    131     return Kama_Thumbnail::$opt;
     129function kthumb_opt(): Options {
     130    return Plugin::$opt;
    132131}
    133132
    134133/**
    135  * @return Kama_Thumbnail_Cache
     134 * Gets instance of the Plugin cache object.
    136135 */
    137 function kthumb_cache(){
    138     return Kama_Thumbnail::$cache;
     136function kthumb_cache(): Cache {
     137    return Plugin::$cache;
    139138}
    140139
     140
     141function _kama_thumb_check_php_version( array $data ): bool {
     142
     143    if( version_compare( PHP_VERSION, $data['req_php'], '>=' ) ){
     144        return true;
     145    }
     146
     147    $message = sprintf( '%s requires PHP %s+, but current one is %s.',
     148        $data['plug_name'],
     149        $data['req_php'],
     150        PHP_VERSION
     151    );
     152
     153    if( defined( 'WP_CLI' ) ){
     154        \WP_CLI::error( $message );
     155    }
     156    else {
     157        add_action( 'admin_notices', static function() use ( $message ){
     158            echo '<div id="message" class="notice notice-error"><p>' . $message . '</p></div>';
     159        } );
     160    }
     161
     162    return false;
     163}
  • kama-thumbnail/trunk/kama_thumbnail.php

    r2810486 r2836004  
    1212 * Author URI: https://wp-kama.ru/
    1313 *
    14  * Requires PHP: 7.2
     14 * Requires PHP: 7.1
    1515 * Requires at least: 4.7
    1616 *
    17  * Version: 3.4.2
     17 * Version: 3.5.0
    1818 */
    1919
    20 $ktdata = (object) get_file_data( __FILE__, [
     20defined( 'ABSPATH' ) || exit;
     21
     22$ktdata = get_file_data( __FILE__, [
    2123    'ver'       => 'Version',
    2224    'req_php'   => 'Requires PHP',
     
    2426] );
    2527
    26 // check is php compatible
    27 if( ! version_compare( phpversion(), $ktdata->req_php, '>=' ) ){
     28define( 'KTHUMB_DIR', realpath( wp_normalize_path( __DIR__ ) ) );
     29define( 'KTHUMB_VER', $ktdata['ver'] );
    2830
    29     $message = sprintf( '%s requires PHP %s+, but current one is %s.',
    30         $ktdata->plug_name,
    31         $ktdata->req_php,
    32         phpversion()
    33     );
     31// load files
    3432
    35     if( defined( 'WP_CLI' ) ){
    36         WP_CLI::error( $message );
     33spl_autoload_register( static function( $class ){
     34
     35    if( false !== strpos( $class, 'Kama_Thumbnail\\' ) ){
     36        $relpath = explode( '\\', $class, 2 )[1];
     37        require KTHUMB_DIR . "/classes/{$relpath}.php";
    3738    }
    38     else {
    39         add_action( 'admin_notices', static function() use ( $message ){
    40             echo '<div id="message" class="notice notice-error"><p>' . $message . '</p></div>';
    41         } );
    42     }
     39} );
    4340
     41require_once KTHUMB_DIR . '/functions.php';
     42
     43if( ! _kama_thumb_check_php_version( $ktdata ) ){
    4444    return;
    4545}
    4646
    47 define( 'KTHUMB_VER', $ktdata->ver );
    4847unset( $ktdata );
    4948
    50 define( 'KTHUMB_DIR', wp_normalize_path( __DIR__ ) );
    51 
    52 // as plugin
     49// Set KTHUMB_URL constant
     50// in plugin
    5351if(
    54     false !== strpos( KTHUMB_DIR, wp_normalize_path( WP_PLUGIN_DIR ) )
     52    false !== strpos( KTHUMB_DIR, realpath( wp_normalize_path( WP_PLUGIN_DIR ) ) )
    5553    ||
    56     false !== strpos( KTHUMB_DIR, wp_normalize_path( WPMU_PLUGIN_DIR ) )
     54    false !== strpos( KTHUMB_DIR, realpath( wp_normalize_path( WPMU_PLUGIN_DIR ) ) )
    5755){
    5856    define( 'KTHUMB_URL', plugins_url( '', __FILE__ ) );
     
    6058// in theme
    6159else {
    62     define( 'KTHUMB_URL', strtr( KTHUMB_DIR, [ wp_normalize_path( get_template_directory() ) => get_template_directory_uri() ] ) );
     60    define( 'KTHUMB_URL', str_replace(
     61        realpath( wp_normalize_path( get_stylesheet_directory() ) ),
     62        get_stylesheet_directory_uri(),
     63        KTHUMB_DIR
     64    ) );
    6365}
    6466
    6567
    66 // load files
     68/**
     69 * INIT
     70 */
    6771
    68 spl_autoload_register( static function( $name ){
    69 
    70     if( false !== strpos( $name, 'Kama_Make_Thumb' ) || false !== strpos( $name, 'Kama_Thumbnail' ) ){
    71 
    72         require KTHUMB_DIR . "/classes/$name.php";
    73     }
    74 } );
    75 
    76 require KTHUMB_DIR . '/functions.php';
    77 
    78 
    79 // stop if this file loads from uninstall.php file
     72// Don't INIT if loads from uninstall.php
    8073if( defined( 'WP_UNINSTALL_PLUGIN' ) ){
    8174    return;
     
    8376
    8477
    85 // init
    86 
    8778if( defined( 'WP_CLI' ) ){
    8879
    89     WP_CLI::add_command( 'kthumb', 'Kama_Thumbnail_CLI_Command', [
     80    WP_CLI::add_command( 'kthumb', \Kama_Thumbnail\CLI_Command::class, [
    9081        'shortdesc' => 'Kama Thumbnail Plugin CLI Commands',
    9182    ] );
     
    9384
    9485
    95 /**
    96  * Initialize the plugin later, so that we can use some hooks from the theme.
    97  */
     86// Initialize later to allow use hooks from theme.
    9887add_action( 'init', 'kama_thumbnail_init' );
    9988
  • kama-thumbnail/trunk/readme.txt

    r2810486 r2836004  
    11=== Plugin Name ===
    22Stable tag:   trunk
    3 Tested up to: 6.1
     3Tested up to: 6.1.1
    44
    55License:      GPLv2 or later
     
    312312== Changelog ==
    313313
     314= 3.5.0 =
     315- CHG: !IMPORTANT All core classes moved under `Kama_Thumbnail` namespace. So if you use such classes as `Kama_Thumbnail` or `Kama_Make_Thumb` directly - You need to update your code to use namespase. Example: `Kama_Thumbnail_Helpers::parse_main_dom()` >>> `\Kama_Thumbnail\Helpers::parse_main_dom()` OR `new Kama_Make_Thumb()` >>> `new \Kama_Thumbnail\Make_Thumb()`.
     316- CHG: CHMOD Options moved: `Kama_Make_Thumb::$CHMOD_DIR` >>> `kthumb_opt()->CHMOD_DIR` and `Kama_Make_Thumb::$CHMOD_FILE` >>> `kthumb_opt()->CHMOD_FILE`
     317- NEW: `$src` parameter now understand Attachment ID|Attachment Object|WP_Post.
     318- NEW: `no_photo_url` option now supports attachment ID as a value.
     319- NEW: Delete cached thumbnails of deleted attachment.
     320- IMP: Unit test improvements.
     321- IMP: `src` value moved to `srcset` and `src` now contains the original URL.
     322- IMP: `decoding="async"` by default for kama_thumb_img().
     323- IMP: Checks the cache_dir path before deleting all files. This is to avoid accidentally deleting files in another directory. Now cache folder must contain one of substring `cache` or `thumb`.
     324- BUG: Type hint in get_src_from_text() method.
     325- BUG: `kama_thumb__img_attrs` hook support `srcset` attribute bugfix.
     326- BUG: stub need to be created when url with not allowed domain was passed. But the stub was created in the path of the normal image.
     327- BUG: Bug fix with symbolic links in WP_PLUGIN_DIR|WPMU_PLUGIN_DIR paths.
     328
    314329= 3.4.2 =
    315330- NEW: Option to delete single IMG cache by image/thumb URL or attachment ID.
Note: See TracChangeset for help on using the changeset viewer.