mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-13 03:36:28 +09:00
Fix profile photo as required field
This commit is contained in:
@@ -152,8 +152,9 @@
|
||||
$form_id = $args['form_id'];
|
||||
$mode = $args['mode'];
|
||||
$fields = unserialize( $args['custom_fields'] );
|
||||
|
||||
if ( get_post_meta( $form_id, '_um_profile_photo_required', true ) && empty( $args['profile_photo'] ) ) {
|
||||
$um_profile_photo = um_profile('profile_photo');
|
||||
|
||||
if ( get_post_meta( $form_id, '_um_profile_photo_required', true ) && ( empty( $args['profile_photo'] ) && empty( $um_profile_photo ) ) ) {
|
||||
$ultimatemember->form->add_error('profile_photo', sprintf(__('%s is required.','ultimatemember'), 'Profile Photo' ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user