Plugin Directory

Changeset 2953106

Timestamp:
08/14/2023 08:41:48 AM (12 months ago)
Author:
aaronfc
Message:

Regenerate Thumbnails v3.1.6

Location:
regenerate-thumbnails/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • regenerate-thumbnails/trunk/includes/class-regeneratethumbnails-regenerator.php

    r2191622 r2953106  
    4141     */
    4242    public $skipped_thumbnails = array();
     43
     44
     45
     46
     47
     48
     49
     50
     51
    4352
    4453    /**
     
    184193        }
    185194
    186         $old_metadata = wp_get_attachment_metadata( $this->attachment->ID );
     195        $old_metadata = wp_get_attachment_metadata( $this->attachment->ID );
    187196
    188197        if ( $args['only_regenerate_missing_thumbnails'] ) {
     
    196205            // Thumbnail sizes that existed were removed and need to be added back to the metadata.
    197206            foreach ( $this->skipped_thumbnails as $skipped_thumbnail ) {
    198                 if ( ! empty( $old_metadata['sizes'][ $skipped_thumbnail ] ) ) {
    199                     $new_metadata['sizes'][ $skipped_thumbnail ] = $old_metadata['sizes'][ $skipped_thumbnail ];
     207                if ( ! empty( $old_metadata['sizes'][ $skipped_thumbnail ] ) ) {
     208                    $new_metadata['sizes'][ $skipped_thumbnail ] = $old_metadata['sizes'][ $skipped_thumbnail ];
    200209                }
    201210            }
     
    210219            // Delete old sizes that are still in the metadata.
    211220            $intermediate_image_sizes = get_intermediate_image_sizes();
    212             foreach ( $old_metadata['sizes'] as $old_size => $old_size_data ) {
     221            foreach ( $old_metadata['sizes'] as $old_size => $old_size_data ) {
    213222                if ( in_array( $old_size, $intermediate_image_sizes ) ) {
    214223                    continue;
     
    264273                wp_delete_file( $wp_upload_dir . $file );
    265274            }
    266         } elseif ( ! empty( $old_metadata ) && ! empty( $old_metadata['sizes'] ) && is_array( $old_metadata['sizes'] ) ) {
     275        } elseif ( ! empty( $old_metadata['sizes'] ) ) {
    267276            // If not deleting, rename any size conflicts to avoid them being lost if the file still exists.
    268             foreach ( $old_metadata['sizes'] as $old_size => $old_size_data ) {
     277            foreach ( $old_metadata['sizes'] as $old_size => $old_size_data ) {
    269278                if ( empty( $new_metadata['sizes'][ $old_size ] ) ) {
    270                     $new_metadata['sizes'][ $old_size ] = $old_metadata['sizes'][ $old_size ];
     279                    $new_metadata['sizes'][ $old_size ] = $old_metadata['sizes'][ $old_size ];
    271280                    continue;
    272281                }
     
    314323        }
    315324
    316         $metadata = wp_get_attachment_metadata( $this->attachment->ID );
     325        $metadata = ;
    317326
    318327        // This is based on WP_Image_Editor_GD::multi_resize() and others.
     
    345354                $size_data['crop']
    346355            );
     356
    347357
    348358            // The false check filters out thumbnails that would be larger than the fullsize image.
  • regenerate-thumbnails/trunk/readme.txt

    r2882117 r2953106  
    33Tags: thumbnail, thumbnails, post thumbnail, post thumbnails
    44Requires at least: 4.7
    5 Tested up to: 6.2
     5Tested up to: 6.
    66Requires PHP: 5.2.4
    7 Stable tag: 3.1.5
     7Stable tag: 3.1.
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7373== ChangeLog ==
    7474
     75
     76
     77
     78
     79
    7580= Version 3.1.5 =
    7681
    7782* Fix: Don't overwrite 'All X Attachment' button label with featured images count.
     83
     84
    7885
    7986= Version 3.1.4 =
  • regenerate-thumbnails/trunk/regenerate-thumbnails.php

    r2489598 r2953106  
    66Description:  Regenerate the thumbnails for one or more of your image uploads. Useful when changing their sizes or your theme.
    77Plugin URI:   https://alex.blog/wordpress-plugins/regenerate-thumbnails/
    8 Version:      3.1.5
     8Version:      3.1.
    99Author:       Alex Mills (Viper007Bond)
    1010Author URI:   https://alex.blog/
     
    4141     * @var string
    4242     */
    43     public $version = '3.1.5';
     43    public $version = '3.1.';
    4444
    4545    /**
Note: See TracChangeset for help on using the changeset viewer.