Changeset 3438710
- Timestamp:
- 01/13/2026 02:51:59 PM (3 weeks ago)
- Location:
- images-to-webp/trunk
- Files:
-
- 3 edited
-
images-to-webp.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
tests/server.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
images-to-webp/trunk/images-to-webp.php
r3407357 r3438710 4 4 Plugin URI: https://www.paypal.me/jakubnovaksl 5 5 Description: Convert JPG, PNG and GIF images to WEBP, speed up your web 6 Version: 4. 86 Version: 4.9 7 7 Author: KubiQ 8 8 Author URI: https://kubiq.sk … … 33 33 add_action( 'fly_image_created', array( $this, 'fly_images_to_webp' ), 10, 2 ); 34 34 add_action( 'bis_image_created', array( $this, 'bis_images_to_webp' ), 10, 2 ); 35 36 $avif_plugin_file = WP_PLUGIN_DIR . '/images-to-avif/images-to-avif.php'; 37 if( ! file_exists( $avif_plugin_file ) ){ 38 add_action( 'admin_notices', array( $this, 'admin_notices' ) ); 39 add_action( 'wp_ajax_avif_notice_dismissed', array( $this, 'avif_notice_dismissed' ) ); 40 } 41 } 42 43 function admin_notices(){ 44 if( current_user_can('manage_options') && ! get_user_meta( get_current_user_id(), 'avif_notice_dismissed' ) ){ 45 if( function_exists('get_current_screen') && isset( get_current_screen()->id ) && in_array( get_current_screen()->id, array( 'dashboard', 'plugins', 'plugin-install', 'upload', 'attachment' ) ) ){ ?> 46 <div class="avif-notice notice notice-info is-dismissible"><p><?php printf( esc_html__( 'There is a new %sImages to AVIF%s plugin that can improve your load time even more and it works perfectly with Images to WebP too.', 'images-to-webp' ), '<a href="' . admin_url( 'plugin-install.php?s=kubiq%20Images%20to%20AVIF&tab=search&type=term' ) . '" target="_blank">', '</a>' ) ?></p></div> 47 <script> 48 jQuery(document).ready(function($){ 49 $(document).on('click', '.avif-notice .notice-dismiss', function(){ 50 $.post( ajaxurl, { action: 'avif_notice_dismissed', _wpnonce: '<?php echo wp_create_nonce('avif_notice_dismissed') ?>' }); 51 }); 52 }); 53 </script><?php 54 } 55 } 56 } 57 58 function avif_notice_dismissed(){ 59 if( defined('DOING_AJAX') && DOING_AJAX && check_ajax_referer('avif_notice_dismissed') ){ 60 add_user_meta( get_current_user_id(), 'avif_notice_dismissed', 1, true ); 61 } 35 62 } 36 63 … … 172 199 } ?> 173 200 <div class="wrap"> 174 <h2><?php _e( 'Images to WebP', 'images-to-webp' ); ?></h2> 175 <?php $this->plugin_admin_tabs( $this->tab ); ?> 176 <?php include_once 'tabs/tab-' . $this->tab . '.php'; ?> 201 <h2><?php _e( 'Images to WebP', 'images-to-webp' ); ?></h2><?php 202 203 $avif_plugin_file = WP_PLUGIN_DIR . '/images-to-avif/images-to-avif.php'; 204 if( ! file_exists( $avif_plugin_file ) ){ 205 echo '<div class="notice notice-info"><p>' . sprintf( esc_html__( 'There is a new %sImages to AVIF%s plugin that can improve your load time even more and it works perfectly with this plugin too.', 'images-to-webp' ), '<a href="' . admin_url( 'plugin-install.php?s=kubiq%20Images%20to%20AVIF&tab=search&type=term' ) . '" target="_blank">', '</a>' ) . '</p></div>'; 206 } 207 208 $this->plugin_admin_tabs( $this->tab ); 209 210 include_once 'tabs/tab-' . $this->tab . '.php'; ?> 177 211 </div><?php 178 212 } -
images-to-webp/trunk/readme.txt
r3407360 r3438710 3 3 Donate link: https://www.paypal.me/jakubnovaksl 4 4 Tags: pictures, optimize, convert, media 5 Requires at least: 3.0.16 Requires PHP: 5.65 Requires at least: 5.0 6 Requires PHP: 7.0 7 7 Tested up to: 6.9 8 Stable tag: 4. 88 Stable tag: 4.9 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 195 195 == Changelog == 196 196 197 = 4.9 = 198 * info banner about new free Images to AVIF plugin 199 * prioritize GD library 200 * readme small changes 201 197 202 = 4.8 = 198 203 * Tested on WP 6.9 -
images-to-webp/trunk/tests/server.php
r2826965 r3438710 3 3 defined('ABSPATH') || exit; 4 4 5 if( version_compare( PHP_VERSION, ' 5.6.12', '<' ) ){5 if( version_compare( PHP_VERSION, '7.0', '<' ) ){ 6 6 deactivate_plugins( __DIR__ ); 7 wp_die( __( 'Please update your PHP to version 5.6.12or higher, then try activate <strong>Images to WebP</strong> again.', 'images-to-webp' ) );7 wp_die( __( 'Please update your PHP to version 7.0 or higher, then try activate <strong>Images to WebP</strong> again.', 'images-to-webp' ) ); 8 8 } 9 9 … … 14 14 15 15 $methods = array(); 16 17 if( extension_loaded('imagick') ){18 if( class_exists('Imagick') ){19 $image = new Imagick();20 if( in_array( 'WEBP', $image->queryFormats() ) ){21 $methods['imagick'] = __( 'Imagick', 'images-to-webp' );22 }23 }24 }25 16 26 17 if( … … 35 26 } 36 27 28 if( extension_loaded('imagick') ){ 29 if( class_exists('Imagick') ){ 30 $image = new Imagick(); 31 if( in_array( 'WEBP', $image->queryFormats() ) ){ 32 $methods['imagick'] = __( 'Imagick', 'images-to-webp' ); 33 } 34 } 35 } 36 37 37 if( count( $methods ) === 0 ){ 38 38 deactivate_plugins( __DIR__ );
Note: See TracChangeset
for help on using the changeset viewer.