Changeset 594277
- Timestamp:
- 09/04/2012 04:07:14 AM (14 years ago)
- Location:
- sp-wpec-variation-image-swap/trunk
- Files:
-
- 2 edited
-
includes/class-core.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sp-wpec-variation-image-swap/trunk/includes/class-core.php
r551487 r594277 83 83 84 84 // get the image size info 85 $image_size = @getimagesize( $image_src ); 86 $image_width = $image_size[0]; 87 $image_height = $image_size[1]; 85 // checks to make sure PHP config allows url fopen 86 if ( ini_get( 'allow_url_fopen' ) ) 87 { 88 $image_size = @getimagesize( $image_src ); 89 $image_width = $image_size[0]; 90 $image_height = $image_size[1]; 91 } 92 else 93 { 94 $ch = curl_init(); 95 curl_setopt ( $ch, CURLOPT_URL, $image_src ); 96 curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 ); 97 98 $contents = curl_exec( $ch ); 99 curl_close( $ch ); 100 101 $new_image = ImageCreateFromString( $contents ); 102 imagejpeg( $new_image, 'temp.jpg', 100 ); 103 104 $imageinfo = @getimagesize( 'temp.jpg' ); 105 $image_width = $image_size[0]; 106 $image_height = $image_size[1]; 107 } 108 88 109 89 110 // get the attachment from the attachment id -
sp-wpec-variation-image-swap/trunk/readme.txt
r563773 r594277 5 5 Requires at least: 3.0 6 6 Tested up to: 3.4 7 Stable tag: 2.0. 37 Stable tag: 2.0.4 8 8 9 9 Plugin that adds product variation image swapping function to Wordpress e-Commerce plugin (WPEC). Requires 3.8+ of WPEC plugin. … … 45 45 == Changelog == 46 46 47 = 2.0.4 = 48 * Update - added a check to see if hosting server allows url fopen, if not, use curl. 49 47 50 = 2.0.3 = 48 51 * Update - changed a selector name in the swap script to prevent compatibility issues with other plugins
Note: See TracChangeset
for help on using the changeset viewer.