Changeset 3035873
- Timestamp:
- 02/14/2024 07:54:04 PM (6 months ago)
- Location:
- easy-image-optimizer
- Files:
-
- 16 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
easy-image-optimizer/tags/3.6.0/changelog.txt
r3017573 r3035873 1 2 3 4 5 6 7 1 8 = 3.5.5 = 2 9 *Release Date - January 4, 2024* -
easy-image-optimizer/tags/3.6.0/classes/class-base.php
r3017573 r3035873 689 689 } 690 690 if ( 'ewww_image_optimizer_ll_all_things' === $option_name && \defined( $constant_name ) ) { 691 692 693 691 694 return \sanitize_text_field( \constant( $constant_name ) ); 692 695 } … … 1199 1202 1200 1203 /** 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1201 1219 * Set an option: use 'site' setting if plugin is network activated, otherwise use 'blog' setting. 1202 1220 * … … 1220 1238 } 1221 1239 return $success; 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1222 1262 } 1223 1263 … … 1311 1351 $this->debug_message( "found $allowed_url, replaced with $this->upload_url to get $local_url" ); 1312 1352 $path = $this->url_to_path_exists( $local_url ); 1353 1354 1355 1356 1357 1358 1313 1359 if ( $path ) { 1314 1360 return $path; … … 1540 1586 // This is used by the WebP parsers, and by the Lazy Load via get_image_dimensions_by_url(). 1541 1587 $this->upload_url = \trailingslashit( ! empty( $upload_dir['baseurl'] ) ? $upload_dir['baseurl'] : \content_url( 'uploads' ) ); 1588 1589 1590 1591 1592 1593 1594 1595 1596 1542 1597 1543 1598 // But this is used by Easy IO, so it should be derived from the above logic instead, which already matches the site/home URLs against the upload URL. -
easy-image-optimizer/tags/3.6.0/classes/class-exactdn.php
r3002888 r3035873 2407 2407 $intermediate_url = \str_replace( $image_url_basename, $image_meta['sizes'][ $size ]['file'], $image_url ); 2408 2408 2409 if ( empty( $image_meta[' width'] ) || empty( $image_meta['height'] ) ) {2409 if ( empty( $image_meta['['height'] ) ) { 2410 2410 list( $filename_width, $filename_height ) = $this->get_dimensions_from_filename( $intermediate_url ); 2411 } 2412 $filename_width = ! empty( $image_meta['width'] ) ? $image_meta['width'] : $filename_width; 2413 $filename_height = ! empty( $image_meta['height'] ) ? $image_meta['height'] : $filename_height; 2411 } else { 2412 $filename_width = $image_meta['sizes'][ $size ]['width']; 2413 $filename_height = $image_meta['sizes'][ $size ]['height']; 2414 } 2414 2415 if ( $filename_width && $filename_height && $image_args['width'] === $filename_width && $image_args['height'] === $filename_height ) { 2415 2416 $this->debug_message( "changing $image_url to $intermediate_url" ); -
easy-image-optimizer/tags/3.6.0/classes/class-hs-beacon.php
r2963296 r3035873 33 33 */ 34 34 public function check_for_optin() { 35 36 37 38 39 35 40 $this->debug_message( '<b>' . __METHOD__ . '()</b>' ); 36 41 $this->set_option( $this->prefix . 'enable_help', 1 ); … … 44 49 */ 45 50 public function check_for_optout() { 51 52 53 54 55 46 56 $this->debug_message( '<b>' . __METHOD__ . '()</b>' ); 47 57 \delete_option( $this->prefix . 'enable_help' ); -
easy-image-optimizer/tags/3.6.0/classes/class-plugin.php
r2969931 r3035873 167 167 $easyio_ll_exclude = empty( $_POST['easyio_ll_exclude'] ) ? '' : sanitize_textarea_field( wp_unslash( $_POST['easyio_ll_exclude'] ) ); 168 168 \update_site_option( 'easyio_ll_exclude', $this->exclude_paths_sanitize( $easyio_ll_exclude ) ); 169 170 169 171 $easyio_allow_multisite_override = empty( $_POST['easyio_allow_multisite_override'] ) ? false : true; 170 172 \update_site_option( 'easyio_allow_multisite_override', $easyio_allow_multisite_override ); … … 181 183 182 184 /** 183 * Register all our options and san tiation functions.185 * Register all our options and sanation functions. 184 186 */ 185 187 public function register_settings() { … … 195 197 \register_setting( 'easyio_options', 'easyio_use_lqip', 'boolval' ); 196 198 \register_setting( 'easyio_options', 'easyio_ll_exclude', array( $this, 'exclude_paths_sanitize' ) ); 199 197 200 } 198 201 … … 218 221 \add_option( 'easyio_ll_autoscale', true ); 219 222 \add_option( 'easyio_ll_exclude', '' ); 223 220 224 221 225 // Set network defaults. -
easy-image-optimizer/tags/3.6.0/easy-image-optimizer.php
r3017573 r3035873 14 14 Description: Easily speed up your website to better connect with your visitors. Properly compress and size/scale images. Includes lazy load and WebP auto-convert. 15 15 Author: Exactly WWW 16 Version: 3. 5.516 Version: 3. 17 17 Requires at least: 6.2 18 18 Requires PHP: 7.4 … … 30 30 add_action( 'admin_notices', 'easyio_unsupported_php' ); 31 31 } elseif ( false === strpos( add_query_arg( '', '' ), 'easyio_disable=1' ) ) { 32 define( 'EASYIO_VERSION', 3 55);32 define( 'EASYIO_VERSION', 3 ); 33 33 34 34 /** -
easy-image-optimizer/tags/3.6.0/readme.txt
r3017573 r3035873 5 5 Tested up to: 6.4 6 6 Requires PHP: 7.4 7 Stable tag: 3. 5.57 Stable tag: 3. 8 8 License: GPLv3 9 9 … … 57 57 58 58 * If you would like to help translate this plugin in your language, get started here: https://translate.wordpress.org/projects/wp-plugins/easy-image-optimizer/ 59 60 61 62 63 64 65 59 66 60 67 = 3.5.5 = -
easy-image-optimizer/tags/3.6.0/unique.php
r2969931 r3035873 55 55 function easyio_activate() { 56 56 easyio_debug_message( '<b>' . __FUNCTION__ . '()</b>' ); 57 57 58 $permissions = apply_filters( 'easyio_admin_permissions', '' ); 58 59 if ( false === current_user_can( $permissions ) ) { … … 82 83 function easyio_deactivate() { 83 84 easyio_debug_message( '<b>' . __FUNCTION__ . '()</b>' ); 85 84 86 $permissions = apply_filters( 'easyio_admin_permissions', '' ); 85 87 if ( false === current_user_can( $permissions ) ) { … … 418 420 echo '<div id="easyio-hs-beacon" class="notice notice-info"><p>' . 419 421 esc_html__( 'Enable the Easy IO support beacon, which gives you access to documentation and our support team right from your WordPress dashboard. To assist you more efficiently, we collect the current url, IP address, browser/device information, and debugging information.', 'easy-image-optimizer' ) . 420 '<br><a href="' . esc_url( $optin_url) . '" class="button-secondary">' . esc_html__( 'Allow', 'easy-image-optimizer' ) . '</a>' .421 ' <a href="' . esc_url( $optout_url) . '" class="button-secondary">' . esc_html__( 'Do not allow', 'easy-image-optimizer' ) . '</a>' .422 '<br><a href="' . esc_url( ) . '" class="button-secondary">' . esc_html__( 'Allow', 'easy-image-optimizer' ) . '</a>' . 423 ' <a href="' . esc_url( ) . '" class="button-secondary">' . esc_html__( 'Do not allow', 'easy-image-optimizer' ) . '</a>' . 422 424 '</p></div>'; 423 425 } … … 862 864 </li> 863 865 <li> 864 <a id="easyio-activate" href="<?php echo esc_url( admin_url( 'admin.php?action=easyio_activate' ) ); ?>" class="button-primary">866 <a id="easyio-activate" href="<?php echo esc_url( ' ) ); ?>" class="button-primary"> 865 867 <?php esc_html_e( 'Activate', 'easy-image-optimizer' ); ?> 866 868 </a> … … 879 881 <?php esc_html_e( 'Manage Subscription', 'easy-image-optimizer' ); ?> 880 882 </a> 881 <a href=" admin.php?action=easyio_deactivate" class="page-title-action">883 <a href="" class="page-title-action"> 882 884 <?php esc_html_e( 'Disable Optimizer', 'easy-image-optimizer' ); ?> 883 885 </a> … … 981 983 easyio_debug_message( $ll_exclude_paths ); 982 984 ?> 985 986 987 988 989 990 991 992 993 994 995 996 997 998 983 999 <?php endif; ?> 984 1000 <?php easyio_debug_message( 'remove metadata: ' . ( easyio_get_option( 'easyio_metadata_remove' ) ? 'on' : 'off' ) ); ?> … … 1025 1041 <td> 1026 1042 <p> 1027 <a target='_blank' href='<?php echo esc_url( admin_url( 'admin.php?action=easyio_view_debug_log' ) ); ?>'><?php esc_html_e( 'View Log', 'easy-image-optimizer' ); ?></a> -1028 <a href='<?php echo esc_url( admin_url( 'admin.php?action=easyio_delete_debug_log' ) ); ?>'><?php esc_html_e( 'Clear Log', 'easy-image-optimizer' ); ?></a>1043 <a target='_blank' href='<?php echo esc_url( ' ) ); ?>'><?php esc_html_e( 'View Log', 'easy-image-optimizer' ); ?></a> - 1044 <a href='<?php echo esc_url( ' ) ); ?>'><?php esc_html_e( 'Clear Log', 'easy-image-optimizer' ); ?></a> 1029 1045 </p> 1030 <p><a class='button button-secondary' target='_blank' href='<?php echo esc_url( admin_url( 'admin.php?action=easyio_download_debug_log' ) ); ?>'><?php esc_html_e( 'Download Log', 'easy-image-optimizer' ); ?></a></p>1046 <p><a class='button button-secondary' target='_blank' href='<?php echo esc_url( ' ) ); ?>'><?php esc_html_e( 'Download Log', 'easy-image-optimizer' ); ?></a></p> 1031 1047 </td> 1032 1048 </tr> … … 1147 1163 */ 1148 1164 function easyio_view_debug_log() { 1165 1149 1166 $permissions = apply_filters( 'easyio_admin_permissions', 'manage_options' ); 1150 1167 if ( false === current_user_can( $permissions ) ) { … … 1164 1181 */ 1165 1182 function easyio_delete_debug_log() { 1183 1166 1184 $permissions = apply_filters( 'easyio_admin_permissions', 'manage_options' ); 1167 1185 if ( false === current_user_can( $permissions ) ) { … … 1183 1201 */ 1184 1202 function easyio_download_debug_log() { 1203 1185 1204 if ( ! current_user_can( apply_filters( 'easyio_admin_permissions', 'manage_options' ) ) ) { 1186 1205 wp_die( esc_html__( 'Access denied.', 'easy-image-optimizer' ) ); -
easy-image-optimizer/trunk/changelog.txt
r3017573 r3035873 1 2 3 4 5 6 7 1 8 = 3.5.5 = 2 9 *Release Date - January 4, 2024* -
easy-image-optimizer/trunk/classes/class-base.php
r3017573 r3035873 689 689 } 690 690 if ( 'ewww_image_optimizer_ll_all_things' === $option_name && \defined( $constant_name ) ) { 691 692 693 691 694 return \sanitize_text_field( \constant( $constant_name ) ); 692 695 } … … 1199 1202 1200 1203 /** 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1201 1219 * Set an option: use 'site' setting if plugin is network activated, otherwise use 'blog' setting. 1202 1220 * … … 1220 1238 } 1221 1239 return $success; 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1222 1262 } 1223 1263 … … 1311 1351 $this->debug_message( "found $allowed_url, replaced with $this->upload_url to get $local_url" ); 1312 1352 $path = $this->url_to_path_exists( $local_url ); 1353 1354 1355 1356 1357 1358 1313 1359 if ( $path ) { 1314 1360 return $path; … … 1540 1586 // This is used by the WebP parsers, and by the Lazy Load via get_image_dimensions_by_url(). 1541 1587 $this->upload_url = \trailingslashit( ! empty( $upload_dir['baseurl'] ) ? $upload_dir['baseurl'] : \content_url( 'uploads' ) ); 1588 1589 1590 1591 1592 1593 1594 1595 1596 1542 1597 1543 1598 // But this is used by Easy IO, so it should be derived from the above logic instead, which already matches the site/home URLs against the upload URL. -
easy-image-optimizer/trunk/classes/class-exactdn.php
r3002888 r3035873 2407 2407 $intermediate_url = \str_replace( $image_url_basename, $image_meta['sizes'][ $size ]['file'], $image_url ); 2408 2408 2409 if ( empty( $image_meta[' width'] ) || empty( $image_meta['height'] ) ) {2409 if ( empty( $image_meta['['height'] ) ) { 2410 2410 list( $filename_width, $filename_height ) = $this->get_dimensions_from_filename( $intermediate_url ); 2411 } 2412 $filename_width = ! empty( $image_meta['width'] ) ? $image_meta['width'] : $filename_width; 2413 $filename_height = ! empty( $image_meta['height'] ) ? $image_meta['height'] : $filename_height; 2411 } else { 2412 $filename_width = $image_meta['sizes'][ $size ]['width']; 2413 $filename_height = $image_meta['sizes'][ $size ]['height']; 2414 } 2414 2415 if ( $filename_width && $filename_height && $image_args['width'] === $filename_width && $image_args['height'] === $filename_height ) { 2415 2416 $this->debug_message( "changing $image_url to $intermediate_url" ); -
easy-image-optimizer/trunk/classes/class-hs-beacon.php
r2963296 r3035873 33 33 */ 34 34 public function check_for_optin() { 35 36 37 38 39 35 40 $this->debug_message( '<b>' . __METHOD__ . '()</b>' ); 36 41 $this->set_option( $this->prefix . 'enable_help', 1 ); … … 44 49 */ 45 50 public function check_for_optout() { 51 52 53 54 55 46 56 $this->debug_message( '<b>' . __METHOD__ . '()</b>' ); 47 57 \delete_option( $this->prefix . 'enable_help' ); -
easy-image-optimizer/trunk/classes/class-plugin.php
r2969931 r3035873 167 167 $easyio_ll_exclude = empty( $_POST['easyio_ll_exclude'] ) ? '' : sanitize_textarea_field( wp_unslash( $_POST['easyio_ll_exclude'] ) ); 168 168 \update_site_option( 'easyio_ll_exclude', $this->exclude_paths_sanitize( $easyio_ll_exclude ) ); 169 170 169 171 $easyio_allow_multisite_override = empty( $_POST['easyio_allow_multisite_override'] ) ? false : true; 170 172 \update_site_option( 'easyio_allow_multisite_override', $easyio_allow_multisite_override ); … … 181 183 182 184 /** 183 * Register all our options and san tiation functions.185 * Register all our options and sanation functions. 184 186 */ 185 187 public function register_settings() { … … 195 197 \register_setting( 'easyio_options', 'easyio_use_lqip', 'boolval' ); 196 198 \register_setting( 'easyio_options', 'easyio_ll_exclude', array( $this, 'exclude_paths_sanitize' ) ); 199 197 200 } 198 201 … … 218 221 \add_option( 'easyio_ll_autoscale', true ); 219 222 \add_option( 'easyio_ll_exclude', '' ); 223 220 224 221 225 // Set network defaults. -
easy-image-optimizer/trunk/easy-image-optimizer.php
r3017573 r3035873 14 14 Description: Easily speed up your website to better connect with your visitors. Properly compress and size/scale images. Includes lazy load and WebP auto-convert. 15 15 Author: Exactly WWW 16 Version: 3. 5.516 Version: 3. 17 17 Requires at least: 6.2 18 18 Requires PHP: 7.4 … … 30 30 add_action( 'admin_notices', 'easyio_unsupported_php' ); 31 31 } elseif ( false === strpos( add_query_arg( '', '' ), 'easyio_disable=1' ) ) { 32 define( 'EASYIO_VERSION', 3 55);32 define( 'EASYIO_VERSION', 3 ); 33 33 34 34 /** -
easy-image-optimizer/trunk/readme.txt
r3017573 r3035873 5 5 Tested up to: 6.4 6 6 Requires PHP: 7.4 7 Stable tag: 3. 5.57 Stable tag: 3. 8 8 License: GPLv3 9 9 … … 57 57 58 58 * If you would like to help translate this plugin in your language, get started here: https://translate.wordpress.org/projects/wp-plugins/easy-image-optimizer/ 59 60 61 62 63 64 65 59 66 60 67 = 3.5.5 = -
easy-image-optimizer/trunk/unique.php
r2969931 r3035873 55 55 function easyio_activate() { 56 56 easyio_debug_message( '<b>' . __FUNCTION__ . '()</b>' ); 57 57 58 $permissions = apply_filters( 'easyio_admin_permissions', '' ); 58 59 if ( false === current_user_can( $permissions ) ) { … … 82 83 function easyio_deactivate() { 83 84 easyio_debug_message( '<b>' . __FUNCTION__ . '()</b>' ); 85 84 86 $permissions = apply_filters( 'easyio_admin_permissions', '' ); 85 87 if ( false === current_user_can( $permissions ) ) { … … 418 420 echo '<div id="easyio-hs-beacon" class="notice notice-info"><p>' . 419 421 esc_html__( 'Enable the Easy IO support beacon, which gives you access to documentation and our support team right from your WordPress dashboard. To assist you more efficiently, we collect the current url, IP address, browser/device information, and debugging information.', 'easy-image-optimizer' ) . 420 '<br><a href="' . esc_url( $optin_url) . '" class="button-secondary">' . esc_html__( 'Allow', 'easy-image-optimizer' ) . '</a>' .421 ' <a href="' . esc_url( $optout_url) . '" class="button-secondary">' . esc_html__( 'Do not allow', 'easy-image-optimizer' ) . '</a>' .422 '<br><a href="' . esc_url( ) . '" class="button-secondary">' . esc_html__( 'Allow', 'easy-image-optimizer' ) . '</a>' . 423 ' <a href="' . esc_url( ) . '" class="button-secondary">' . esc_html__( 'Do not allow', 'easy-image-optimizer' ) . '</a>' . 422 424 '</p></div>'; 423 425 } … … 862 864 </li> 863 865 <li> 864 <a id="easyio-activate" href="<?php echo esc_url( admin_url( 'admin.php?action=easyio_activate' ) ); ?>" class="button-primary">866 <a id="easyio-activate" href="<?php echo esc_url( ' ) ); ?>" class="button-primary"> 865 867 <?php esc_html_e( 'Activate', 'easy-image-optimizer' ); ?> 866 868 </a> … … 879 881 <?php esc_html_e( 'Manage Subscription', 'easy-image-optimizer' ); ?> 880 882 </a> 881 <a href=" admin.php?action=easyio_deactivate" class="page-title-action">883 <a href="" class="page-title-action"> 882 884 <?php esc_html_e( 'Disable Optimizer', 'easy-image-optimizer' ); ?> 883 885 </a> … … 981 983 easyio_debug_message( $ll_exclude_paths ); 982 984 ?> 985 986 987 988 989 990 991 992 993 994 995 996 997 998 983 999 <?php endif; ?> 984 1000 <?php easyio_debug_message( 'remove metadata: ' . ( easyio_get_option( 'easyio_metadata_remove' ) ? 'on' : 'off' ) ); ?> … … 1025 1041 <td> 1026 1042 <p> 1027 <a target='_blank' href='<?php echo esc_url( admin_url( 'admin.php?action=easyio_view_debug_log' ) ); ?>'><?php esc_html_e( 'View Log', 'easy-image-optimizer' ); ?></a> -1028 <a href='<?php echo esc_url( admin_url( 'admin.php?action=easyio_delete_debug_log' ) ); ?>'><?php esc_html_e( 'Clear Log', 'easy-image-optimizer' ); ?></a>1043 <a target='_blank' href='<?php echo esc_url( ' ) ); ?>'><?php esc_html_e( 'View Log', 'easy-image-optimizer' ); ?></a> - 1044 <a href='<?php echo esc_url( ' ) ); ?>'><?php esc_html_e( 'Clear Log', 'easy-image-optimizer' ); ?></a> 1029 1045 </p> 1030 <p><a class='button button-secondary' target='_blank' href='<?php echo esc_url( admin_url( 'admin.php?action=easyio_download_debug_log' ) ); ?>'><?php esc_html_e( 'Download Log', 'easy-image-optimizer' ); ?></a></p>1046 <p><a class='button button-secondary' target='_blank' href='<?php echo esc_url( ' ) ); ?>'><?php esc_html_e( 'Download Log', 'easy-image-optimizer' ); ?></a></p> 1031 1047 </td> 1032 1048 </tr> … … 1147 1163 */ 1148 1164 function easyio_view_debug_log() { 1165 1149 1166 $permissions = apply_filters( 'easyio_admin_permissions', 'manage_options' ); 1150 1167 if ( false === current_user_can( $permissions ) ) { … … 1164 1181 */ 1165 1182 function easyio_delete_debug_log() { 1183 1166 1184 $permissions = apply_filters( 'easyio_admin_permissions', 'manage_options' ); 1167 1185 if ( false === current_user_can( $permissions ) ) { … … 1183 1201 */ 1184 1202 function easyio_download_debug_log() { 1203 1185 1204 if ( ! current_user_can( apply_filters( 'easyio_admin_permissions', 'manage_options' ) ) ) { 1186 1205 wp_die( esc_html__( 'Access denied.', 'easy-image-optimizer' ) );
Note: See TracChangeset
for help on using the changeset viewer.