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