Changeset 3068973
- Timestamp:
- 04/11/2024 12:22:12 PM (4 months ago)
- Location:
- timber-library/trunk/lib
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
timber-library/trunk/lib/Admin.php
r2981863 r3068973 74 74 protected static function update_message_major() { 75 75 $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();79 76 return $m; 80 77 } … … 119 116 if ( $upgrade_magnitude == 'milestone' ) { 120 117 $message = self::update_message_milestone(); 121 echo '<br />' .sprintf($message);118 echo '<br />'($message); 122 119 return; 123 120 } elseif ( $upgrade_magnitude == 'major' ) { 124 121 //major version 125 122 $message = self::update_message_major(); 126 echo '<br />' .sprintf($message);123 echo '<br />'($message); 127 124 return; 128 125 } 129 126 $message = self::update_message_minor(); 130 echo '<br />' .($message);127 echo '<br />'($message); 131 128 return; 132 129 -
timber-library/trunk/lib/Image.php
r2800949 r3068973 129 129 return $this->get_dimensions_loaded($dim); 130 130 } 131 132 133 134 135 131 136 if ( file_exists($this->file_loc) && filesize($this->file_loc) ) { 132 137 if ( ImageHelper::is_svg( $this->file_loc ) ) { -
timber-library/trunk/lib/Image/Operation/ToJpg.php
r1942747 r3068973 43 43 */ 44 44 public function run( $load_filename, $save_filename ) { 45 46 47 45 48 46 49 if ( !file_exists($load_filename) ) { 47 50 return false; 48 51 } 49 52 50 53 // Attempt to check if SVG. 51 54 if ( ImageHelper::is_svg($load_filename) ) { -
timber-library/trunk/lib/Image/Operation/ToWebp.php
r1999260 r3068973 8 8 9 9 /** 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. 11 11 * If webp is not enabled, Timber will generate webp images instead 12 12 * @codeCoverageIgnore … … 43 43 */ 44 44 public function run( $load_filename, $save_filename ) { 45 46 47 48 45 49 if (!is_file($load_filename)) { 46 50 return false; -
timber-library/trunk/lib/ImageHelper.php
r2603908 r3068973 33 33 static $home_url; 34 34 35 36 37 38 35 39 public static function init() { 36 40 self::$home_url = get_home_url(); … … 122 126 return false; 123 127 } 128 129 130 131 132 124 133 //its a gif so test 125 134 if ( !($fh = @fopen($file, 'rb')) ) { … … 151 160 */ 152 161 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 ) ) { 154 171 return false; 155 172 } … … 367 384 public static function sideload_image( $file ) { 368 385 $loc = self::get_sideloaded_file_loc($file); 386 387 388 389 390 369 391 if ( file_exists($loc) ) { 370 392 return URLHelper::file_system_to_url($loc); … … 577 599 } 578 600 601 602 603 604 579 605 $allow_fs_write = apply_filters('timber/allow_fs_write', true); 580 606 … … 582 608 return $src; 583 609 } 584 610 585 611 $external = false; 586 612 // if external image, load it first … … 683 709 return $new_path; 684 710 } 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 685 742 } -
timber-library/trunk/lib/Timber.php
r2981863 r3068973 36 36 class Timber { 37 37 38 public static $version = '1.23. 0';38 public static $version = '1.23.'; 39 39 public static $locations; 40 40 public static $dirname = 'views';
Note: See TracChangeset
for help on using the changeset viewer.