[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * BuddyPress - Members Profile Change Avatar 4 * 5 * @package BuddyPress 6 * @subpackage bp-legacy 7 * @version 3.0.0 8 */ 9 10 ?> 11 12 <h2><?php _e( 'Change Profile Photo', 'buddypress' ); ?></h2> 13 14 <?php 15 16 /** 17 * Fires before the display of profile avatar upload content. 18 * 19 * @since 1.1.0 20 */ 21 do_action( 'bp_before_profile_avatar_upload_content' ); ?> 22 23 <?php if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?> 24 25 <p><?php _e( 'Your profile photo will be used on your profile and throughout the site. If there is a <a href="http://gravatar.com">Gravatar</a> associated with your account email we will use that, or you can upload an image from your computer.', 'buddypress' ); ?></p> 26 27 <form action="" method="post" id="avatar-upload-form" class="standard-form" enctype="multipart/form-data"> 28 29 <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?> 30 31 <?php wp_nonce_field( 'bp_avatar_upload' ); ?> 32 <p><?php _e( 'Click below to select a JPG, GIF or PNG format photo from your computer and then click \'Upload Image\' to proceed.', 'buddypress' ); ?></p> 33 34 <p id="avatar-upload"> 35 <label for="file" class="bp-screen-reader-text"><?php 36 /* translators: accessibility text */ 37 _e( 'Select an image', 'buddypress' ); 38 ?></label> 39 <input type="file" name="file" id="file" /> 40 <input type="submit" name="upload" id="upload" value="<?php esc_attr_e( 'Upload Image', 'buddypress' ); ?>" /> 41 <input type="hidden" name="action" id="action" value="bp_avatar_upload" /> 42 </p> 43 44 <?php if ( bp_get_user_has_avatar() ) : ?> 45 <p><?php _e( "If you'd like to delete your current profile photo but not upload a new one, please use the delete profile photo button.", 'buddypress' ); ?></p> 46 <p><a class="button edit" href="<?php bp_avatar_delete_link(); ?>"><?php _e( 'Delete My Profile Photo', 'buddypress' ); ?></a></p> 47 <?php endif; ?> 48 49 <?php endif; ?> 50 51 <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?> 52 53 <h5><?php _e( 'Crop Your New Profile Photo', 'buddypress' ); ?></h5> 54 55 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php esc_attr_e( 'Profile photo to crop', 'buddypress' ); ?>" /> 56 57 <div id="avatar-crop-pane"> 58 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( 'Profile photo preview', 'buddypress' ); ?>" /> 59 </div> 60 61 <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php esc_attr_e( 'Crop Image', 'buddypress' ); ?>" /> 62 63 <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src(); ?>" /> 64 <input type="hidden" id="x" name="x" /> 65 <input type="hidden" id="y" name="y" /> 66 <input type="hidden" id="w" name="w" /> 67 <input type="hidden" id="h" name="h" /> 68 69 <?php wp_nonce_field( 'bp_avatar_cropstore' ); ?> 70 71 <?php endif; ?> 72 73 </form> 74 75 <?php 76 /** 77 * Load the Avatar UI templates 78 * 79 * @since 2.3.0 80 */ 81 bp_avatar_get_templates(); ?> 82 83 <?php else : ?> 84 85 <p><?php _e( 'Your profile photo will be used on your profile and throughout the site. To change your profile photo, please create an account with <a href="https://gravatar.com">Gravatar</a> using the same email address as you used to register with this site.', 'buddypress' ); ?></p> 86 87 <?php endif; ?> 88 89 <?php 90 91 /** 92 * Fires after the display of profile avatar upload content. 93 * 94 * @since 1.1.0 95 */ 96 do_action( 'bp_after_profile_avatar_upload_content' );
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Apr 26 01:01:11 2024 | Cross-referenced by PHPXref 0.7.1 |