💥 TRENDING: Changeset/ - Full Gallery 2025

Changeset 3346930


Ignore:
Timestamp:
08/19/2025 10:55:17 AM (4 months ago)
Author:
petredobrescu
Message:

Version 6.3.1

🔥 The Quick Fix Update

Release Date: August 19, 2025

🛠️ Fixes & Improvements

  • Draft Content Preservation: AI Image SEO data generation now respects and preserves content from draft posts.
  • Cleaner Media Library Display: ShortPixel info is now shown only in the designated column, so no more unexpected placements.
  • Classic Editor Compatibility: Resolved JavaScript errors appearing in the post editor when using the Classic Editor.

A focused hotfix to ensure a smoother experience after the latest major release. Update now! 🚀

Location:
shortpixel-image-optimiser
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • shortpixel-image-optimiser/tags/6.3.1/class/Controller/Optimizer/OptimizeAiController.php

    r3346588 r3346930  
    474474
    475475    $replacer2 = \ShortPixel\Replacer\Replacer::getInstance();
     476    $aiData = $args['aiData'];
     477    $qItem = $args['qItem'];
    476478
    477479        foreach($results as $result)
     
    489491            // @todo The result of the post, should parse the content somehow via regex, then load.
    490492             $frontImage = new \ShortPixel\Model\FrontImage($match);
    491              if (isset($args['alt']))
     493             if (isset($aiData['alt']))
    492494             {
    493                 $frontImage->alt = $args['alt'];
     495                $frontImage->alt = $aiData['alt'];
    494496             }
    495              if (isset($args['caption']))
     497             if (isset($aiData['caption']))
    496498             {
    497                 $frontImage->caption = $args['caption'];
     499                $frontImage->caption = $aiData['caption'];
    498500             }
    499501
     
    503505            }
    504506
    505             $content = $replacer2->replaceContent($match, $sources, $replaces);
     507            $content = $replacer2->replaceContent($content, $sources, $replaces);
    506508           
    507509            $replacer2->Updater()->updatePost($post_id, $content);
  • shortpixel-image-optimiser/tags/6.3.1/class/Controller/View/ListMediaViewController.php

    r3346588 r3346930  
    7575       $this->view->id = $id;
    7676       $this->loadItem($id);
    77 
    78        if (true === \wpSPIO()->settings()->enable_ai)
    79        {
    80           $this->loadAiItem($id);
    81 //          $this->loadView('view-list-ai-media', false);
    82        }
    83        
    84      }
    85 
    86      $this->loadView(null, false);
     77       $this->loadView(null, false);
     78     
     79     }
     80
    8781
    8882
     
    10599     $list_actions = array();
    106100
     101     if (true === \wpSPIO()->settings()->enable_ai)
     102     {
     103        $aiDataModel = $this->loadAiItem($id);
     104     }
     105     else
     106     {
     107        $aiDataModel = null;
     108     }
     109
    107110    $this->view->text = UiHelper::getStatusText($mediaItem);
    108111
    109         $list_actions = UiHelper::getListActions($mediaItem);
     112        $list_actions = UiHelper::getListActions($mediaItem, $aiDataModel);
    110113    $this->view->list_actions = $list_actions;
    111114
     
    193196     }
    194197
     198     return $AiDataModel;
     199
    195200
    196201  }
  • shortpixel-image-optimiser/tags/6.3.1/class/Helper/UiHelper.php

    r3346588 r3346930  
    307307  }
    308308
    309   public static function getListActions($mediaItem)
     309  public static function getListActions($mediaItem, $aiDataModel = null)
    310310  {
    311311      $list_actions = array();
     
    323323            if (! $access->imageIsEditable($mediaItem))
    324324            {
    325                  return array();
     325                 return [];
    326326            }
    327327
    328       $aiDataModel = new AiDataModel($id);
    329 
    330             if ($id === 0)
     328      if ($id === 0)
    331329      {
    332330                return [];
    333331      }
     332
     333      //$aiDataModel = new AiDataModel($id);
    334334
    335335      if ($mediaItem->isSomethingOptimized() )
     
    438438      } //isOptimized
    439439
    440       if ($aiDataModel->isProcessable() && 'media' === $mediaItem->get('type') && in_array($mediaItem->getExtension(), $aiDataModel->supportedExtensions()))
     440
     441      if (false === is_null($aiDataModel) && $aiDataModel->isProcessable() && 'media' === $mediaItem->get('type') && in_array($mediaItem->getExtension(), $aiDataModel->supportedExtensions()))
    441442      {
    442443         $list_actions['shortpixel-generateai'] = self::getAction('shortpixel-generateai', $id);
  • shortpixel-image-optimiser/tags/6.3.1/readme.txt

    r3346588 r3346930  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 6.3.0
     7Stable tag: 6.3.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    475475== Changelog ==
    476476
     477= 6.3.1 =
     478
     479🔥 The Quick Fix Update
     480
     481Release Date: August 19, 2025
     482
     483🛠️ Fixes & Improvements
     484
     485* Draft Content Preservation: AI Image SEO data generation now respects and preserves content from draft posts.
     486* Cleaner Media Library Display: ShortPixel info is now shown only in the designated column, so no more unexpected placements.
     487* Classic Editor Compatibility: Resolved JavaScript errors appearing in the post editor when using the Classic Editor.
     488
     489A focused hotfix to ensure a smoother experience after the latest major release. Update now! 🚀
     490
    477491= 6.3.0 =
    478492
     
    483497🌟 New Features
    484498
    485 * Faster AI Model: We've upgraded to a better, faster AI model for generating image SEO data more accurate and efficient.
     499* Faster AI Model: We've upgraded to a better, faster AI model for generating image SEO data more accurately and efficiently.
    486500* Expanded SEO Tags: In addition to ALT tags, you can now automatically generate image captions and descriptions to enhance SEO and accessibility.
    487501* Auto-Generate on Upload: Image SEO data can now be generated automatically for newly uploaded images.
  • shortpixel-image-optimiser/tags/6.3.1/res/js/screens/screen-media.js

    r3346588 r3346930  
    535535
    536536        wp.data.subscribe(() => {
    537             const { getMedia } = wp.data.select('core');
     537            //const { getMedia } = wp.data.select('core');
    538538            const { getSelectedBlock } = wp.data.select('core/block-editor');
    539539       
  • shortpixel-image-optimiser/tags/6.3.1/wp-shortpixel.php

    r3346588 r3346930  
    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.0
     6 * Version: 6.3.1
    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.0");
     39define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "6.3.1");
    4040
    4141define('SHORTPIXEL_BACKUP', 'ShortpixelBackups');
  • shortpixel-image-optimiser/trunk/class/Controller/Optimizer/OptimizeAiController.php

    r3346588 r3346930  
    474474
    475475    $replacer2 = \ShortPixel\Replacer\Replacer::getInstance();
     476    $aiData = $args['aiData'];
     477    $qItem = $args['qItem'];
    476478
    477479        foreach($results as $result)
     
    489491            // @todo The result of the post, should parse the content somehow via regex, then load.
    490492             $frontImage = new \ShortPixel\Model\FrontImage($match);
    491              if (isset($args['alt']))
     493             if (isset($aiData['alt']))
    492494             {
    493                 $frontImage->alt = $args['alt'];
     495                $frontImage->alt = $aiData['alt'];
    494496             }
    495              if (isset($args['caption']))
     497             if (isset($aiData['caption']))
    496498             {
    497                 $frontImage->caption = $args['caption'];