Skip to content

Commit

Permalink
Merge pull request #137 from devgeniem/image-helper-data-filter
Browse files Browse the repository at this point in the history
Added a filter for image helper $image_data
  • Loading branch information
Miika Arponen authored Dec 4, 2019
2 parents f10fea3 + d8354e6 commit 1b474b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [image-helper-data-filter] - 2019-12-03

### Added
- A filter for image helper `$image_data`.

## [1.26.3] - 2019-12-03

### Fixed
Expand Down
2 changes: 2 additions & 0 deletions helpers/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ private function get_image_data( $params ) {
$image_data['attrs']['alt'] = $params->alt;
}

$image_data = \apply_filters( 'dustpress/image/image_data', $image_data );

return $image_data;
}

Expand Down

0 comments on commit 1b474b8

Please sign in to comment.