Changeset 2325721
- Timestamp:
- 06/17/2020 09:14:32 AM (6 years ago)
- Location:
- wp-performance-pack/trunk
- Files:
-
- 4 edited
-
modules/dynamic_images/class.wppp_serve_image.php (modified) (2 diffs)
-
modules/dynamic_images/serve-dynamic-images.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
wp-performance-pack.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-performance-pack/trunk/modules/dynamic_images/class.wppp_serve_image.php
r2258214 r2325721 64 64 function get_local_filename() { 65 65 if ( $this->localfilename === null ) { 66 $uploads_dir = wp_upload_dir(); 67 $temp = parse_url( $uploads_dir['baseurl'] ); 68 $upload_path = $temp['path']; 69 $findfile = str_replace( $upload_path, '', $this->filename ); 70 $this->localfilename = $uploads_dir['basedir'] . $findfile; 71 $this->localfiletime = filemtime( $this->localfilename ); 72 66 $uploads_dir = wp_upload_dir(); 67 $upload_path = parse_url( $uploads_dir[ 'baseurl' ] )[ 'path' ]; 68 69 $pos = strpos( $this->filename, $upload_path ); 70 if ( $pos !== false ) { 71 $this->localfilename = $uploads_dir['basedir'] . substr( $this->filename, $pos + strlen( $upload_path ) ); 72 $this->localfilename_scaled = $uploads_dir['basedir'] . substr( $this->filename_scaled, $pos + strlen( $upload_path ) ); 73 } else { 74 $this->exit404( 'Error getting local file name for "' . $this->filename . '"' ); 75 return false; 76 } 73 77 if ( !file_exists( $this->localfilename ) ) { 74 78 $this->exit404( 'File "' . $this->localfilename . '" not found' ); 75 79 return false; 76 80 } 77 $findfile = str_replace( $upload_path, '', $this->filename_scaled ); 78 $this->localfilename_scaled = $uploads_dir['basedir'] . $findfile; 81 $this->localfiletime = filemtime( $this->localfilename ); 79 82 } 80 83 return true; … … 208 211 // change save folder 209 212 $newfile = WP_CONTENT_DIR . '/wppp/images' . substr( $newfile, $uplen, strlen( $newfile ) - $uplen ); 210 wp_mkdir_p( dirname( $newfile ) ); 213 if ( !$this->wppp->options[ 'dynamic_images_nosave' ] ) 214 wp_mkdir_p( dirname( $newfile ) ); 211 215 } 212 216 if ( !$this->wppp->options[ 'dynamic_images_nosave' ] && $this->wppp->options[ 'dynimg_serve_method' ] === 'wordpress' && file_exists( $newfile ) ) { -
wp-performance-pack/trunk/modules/dynamic_images/serve-dynamic-images.php
r2258139 r2325721 96 96 } 97 97 98 99 100 98 function prepare_resize() { 101 99 if ( !$this->wppp->options['dynamic_images_nosave'] ) { -
wp-performance-pack/trunk/readme.txt
r2325169 r2325721 5 5 Tested up to: 5.4.2 6 6 Requires PHP: 5.3 7 Stable tag: 2.3.2 7 Stable tag: 2.3.23 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 128 128 == Changelog == 129 129 130 = 2.3.3 = 131 * [dynimg] "Cache folders" for intermediate images aren't created anymore if saving of intermediate images is disabled. 132 * [dynimg] Improved method for determining local file path for requested images. 133 130 134 = 2.3.2 = 131 135 * [wpfeatures] Additional script is deregistered when heartbeat is deactivated -
wp-performance-pack/trunk/wp-performance-pack.php
r2325169 r2325721 4 4 Plugin URI: http://wordpress.org/plugins/wp-performance-pack 5 5 Description: Performance optimizations for WordPress. Improve localization performance and image handling, serve images through CDN. 6 Version: 2.3. 26 Version: 2.3.3 7 7 Text Domain: wp-performance-pack 8 8 Author: Björn Ahrens … … 130 130 * @const string 131 131 */ 132 const wppp_version = '2.3. 2';132 const wppp_version = '2.3.3'; 133 133 134 134 /**
Note: See TracChangeset
for help on using the changeset viewer.