Changeset 3185220
- Timestamp:
- 11/10/2024 06:13:19 PM (17 months ago)
- Location:
- webp-transformer
- Files:
-
- 3 edited
- 2 copied
-
tags/1.0.2 (copied) (copied from webp-transformer/trunk)
-
tags/1.0.2/readme.txt (copied) (copied from webp-transformer/trunk/readme.txt) (2 diffs)
-
tags/1.0.2/webp-transformer.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/webp-transformer.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
webp-transformer/tags/1.0.2/readme.txt
r3185202 r3185220 4 4 Requires at least: 6.0 5 5 Tested up to: 6.6.2 6 Stable tag: 1.0. 17 Requires PHP: 8.16 Stable tag: 1.0.2 7 Requires PHP: 7.4 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 29 29 == Changelog == 30 30 31 = 1.0.2 = 32 *Release Date 10th November 2024* 33 34 * Adjustments to be compatible with PHP versions from 7.4 onwards 35 36 = 1.0.1 = 37 *Release Date 1th November 2024* 38 39 * Add assets and structure to readme.txt and repository 40 31 41 = 1.0 = 32 42 *Release Date 1th November 2024* -
webp-transformer/tags/1.0.2/webp-transformer.php
r3180057 r3185220 6 6 Author: Informatiza Soluções Empresariais 7 7 Text Domain: webp-transformer 8 Version: 1.0. 18 Version: 1.0.2 9 9 Author URI: https://informatizaweb.com.br/ 10 10 License: GPLv2 or later … … 36 36 include_once WBPTF_PATH . 'pages/settings.php'; 37 37 38 add_action( 'init', array($this, 'load_textdomain'));38 add_action('init', array($this, 'load_textdomain')); 39 39 add_filter('plugin_action_links_' . plugin_basename(__FILE__), array($this, 'settings_link')); 40 40 … … 46 46 add_filter('wp_handle_upload', [$this, 'convert_and_resize_image']); 47 47 } 48 48 49 49 public function load_textdomain() 50 50 { 51 load_plugin_textdomain( 'webp-transformer', false, dirname( plugin_basename(__FILE__)) . '/languages');51 load_plugin_textdomain('webp-transformer', false, dirname(plugin_basename(__FILE__)) . '/languages'); 52 52 } 53 53 54 54 public function error_log($message) 55 55 { 56 if (defined( 'WP_DEBUG') && WP_DEBUG === true) {56 if (defined('WP_DEBUG') && WP_DEBUG === true) { 57 57 // phpcs:disable WordPress.PHP.DevelopmentFunctions 58 58 error_log($message); … … 63 63 public function gd_extension_notice() 64 64 { 65 ?>66 <div class="notice notice-error">67 <p><?php esc_html_e('The GD extension is not loaded. The Webp Transformer plugin will not function properly without it.', 'webp-transformer'); ?></p>68 </div>69 <?php65 ?> 66 <div class="notice notice-error"> 67 <p><?php esc_html_e('The GD extension is not loaded. The Webp Transformer plugin will not function properly without it.', 'webp-transformer'); ?></p> 68 </div> 69 <?php 70 70 } 71 71 … … 102 102 $file['file'] = $webp_file_path; 103 103 $file['type'] = 'image/webp'; 104 104 105 105 wp_delete_file($original_file_path); 106 106 } else { … … 125 125 case 'image/png': 126 126 $img = imagecreatefrompng($file_path); 127 imagepalettetotruecolor($img);128 129 127 return $img; 130 128 default: … … 161 159 $ignore_filename = wbptf_get_ignore_filename(); 162 160 163 return str _contains($base_name, $ignore_filename);161 return strpos($base_name, $ignore_filename) !== false; 164 162 } 165 163 -
webp-transformer/trunk/readme.txt
r3185202 r3185220 4 4 Requires at least: 6.0 5 5 Tested up to: 6.6.2 6 Stable tag: 1.0. 17 Requires PHP: 8.16 Stable tag: 1.0.2 7 Requires PHP: 7.4 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 29 29 == Changelog == 30 30 31 = 1.0.2 = 32 *Release Date 10th November 2024* 33 34 * Adjustments to be compatible with PHP versions from 7.4 onwards 35 36 = 1.0.1 = 37 *Release Date 1th November 2024* 38 39 * Add assets and structure to readme.txt and repository 40 31 41 = 1.0 = 32 42 *Release Date 1th November 2024* -
webp-transformer/trunk/webp-transformer.php
r3180057 r3185220 6 6 Author: Informatiza Soluções Empresariais 7 7 Text Domain: webp-transformer 8 Version: 1.0. 18 Version: 1.0.2 9 9 Author URI: https://informatizaweb.com.br/ 10 10 License: GPLv2 or later … … 36 36 include_once WBPTF_PATH . 'pages/settings.php'; 37 37 38 add_action( 'init', array($this, 'load_textdomain'));38 add_action('init', array($this, 'load_textdomain')); 39 39 add_filter('plugin_action_links_' . plugin_basename(__FILE__), array($this, 'settings_link')); 40 40 … … 46 46 add_filter('wp_handle_upload', [$this, 'convert_and_resize_image']); 47 47 } 48 48 49 49 public function load_textdomain() 50 50 { 51 load_plugin_textdomain( 'webp-transformer', false, dirname( plugin_basename(__FILE__)) . '/languages');51 load_plugin_textdomain('webp-transformer', false, dirname(plugin_basename(__FILE__)) . '/languages'); 52 52 } 53 53 54 54 public function error_log($message) 55 55 { 56 if (defined( 'WP_DEBUG') && WP_DEBUG === true) {56 if (defined('WP_DEBUG') && WP_DEBUG === true) { 57 57 // phpcs:disable WordPress.PHP.DevelopmentFunctions 58 58 error_log($message); … … 63 63 public function gd_extension_notice() 64 64 { 65 ?>66 <div class="notice notice-error">67 <p><?php esc_html_e('The GD extension is not loaded. The Webp Transformer plugin will not function properly without it.', 'webp-transformer'); ?></p>68 </div>69 <?php65 ?> 66 <div class="notice notice-error"> 67 <p><?php esc_html_e('The GD extension is not loaded. The Webp Transformer plugin will not function properly without it.', 'webp-transformer'); ?></p> 68 </div> 69 <?php 70 70 } 71 71 … … 102 102 $file['file'] = $webp_file_path; 103 103 $file['type'] = 'image/webp'; 104 104 105 105 wp_delete_file($original_file_path); 106 106 } else { … … 125 125 case 'image/png': 126 126 $img = imagecreatefrompng($file_path); 127 imagepalettetotruecolor($img);128 129 127 return $img; 130 128 default: … … 161 159 $ignore_filename = wbptf_get_ignore_filename(); 162 160 163 return str _contains($base_name, $ignore_filename);161 return strpos($base_name, $ignore_filename) !== false; 164 162 } 165 163
Note: See TracChangeset
for help on using the changeset viewer.