Changeset 2969420
- Timestamp:
- 09/20/2023 06:59:07 PM (11 months ago)
- Location:
- imsanity
- Files:
-
- 2 deleted
- 16 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
imsanity/tags/2.8.3/.travis.yml
r2794659 r2969420 1 1 os: linux 2 2 3 dist: bionic 3 4 … … 14 15 15 16 php: 16 - 7. 217 - 7.417 - 7. 18 - 18 19 19 20 env: … … 24 25 - phpenv config-rm xdebug.ini 25 26 - composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true 26 - composer global require wp-coding-standards/wpcs dealerdirect/phpcodesniffer-composer-installerphpcompatibility/phpcompatibility-wp27 - composer global require phpcompatibility/phpcompatibility-wp 27 28 28 29 script: -
imsanity/tags/2.8.3/changelog.txt
r2794659 r2969420 1 2 3 4 1 5 = 2.8.2 = 2 6 * fixed: mime type error when filename in attachment metadata is incorrect -
imsanity/tags/2.8.3/class-imsanity-cli.php
r2271703 r2969420 32 32 * @param array $assoc_args An array of named arguments provided via WP-CLI. 33 33 */ 34 function resize( $args, $assoc_args ) {34 function resize( $args, $assoc_args ) { 35 35 36 36 // let's get started, shall we? … … 72 72 $imagew = false; 73 73 $imageh = false; 74 $images_finished++;74 ; 75 75 76 76 $path = get_attached_file( $id ); -
imsanity/tags/2.8.3/imsanity.php
r2794659 r2969420 15 15 Author: Exactly WWW 16 16 Domain Path: /languages 17 Version: 2.8. 218 Requires at least: 5.519 Requires PHP: 7. 217 Version: 2.8. 18 Requires at least: 19 Requires PHP: 7. 20 20 Author URI: https://ewww.io/about/ 21 21 License: GPLv3 … … 26 26 } 27 27 28 define( 'IMSANITY_VERSION', '2.8. 2' );28 define( 'IMSANITY_VERSION', '2.8.' ); 29 29 define( 'IMSANITY_SCHEMA_VERSION', '1.1' ); 30 30 … … 66 66 * Import supporting libraries. 67 67 */ 68 require_once ( plugin_dir_path( __FILE__ ) . 'libs/utils.php' );69 require_once ( plugin_dir_path( __FILE__ ) . 'settings.php' );70 require_once ( plugin_dir_path( __FILE__ ) . 'ajax.php' );71 require_once ( plugin_dir_path( __FILE__ ) . 'media.php' );68 require_once; 69 require_once; 70 require_once; 71 require_once; 72 72 if ( defined( 'WP_CLI' ) && WP_CLI ) { 73 require_once ( plugin_dir_path( __FILE__ ) . 'class-imsanity-cli.php' );73 require_once; 74 74 } 75 75 … … 152 152 */ 153 153 function imsanity_get_max_width_height( $source ) { 154 $w = imsanity_get_option( 'imsanity_max_width', IMSANITY_DEFAULT_MAX_WIDTH );155 $h = imsanity_get_option( 'imsanity_max_height', IMSANITY_DEFAULT_MAX_HEIGHT );154 $w = imsanity_get_option( 'imsanity_max_width', IMSANITY_DEFAULT_MAX_WIDTH ); 155 $h = imsanity_get_option( 'imsanity_max_height', IMSANITY_DEFAULT_MAX_HEIGHT ); 156 156 157 157 switch ( $source ) { … … 159 159 break; 160 160 case IMSANITY_SOURCE_LIBRARY: 161 $w = imsanity_get_option( 'imsanity_max_width_library', $w );162 $h = imsanity_get_option( 'imsanity_max_height_library', $h );161 $w = imsanity_get_option( 'imsanity_max_width_library', $w ); 162 $h = imsanity_get_option( 'imsanity_max_height_library', $h ); 163 163 break; 164 164 default: 165 $w = imsanity_get_option( 'imsanity_max_width_other', $w );166 $h = imsanity_get_option( 'imsanity_max_height_other', $h );165 $w = imsanity_get_option( 'imsanity_max_width_other', $w ); 166 $h = imsanity_get_option( 'imsanity_max_height_other', $h ); 167 167 break; 168 168 } … … 227 227 list( $maxw, $maxh ) = $max_width_height; 228 228 } 229 230 229 231 230 232 list( $oldw, $oldh ) = getimagesize( $oldpath ); -
imsanity/tags/2.8.3/libs/utils.php
r2794659 r2969420 5 5 * @package Imsanity 6 6 */ 7 8 /**9 * Util function returns an array value, if not defined then returns default instead.10 *11 * @param array $arr Any array.12 * @param string $key Any index from that array.13 * @param mixed $default Whatever you want.14 */15 function imsanity_val( $arr, $key, $default = '' ) {16 return isset( $arr[ $key ] ) ? $arr[ $key ] : $default;17 }18 7 19 8 /** … … 116 105 function imsanity_get_orientation( $file, $type ) { 117 106 if ( function_exists( 'exif_read_data' ) && 'image/jpeg' === $type ) { 118 $exif = @exif_read_data( $file ); 107 $exif = @exif_read_data( $file ); 119 108 if ( is_array( $exif ) && array_key_exists( 'Orientation', $exif ) ) { 120 109 return (int) $exif['Orientation']; -
imsanity/tags/2.8.3/phpcs.ruleset.xml
r2743190 r2969420 14 14 </rule> 15 15 16 16 17 <rule ref="PHPCompatibilityWP"> 17 18 <severity>10</severity> -
imsanity/tags/2.8.3/readme.txt
r2794659 r2969420 3 3 Donate link: https://ewww.io/donate/ 4 4 Tags: image, scale, resize, space saver, quality, upload 5 Requires at least: 5.56 Tested up to: 6. 17 Requires PHP: 7. 28 Stable tag: 2.8. 25 Requires at least: 6 Tested up to: 6. 7 Requires PHP: 7. 8 Stable tag: 2.8. 9 9 License: GPLv3 10 10 … … 18 18 19 19 This plugin is ideal for blogs that do not require hi-resolution original images to be stored and/or the contributors don't want (or understand how) to scale images before uploading. 20 21 20 22 21 23 = Features = … … 107 109 == Changelog == 108 110 111 112 113 114 109 115 = 2.8.2 = 110 116 * fixed: mime type error when filename in attachment metadata is incorrect -
imsanity/tags/2.8.3/settings.php
r2743190 r2969420 48 48 if ( ! function_exists( 'is_plugin_active_for_network' ) && is_multisite() ) { 49 49 // Need to include the plugin library for the is_plugin_active function. 50 require_once ( ABSPATH . 'wp-admin/includes/plugin.php' );50 require_once; 51 51 } 52 52 if ( is_multisite() ) { … … 200 200 );'; 201 201 202 require_once ( ABSPATH . 'wp-admin/includes/upgrade.php' );202 require_once; 203 203 dbDelta( $sql ); 204 204 … … 837 837 </form> 838 838 <?php 839 840 } 839 } -
imsanity/trunk/.travis.yml
r2794659 r2969420 1 1 os: linux 2 2 3 dist: bionic 3 4 … … 14 15 15 16 php: 16 - 7. 217 - 7.417 - 7. 18 - 18 19 19 20 env: … … 24 25 - phpenv config-rm xdebug.ini 25 26 - composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true 26 - composer global require wp-coding-standards/wpcs dealerdirect/phpcodesniffer-composer-installerphpcompatibility/phpcompatibility-wp27 - composer global require phpcompatibility/phpcompatibility-wp 27 28 28 29 script: -
imsanity/trunk/changelog.txt
r2794659 r2969420 1 2 3 4 1 5 = 2.8.2 = 2 6 * fixed: mime type error when filename in attachment metadata is incorrect -
imsanity/trunk/class-imsanity-cli.php
r2271703 r2969420 32 32 * @param array $assoc_args An array of named arguments provided via WP-CLI. 33 33 */ 34 function resize( $args, $assoc_args ) {34 function resize( $args, $assoc_args ) { 35 35 36 36 // let's get started, shall we? … … 72 72 $imagew = false; 73 73 $imageh = false; 74 $images_finished++;74 ; 75 75 76 76 $path = get_attached_file( $id ); -
imsanity/trunk/imsanity.php
r2794659 r2969420 15 15 Author: Exactly WWW 16 16 Domain Path: /languages 17 Version: 2.8. 218 Requires at least: 5.519 Requires PHP: 7. 217 Version: 2.8. 18 Requires at least: 19 Requires PHP: 7. 20 20 Author URI: https://ewww.io/about/ 21 21 License: GPLv3 … … 26 26 } 27 27 28 define( 'IMSANITY_VERSION', '2.8. 2' );28 define( 'IMSANITY_VERSION', '2.8.' ); 29 29 define( 'IMSANITY_SCHEMA_VERSION', '1.1' ); 30 30 … … 66 66 * Import supporting libraries. 67 67 */ 68 require_once ( plugin_dir_path( __FILE__ ) . 'libs/utils.php' );69 require_once ( plugin_dir_path( __FILE__ ) . 'settings.php' );70 require_once ( plugin_dir_path( __FILE__ ) . 'ajax.php' );71 require_once ( plugin_dir_path( __FILE__ ) . 'media.php' );68 require_once; 69 require_once; 70 require_once; 71 require_once; 72 72 if ( defined( 'WP_CLI' ) && WP_CLI ) { 73 require_once ( plugin_dir_path( __FILE__ ) . 'class-imsanity-cli.php' );73 require_once; 74 74 } 75 75 … … 152 152 */ 153 153 function imsanity_get_max_width_height( $source ) { 154 $w = imsanity_get_option( 'imsanity_max_width', IMSANITY_DEFAULT_MAX_WIDTH );155 $h = imsanity_get_option( 'imsanity_max_height', IMSANITY_DEFAULT_MAX_HEIGHT );154 $w = imsanity_get_option( 'imsanity_max_width', IMSANITY_DEFAULT_MAX_WIDTH ); 155 $h = imsanity_get_option( 'imsanity_max_height', IMSANITY_DEFAULT_MAX_HEIGHT ); 156 156 157 157 switch ( $source ) { … … 159 159 break; 160 160 case IMSANITY_SOURCE_LIBRARY: 161 $w = imsanity_get_option( 'imsanity_max_width_library', $w );162 $h = imsanity_get_option( 'imsanity_max_height_library', $h );161 $w = imsanity_get_option( 'imsanity_max_width_library', $w ); 162 $h = imsanity_get_option( 'imsanity_max_height_library', $h ); 163 163 break; 164 164 default: 165 $w = imsanity_get_option( 'imsanity_max_width_other', $w );166 $h = imsanity_get_option( 'imsanity_max_height_other', $h );165 $w = imsanity_get_option( 'imsanity_max_width_other', $w ); 166 $h = imsanity_get_option( 'imsanity_max_height_other', $h ); 167 167 break; 168 168 } … … 227 227 list( $maxw, $maxh ) = $max_width_height; 228 228 } 229 230 229 231 230 232 list( $oldw, $oldh ) = getimagesize( $oldpath ); -
imsanity/trunk/libs/utils.php
r2794659 r2969420 5 5 * @package Imsanity 6 6 */ 7 8 /**9 * Util function returns an array value, if not defined then returns default instead.10 *11 * @param array $arr Any array.12 * @param string $key Any index from that array.13 * @param mixed $default Whatever you want.14 */15 function imsanity_val( $arr, $key, $default = '' ) {16 return isset( $arr[ $key ] ) ? $arr[ $key ] : $default;17 }18 7 19 8 /** … … 116 105 function imsanity_get_orientation( $file, $type ) { 117 106 if ( function_exists( 'exif_read_data' ) && 'image/jpeg' === $type ) { 118 $exif = @exif_read_data( $file ); 107 $exif = @exif_read_data( $file ); 119 108 if ( is_array( $exif ) && array_key_exists( 'Orientation', $exif ) ) { 120 109 return (int) $exif['Orientation']; -
imsanity/trunk/phpcs.ruleset.xml
r2743190 r2969420 14 14 </rule> 15 15 16 16 17 <rule ref="PHPCompatibilityWP"> 17 18 <severity>10</severity> -
imsanity/trunk/readme.txt
r2794659 r2969420 3 3 Donate link: https://ewww.io/donate/ 4 4 Tags: image, scale, resize, space saver, quality, upload 5 Requires at least: 5.56 Tested up to: 6. 17 Requires PHP: 7. 28 Stable tag: 2.8. 25 Requires at least: 6 Tested up to: 6. 7 Requires PHP: 7. 8 Stable tag: 2.8. 9 9 License: GPLv3 10 10 … … 18 18 19 19 This plugin is ideal for blogs that do not require hi-resolution original images to be stored and/or the contributors don't want (or understand how) to scale images before uploading. 20 21 20 22 21 23 = Features = … … 107 109 == Changelog == 108 110 111 112 113 114 109 115 = 2.8.2 = 110 116 * fixed: mime type error when filename in attachment metadata is incorrect -
imsanity/trunk/settings.php
r2743190 r2969420 48 48 if ( ! function_exists( 'is_plugin_active_for_network' ) && is_multisite() ) { 49 49 // Need to include the plugin library for the is_plugin_active function. 50 require_once ( ABSPATH . 'wp-admin/includes/plugin.php' );50 require_once; 51 51 } 52 52 if ( is_multisite() ) { … … 200 200 );'; 201 201 202 require_once ( ABSPATH . 'wp-admin/includes/upgrade.php' );202 require_once; 203 203 dbDelta( $sql ); 204 204 … … 837 837 </form> 838 838 <?php 839 840 } 839 }
Note: See TracChangeset
for help on using the changeset viewer.