Ticket #5758: 5758#.patch
File 5758#.patch, 21.8 KB (added by , 9 years ago) |
---|
-
src/bp-core/bp-core-admin.php
396 396 397 397 if ( ! empty( $avatar_setting ) ) { 398 398 // Allow avatar uploads 399 add_settings_field( 'bp-disable-avatar-uploads', __( ' AvatarUploads', 'buddypress' ), 'bp_admin_setting_callback_avatar_uploads', 'buddypress', $avatar_setting );399 add_settings_field( 'bp-disable-avatar-uploads', __( 'Profile Photo Uploads', 'buddypress' ), 'bp_admin_setting_callback_avatar_uploads', 'buddypress', $avatar_setting ); 400 400 register_setting ( 'buddypress', 'bp-disable-avatar-uploads', 'intval' ); 401 401 } 402 402 } -
src/bp-core/bp-core-avatars.php
300 300 301 301 // Get a fallback for the 'alt' parameter 302 302 if ( empty( $alt ) ) 303 $alt = __( ' Avatar Image', 'buddypress' );303 $alt = __( 'Profile Photo', 'buddypress' ); 304 304 305 305 $html_alt = ' alt="' . esc_attr( $alt ) . '"'; 306 306 … … 844 844 845 845 // Image alt tag 846 846 if ( empty( $alt ) ) { 847 $alt = sprintf( __( ' Avatarof %s', 'buddypress' ), bp_core_get_user_displayname( $id ) );847 $alt = sprintf( __( 'Profile Photo of %s', 'buddypress' ), bp_core_get_user_displayname( $id ) ); 848 848 } 849 849 850 850 // Use the 'thumb' type, unless the requested width is bigger than -
src/bp-core/bp-core-classes.php
810 810 wp_cache_set( 'bp_user_email_' . $this->id, $this->email, 'bp' ); 811 811 wp_cache_set( 'bp_user_url_' . $this->id, $this->user_url, 'bp' ); 812 812 813 $this->avatar = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'full', 'alt' => sprintf( __( ' Avatarof %s', 'buddypress' ), $this->fullname ) ) );814 $this->avatar_thumb = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb', 'alt' => sprintf( __( ' Avatarof %s', 'buddypress' ), $this->fullname ) ) );815 $this->avatar_mini = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb', 'alt' => sprintf( __( ' Avatarof %s', 'buddypress' ), $this->fullname ), 'width' => 30, 'height' => 30 ) );813 $this->avatar = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'full', 'alt' => sprintf( __( 'Profile Photo of %s', 'buddypress' ), $this->fullname ) ) ); 814 $this->avatar_thumb = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile Photo of %s', 'buddypress' ), $this->fullname ) ) ); 815 $this->avatar_mini = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile Photo of %s', 'buddypress' ), $this->fullname ), 'width' => 30, 'height' => 30 ) ); 816 816 $this->last_active = bp_core_get_last_activity( bp_get_user_last_activity( $this->id ), __( 'active %s', 'buddypress' ) ); 817 817 } 818 818 -
src/bp-core/bp-core-template.php
157 157 global $comment; 158 158 159 159 if ( function_exists( 'bp_core_fetch_avatar' ) ) 160 echo apply_filters( 'bp_comment_author_avatar', bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'type' => 'thumb', 'alt' => sprintf( __( ' Avatarof %s', 'buddypress' ), bp_core_get_user_displayname( $comment->user_id ) ) ) ) );160 echo apply_filters( 'bp_comment_author_avatar', bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile Photo of %s', 'buddypress' ), bp_core_get_user_displayname( $comment->user_id ) ) ) ) ); 161 161 else if ( function_exists('get_avatar') ) 162 162 get_avatar(); 163 163 } … … 173 173 global $post; 174 174 175 175 if ( function_exists( 'bp_core_fetch_avatar' ) ) 176 echo apply_filters( 'bp_post_author_avatar', bp_core_fetch_avatar( array( 'item_id' => $post->post_author, 'type' => 'thumb', 'alt' => sprintf( __( ' Avatarof %s', 'buddypress' ), bp_core_get_user_displayname( $post->post_author ) ) ) ) );176 echo apply_filters( 'bp_post_author_avatar', bp_core_fetch_avatar( array( 'item_id' => $post->post_author, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile Photo of %s', 'buddypress' ), bp_core_get_user_displayname( $post->post_author ) ) ) ) ); 177 177 else if ( function_exists('get_avatar') ) 178 178 get_avatar(); 179 179 } -
src/bp-core/bp-core-widgets.php
314 314 */ 315 315 function __construct() { 316 316 $widget_ops = array( 317 'description' => __( ' Avatars of users who are currently online', 'buddypress' ),317 'description' => __( 'Profile Photos of online users', 'buddypress' ), 318 318 'classname' => 'widget_bp_core_whos_online_widget buddypress widget', 319 319 ); 320 320 parent::__construct( false, $name = _x( "(BuddyPress) Who's Online", 'widget name', 'buddypress' ), $widget_ops ); … … 417 417 */ 418 418 function __construct() { 419 419 $widget_ops = array( 420 'description' => __( ' Avatars of recently active members', 'buddypress' ),420 'description' => __( 'Profile Photos of recently active members', 'buddypress' ), 421 421 'classname' => 'widget_bp_core_recently_active_widget buddypress widget', 422 422 ); 423 423 parent::__construct( false, $name = _x( '(BuddyPress) Recently Active Members', 'widget name', 'buddypress' ), $widget_ops ); -
src/bp-core/deprecated/2.1.php
389 389 390 390 <?php if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?> 391 391 392 <li><a href="<?php bp_groups_action_link( 'admin/group-avatar' ); ?>"><?php _e( 'Group Avatar', 'buddypress' ); ?></a></li>392 <li><a href="<?php bp_groups_action_link( 'admin/group-avatar' ); ?>"><?php _e( 'Group Profile Photo', 'buddypress' ); ?></a></li> 393 393 394 394 <?php endif; ?> 395 395 … … 512 512 513 513 <?php endif ?> 514 514 515 <li><a href="<?php bp_members_component_link( 'profile', 'change-avatar' ); ?>"><?php printf( __( "Edit %s's Avatar", 'buddypress' ), esc_attr( bp_get_displayed_user_fullname() ) ) ?></a></li>515 <li><a href="<?php bp_members_component_link( 'profile', 'change-avatar' ); ?>"><?php printf( __( "Edit %s's Profile Photo", 'buddypress' ), esc_attr( bp_get_displayed_user_fullname() ) ) ?></a></li> 516 516 517 517 <li><a href="<?php bp_members_component_link( 'settings', 'capabilities' ); ?>"><?php _e( 'User Capabilities', 'buddypress' ); ?></a></li> 518 518 -
src/bp-groups/bp-groups-adminbar.php
61 61 $wp_admin_bar->add_menu( array( 62 62 'parent' => $bp->group_admin_menu_id, 63 63 'id' => 'group-avatar', 64 'title' => __( 'Edit Avatar', 'buddypress' ),64 'title' => __( 'Edit Profile Photo', 'buddypress' ), 65 65 'href' => bp_get_groups_action_link( 'admin/group-avatar' ) 66 66 ) ); 67 67 } -
src/bp-groups/bp-groups-loader.php
255 255 // If avatar uploads are not disabled, add avatar option 256 256 if ( ! (int) buddypress()->site_options['bp-disable-avatar-uploads'] ) { 257 257 $this->group_creation_steps['group-avatar'] = array( 258 'name' => __( ' Avatar', 'buddypress' ),258 'name' => __( 'Profile Photo', 'buddypress' ), 259 259 'position' => 20 260 260 ); 261 261 } … … 584 584 'object' => 'group', 585 585 'type' => 'thumb', 586 586 'avatar_dir' => 'group-avatars', 587 'alt' => __( 'Group Avatar', 'buddypress' )587 'alt' => __( 'Group Profile Photo', 'buddypress' ) 588 588 ) ); 589 589 590 590 if ( empty( $bp->bp_options_avatar ) ) { 591 $bp->bp_options_avatar = '<img src="' . esc_url( bp_core_avatar_default_thumb() ) . '" alt="' . esc_attr__( 'No Group Avatar', 'buddypress' ) . '" class="avatar" />';591 $bp->bp_options_avatar = '<img src="' . esc_url( bp_core_avatar_default_thumb() ) . '" alt="' . esc_attr__( 'No Group Profile Photo', 'buddypress' ) . '" class="avatar" />'; 592 592 } 593 593 } 594 594 } -
src/bp-groups/bp-groups-template.php
1560 1560 1561 1561 <?php if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?> 1562 1562 1563 <li<?php if ( 'group-avatar' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_group_permalink( $group ) . 'admin/group-avatar' ) ?>"><?php _e( ' Avatar', 'buddypress' ); ?></a></li>1563 <li<?php if ( 'group-avatar' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_group_permalink( $group ) . 'admin/group-avatar' ) ?>"><?php _e( 'Profile Photo', 'buddypress' ); ?></a></li> 1564 1564 1565 1565 <?php endif; ?> 1566 1566 … … 3455 3455 $this->invite->user->profile_data = BP_XProfile_ProfileData::get_all_for_user( $user_id ); 3456 3456 } 3457 3457 3458 $this->invite->user->avatar = bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'full', 'alt' => sprintf( __( ' Avatarof %s', 'buddypress' ), $this->invite->user->fullname ) ) );3459 $this->invite->user->avatar_thumb = bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'thumb', 'alt' => sprintf( __( ' Avatarof %s', 'buddypress' ), $this->invite->user->fullname ) ) );3460 $this->invite->user->avatar_mini = bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'thumb', 'alt' => sprintf( __( ' Avatarof %s', 'buddypress' ), $this->invite->user->fullname ), 'width' => 30, 'height' => 30 ) );3458 $this->invite->user->avatar = bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'full', 'alt' => sprintf( __( 'Profile Photo of %s', 'buddypress' ), $this->invite->user->fullname ) ) ); 3459 $this->invite->user->avatar_thumb = bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile Photo of %s', 'buddypress' ), $this->invite->user->fullname ) ) ); 3460 $this->invite->user->avatar_mini = bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile Photo of %s', 'buddypress' ), $this->invite->user->fullname ), 'width' => 30, 'height' => 30 ) ); 3461 3461 $this->invite->user->email = $this->invite->user->user_email; 3462 3462 $this->invite->user->user_url = bp_core_get_user_domain( $user_id, $this->invite->user->user_nicename, $this->invite->user->user_login ); 3463 3463 $this->invite->user->user_link = "<a href='{$this->invite->user->user_url}' title='{$this->invite->user->fullname}'>{$this->invite->user->fullname}</a>"; -
src/bp-members/bp-members-admin.php
278 278 case 'avatar': 279 279 $notice = array( 280 280 'class' => 'updated', 281 'message' => __( ' Avatar was deleted successfully!', 'buddypress' )281 'message' => __( 'Profile Photo was deleted!', 'buddypress' ) 282 282 ); 283 283 break; 284 284 case 'ham' : -
src/bp-members/bp-members-adminbar.php
106 106 $wp_admin_bar->add_menu( array( 107 107 'parent' => $bp->user_admin_menu_id, 108 108 'id' => $bp->user_admin_menu_id . '-change-avatar', 109 'title' => __( "Edit Avatar", 'buddypress' ),109 'title' => __( "Edit Profile Photo", 'buddypress' ), 110 110 'href' => bp_get_members_component_link( 'profile', 'change-avatar' ) 111 111 ) ); 112 112 } -
src/bp-members/bp-members-template.php
1690 1690 $defaults = array( 1691 1691 'size' => bp_core_avatar_full_width(), 1692 1692 'class' => 'avatar', 1693 'alt' => __( 'Your Avatar', 'buddypress' )1693 'alt' => __( 'Your Profile Photo', 'buddypress' ) 1694 1694 ); 1695 1695 1696 1696 $r = wp_parse_args( $args, $defaults ); -
src/bp-templates/bp-legacy/buddypress/groups/create.php
154 154 155 155 <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?> 156 156 157 <h4><?php _e( 'Crop Group Avatar', 'buddypress' ); ?></h4>157 <h4><?php _e( 'Crop Group Profile Photo', 'buddypress' ); ?></h4> 158 158 159 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php esc_attr_e( ' Avatarto crop', 'buddypress' ); ?>" />159 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php esc_attr_e( 'Profile Photo to crop', 'buddypress' ); ?>" /> 160 160 161 161 <div id="avatar-crop-pane"> 162 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( ' Avatarpreview', 'buddypress' ); ?>" />162 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( 'Profile Photo preview', 'buddypress' ); ?>" /> 163 163 </div> 164 164 165 165 <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php esc_attr_e( 'Crop Image', 'buddypress' ); ?>" /> -
src/bp-templates/bp-legacy/buddypress/groups/single/admin.php
136 136 137 137 <p><?php _e( "If you'd like to remove the existing avatar but not upload a new one, please use the delete avatar button.", 'buddypress' ); ?></p> 138 138 139 <?php bp_button( array( 'id' => 'delete_group_avatar', 'component' => 'groups', 'wrapper_id' => 'delete-group-avatar-button', 'link_class' => 'edit', 'link_href' => bp_get_group_avatar_delete_link(), 'link_title' => __( 'Delete Avatar', 'buddypress' ), 'link_text' => __( 'Delete Avatar', 'buddypress' ) ) ); ?>139 <?php bp_button( array( 'id' => 'delete_group_avatar', 'component' => 'groups', 'wrapper_id' => 'delete-group-avatar-button', 'link_class' => 'edit', 'link_href' => bp_get_group_avatar_delete_link(), 'link_title' => __( 'Delete Profile Photo', 'buddypress' ), 'link_text' => __( 'Delete Profile Photo', 'buddypress' ) ) ); ?> 140 140 141 141 <?php endif; ?> 142 142 … … 146 146 147 147 <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?> 148 148 149 <h4><?php _e( 'Crop Avatar', 'buddypress' ); ?></h4>149 <h4><?php _e( 'Crop Profile Photo', 'buddypress' ); ?></h4> 150 150 151 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php esc_attr_e( ' Avatarto crop', 'buddypress' ); ?>" />151 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php esc_attr_e( 'Profile Photo to crop', 'buddypress' ); ?>" /> 152 152 153 153 <div id="avatar-crop-pane"> 154 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( ' Avatarpreview', 'buddypress' ); ?>" />154 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( 'Profile Photo preview', 'buddypress' ); ?>" /> 155 155 </div> 156 156 157 157 <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php esc_attr_e( 'Crop Image', 'buddypress' ); ?>" /> -
src/bp-templates/bp-legacy/buddypress/members/single/profile/change-avatar.php
1 <h4><?php _e( 'Change Avatar', 'buddypress' ); ?></h4>1 <h4><?php _e( 'Change Profile Photo', 'buddypress' ); ?></h4> 2 2 3 3 <?php do_action( 'bp_before_profile_avatar_upload_content' ); ?> 4 4 … … 21 21 22 22 <?php if ( bp_get_user_has_avatar() ) : ?> 23 23 <p><?php _e( "If you'd like to delete your current avatar but not upload a new one, please use the delete avatar button.", 'buddypress' ); ?></p> 24 <p><a class="button edit" href="<?php bp_avatar_delete_link(); ?>" title="<?php esc_attr_e( 'Delete Avatar', 'buddypress' ); ?>"><?php _e( 'Delete My Avatar', 'buddypress' ); ?></a></p>24 <p><a class="button edit" href="<?php bp_avatar_delete_link(); ?>" title="<?php esc_attr_e( 'Delete Profile Photo', 'buddypress' ); ?>"><?php _e( 'Delete My Profile Photo', 'buddypress' ); ?></a></p> 25 25 <?php endif; ?> 26 26 27 27 <?php endif; ?> … … 28 28 29 29 <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?> 30 30 31 <h5><?php _e( 'Crop Your New Avatar', 'buddypress' ); ?></h5>31 <h5><?php _e( 'Crop Your New Profile Photo', 'buddypress' ); ?></h5> 32 32 33 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php esc_attr_e( ' Avatarto crop', 'buddypress' ); ?>" />33 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php esc_attr_e( 'Profile Photo to crop', 'buddypress' ); ?>" /> 34 34 35 35 <div id="avatar-crop-pane"> 36 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( ' Avatarpreview', 'buddypress' ); ?>" />36 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( 'Profile Photo preview', 'buddypress' ); ?>" /> 37 37 </div> 38 38 39 39 <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php esc_attr_e( 'Crop Image', 'buddypress' ); ?>" /> -
src/bp-xprofile/bp-xprofile-activity.php
24 24 'new_avatar', 25 25 __( 'Member changed profile picture', 'buddypress' ), 26 26 'bp_xprofile_format_activity_action_new_avatar', 27 __( 'Updated Avatars', 'buddypress' )27 __( 'Updated Profile Photos', 'buddypress' ) 28 28 ); 29 29 30 30 bp_activity_set_action( -
src/bp-xprofile/bp-xprofile-admin.php
583 583 // Avatar Metabox 584 584 add_meta_box( 585 585 'bp_xprofile_user_admin_avatar', 586 _x( ' Avatar', 'xprofile user-admin edit screen', 'buddypress' ),586 _x( 'Profile Photo', 'xprofile user-admin edit screen', 'buddypress' ), 587 587 array( $this, 'user_admin_avatar_metabox' ), 588 588 $screen_id, 589 589 'side', … … 843 843 $community_url = add_query_arg( $query_args, buddypress()->members->admin->edit_profile_url ); 844 844 $delete_link = wp_nonce_url( $community_url, 'delete_avatar' ); ?> 845 845 846 <a href="<?php echo esc_url( $delete_link ); ?>" title="<?php esc_attr_e( 'Delete Avatar', 'buddypress' ); ?>" class="bp-xprofile-avatar-user-admin"><?php esc_html_e( 'Delete Avatar', 'buddypress' ); ?></a></li>846 <a href="<?php echo esc_url( $delete_link ); ?>" title="<?php esc_attr_e( 'Delete Profile Photo', 'buddypress' ); ?>" class="bp-xprofile-avatar-user-admin"><?php esc_html_e( 'Delete Profile Photo', 'buddypress' ); ?></a></li> 847 847 848 848 <?php endif; ?> 849 849 -
src/bp-xprofile/bp-xprofile-loader.php
208 208 // Change Avatar 209 209 if ( buddypress()->avatar->show_avatars ) { 210 210 $sub_nav[] = array( 211 'name' => __( 'Change Avatar', 'buddypress' ),211 'name' => __( 'Change Profile Photo', 'buddypress' ), 212 212 'slug' => 'change-avatar', 213 213 'parent_url' => $profile_link, 214 214 'parent_slug' => $this->slug, … … 305 305 $wp_admin_nav[] = array( 306 306 'parent' => 'my-account-' . $this->id, 307 307 'id' => 'my-account-' . $this->id . '-change-avatar', 308 'title' => __( 'Change Avatar', 'buddypress' ),308 'title' => __( 'Change Profile Photo', 'buddypress' ), 309 309 'href' => trailingslashit( $profile_link . 'change-avatar' ) 310 310 ); 311 311 } -
src/bp-xprofile/bp-xprofile-template.php
648 648 if ( !(int) $bp->site_options['bp-disable-avatar-uploads'] ) 649 649 bp_core_avatar_admin( null, bp_loggedin_user_domain() . $bp->profile->slug . '/change-avatar/', bp_loggedin_user_domain() . $bp->profile->slug . '/delete-avatar/' ); 650 650 else 651 _e( ' Avataruploads are currently disabled. Why not use a <a href="http://gravatar.com" target="_blank">gravatar</a> instead?', 'buddypress' );651 _e( 'Profile Photo uploads are currently disabled. Why not use a <a href="http://gravatar.com" target="_blank">gravatar</a> instead?', 'buddypress' ); 652 652 } 653 653 654 654 function bp_profile_last_updated() {