mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Adds a new filter hook 'um_allow_frontend_image_uploads'
This filter hook modifies the validation of authorization on image uploads
This commit is contained in:
+3
-1
@@ -537,7 +537,9 @@ class UM_Files {
|
||||
wp_die( __('Unauthorized to do this attempt.','ultimatemember') );
|
||||
}
|
||||
|
||||
if ( !is_user_logged_in() && ( $key == 'profile_photo' || $key == 'cover_photo' ) ) {
|
||||
$allow_frontend_image_uploads = apply_filters('um_allow_frontend_image_uploads', false, $user_id, $key );
|
||||
|
||||
if ( $allow_frontend_image_uploads == false && !is_user_logged_in() && ( $key == 'profile_photo' || $key == 'cover_photo' ) ) {
|
||||
wp_die( __('Unauthorized to do this attempt.','ultimatemember') );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user