diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 6d0ae855..809e373a 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [1.59.1] - 2024-10-28 + +- TMS-1075-fix: Early return added to ImageGalleryFormatter + +## [1.59.0] - 2024-10-24 + - TMS-1075: Redipress 2 filters ## [1.58.3] - 2024-09-25 diff --git a/lib/Formatters/ImageGalleryFormatter.php b/lib/Formatters/ImageGalleryFormatter.php index 6e9c96bf..ad88011a 100644 --- a/lib/Formatters/ImageGalleryFormatter.php +++ b/lib/Formatters/ImageGalleryFormatter.php @@ -35,6 +35,10 @@ public function hooks() : void { * @return array */ public function format( array $data ) : array { + if ( empty( $data['rows'] ) ) { + return $data; + } + $data['rows'] = array_map( static function ( $item ) { $item = \TMS\Theme\Base\Formatters\ImageFormatter::format( $item ); diff --git a/style.css b/style.css index 691abb06..1e0132ce 100644 --- a/style.css +++ b/style.css @@ -2,7 +2,7 @@ * Theme Name: TMS Theme Base * Description: Tampere Multisite Base Theme * Domain Path: /lang - * Version: 1.58.3 + * Version: 1.59.1 * Author: Geniem * Author URI: https://geniem.fi * Text Domain: tms-theme-base