Plugin Directory

Changeset 3379473

Timestamp:
10/16/2025 12:54:49 PM (5 months ago)
Author:
petredobrescu
Message:

Version 6.3.5

🔐 The SmartCrop & Security Fix Update

Release Date: October 16, 2025

🛠️ Fixes & Improvements

  • SmartCrop Re-Optimization Fix: The “Re-optimize with/without SmartCrop” feature now correctly follows the selected action instead of always applying the saved setting.
  • AI SEO Preview Credit Message: A clear message is now displayed in the AI SEO preview (from Settings) when you’re out of credits.
  • French Locale Compatibility: Fixed an issue that prevented plugin deactivation when WordPress was set to French due to a language-related error.
  • AI SEO Limits Save Fix: The limits for AI-generated SEO text fields are now properly saved in the settings.
  • Bulk Background Mode Stability: Addressed intermittent failures of background processing in specific cron configurations.
  • Security Fix – Settings Import/Export: Patched a vulnerability that could allow contributor-level users to import/export plugin settings. Thanks to the WordFence team for the responsible disclosure!
  • CDN Link Fix for Inline Backgrounds: Inline background images using single quotes are now correctly replaced with CDN links.
  • Nonce Validation Improvement: Added checks for key form fields to prevent "nonce failed" errors when other plugins modify form data.
  • Inline Background-Image Fix: Ensured that all inline background-image styles end with a semicolon (;) when using the PICTURE tag to deliver next-generation images.

Update now for stronger security, improved SmartCrop behavior, and a smoother image SEO experience! 🚀

Location:
shortpixel-image-optimiser
Files:
2 added
38 edited
1 copied

Legend:

