Plugin Directory

Changeset 3409283


Ignore:
Timestamp:
12/03/2025 10:21:00 AM (3 months ago)
Author:
TinyPNG
Message:

3.6.5 trunk

Location:
tiny-compress-images/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • tiny-compress-images/trunk/readme.txt

    r3399519 r3409283  
    55Requires at least: 4.0
    66Tested up to: 6.8
    7 Stable tag: 3.6.4
     7Stable tag: 3.6.5
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    175175
    176176== Changelog ==
     177= 3.6.5 =
     178* fix: prevent picture element when using a page builder
     179
    177180= 3.6.4 =
    178181* added a guard to prevent bulk processing to requeue already processed images
  • tiny-compress-images/trunk/src/class-tiny-helpers.php

    r3325506 r3409283  
    2020
    2121class Tiny_Helpers {
     22
    2223
    2324    /**
     
    109110        }
    110111    }
     112
     113
     114    /**
     115     * Checks wether a user is viewing from a page builder
     116     *
     117     * @since 3.6.5
     118     */
     119    public static function is_pagebuilder_request() {
     120        $pagebuilder_keys = array(
     121            'fl_builder', // Beaver Builder
     122            'et_fb', // Divi Builder
     123            'bricks', // Bricks Builder
     124            'breakdance', // Breakdance Builder
     125            'breakdance_browser', // Breakdance Builder
     126            'ct_builder', // Oxygen Builder
     127            'fb-edit', // Avada Live Builder
     128            'spio_no_cdn', // Site Origin
     129            'tatsu', // Tatsu Builder
     130            'tve', // Thrive Architect
     131            'tcbf', // Thrive Architect
     132        );
     133
     134        foreach ( $pagebuilder_keys as $key ) {
     135            if ( isset( $_GET[ $key ] ) ) {
     136                return true;
     137            }
     138        }
     139
     140        return false;
     141    }
    111142}
  • tiny-compress-images/trunk/src/class-tiny-picture.php

    r3399519 r3409283  
    3232
    3333
     34
    3435    /** @var string */
    3536    private $base_dir;
     
    5758
    5859        if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
     60            return;
     61        }
     62
     63        if ( Tiny_Helpers::is_pagebuilder_request() ) {
    5964            return;
    6065        }
     
    190195
    191196
     197
    192198    public $raw_html;
    193199    protected $base_dir;
     
    238244        if ( preg_match_all(
    239245            '~<' . $regex_tag .
    240             '\b(?:[^>"\']+|"[^"]*"|\'[^\']*\')*>.*?</' .
    241             $regex_tag .
    242             '>~is',
     246                '\b(?:[^>"\']+|"[^"]*"|\'[^\']*\')*>.*?</' .
     247                $regex_tag .
     248                '>~is',
    243249            $html,
    244250            $matches
     
    380386            }
    381387
    382             if ( $width_descriptor &&
     388            if (
     389                $width_descriptor &&
    383390                ! self::srcset_contains_width_descriptor(
    384391                    $srcset_parts,
    385392                    $width_descriptor
    386                 ) ) {
     393                )
     394            ) {
    387395                continue;
    388396            }
     
    413421            $source_parts[] = '/>';
    414422            $sources[] = implode( ' ', $source_parts );
    415         }// End foreach().
     423        } // End foreach().
    416424
    417425        return $sources;
     
    473481
    474482
     483
    475484    /**
    476485     * Adds alternative format sources (e.g., image/webp, image/avif) to an existing
     
    514523class Tiny_Image_Source extends Tiny_Source_Base {
    515524
     525
    516526    /**
    517527     * Generates a formatted image source array if the corresponding local file exists.
  • tiny-compress-images/trunk/src/class-tiny-plugin.php

    r3399519 r3409283  
    1919*/
    2020class Tiny_Plugin extends Tiny_WP_Base {
    21     const VERSION = '3.6.4';
     21    const VERSION = '3.6.5';
    2222    const MEDIA_COLUMN = self::NAME;
    2323    const DATETIME_FORMAT = 'Y-m-d G:i:s';
  • tiny-compress-images/trunk/src/class-tiny-settings.php

    r3399519 r3409283  
    719719            echo '<div class="notice notice-warning inline"><p>';
    720720            echo '<strong>' . esc_html__( 'Warning', 'tiny-compress-images' ) . '</strong> — ';
    721             $message = esc_html_e(
     721            $message = esc_html__(
    722722                'For compression to work you will need to configure WP Offload S3 to keep a copy of the images on the server.', // WPCS: Needed for proper translation.
    723723                'tiny-compress-images'
  • tiny-compress-images/trunk/tiny-compress-images.php

    r3399519 r3409283  
    33 * Plugin Name: TinyPNG - JPEG, PNG & WebP image compression
    44 * Description: Speed up your website. Optimize your JPEG, PNG, and WebP images automatically with TinyPNG.
    5  * Version: 3.6.4
     5 * Version: 3.6.5
    66 * Author: TinyPNG
    77 * Author URI: https://tinypng.com
Note: See TracChangeset for help on using the changeset viewer.