From 73a9baf54ecbccfaf847077fa92e6690ffa428f2 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Fri, 23 Sep 2016 22:52:18 +0800 Subject: [PATCH] Adds new filters to modify image field data on upload --- core/um-files.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/um-files.php b/core/um-files.php index 14fec57e..ae3175b4 100644 --- a/core/um-files.php +++ b/core/um-files.php @@ -378,6 +378,9 @@ class UM_Files { } } + $data = apply_filters("um_image_handle_global__option", $data ); + $data = apply_filters("um_image_handle_{$field}__option", $data ); + if ( $fileinfo['invalid_image'] == true ) { $error = sprintf(__('Your image is invalid or too large!','ultimatemember') ); } elseif ( isset( $data['allowed_types'] ) && !$this->in_array( $fileinfo['extension'], $data['allowed_types'] ) ) {