Unmodified
Added
Removed
  • shortpixel-image-optimiser/tags/6.3.5/build/shortpixel/replacer2/src/Classes/Finder.php

    r3346588 r3379473  
    4848   
    4949            $rs = $wpdb->get_results($posts_sql, ARRAY_A);
    50             $number_of_updates = 0;
    5150   
    5251
     
    5453            call_user_func_array($this->callback, ['results' => $rs, 'args' => $this->return_data]);
    5554
    56             /*if (! empty($rs)) {
    57                 foreach ($rs as $rows) {
    58                     $number_of_updates = $number_of_updates + 1;
    59                     // replace old URLs with new URLs.
    60    
    61                     $post_content = $rows["post_content"];
    62                     $post_id = $rows['ID'];
    63                     $replaced_content = $this->replaceContent($post_content, $search_urls, $replace_urls, false, true);
    64    
    65                     if ($replaced_content !== $post_content) {
    66    
    67                         //  $result = wp_update_post($post_ar);
    68                         $sql = 'UPDATE ' . $wpdb->posts . ' SET post_content = %s WHERE ID = %d';
    69                         $sql = $wpdb->prepare($sql, $replaced_content, $post_id);
    70    
    71                         $result = $wpdb->query($sql);
    72    
    73                         if ($result === false) {
    74                             // Notice::addError('Something went wrong while replacing' .  $result->get_error_message() );
    75                             Log::addError('WP-Error during post update', $result);
    76                         }
    77                     }
    78                 }
    79             } */
    80    
    81         //  $number_of_updates += $this->handleMetaData($base_url, $search_urls, $replace_urls);
    82         //  return $number_of_updates;
    8355        }
    8456
  • shortpixel-image-optimiser/tags/6.3.5/build/shortpixel/replacer2/src/Classes/Updater.php

    r3348311 r3379473  
    77}
    88
     9
    910
    1011
     
    2122        $sql = $wpdb->prepare($sql, $content, $post_id);
    2223   
    23     $result = $wpdb->query($sql);
    24 
    25     //Also flush object cache to ensure the content is updated properly
    26     wp_cache_delete($post_id, 'posts');
     24        $result = $wpdb->query($sql);
    2725   
    2826        if ($result === false) {
    2927            // Notice::addError('Something went wrong while replacing' .  $result->get_error_message() );
    3028            Log::addError('WP-Error during post update', $result);
     29
    3130        }
    3231
    3332        self::$updatesNumber++;
     33
    3434    }
    3535
  • shortpixel-image-optimiser/tags/6.3.5/build/shortpixel/replacer2/src/Modules/SmartSlider.php

    r3346588 r3379473  
    2626        }
    2727
    28         add_action('shortpixel/replacer/replace_urls', [$this, 'doReplaceQueries'], 10, 2);
     28        add_action('shortpixel/replacer/replace_urls', [$this, 'doReplaceQueries']);
    2929    }
    3030
  • shortpixel-image-optimiser/tags/6.3.5/class/BuildAutoLoader.php

    r3080349 r3379473  
    4848      'class/external/offload/wp-offload-media.php',
    4949            'class/external/offload/virtual-filesystem.php',
     50
    5051      'class/external/wp-cli/wp-cli-base.php',
    5152            'class/external/wp-cli/wp-cli-single.php',
     
    6162      'class/external/MediaFileRenamer.php',
    6263      'class/external/formidable.php',
     64
    6365    );
    6466
  • shortpixel-image-optimiser/tags/6.3.5/class/Controller/AdminController.php

    r3363822 r3379473  
    211211    public function processCronHook($bulk)
    212212    {
     213
     214
     215
     216
     217
    213218
    214219        $args = array(
     
    246251
    247252        $queueArgs = [];
    248                 if ($args['bulk'] === true)
     253                if ()
    249254                {
    250255                     $queueArgs['is_bulk'] = true;
    251256                }
     257
    252258
    253259              $control = new QueueController($queueArgs);
  • shortpixel-image-optimiser/tags/6.3.5/class/Controller/AjaxController.php

    r3363822 r3379473  
    276276                $json = $this->startRestoreAll($json, $data);
    277277                break;
     278
     279
     280
     281
    278282            case 'startMigrateAll':
    279283                $this->checkActionAccess($action, 'is_admin_user');
     
    335339            default:
    336340            case 'settings/getAiExample':
     341
    337342                $this->getSettingsAiExample($data);
    338343            break;
    339344            case 'settings/setAiImageId':
     345
    340346                $this->setSettingsAiImage($data);
    341347            break;
     
    468474    protected function purgeCDNCache($json, $data)
    469475    {
     476
     477
    470478        $purge =  isset($_POST['purge']) ? sanitize_text_field($_POST['purge']) : 'cssjs';
    471 
    472479
    473480        $CDNController = new \ShortPixel\Controller\Front\CDNController();
     
    478485
    479486        return $json;
    480 
    481        
    482487    }
    483488
     
    486491    {
    487492        $action = (isset($_POST['actionType'])) ? sanitize_text_field($_POST['actionType']) : 'export';
     493
    488494        $settings = \wpSPIO()->settings();
    489495
     
    781787        }
    782788
    783 
    784789        $json->$type = (object) $metadata;
    785790        $json->$type->results = null;
     
    929934
    930935        return $json;
     936
     937
     938
     939
     940
     941
     942
     943
     944
     945
     946
     947
    931948    }
    932949
     
    10371054            if (property_exists($result, 'is_done') && true === $result->is_done)
    10381055            {
     1056
     1057
     1058
     1059
     1060
     1061
    10391062                if ('requestAlt' === $state)
    10401063                {
  • shortpixel-image-optimiser/tags/6.3.5/class/Controller/Api/AiController.php

    r3363822 r3379473  
    2727    public function __construct()
    2828    {
    29       $this->main_url = 'https://capi-gpt.shortpixel.com/';
     29     $this->main_url = 'https://capi-gpt.shortpixel.com/';
    3030    }
    3131
     
    144144        if ($qItem->data()->action == 'requestAlt')
    145145        {
    146             if (false === $id)
     146            if (false === $id)
    147147            {
    148148               return $this->returnRetry(RequestManager::STATUS_WAITING, __('Response without result object', 'shortpixel-image-optimiser'));
  • shortpixel-image-optimiser/tags/6.3.5/class/Controller/Api/ApiController.php

    r3363822 r3379473  
    409409           
    410410            // Prevent this check if smartcrop is active on this image.
    411             if (isset($data['resize']) && 4 == $data['resize'] )
     411            if (isset($data['resize']) && 4 $data['resize'] )
    412412            {
    413413                $image['image']['status'] = self::STATUS_OPTIMIZED_BIGGER;
  • shortpixel-image-optimiser/tags/6.3.5/class/Controller/Front/CDNController.php

    r3363822 r3379473  
    361361            $background_inline_found = true;
    362362        }
    363    
     363
    364364        // ** DO IMAGE MATCHES **/
    365365        $image_matches = $this->fetchImageMatches($content, $args);
     
    369369        $replaceBlocks = $this->filterRegexExclusions($replaceBlocks);
    370370        $replaceBlocks = $this->filterOtherDomains($replaceBlocks);
    371 
    372371
    373372
     
    719718        {
    720719             $raw_url = $replaceBlock->raw_url;
     720
     721
     722
     723
     724
     725
     726
     727
     728
     729
     730
     731
    721732             // Rebuild the matches url: pattern ( easier than $1 getting it back )
    722              $replace_urls[] = 'url(\'' . $replaceBlock->replace_url . '\')';
     733             $replace_urls[] = 'url(')';
    723734             $patterns[] = str_replace('%%replace%%', "" . preg_quote($raw_url, '/') . "", $pattern);
    724735
  • shortpixel-image-optimiser/tags/6.3.5/class/Controller/Front/PictureController.php

    r3262795 r3379473  
    392392            $converted[] = $target_urldef;
    393393            // Fix: The originals are not being put anymore because this would lead to double images and that's not a good thing.
    394             $new_urldef = "url('" . $checkedFile . "') $image_data ";
     394            $new_urldef = "url('" . $checkedFile . "') $image_data ";
    395395            $content = str_replace($target_urldef, $new_urldef, $content);
    396396          }
  • shortpixel-image-optimiser/tags/6.3.5/class/Controller/View/SettingsViewController.php

    r3363822 r3379473  
    429429              AdminNoticesController::resetIntegrationNotices();
    430430          }
    431 
    432          
    433431
    434432                    // If the compression type setting changes, remove all queued items to prevent further optimizing with a wrong type.
  • shortpixel-image-optimiser/tags/6.3.5/class/Model.php

    r3348311 r3379473  
    155155      }
    156156
    157       return max($value, $this->model[$name]['max']);
     157      if ($value > $this->model[$name]['max'])
     158      {
     159         return $this->model[$name]['max'];
     160      }
     161
     162      return $value;
    158163  }
    159164
  • shortpixel-image-optimiser/tags/6.3.5/class/ViewController.php

    r3289850 r3379473  
    7272    elseif (! isset($_POST['sp-nonce']) || ! wp_verify_nonce( sanitize_key($_POST['sp-nonce']), $this->form_action))
    7373    {
     74
     75
     76
     77
     78
     79
    7480      Log::addInfo('Check Post fails nonce check, action : ' . $this->form_action, array($_POST) );
    7581            exit('Nonce Failed');
    76       return false;
     82      return e;
    7783    }
    7884    elseif (isset($_POST) && count($_POST) > 0)
  • shortpixel-image-optimiser/tags/6.3.5/class/external/offload/Offloader.php

    r3346588 r3379473  
    5555        {
    5656            $this->offloadName = 'infinite-uploads';
     57
     58
     59
     60
    5761            return true;
    5862        }   
  • shortpixel-image-optimiser/tags/6.3.5/class/external/offload/wp-offload-media.php

    r3363822 r3379473  
    176176        $itemHandler = $this->as3cf->get_item_handler($remove);
    177177
    178         $result = $itemHandler->handle($a3cfItem, array('verify_exists_on_local' => false)); //handle it then.
    179         return $result;
     178
    180179    }
    181180
  • shortpixel-image-optimiser/tags/6.3.5/class/plugin.json

    r3080349 r3379473  
    1 {"name":"ShortPixel\/Plugin","description":"ShortPixel AutoLoader","type":"function","autoload":{"psr-4":{"ShortPixel":"class"},"files":["class\/wp-shortpixel-settings.php","class\/front\/img-to-picture-webp.php","class\/external\/cloudflare.php","class\/external\/nextgen\/nextGenController.php","class\/external\/nextgen\/nextGenViewController.php","class\/external\/visualcomposer.php","class\/external\/offload\/Offloader.php","class\/external\/offload\/wp-offload-media.php","class\/external\/offload\/virtual-filesystem.php","class\/external\/wp-cli\/wp-cli-base.php","class\/external\/wp-cli\/wp-cli-single.php","class\/external\/wp-cli\/wp-cli-bulk.php","class\/external\/image-galleries.php","class\/external\/pantheon.php","class\/external\/spai.php","class\/external\/cache.php","class\/external\/uncode.php","class\/external\/query-monitor.php","class\/external\/Woocommerce.php","class\/external\/themes\/total-theme.php","class\/external\/MediaFileRenamer.php","class\/external\/formidable.php"]}}
     1{"name":"ShortPixel\/Plugin","description":"ShortPixel AutoLoader","type":"function","autoload":{"psr-4":{"ShortPixel":"class"},"files":["class\/wp-shortpixel-settings.php","class\/front\/img-to-picture-webp.php","class\/external\/cloudflare.php","class\/external\/nextgen\/nextGenController.php","class\/external\/nextgen\/nextGenViewController.php","class\/external\/visualcomposer.php","class\/external\/offload\/Offloader.php","class\/external\/offload\/wp-offload-media.php","class\/external\/offload\/virtual-filesystem.php","class\/external\/wp-cli\/wp-cli-base.php","class\/external\/wp-cli\/wp-cli-single.php","class\/external\/wp-cli\/wp-cli-bulk.php","class\/external\/image-galleries.php","class\/external\/pantheon.php","class\/external\/spai.php","class\/external\/cache.php","class\/external\/uncode.php","class\/external\/query-monitor.php","class\/external\/Woocommerce.php","class\/external\/themes\/total-theme.php","class\/external\/MediaFileRenamer.php","class\/external\/formidable.php"]}}
  • shortpixel-image-optimiser/tags/6.3.5/class/view/shortpixel-feedback.php

    r3289850 r3379473  
    6868        $form = $this->getFormInfo();
    6969
     70
     71
    7072        // Build the HTML to go in the form
    71         $html = '<div class="shortpixel-deactivate-form-head"><strong>' . esc_html( $form['heading'] ) . '</strong></div>';
     73        $html = '<div class="shortpixel-deactivate-form-head"><strong>' . esc_html( $form['heading'] ) . '</strong></div>';
    7274        $html .= '<div class="shortpixel-deactivate-form-body">';
    7375        if( is_array( $form['options'] ) ) {
    7476            $html .= '<div class="shortpixel-deactivate-options">';
    75             $html .= '<p><strong>' . esc_html( $form['body'] ) . '</strong></p><p>';
     77            $html .= '<p><strong>' . esc_html( $form['body'] ) . '</strong></p><p>';
    7678            foreach( $form['options'] as $key => $option ) {
    7779                $html .= '<input type="radio" name="shortpixel-deactivate-reason" id="' . esc_attr( $key ) . '" value="' . esc_attr( $key ) . '"> <label for="' . esc_attr( $key ) . '">' . esc_attr( $option ) . '</label><br>';
    7880            }
    79             $html .= '</p><label id="shortpixel-deactivate-details-label" for="shortpixel-deactivate-reasons"><strong>' . esc_html( $form['details'] ) .'</strong></label><textarea name="shortpixel-deactivate-details" id="shortpixel-deactivate-details" rows="2" style="width:100%"></textarea>';
     81            $html .= '</p><label id="shortpixel-deactivate-details-label" for="shortpixel-deactivate-reasons"><strong>' . esc_html( $form['details'] ) .'</strong></label><textarea name="shortpixel-deactivate-details" id="shortpixel-deactivate-details" rows="2" style="width:100%"></textarea>';
    8082            $html .= '</div><!-- .shortpixel-deactivate-options -->';
    8183        }
     
    8385        $html .= '<span title="' . __( 'Un-check this if you don\\\'t plan to use ShortPixel in the future on this website. You might also want to run a Bulk Delete SP Metadata before removing the plugin (Media Library -> Bulk ShortPixel).', 'shortpixel-image-optimiser' )
    8486            . '">'
    85             . sprintf(__(  'If you want to completely uninstall ShortPIxel from your site, please go to %s Settings → ShortPixel → Tools %s.', 'shortpixel-image-optimiser' ),'<a href="' . esc_url(admin_url('/options-general.php?page=wp-shortpixel-settings&part=tools'))  . '">', '</a>') . '</span><br>';
     87            . sprintf(xel from your site, please go to %s Settings → ShortPixel → Tools %s.', 'shortpixel-image-optimiser' ),'<a href="' . esc_url(admin_url('/options-general.php?page=wp-shortpixel-settings&part=tools'))  . '">', '</a>') . '</span><br>';
    8688        $html .= '<hr/>';
    8789        $html .= '</div><!-- .shortpixel-deactivate-form-body -->';
    88         $html .= '<p class="deactivating-spinner"><span class="spinner"></span> ' . __( 'Submitting form', 'shortpixel-image-optimiser' ) . '</p>';
     90        $html .= '<p class="deactivating-spinner"><span class="spinner"></span> ' . __( 'Submitting form', 'shortpixel-image-optimiser' ) . '</p>';
    8991        $html .= '<div class="shortpixel-deactivate-form-footer"><p>';
    9092        $html .= '<label for="anonymous" title="'
    91             . __("If you UNCHECK this then your email address will be sent along with your feedback. This can be used by ShortPixel to get back to you for more info or a solution.",'shortpixel-image-optimiser')
     93            . __("If you UNCHECK this then your email address will be sent along with your feedback. This can be used by ShortPixel to get back to you for more info or a solution.",'shortpixel-image-optimiser')
    9294            . '"><input type="checkbox" name="shortpixel-deactivate-tracking" checked="checked" id="anonymous" value="1"> ' . esc_html__( 'Send anonymous', 'shortpixel-image-optimiser' ) . '</label><br>';
    9395        $html .= '<a id="shortpixel-deactivate-submit-form" class="button button-primary" href="#">'
     
    266268                                    reason: formContainer.find('input[name="shortpixel-deactivate-reason"]:checked').val(),
    267269                                    details: formContainer.find('#shortpixel-deactivate-details').val()
    268                                     //anonymous: formContainer.find('#anonymous:checked').length,
    269270                                };
    270271                                                                if (formContainer.find('#anonymous').is(':checked'))
     
    280281                    formContainer.on('click', '#shortpixel-deactivate-submit-form', function(e){
    281282                        e.preventDefault();
    282                        // if( formContainer.find('#shortpixel-keep-settings:checked').length ) {
    283283                            window.location.href = url;
    284                        /* } else {
    285                             SubmitFeedback({}, formContainer);
    286                         } */
     284
    287285                    });
    288286
  • shortpixel-image-optimiser/tags/6.3.5/readme.txt

    r3363822 r3379473  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 6.3.4
     7Stable tag: 6.3.
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    474474
    475475== Changelog ==
     476
     477
     478
     479
     480
     481
     482
     483
     484
     485
     486
     487
     488
     489
     490
     491
     492
     493
     494
     495
    476496
    477497= 6.3.4 =
  • shortpixel-image-optimiser/tags/6.3.5/wp-shortpixel.php

    r3363822 r3379473  
    44 * Plugin URI: https://shortpixel.com/
    55 * Description: ShortPixel optimizes images automatically, while guarding the quality of your images. Check your <a href="/wp-admin/options-general.php?page=wp-shortpixel-settings" target="_blank">Settings &gt; ShortPixel</a> page on how to start optimizing your image library and make your website load faster.
    6  * Version: 6.3.4
     6 * Version: 6.3.
    77 * Author: ShortPixel - Convert WebP/AVIF & Optimize Images
    88 * Author URI: https://shortpixel.com
     
    3737define('SHORTPIXEL_PLUGIN_DIR', __DIR__);
    3838
    39 define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "6.3.4");
     39define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "6.3.");
    4040
    4141define('SHORTPIXEL_BACKUP', 'ShortpixelBackups');
  • shortpixel-image-optimiser/trunk/build/shortpixel/replacer2/src/Classes/Finder.php

    r3346588 r3379473  
    4848   
    4949            $rs = $wpdb->get_results($posts_sql, ARRAY_A);
    50             $number_of_updates = 0;
    5150   
    5251
     
    5453            call_user_func_array($this->callback, ['results' => $rs, 'args' => $this->return_data]);
    5554
    56             /*if (! empty($rs)) {
    57                 foreach ($rs as $rows) {
    58                     $number_of_updates = $number_of_updates + 1;
    59                     // replace old URLs with new URLs.
    60    
    61                     $post_content = $rows["post_content"];
    62                     $post_id = $rows['ID'];
    63                     $replaced_content = $this->replaceContent($post_content, $search_urls, $replace_urls, false, true);
    64    
    65                     if ($replaced_content !== $post_content) {
    66    
    67                         //  $result = wp_update_post($post_ar);
    68                         $sql = 'UPDATE ' . $wpdb->posts . ' SET post_content = %s WHERE ID = %d';
    69                         $sql = $wpdb->prepare($sql, $replaced_content, $post_id);
    70    
    71                         $result = $wpdb->query($sql);
    72    
    73                         if ($result === false) {
    74                             // Notice::addError('Something went wrong while replacing' .  $result->get_error_message() );
    75                             Log::addError('WP-Error during post update', $result);
    76                         }
    77                     }
    78                 }
    79             } */
    80    
    81         //  $number_of_updates += $this->handleMetaData($base_url, $search_urls, $replace_urls);
    82         //  return $number_of_updates;
    8355        }
    8456
  • shortpixel-image-optimiser/trunk/build/shortpixel/replacer2/src/Classes/Updater.php

    r3348311 r3379473  
    77}
    88
     9
    910
    1011
     
    2122        $sql = $wpdb->prepare($sql, $content, $post_id);
    2223   
    23     $result = $wpdb->query($sql);
    24 
    25     //Also flush object cache to ensure the content is updated properly
    26     wp_cache_delete($post_id, 'posts');
     24        $result = $wpdb->query($sql);
    2725   
    2826        if ($result === false) {
    2927            // Notice::addError('Something went wrong while replacing' .  $result->get_error_message() );
    3028            Log::addError('WP-Error during post update', $result);
     29
    3130        }
    3231
    3332        self::$updatesNumber++;
     33
    3434    }
    3535
  • shortpixel-image-optimiser/trunk/build/shortpixel/replacer2/src/Modules/SmartSlider.php

    r3346588 r3379473  
    2626        }
    2727
    28         add_action('shortpixel/replacer/replace_urls', [$this, 'doReplaceQueries'], 10, 2);
     28        add_action('shortpixel/replacer/replace_urls', [$this, 'doReplaceQueries']);
    2929    }
    3030
  • shortpixel-image-optimiser/trunk/class/BuildAutoLoader.php

    r3080349 r3379473  
    4848      'class/external/offload/wp-offload-media.php',
    4949            'class/external/offload/virtual-filesystem.php',
     50
    5051      'class/external/wp-cli/wp-cli-base.php',
    5152            'class/external/wp-cli/wp-cli-single.php',
     
    6162      'class/external/MediaFileRenamer.php',
    6263      'class/external/formidable.php',
     64
    6365    );
    6466
  • shortpixel-image-optimiser/trunk/class/Controller/AdminController.php

    r3363822 r3379473  
    211211    public function processCronHook($bulk)
    212212    {
     213
     214
     215
     216
     217
    213218
    214219        $args = array(
     
    246251
    247252        $queueArgs = [];
    248                 if ($args['bulk'] === true)
     253                if ()
    249254                {
    250255                     $queueArgs['is_bulk'] = true;
    251256                }
     257
    252258
    253259              $control = new QueueController($queueArgs);
  • shortpixel-image-optimiser/trunk/class/Controller/AjaxController.php

    r3363822 r3379473  
    276276                $json = $this->startRestoreAll($json, $data);
    277277                break;
     278
     279
     280
     281
    278282            case 'startMigrateAll':
    279283                $this->checkActionAccess($action, 'is_admin_user');
     
    335339            default:
    336340            case 'settings/getAiExample':
     341
    337342                $this->getSettingsAiExample($data);
    338343            break;
    339344            case 'settings/setAiImageId':
     345
    340346                $this->setSettingsAiImage($data);
    341347            break;
     
    468474    protected function purgeCDNCache($json, $data)
    469475    {
     476
     477
    470478        $purge =  isset($_POST['purge']) ? sanitize_text_field($_POST['purge']) : 'cssjs';
    471 
    472479
    473480        $CDNController = new \ShortPixel\Controller\Front\CDNController();
     
    478485
    479486        return $json;
    480 
    481        
    482487    }
    483488
     
    486491    {
    487492        $action = (isset($_POST['actionType'])) ? sanitize_text_field($_POST['actionType']) : 'export';
     493
    488494        $settings = \wpSPIO()->settings();
    489495
     
    781787        }
    782788
    783 
    784789        $json->$type = (object) $metadata;
    785790        $json->$type->results = null;
     
    929934
    930935        return $json;
     936
     937
     938
     939
     940
     941
     942
     943
     944
     945
     946
     947
    931948    }
    932949
     
    10371054            if (property_exists($result, 'is_done') && true === $result->is_done)
    10381055            {
     1056
     1057
     1058
     1059
     1060
     1061
    10391062                if ('requestAlt' === $state)
    10401063                {
  • shortpixel-image-optimiser/trunk/class/Controller/Api/AiController.php

    r3363822 r3379473  
    2727    public function __construct()
    2828    {
    29       $this->main_url = 'https://capi-gpt.shortpixel.com/';
     29     $this->main_url = 'https://capi-gpt.shortpixel.com/';
    3030    }
    3131
     
    144144        if ($qItem->data()->action == 'requestAlt')
    145145        {
    146             if (false === $id)
     146            if (false === $id)
    147147            {
    148148               return $this->returnRetry(RequestManager::STATUS_WAITING, __('Response without result object', 'shortpixel-image-optimiser'));
  • shortpixel-image-optimiser/trunk/class/Controller/Api/ApiController.php

    r3363822 r3379473  
    409409           
    410410            // Prevent this check if smartcrop is active on this image.
    411             if (isset($data['resize']) && 4 == $data['resize'] )
     411            if (isset($data['resize']) && 4 $data['resize'] )
    412412            {
    413413                $image['image']['status'] = self::STATUS_OPTIMIZED_BIGGER;
  • shortpixel-image-optimiser/trunk/class/Controller/Front/CDNController.php

    r3363822 r3379473  
    361361            $background_inline_found = true;
    362362        }
    363    
     363
    364364        // ** DO IMAGE MATCHES **/
    365365        $image_matches = $this->fetchImageMatches($content, $args);
     
    369369        $replaceBlocks = $this->filterRegexExclusions($replaceBlocks);
    370370        $replaceBlocks = $this->filterOtherDomains($replaceBlocks);
    371 
    372371
    373372
     
    719718        {
    720719             $raw_url = $replaceBlock->raw_url;
     720
     721
     722
     723
     724
     725
     726
     727
     728
     729
     730
     731
    721732             // Rebuild the matches url: pattern ( easier than $1 getting it back )
    722              $replace_urls[] = 'url(\'' . $replaceBlock->replace_url . '\')';
     733             $replace_urls[] = 'url(')';
    723734             $patterns[] = str_replace('%%replace%%', "" . preg_quote($raw_url, '/') . "", $pattern);
    724735
  • shortpixel-image-optimiser/trunk/class/Controller/Front/PictureController.php

    r3262795 r3379473  
    392392            $converted[] = $target_urldef;
    393393            // Fix: The originals are not being put anymore because this would lead to double images and that's not a good thing.
    394             $new_urldef = "url('" . $checkedFile . "') $image_data ";
     394            $new_urldef = "url('" . $checkedFile . "') $image_data ";
    395395            $content = str_replace($target_urldef, $new_urldef, $content);
    396396          }
  • shortpixel-image-optimiser/trunk/class/Controller/View/SettingsViewController.php

    r3363822 r3379473  
    429429              AdminNoticesController::resetIntegrationNotices();
    430430          }
    431 
    432          
    433431
    434432                    // If the compression type setting changes, remove all queued items to prevent further optimizing with a wrong type.
  • shortpixel-image-optimiser/trunk/class/Model.php

    r3348311 r3379473  
    155155      }
    156156
    157       return max($value, $this->model[$name]['max']);
     157      if ($value > $this->model[$name]['max'])
     158      {
     159         return $this->model[$name]['max'];
     160      }
     161
     162      return $value;
    158163  }
    159164
  • shortpixel-image-optimiser/trunk/class/ViewController.php

    r3289850 r3379473  
    7272    elseif (! isset($_POST['sp-nonce']) || ! wp_verify_nonce( sanitize_key($_POST['sp-nonce']), $this->form_action))
    7373    {
     74
     75
     76
     77
     78
     79
    7480      Log::addInfo('Check Post fails nonce check, action : ' . $this->form_action, array($_POST) );
    7581            exit('Nonce Failed');
    76       return false;
     82      return e;
    7783    }
    7884    elseif (isset($_POST) && count($_POST) > 0)
  • shortpixel-image-optimiser/trunk/class/external/offload/Offloader.php

    r3346588 r3379473  
    5555        {
    5656            $this->offloadName = 'infinite-uploads';
     57
     58
     59
     60
    5761            return true;
    5862        }   
  • shortpixel-image-optimiser/trunk/class/external/offload/wp-offload-media.php

    r3363822 r3379473  
    176176        $itemHandler = $this->as3cf->get_item_handler($remove);
    177177
    178         $result = $itemHandler->handle($a3cfItem, array('verify_exists_on_local' => false)); //handle it then.
    179         return $result;
     178
    180179    }
    181180
  • shortpixel-image-optimiser/trunk/class/plugin.json

    r3080349 r3379473  
    1 {"name":"ShortPixel\/Plugin","description":"ShortPixel AutoLoader","type":"function","autoload":{"psr-4":{"ShortPixel":"class"},"files":["class\/wp-shortpixel-settings.php","class\/front\/img-to-picture-webp.php","class\/external\/cloudflare.php","class\/external\/nextgen\/nextGenController.php","class\/external\/nextgen\/nextGenViewController.php","class\/external\/visualcomposer.php","class\/external\/offload\/Offloader.php","class\/external\/offload\/wp-offload-media.php","class\/external\/offload\/virtual-filesystem.php","class\/external\/wp-cli\/wp-cli-base.php","class\/external\/wp-cli\/wp-cli-single.php","class\/external\/wp-cli\/wp-cli-bulk.php","class\/external\/image-galleries.php","class\/external\/pantheon.php","class\/external\/spai.php","class\/external\/cache.php","class\/external\/uncode.php","class\/external\/query-monitor.php","class\/external\/Woocommerce.php","class\/external\/themes\/total-theme.php","class\/external\/MediaFileRenamer.php","class\/external\/formidable.php"]}}
     1{"name":"ShortPixel\/Plugin","description":"ShortPixel AutoLoader","type":"function","autoload":{"psr-4":{"ShortPixel":"class"},"files":["class\/wp-shortpixel-settings.php","class\/front\/img-to-picture-webp.php","class\/external\/cloudflare.php","class\/external\/nextgen\/nextGenController.php","class\/external\/nextgen\/nextGenViewController.php","class\/external\/visualcomposer.php","class\/external\/offload\/Offloader.php","class\/external\/offload\/wp-offload-media.php","class\/external\/offload\/virtual-filesystem.php","class\/external\/wp-cli\/wp-cli-base.php","class\/external\/wp-cli\/wp-cli-single.php","class\/external\/wp-cli\/wp-cli-bulk.php","class\/external\/image-galleries.php","class\/external\/pantheon.php","class\/external\/spai.php","class\/external\/cache.php","class\/external\/uncode.php","class\/external\/query-monitor.php","class\/external\/Woocommerce.php","class\/external\/themes\/total-theme.php","class\/external\/MediaFileRenamer.php","class\/external\/formidable.php"]}}
  • shortpixel-image-optimiser/trunk/class/view/shortpixel-feedback.php

    r3289850 r3379473  
    6868        $form = $this->getFormInfo();
    6969
     70
     71
    7072        // Build the HTML to go in the form
    71         $html = '<div class="shortpixel-deactivate-form-head"><strong>' . esc_html( $form['heading'] ) . '</strong></div>';
     73        $html = '<div class="shortpixel-deactivate-form-head"><strong>' . esc_html( $form['heading'] ) . '</strong></div>';
    7274        $html .= '<div class="shortpixel-deactivate-form-body">';
    7375        if( is_array( $form['options'] ) ) {
    7476            $html .= '<div class="shortpixel-deactivate-options">';
    75             $html .= '<p><strong>' . esc_html( $form['body'] ) . '</strong></p><p>';
     77            $html .= '<p><strong>' . esc_html( $form['body'] ) . '</strong></p><p>';
    7678            foreach( $form['options'] as $key => $option ) {
    7779                $html .= '<input type="radio" name="shortpixel-deactivate-reason" id="' . esc_attr( $key ) . '" value="' . esc_attr( $key ) . '"> <label for="' . esc_attr( $key ) . '">' . esc_attr( $option ) . '</label><br>';
    7880            }
    79             $html .= '</p><label id="shortpixel-deactivate-details-label" for="shortpixel-deactivate-reasons"><strong>' . esc_html( $form['details'] ) .'</strong></label><textarea name="shortpixel-deactivate-details" id="shortpixel-deactivate-details" rows="2" style="width:100%"></textarea>';
     81            $html .= '</p><label id="shortpixel-deactivate-details-label" for="shortpixel-deactivate-reasons"><strong>' . esc_html( $form['details'] ) .'</strong></label><textarea name="shortpixel-deactivate-details" id="shortpixel-deactivate-details" rows="2" style="width:100%"></textarea>';
    8082            $html .= '</div><!-- .shortpixel-deactivate-options -->';
    8183        }
     
    8385        $html .= '<span title="' . __( 'Un-check this if you don\\\'t plan to use ShortPixel in the future on this website. You might also want to run a Bulk Delete SP Metadata before removing the plugin (Media Library -> Bulk ShortPixel).', 'shortpixel-image-optimiser' )
    8486            . '">'
    85             . sprintf(__(  'If you want to completely uninstall ShortPIxel from your site, please go to %s Settings → ShortPixel → Tools %s.', 'shortpixel-image-optimiser' ),'<a href="' . esc_url(admin_url('/options-general.php?page=wp-shortpixel-settings&part=tools'))  . '">', '</a>') . '</span><br>';
     87            . sprintf(xel from your site, please go to %s Settings → ShortPixel → Tools %s.', 'shortpixel-image-optimiser' ),'<a href="' . esc_url(admin_url('/options-general.php?page=wp-shortpixel-settings&part=tools'))  . '">', '</a>') . '</span><br>';
    8688        $html .= '<hr/>';
    8789        $html .= '</div><!-- .shortpixel-deactivate-form-body -->';
    88         $html .= '<p class="deactivating-spinner"><span class="spinner"></span> ' . __( 'Submitting form', 'shortpixel-image-optimiser' ) . '</p>';
     90        $html .= '<p class="deactivating-spinner"><span class="spinner"></span> ' . __( 'Submitting form', 'shortpixel-image-optimiser' ) . '</p>';
    8991        $html .= '<div class="shortpixel-deactivate-form-footer"><p>';
    9092        $html .= '<label for="anonymous" title="'
    91             . __("If you UNCHECK this then your email address will be sent along with your feedback. This can be used by ShortPixel to get back to you for more info or a solution.",'shortpixel-image-optimiser')
     93            . __("If you UNCHECK this then your email address will be sent along with your feedback. This can be used by ShortPixel to get back to you for more info or a solution.",'shortpixel-image-optimiser')
    9294            . '"><input type="checkbox" name="shortpixel-deactivate-tracking" checked="checked" id="anonymous" value="1"> ' . esc_html__( 'Send anonymous', 'shortpixel-image-optimiser' ) . '</label><br>';
    9395        $html .= '<a id="shortpixel-deactivate-submit-form" class="button button-primary" href="#">'
     
    266268                                    reason: formContainer.find('input[name="shortpixel-deactivate-reason"]:checked').val(),
    267269                                    details: formContainer.find('#shortpixel-deactivate-details').val()
    268                                     //anonymous: formContainer.find('#anonymous:checked').length,
    269270                                };
    270271                                                                if (formContainer.find('#anonymous').is(':checked'))
     
    280281                    formContainer.on('click', '#shortpixel-deactivate-submit-form', function(e){
    281282                        e.preventDefault();
    282                        // if( formContainer.find('#shortpixel-keep-settings:checked').length ) {
    283283                            window.location.href = url;
    284                        /* } else {
    285                             SubmitFeedback({}, formContainer);
    286                         } */
     284
    287285                    });
    288286
  • shortpixel-image-optimiser/trunk/readme.txt

    r3363822 r3379473  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 6.3.4
     7Stable tag: 6.3.
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    474474
    475475== Changelog ==
     476
     477
     478
     479
     480
     481
     482
     483
     484
     485
     486
     487
     488
     489
     490
     491
     492
     493
     494
     495
    476496
    477497= 6.3.4 =
  • shortpixel-image-optimiser/trunk/wp-shortpixel.php

    r3363822 r3379473  
    44 * Plugin URI: https://shortpixel.com/
    55 * Description: ShortPixel optimizes images automatically, while guarding the quality of your images. Check your <a href="/wp-admin/options-general.php?page=wp-shortpixel-settings" target="_blank">Settings &gt; ShortPixel</a> page on how to start optimizing your image library and make your website load faster.
    6  * Version: 6.3.4
     6 * Version: 6.3.
    77 * Author: ShortPixel - Convert WebP/AVIF & Optimize Images
    88 * Author URI: https://shortpixel.com
     
    3737define('SHORTPIXEL_PLUGIN_DIR', __DIR__);
    3838
    39 define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "6.3.4");
     39define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "6.3.");
    4040
    4141define('SHORTPIXEL_BACKUP', 'ShortpixelBackups');
Note: See TracChangeset for help on using the changeset viewer.