Changeset 2800949
- Timestamp:
- 10/19/2022 02:03:23 AM (21 months ago)
- Location:
- timber-library/trunk/lib
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
timber-library/trunk/lib/Image.php
r2616192 r2800949 438 438 */ 439 439 public function link() { 440 if ( strlen($this->abs_url)) {440 if () { 441 441 return $this->abs_url; 442 442 } … … 484 484 */ 485 485 public function src( $size = 'full' ) { 486 if ( isset($this->abs_url)) {486 if () { 487 487 return $this->_maybe_secure_url($this->abs_url); 488 488 } -
timber-library/trunk/lib/Image/Operation/Letterbox.php
r2746631 r2800949 64 64 return false; 65 65 } 66 66 67 67 $w = $this->w; 68 68 $h = $this->h; … … 93 93 $x = $w / 2 - $owt / 2; 94 94 $oht = $h; 95 $image->crop(0, 0, $ow, $oh, $owt, $oht);95 $image->crop(0, 0, ); 96 96 } else { 97 97 $w_scale = $w / $ow; … … 100 100 $y = $h / 2 - $oht / 2; 101 101 $owt = $w; 102 $image->crop(0, 0, $ow, $oh, $owt, $oht);102 $image->crop(0, 0, ); 103 103 } 104 104 $result = $image->save($save_filename); … … 121 121 } 122 122 $image = $func($save_filename); 123 imagecopy($bg, $image, $x, $y, 0, 0, $owt, $oht);123 imagecopy($bg, $image, ); 124 124 if ( $save_func === 'imagegif' ) { 125 125 return $save_func($bg, $save_filename); -
timber-library/trunk/lib/Image/Operation/Resize.php
r2746631 r2800949 76 76 $crop = self::get_target_sizes($editor); 77 77 foreach ( $image as $frame ) { 78 $frame->cropImage($crop['src_w'], $crop['src_h'], $crop['x'], $crop['y']); 78 $frame->cropImage( 79 round($crop['src_w']), 80 round($crop['src_h']), 81 round($crop['x']), 82 round($crop['y']) 83 ); 79 84 $frame->thumbnailImage($w, $h); 80 85 $frame->setImagePage($w, $h, 0, 0); … … 189 194 190 195 $crop = self::get_target_sizes($image); 191 $image->crop( $crop['x'], 192 $crop['y'], 193 $crop['src_w'], 194 $crop['src_h'], 195 $crop['target_w'], 196 $crop['target_h'] 196 $image->crop( 197 round( $crop['x'] ), 198 round( $crop['y'] ), 199 round( $crop['src_w'] ), 200 round( $crop['src_h'] ), 201 round( $crop['target_w'] ), 202 round( $crop['target_h'] ) 197 203 ); 198 204 $quality = apply_filters( 'wp_editor_set_quality', 82, 'image/jpeg'); -
timber-library/trunk/lib/Image/Operation/Retina.php
r1942747 r2800949 63 63 $src_h = $current_size['height']; 64 64 // Get ratios 65 $w = $src_w * $this->factor;66 $h = $src_h * $this->factor;65 $w = ; 66 $h = ; 67 67 $image->crop(0, 0, $src_w, $src_h, $w, $h); 68 68 $result = $image->save($save_filename); -
timber-library/trunk/lib/Loader.php
r2603908 r2800949 206 206 $cache_mode = $this->_get_cache_mode($cache_mode); 207 207 if ( self::CACHE_TRANSIENT === $cache_mode || self::CACHE_SITE_TRANSIENT === $cache_mode ) { 208 return self::clear_cache_timber_database(); 208 // $wpdb->query() might return 0 affected rows, but that means it’s still successful. 209 return false !== self::clear_cache_timber_database(); 209 210 } else if ( self::CACHE_OBJECT === $cache_mode && $object_cache ) { 210 return self::clear_cache_timber_object();211 return self::clear_cache_timber_object(); 211 212 } 212 213 return false; -
timber-library/trunk/lib/PostsIterator.php
r1736508 r2800949 9 9 */ 10 10 class PostsIterator extends \ArrayIterator { 11 11 12 #[\ReturnTypeWillChange] 12 13 public function current() { 13 14 global $post; … … 15 16 return $post; 16 17 } 17 18 18 19 } -
timber-library/trunk/lib/QueryIterator.php
r2175400 r2800949 131 131 // 132 132 133 public function valid() {133 public function valid() { 134 134 return $this->_query->have_posts(); 135 135 } 136 136 137 137 138 public function current() { 138 139 global $post; … … 148 149 * Don't implement next, because current already advances the loop 149 150 */ 151 150 152 final public function next() {} 151 153 154 152 155 public function rewind() { 153 156 $this->_query->rewind_posts(); 154 157 } 155 158 159 156 160 public function key() { 157 161 $this->_query->current_post; … … 200 204 * The return value is cast to an integer. 201 205 */ 202 public function count() {206 public function count() { 203 207 return $this->post_count(); 204 208 } -
timber-library/trunk/lib/Timber.php
r2746630 r2800949 36 36 class Timber { 37 37 38 public static $version = '1. 19.2';38 public static $version = '1.'; 39 39 public static $locations; 40 40 public static $dirname = 'views';
Note: See TracChangeset
for help on using the changeset viewer.