Skip to:
Content

BuddyPress.org

Ticket #5758: 5758#.patch

File 5758#.patch, 21.8 KB (added by sooskriszta, 9 years ago)

Changes "Avatar" to "Profile Photo"

  • src/bp-core/bp-core-admin.php

     
    396396
    397397                if ( ! empty( $avatar_setting ) ) {
    398398                    // Allow avatar uploads
    399                     add_settings_field( 'bp-disable-avatar-uploads', __( 'Avatar Uploads',   '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 );
    400400                    register_setting  ( 'buddypress',         'bp-disable-avatar-uploads',   'intval'                                                                                    );
    401401                }
    402402        }
  • src/bp-core/bp-core-avatars.php

     
    300300
    301301        // Get a fallback for the 'alt' parameter
    302302        if ( empty( $alt ) )
    303                 $alt = __( 'Avatar Image', 'buddypress' );
     303                $alt = __( 'Profile Photo', 'buddypress' );
    304304
    305305        $html_alt = ' alt="' . esc_attr( $alt ) . '"';
    306306
     
    844844
    845845        // Image alt tag
    846846        if ( empty( $alt ) ) {
    847                 $alt = sprintf( __( 'Avatar of %s', 'buddypress' ), bp_core_get_user_displayname( $id ) );
     847                $alt = sprintf( __( 'Profile Photo of %s', 'buddypress' ), bp_core_get_user_displayname( $id ) );
    848848        }
    849849
    850850        // Use the 'thumb' type, unless the requested width is bigger than
  • src/bp-core/bp-core-classes.php

     
    810810                wp_cache_set( 'bp_user_email_' . $this->id, $this->email, 'bp' );
    811811                wp_cache_set( 'bp_user_url_' . $this->id, $this->user_url, 'bp' );
    812812
    813                 $this->avatar       = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'full', 'alt' => sprintf( __( 'Avatar of %s', 'buddypress' ), $this->fullname ) ) );
    814                 $this->avatar_thumb = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb', 'alt' => sprintf( __( 'Avatar of %s', 'buddypress' ), $this->fullname ) ) );
    815                 $this->avatar_mini  = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb', 'alt' => sprintf( __( 'Avatar of %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 ) );
    816816                $this->last_active  = bp_core_get_last_activity( bp_get_user_last_activity( $this->id ), __( 'active %s', 'buddypress' ) );
    817817        }
    818818
  • src/bp-core/bp-core-template.php

     
    157157        global $comment;
    158158
    159159        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( __( 'Avatar of %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 ) ) ) ) );
    161161        else if ( function_exists('get_avatar') )
    162162                get_avatar();
    163163}
     
    173173        global $post;
    174174
    175175        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( __( 'Avatar of %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 ) ) ) ) );
    177177        else if ( function_exists('get_avatar') )
    178178                get_avatar();
    179179}
  • src/bp-core/bp-core-widgets.php

     
    314314         */
    315315        function __construct() {
    316316                $widget_ops = array(
    317                         'description' => __( 'Avatars of users who are currently online', 'buddypress' ),
     317                        'description' => __( 'Profile Photos of online users', 'buddypress' ),
    318318                        'classname' => 'widget_bp_core_whos_online_widget buddypress widget',
    319319                );
    320320                parent::__construct( false, $name = _x( "(BuddyPress) Who's Online", 'widget name', 'buddypress' ), $widget_ops );
     
    417417         */
    418418        function __construct() {
    419419                $widget_ops = array(
    420                         'description' => __( 'Avatars of recently active members', 'buddypress' ),
     420                        'description' => __( 'Profile Photos of recently active members', 'buddypress' ),
    421421                        'classname' => 'widget_bp_core_recently_active_widget buddypress widget',
    422422                );
    423423                parent::__construct( false, $name = _x( '(BuddyPress) Recently Active Members', 'widget name', 'buddypress' ), $widget_ops );
  • src/bp-core/deprecated/2.1.php

     
    389389
    390390                        <?php if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?>
    391391
    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>
    393393
    394394                        <?php endif; ?>
    395395
     
    512512
    513513                        <?php endif ?>
    514514
    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>
    516516
    517517                        <li><a href="<?php bp_members_component_link( 'settings', 'capabilities' ); ?>"><?php _e( 'User Capabilities', 'buddypress' ); ?></a></li>
    518518
  • src/bp-groups/bp-groups-adminbar.php

     
    6161                $wp_admin_bar->add_menu( array(
    6262                        'parent' => $bp->group_admin_menu_id,
    6363                        'id'     => 'group-avatar',
    64                         'title'  => __( 'Edit Avatar', 'buddypress' ),
     64                        'title'  => __( 'Edit Profile Photo', 'buddypress' ),
    6565                        'href'   =>  bp_get_groups_action_link( 'admin/group-avatar' )
    6666                ) );
    6767        }
  • src/bp-groups/bp-groups-loader.php

     
    255255                // If avatar uploads are not disabled, add avatar option
    256256                if ( ! (int) buddypress()->site_options['bp-disable-avatar-uploads'] ) {
    257257                        $this->group_creation_steps['group-avatar'] = array(
    258                                 'name'     => __( 'Avatar',   'buddypress' ),
     258                                'name'     => __( 'Profile Photo',   'buddypress' ),
    259259                                'position' => 20
    260260                        );
    261261                }
     
    584584                                        'object'     => 'group',
    585585                                        'type'       => 'thumb',
    586586                                        'avatar_dir' => 'group-avatars',
    587                                         'alt'        => __( 'Group Avatar', 'buddypress' )
     587                                        'alt'        => __( 'Group Profile Photo', 'buddypress' )
    588588                                ) );
    589589
    590590                                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" />';
    592592                                }
    593593                        }
    594594                }
  • src/bp-groups/bp-groups-template.php

     
    15601560
    15611561        <?php if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?>
    15621562
    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>
    15641564
    15651565        <?php endif; ?>
    15661566
     
    34553455                        $this->invite->user->profile_data = BP_XProfile_ProfileData::get_all_for_user( $user_id );
    34563456                }
    34573457
    3458                 $this->invite->user->avatar       = bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'full', 'alt' => sprintf( __( 'Avatar 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( __( 'Avatar 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( __( 'Avatar of %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 ) );
    34613461                $this->invite->user->email        = $this->invite->user->user_email;
    34623462                $this->invite->user->user_url     = bp_core_get_user_domain( $user_id, $this->invite->user->user_nicename, $this->invite->user->user_login );
    34633463                $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

     
    278278                        case 'avatar':
    279279                                $notice = array(
    280280                                        'class'   => 'updated',
    281                                         'message' => __( 'Avatar was deleted successfully!', 'buddypress' )
     281                                        'message' => __( 'Profile Photo was deleted!', 'buddypress' )
    282282                                );
    283283                                break;
    284284                        case 'ham' :
  • src/bp-members/bp-members-adminbar.php

     
    106106                        $wp_admin_bar->add_menu( array(
    107107                                'parent' => $bp->user_admin_menu_id,
    108108                                'id'     => $bp->user_admin_menu_id . '-change-avatar',
    109                                 'title'  => __( "Edit Avatar", 'buddypress' ),
     109                                'title'  => __( "Edit Profile Photo", 'buddypress' ),
    110110                                'href'   => bp_get_members_component_link( 'profile', 'change-avatar' )
    111111                        ) );
    112112                }
  • src/bp-members/bp-members-template.php

     
    16901690                $defaults = array(
    16911691                        'size' => bp_core_avatar_full_width(),
    16921692                        'class' => 'avatar',
    1693                         'alt' => __( 'Your Avatar', 'buddypress' )
     1693                        'alt' => __( 'Your Profile Photo', 'buddypress' )
    16941694                );
    16951695
    16961696                $r = wp_parse_args( $args, $defaults );
  • src/bp-templates/bp-legacy/buddypress/groups/create.php

     
    154154
    155155                                <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
    156156
    157                                         <h4><?php _e( 'Crop Group Avatar', 'buddypress' ); ?></h4>
     157                                        <h4><?php _e( 'Crop Group Profile Photo', 'buddypress' ); ?></h4>
    158158
    159                                         <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php esc_attr_e( 'Avatar to 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' ); ?>" />
    160160
    161161                                        <div id="avatar-crop-pane">
    162                                                 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( 'Avatar preview', 'buddypress' ); ?>" />
     162                                                <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( 'Profile Photo preview', 'buddypress' ); ?>" />
    163163                                        </div>
    164164
    165165                                        <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

     
    136136
    137137                                <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>
    138138
    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' ) ) ); ?>
    140140
    141141                        <?php endif; ?>
    142142
     
    146146
    147147        <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
    148148
    149                 <h4><?php _e( 'Crop Avatar', 'buddypress' ); ?></h4>
     149                <h4><?php _e( 'Crop Profile Photo', 'buddypress' ); ?></h4>
    150150
    151                 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php esc_attr_e( 'Avatar to 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' ); ?>" />
    152152
    153153                <div id="avatar-crop-pane">
    154                         <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( 'Avatar preview', 'buddypress' ); ?>" />
     154                        <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( 'Profile Photo preview', 'buddypress' ); ?>" />
    155155                </div>
    156156
    157157                <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>
    22
    33<?php do_action( 'bp_before_profile_avatar_upload_content' ); ?>
    44
     
    2121
    2222                        <?php if ( bp_get_user_has_avatar() ) : ?>
    2323                                <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>
    2525                        <?php endif; ?>
    2626
    2727                <?php endif; ?>
     
    2828
    2929                <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
    3030
    31                         <h5><?php _e( 'Crop Your New Avatar', 'buddypress' ); ?></h5>
     31                        <h5><?php _e( 'Crop Your New Profile Photo', 'buddypress' ); ?></h5>
    3232
    33                         <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php esc_attr_e( 'Avatar to 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' ); ?>" />
    3434
    3535                        <div id="avatar-crop-pane">
    36                                 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( 'Avatar preview', 'buddypress' ); ?>" />
     36                                <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( 'Profile Photo preview', 'buddypress' ); ?>" />
    3737                        </div>
    3838
    3939                        <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

     
    2424                'new_avatar',
    2525                __( 'Member changed profile picture', 'buddypress' ),
    2626                'bp_xprofile_format_activity_action_new_avatar',
    27                 __( 'Updated Avatars', 'buddypress' )
     27                __( 'Updated Profile Photos', 'buddypress' )
    2828        );
    2929
    3030        bp_activity_set_action(
  • src/bp-xprofile/bp-xprofile-admin.php

     
    583583                // Avatar Metabox
    584584                add_meta_box(
    585585                        'bp_xprofile_user_admin_avatar',
    586                         _x( 'Avatar', 'xprofile user-admin edit screen', 'buddypress' ),
     586                        _x( 'Profile Photo', 'xprofile user-admin edit screen', 'buddypress' ),
    587587                        array( $this, 'user_admin_avatar_metabox' ),
    588588                        $screen_id,
    589589                        'side',
     
    843843                                $community_url = add_query_arg( $query_args, buddypress()->members->admin->edit_profile_url );
    844844                                $delete_link   = wp_nonce_url( $community_url, 'delete_avatar' ); ?>
    845845
    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>
    847847
    848848                        <?php endif; ?>
    849849
  • src/bp-xprofile/bp-xprofile-loader.php

     
    208208                // Change Avatar
    209209                if ( buddypress()->avatar->show_avatars ) {
    210210                        $sub_nav[] = array(
    211                                 'name'            => __( 'Change Avatar', 'buddypress' ),
     211                                'name'            => __( 'Change Profile Photo', 'buddypress' ),
    212212                                'slug'            => 'change-avatar',
    213213                                'parent_url'      => $profile_link,
    214214                                'parent_slug'     => $this->slug,
     
    305305                                $wp_admin_nav[] = array(
    306306                                        'parent' => 'my-account-' . $this->id,
    307307                                        'id'     => 'my-account-' . $this->id . '-change-avatar',
    308                                         'title'  => __( 'Change Avatar', 'buddypress' ),
     308                                        'title'  => __( 'Change Profile Photo', 'buddypress' ),
    309309                                        'href'   => trailingslashit( $profile_link . 'change-avatar' )
    310310                                );
    311311                        }
  • src/bp-xprofile/bp-xprofile-template.php

     
    648648        if ( !(int) $bp->site_options['bp-disable-avatar-uploads'] )
    649649                bp_core_avatar_admin( null, bp_loggedin_user_domain() . $bp->profile->slug . '/change-avatar/', bp_loggedin_user_domain() . $bp->profile->slug . '/delete-avatar/' );
    650650        else
    651                 _e( 'Avatar uploads 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' );
    652652}
    653653
    654654function bp_profile_last_updated() {