Skip to content

Commit

Permalink
TMS-1075-fix: Early return added to ImageGalleryFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
eebbi committed Oct 28, 2024
1 parent 9b5ccd0 commit b237014
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

- TMS-1075-fix: Early return added to ImageGalleryFormatter

## [1.59.0] - 2024-10-24

- TMS-1075: Redipress 2 filters
Expand Down
4 changes: 4 additions & 0 deletions lib/Formatters/ImageGalleryFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down

0 comments on commit b237014

Please sign in to comment.