From 323cd4a744f76f33d707678666c3699776c218a0 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Mon, 16 Nov 2015 22:04:59 +0800 Subject: [PATCH] Exclude stream photo This excludes the stream photo from deletion on 'um_after_user_upload' hook. --- core/um-actions-user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/um-actions-user.php b/core/um-actions-user.php index 9aa2072a..94daca7e 100644 --- a/core/um-actions-user.php +++ b/core/um-actions-user.php @@ -31,7 +31,7 @@ foreach($files as $file) { $str = basename($file); - if ( !strstr( $str, 'profile_photo') && !strstr( $str, 'cover_photo') && !preg_grep('/' . $str . '/', $array ) ) + if ( !strstr( $str, 'profile_photo') && !strstr( $str, 'cover_photo') && !strstr( $str, 'stream_photo') && !preg_grep('/' . $str . '/', $array ) ) unlink( $file ); }