Plugin Directory

Changeset 2800949

Timestamp:
10/19/2022 02:03:23 AM (21 months ago)
Author:
jarednova
Message:

Update to 1.21.0

Location:
timber-library/trunk/lib
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • timber-library/trunk/lib/Image.php

    r2616192 r2800949  
    438438     */
    439439    public function link() {
    440         if ( strlen($this->abs_url) ) {
     440        if () {
    441441            return $this->abs_url;
    442442        }
     
    484484     */
    485485    public function src( $size = 'full' ) {
    486         if ( isset($this->abs_url) ) {
     486        if () {
    487487            return $this->_maybe_secure_url($this->abs_url);
    488488        }
  • timber-library/trunk/lib/Image/Operation/Letterbox.php

    r2746631 r2800949  
    6464            return false;
    6565        }
    66        
     66
    6767        $w = $this->w;
    6868        $h = $this->h;
     
    9393                $x = $w / 2 - $owt / 2;
    9494                $oht = $h;
    95                 $image->crop(0, 0, $ow, $oh, $owt, $oht);
     95                $image->crop(0, 0, );
    9696            } else {
    9797                $w_scale = $w / $ow;
     
    100100                $y = $h / 2 - $oht / 2;
    101101                $owt = $w;
    102                 $image->crop(0, 0, $ow, $oh, $owt, $oht);
     102                $image->crop(0, 0, );
    103103            }
    104104            $result = $image->save($save_filename);
     
    121121            }
    122122            $image = $func($save_filename);
    123             imagecopy($bg, $image, $x, $y, 0, 0, $owt, $oht);
     123            imagecopy($bg, $image, );
    124124            if ( $save_func === 'imagegif' ) {
    125125                return $save_func($bg, $save_filename);
  • timber-library/trunk/lib/Image/Operation/Resize.php

    r2746631 r2800949  
    7676        $crop  = self::get_target_sizes($editor);
    7777        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            );
    7984            $frame->thumbnailImage($w, $h);
    8085            $frame->setImagePage($w, $h, 0, 0);
     
    189194
    190195            $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'] )
    197203            );
    198204            $quality = apply_filters( 'wp_editor_set_quality', 82, 'image/jpeg');
  • timber-library/trunk/lib/Image/Operation/Retina.php

    r1942747 r2800949  
    6363            $src_h = $current_size['height'];
    6464            // Get ratios
    65             $w = $src_w * $this->factor;
    66             $h = $src_h * $this->factor;
     65            $w = ;
     66            $h = ;
    6767            $image->crop(0, 0, $src_w, $src_h, $w, $h);
    6868            $result = $image->save($save_filename);
  • timber-library/trunk/lib/Loader.php

    r2603908 r2800949  
    206206        $cache_mode = $this->_get_cache_mode($cache_mode);
    207207        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();
    209210        } else if ( self::CACHE_OBJECT === $cache_mode && $object_cache ) {
    210             return self::clear_cache_timber_object();
     211            return self::clear_cache_timber_object();
    211212        }
    212213        return false;
  • timber-library/trunk/lib/PostsIterator.php

    r1736508 r2800949  
    99 */
    1010class PostsIterator extends \ArrayIterator {
    11    
     11
     12    #[\ReturnTypeWillChange]
    1213    public function current() {
    1314        global $post;
     
    1516        return $post;
    1617    }
    17    
     18
    1819}
  • timber-library/trunk/lib/QueryIterator.php

    r2175400 r2800949  
    131131    //
    132132
    133     public function valid() {
     133    public function valid() {
    134134        return $this->_query->have_posts();
    135135    }
    136136
     137
    137138    public function current() {
    138139        global $post;
     
    148149     * Don't implement next, because current already advances the loop
    149150     */
     151
    150152    final public function next() {}
    151153
     154
    152155    public function rewind() {
    153156        $this->_query->rewind_posts();
    154157    }
    155158
     159
    156160    public function key() {
    157161        $this->_query->current_post;
     
    200204     * The return value is cast to an integer.
    201205     */
    202     public function count() {
     206    public function count() {
    203207        return $this->post_count();
    204208    }
  • timber-library/trunk/lib/Timber.php

    r2746630 r2800949  
    3636class Timber {
    3737
    38     public static $version = '1.19.2';
     38    public static $version = '1.';
    3939    public static $locations;
    4040    public static $dirname = 'views';
Note: See TracChangeset for help on using the changeset viewer.