Upload Avatar in frontend
-
Is there is a way to add the upload avatar in custom page for user to upload their own avatar, instead of doing from the admin page only?
Iam tryin with something like this
<fieldset> <legend class="screen-reader-text"><span><?php _e('Select Image','avatar-manager'); ?></span></legend> <p> <label class="description" for="avatar-manager-upload"> <?php _e('Choose an image from your computer:','avatar-manager'); ?> </label> <br> <input name="avatar_manager_import" type="file" id="avatar-manager-upload"> <input name="avatar_manager_submit" type="submit" class="button" value="<?php esc_attr_e('Agregar Imagen Seleccionada','avatar-manager'); ?>"> </p> <?php if(current_user_can('upload_files')&&did_action('wp_enqueue_media')): ?> <p> <label class="d-none description" for="avatar-manager-choose-from-library-link"> <?php _e('Or choose an image from your media library:','avatar-manager'); ?> </label> <br> <?php $modal_update_href=add_query_arg(array('action'=>'update','avatar_manager_action'=>'set-avatar','user_id'=>$profileuser->id),self_admin_url(is_profile_page?'profile.php':'user-edit.php')); ?> <a class="button d-none" data-choose="<?php esc_attr_e('Choose a Custom Avatar','avatar-manager'); ?>" data-update="<?php esc_attr_e('Set as avatar','avatar-manager'); ?>" data-update-link="<?php echo wp_nonce_url($modal_update_href,'update-user_'.$profileuser->id); ?>" id="avatar-manager-choose-from-library-link"> <?php _e('Choose Image','avatar-manager'); ?> </a> </p> <?php endif; ?> </fieldset>
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Upload Avatar in frontend’ is closed to new replies.