From f52650fd516b8e4f16c03c97d5d5d007351ddce9 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Wed, 21 Sep 2016 14:06:42 +0800 Subject: [PATCH] Fixes the hierarchy of actions and adds a new filter hook New filter hook: `um_user_pre_updating_files_array` --- core/um-actions-profile.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/um-actions-profile.php b/core/um-actions-profile.php index 008da81f..7d1b6b93 100644 --- a/core/um-actions-profile.php +++ b/core/um-actions-profile.php @@ -109,14 +109,17 @@ if ( is_array( $to_update ) ) { $ultimatemember->user->update_profile( $to_update ); + do_action('um_after_user_updated', um_user('ID') ); + } + $files = apply_filters('um_user_pre_updating_files_array', $files); + if ( is_array( $files ) ) { $ultimatemember->user->update_files( $files ); + do_action('um_after_user_upload', um_user('ID'), $files ); } - do_action('um_after_user_updated', um_user('ID') ); - do_action('um_after_user_upload', um_user('ID') ); do_action('um_user_after_updating_profile', $to_update ); do_action('um_update_profile_full_name', $to_update );