From d8354e6149737111e5dfa6f2f3eabaf2c12eb7da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timi-Artturi=20M=C3=A4kel=C3=A4?= Date: Tue, 3 Dec 2019 17:42:20 +0200 Subject: [PATCH] Added a filter for image helper --- CHANGELOG.md | 5 +++++ helpers/image.php | 2 ++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f00e2824..93273546 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/helpers/image.php b/helpers/image.php index 64830fb7..56104599 100644 --- a/helpers/image.php +++ b/helpers/image.php @@ -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; }