Plugin Directory

Changeset 3068973

Timestamp:
04/11/2024 12:22:12 PM (4 months ago)
Author:
jarednova
Message:

Update to 1.23.1

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

Legend:

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

    r2981863 r3068973  
    7474    protected static function update_message_major() {
    7575        $m = '<br><b>Warning:</b> This new version of Timber introduces some major new features which might have unknown effects on your site.';
    76 
    77 
    78         $m .= self::disable_update();
    7976        return $m;
    8077    }
     
    119116        if ( $upgrade_magnitude == 'milestone' ) {
    120117            $message = self::update_message_milestone();
    121             echo '<br />'.sprintf($message);
     118            echo '<br />'($message);
    122119            return;
    123120        } elseif ( $upgrade_magnitude == 'major' ) {
    124121            //major version
    125122            $message = self::update_message_major();
    126             echo '<br />'.sprintf($message);
     123            echo '<br />'($message);
    127124            return;
    128125        }
    129126        $message = self::update_message_minor();
    130         echo '<br />'.($message);
     127        echo '<br />'($message);
    131128        return;
    132129
  • timber-library/trunk/lib/Image.php

    r2800949 r3068973  
    129129            return $this->get_dimensions_loaded($dim);
    130130        }
     131
     132
     133
     134
     135
    131136        if ( file_exists($this->file_loc) && filesize($this->file_loc) ) {
    132137            if ( ImageHelper::is_svg( $this->file_loc ) ) {
  • timber-library/trunk/lib/Image/Operation/ToJpg.php

    r1942747 r3068973  
    4343     */
    4444    public function run( $load_filename, $save_filename ) {
     45
     46
     47
    4548
    4649        if ( !file_exists($load_filename) ) {
    4750            return false;
    4851        }
    49        
     52
    5053        // Attempt to check if SVG.
    5154        if ( ImageHelper::is_svg($load_filename) ) {
  • timber-library/trunk/lib/Image/Operation/ToWebp.php

    r1999260 r3068973  
    88
    99/**
    10  * This class is used to process webp images. Not all server configurations support webp. 
     10 * This class is used to process webp images. Not all server configurations support webp.
    1111 * If webp is not enabled, Timber will generate webp images instead
    1212 * @codeCoverageIgnore
     
    4343     */
    4444    public function run( $load_filename, $save_filename ) {
     45
     46
     47
     48
    4549        if (!is_file($load_filename)) {
    4650            return false;
  • timber-library/trunk/lib/ImageHelper.php

    r2603908 r3068973  
    3333    static $home_url;
    3434
     35
     36
     37
     38
    3539    public static function init() {
    3640        self::$home_url = get_home_url();
     
    122126            return false;
    123127        }
     128
     129
     130
     131
     132
    124133        //its a gif so test
    125134        if ( !($fh = @fopen($file, 'rb')) ) {
     
    151160     */
    152161    public static function is_svg( $file_path ) {
    153         if ( ! isset( $file_path ) || '' === $file_path || ! file_exists( $file_path ) ) {
     162        if ( ! isset( $file_path ) || '' === $file_path ) {
     163            return false;
     164        }
     165
     166        if (!ImageHelper::is_protocol_allowed($file_path) ) {
     167            throw new \InvalidArgumentException('The output file scheme is not supported.');
     168        }
     169
     170        if ( ! file_exists( $file_path ) ) {
    154171            return false;
    155172        }
     
    367384    public static function sideload_image( $file ) {
    368385        $loc = self::get_sideloaded_file_loc($file);
     386
     387
     388
     389
     390
    369391        if ( file_exists($loc) ) {
    370392            return URLHelper::file_system_to_url($loc);
     
    577599        }
    578600
     601
     602
     603
     604
    579605        $allow_fs_write = apply_filters('timber/allow_fs_write', true);
    580606
     
    582608            return $src;
    583609        }
    584        
     610
    585611        $external = false;
    586612        // if external image, load it first
     
    683709        return $new_path;
    684710    }
     711
     712
     713
     714
     715
     716
     717
     718
     719
     720
     721
     722
     723
     724
     725
     726
     727
     728
     729
     730
     731
     732
     733
     734
     735
     736
     737
     738
     739
     740
     741
    685742}
  • timber-library/trunk/lib/Timber.php

    r2981863 r3068973  
    3636class Timber {
    3737
    38     public static $version = '1.23.0';
     38    public static $version = '1.23.';
    3939    public static $locations;
    4040    public static $dirname = 'views';
Note: See TracChangeset for help on using the changeset viewer.