Plugin Directory

Changeset 2916759


Ignore:
Timestamp:
05/24/2023 10:36:44 AM (3 years ago)
Author:
upress
Message:

v1.6.2

Location:
ezcache
Files:
96 added
5 edited

Legend:

Unmodified
Added
Removed
  • ezcache/trunk/changelog.txt

    r2892153 r2916759  
     1= 1.6.2 =
     2- Fix external JS files not being ignored while combining
     3- Added an exclusion for Elementor per-page JS/CSS files so that the manual exclusion is no longer required
     4
    15= 1.6.1 =
    26- Fix problem setting up scheduled task for old cache cleanup
  • ezcache/trunk/ezcache.php

    r2892153 r2916759  
    44    Description: ezCache is an easy and innovative cache plugin that will help you significantly improve your site speed.
    55    Plugin URI: https://ezcache.app
    6     Version: 1.6.1
     6    Version: 1.6.2
    77    Author: uPress
    88    Author URI: https://www.upress.io
     
    3636    define( 'EZCACHE_URL', plugin_dir_url( __FILE__ ) );
    3737    define( 'EZCACHE_BASEBANE', basename( __FILE__ ) );
    38     define( 'EZCACHE_VERSION', '1.6.1' );
     38    define( 'EZCACHE_VERSION', '1.6.2' );
    3939    define( 'EZCACHE_SETTINGS_KEY', 'ezcache' );
    4040
     
    176176            $wp_config_path = $this->get_wp_config_path();
    177177
    178             $handle = @fopen( $wp_config_path, 'r+' );
    179             if ( ! $handle ) {
    180                 return;
    181             }
    182 
    183178            copy( $wp_config_path, $wp_config_path . '.backup' );
    184179
    185             $contents = fread( $handle, filesize( $wp_config_path ) );
     180            $contents = file_get_contents( $wp_config_path );
     181            $contents = preg_replace( "/\r\n|\r|\n/", "\n", $contents ); // normalize line-breaks
    186182
    187183            // update wp-config define
     
    202198            }
    203199
    204             ftruncate( $handle, 0 );
    205             rewind( $handle );
    206             fwrite( $handle, $contents );
    207             fclose( $handle );
     200            if ( "\n" !== PHP_EOL ) {
     201                // update line-breaks to platform defaults
     202                $contents = preg_replace( "/\n/", PHP_EOL, $contents );
     203            }
     204
     205            file_put_contents( $wp_config_path, trim( $contents ) );
     206
     207            if ( filesize( $wp_config_path ) <= 0 ) {
     208                // operation failed, revert the file
     209                copy( $wp_config_path . '.backup', $wp_config_path );
     210            }
    208211
    209212            unlink( $wp_config_path . '.backup' );
  • ezcache/trunk/includes/FileOptimizer/BaseFileOptimizer.php

    r2247507 r2916759  
    7474        $excluded_files = preg_split( "/\\r\\n|\\r|\\n/u", trim( $excluded_files ), -1, PREG_SPLIT_NO_EMPTY );
    7575        $excluded_files = array_filter( $excluded_files );
     76        $excluded_files = array_merge( $excluded_files, ['elementor/css/post-'] );
     77        $excluded_files = array_unique( $excluded_files );
    7678        $excluded_files = apply_filters( 'ezcache_excluded_minify_files', $excluded_files );
    7779        foreach ( $excluded_files as $file ) {
  • ezcache/trunk/includes/FileOptimizer/JsCombiner.php

    r2812876 r2916759  
    116116                }
    117117
     118                if ( $this->is_minify_excluded_file( $matches ) ) {
     119                    return [];
     120                }
     121
    118122                if ( $this->is_external_file( $matches[2] ) ) {
    119123                    foreach ( $this->get_excluded_external_file_path() as $excluded_file ) {
     
    129133
    130134                    return $script;
    131                 }
    132 
    133                 if ( $this->is_minify_excluded_file( $matches ) ) {
    134                     return [];
    135135                }
    136136
  • ezcache/trunk/readme.txt

    r2892153 r2916759  
    3535
    3636== Changelog ==
     37= 1.6.2 =
     38- Fix external JS files not being ignored while combining
     39- Added an exclusion for Elementor per-page JS/CSS files so that the manual exclusion is no longer required
     40
    3741= 1.6.1 =
    3842- Fix problem setting up scheduled task for old cache cleanup
Note: See TracChangeset for help on using the changeset viewer.