Skip to:
Content

BuddyPress.org

Ticket #6525: 6525_2.patch

File 6525_2.patch, 20.5 KB (added by lenasterg, 11 years ago)
  • src/bp-activity/bp-activity-loader.php

     
    347347                                $bp->bp_options_avatar = bp_core_fetch_avatar( array(
    348348                                        'item_id' => bp_displayed_user_id(),
    349349                                        'type'    => 'thumb',
    350                                         'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )
     350                                        'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() ),
     351                                        'title' => bp_get_displayed_user_fullname()
    351352                                ) );
    352353                                $bp->bp_options_title  = bp_get_displayed_user_fullname();
    353354                        }
  • src/bp-activity/bp-activity-template.php

     
    14491449         *     @type string      $class   Default: 'avatar'.
    14501450         *     @type string|bool $email   Default: Email of the activity's
    14511451         *                                associated user, if available. Otherwise false.
     1452     *     @type string          $title   Default: [user name]' if activity user name is
     1453     *                                                            available, otherwise ''
    14521454         *     @type string      $type    Default: 'full' when viewing a single activity
    14531455         *                                permalink page, otherwise 'thumb'.
    14541456         *     @type int|bool    $user_id Default: ID of the activity's user.
    … …  
    14771479                        'alt'     => $alt_default,
    14781480                        'class'   => 'avatar',
    14791481                        'email'   => false,
     1482                        'title' => $dn_default,
    14801483                        'type'    => $type_default,
    14811484                        'user_id' => false
    14821485                );
    … …  
    15411544                        'object'  => $object,
    15421545                        'type'    => $type,
    15431546                        'alt'     => $alt,
     1547                        'title' => $title,
    15441548                        'class'   => $class,
    15451549                        'width'   => $width,
    15461550                        'height'  => $height,
    … …  
    15801584         *     For a complete description of arguments, see {@link bp_core_fetch_avatar()}.
    15811585         *     @type string      $alt     Default value varies based on current activity
    15821586         *                                item component.
     1587         *     @type string      $title   Default value varies based on current activity
     1588         *                                                                item component.
    15831589         *     @type string      $type    Default: 'full' when viewing a single activity
    15841590         *                                permalink page, otherwise 'thumb'.
    15851591         *     @type string      $class   Default: 'avatar'.
    … …  
    15931599
    15941600                $r = wp_parse_args( $args, array(
    15951601                        'alt'        => '',
     1602                        'title'          => '',
    15961603                        'type'       => 'thumb',
    15971604                        'width'      => 20,
    15981605                        'height'     => 20,
    … …  
    17011708                        'object'  => $object,
    17021709                        'type'    => $type,
    17031710                        'alt'     => $alt,
     1711                        'title' => $title,
    17041712                        'class'   => $class,
    17051713                        'width'   => $width,
    17061714                        'height'  => $height,
  • src/bp-groups/bp-groups-template.php

     
    873873        echo bp_get_group_avatar( $args );
    874874}
    875875        /**
    876          * Return the group avatar while in the groups loop.
     876         * Get a group's avatar.
    877877         *
    878878         * @since BuddyPress (1.0.0)
    879879         *
    880          * @param array|string $args {
    881          *     Array of arguments. See {@link bp_core_fetch_avatar()} for
    882          *     detailed description. Default values that differ from that
    883          *     function are described below.
    884          *
    885          *     @type string $type Default: 'full'.
    886          *     @type string $id   Passed to $css_id parameter.
     880         * @see bp_core_fetch_avatar() For a description of arguments and
     881         *      return values.
     882         * @param array $args  {
     883         *     Arguments are listed here with an explanation of their defaults.
     884         *     For more information about the arguments, see
     885         *     {@link bp_core_fetch_avatar()}.
     886         *     @type string   $alt     Default: 'Group logo of [group name]'.
     887         *     @type string   $class   Default: 'avatar'.
     888         *     @type string   $title   Default: '[group name]'.
     889         *     @type string   $type    Default: 'full'.
     890         *     @type int|bool $width   Default: false.
     891         *     @type int|bool $height Default: false.
     892         *     @type bool $id Passed to $css_id parameter.
    887893         * }
    888          * @return string
     894         * @return string Group avatar string.
    889895         */
    890896        function bp_get_group_avatar( $args = '' ) {
    891897                global $groups_template;
    … …  
    902908                        'height' => false,
    903909                        'class'  => 'avatar',
    904910                        'id'     => false,
    905                         'alt'    => sprintf( __( 'Group logo of %s', 'buddypress' ), $groups_template->group->name )
     911                        'alt'    => sprintf( __( 'Group logo of %s', 'buddypress' ), $groups_template->group->name ),
     912                        'title' => $groups_template->group->name,
    906913                ) );
    907914
    908915                // Fetch the avatar from the folder
    909916                $avatar = bp_core_fetch_avatar( array(
    910917                        'item_id'    => $groups_template->group->id,
    911                         'title'      => $groups_template->group->name,
     918                        'title'      => $r['title'],
    912919                        'avatar_dir' => 'group-avatars',
    913920                        'object'     => 'group',
    914921                        'type'       => $r['type'],
    … …  
    39823989                        'item_id' => $members_template->member->user_id,
    39833990                        'type'    => 'full',
    39843991                        'email'   => $members_template->member->user_email,
    3985                         'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), $members_template->member->display_name )
     3992                        'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), $members_template->member->display_name ),
     3993                        'title'   => $members_template->member->display_name
    39863994                ) );
    39873995
    39883996                /**
    … …  
    40234031                        'item_id' => $members_template->member->user_id,
    40244032                        'type'    => 'thumb',
    40254033                        'email'   => $members_template->member->user_email,
    4026                         'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), $members_template->member->display_name )
     4034                        'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), $members_template->member->display_name ),
     4035                        'title'   => $members_template->member->display_name
    40274036                ) );
    40284037
    40294038                /**
    … …  
    40674076                        'email'   => $members_template->member->user_email,
    40684077                        'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), $members_template->member->display_name ),
    40694078                        'width'   => absint( $width ),
    4070                         'height'  => absint( $height )
     4079                        'height'  => absint( $height ),
     4080                        'title'   => $members_template->member->display_name
    40714081                ) );
    40724082
    40734083                /**
    … …  
    46914701         *
    46924702         * @since BuddyPress (1.1.0)
    46934703         *
    4694          * @see bp_core_fetch_avatar() For more information on accepted arguments
    4695          *
    4696          * @param  array  $args See bp_core_fetch_avatar()
     4704         * @see bp_core_fetch_avatar() For a description of arguments and
     4705         *      return values.
     4706         * @param array $args  {
     4707         *     Arguments are listed here with an explanation of their defaults.
     4708         *     For more information about the arguments, see
     4709         *     {@link bp_core_fetch_avatar()}.
     4710         *     @type string   $alt     Default: 'Group photo'.
     4711         *     @type string   $class   Default: 'avatar'.
     4712         *     @type string   $title   Default: ''.
     4713         *     @type string   $type    Default: 'full'.
     4714         *     @type int|bool $width   Default: false.
     4715         *     @type int|bool $height  Default: false.
     4716         *     @type string   $id          Passed to $css_id parameter. Default: 'avatar-crop-preview'
     4717         * }
    46974718         * @return string       The avatar for the group being created
    46984719         */
    46994720        function bp_get_new_group_avatar( $args = '' ) {
    … …  
    47064727                        'class'   => 'avatar',
    47074728                        'id'      => 'avatar-crop-preview',
    47084729                        'alt'     => __( 'Group photo', 'buddypress' ),
     4730                        'title'   => '',
    47094731                        'no_grav' => false
    47104732                ), 'get_new_group_avatar' );
    47114733
    … …  
    50875109                        'type'       => $type,
    50885110                        'avatar_dir' => 'group-avatars',
    50895111                        'alt'        => __( 'Group avatar', 'buddypress' ),
     5112                        'title'      => '',
    50905113                        'class'      => 'avatar'
    50915114                ) );
    50925115
    … …  
    53825405function bp_group_request_user_avatar_thumb() {
    53835406        global $requests_template;
    53845407
     5408        $user_display_name = bp_core_get_user_displayname( $requests_template->request->user_id );
    53855409        /**
    53865410         * Filters the requesting user's avatar thumbnail.
    53875411         *
    … …  
    53895413         *
    53905414         * @param string $value HTML markup for the user's avatar thumbnail.
    53915415         */
    5392         echo apply_filters( 'bp_group_request_user_avatar_thumb', bp_core_fetch_avatar( array( 'item_id' => $requests_template->request->user_id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_core_get_user_displayname( $requests_template->request->user_id ) ) ) ) );
     5416        echo apply_filters( 'bp_group_request_user_avatar_thumb', bp_core_fetch_avatar( array( 'item_id' => $requests_template->request->user_id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), $user_display_name ), 'title'=>'') ) );
    53935417}
    53945418
    53955419function bp_group_request_reject_link() {
    … …  
    56735697                if ( bp_is_active( 'xprofile' ) ) {
    56745698                        $this->invite->user->profile_data = BP_XProfile_ProfileData::get_all_for_user( $user_id );
    56755699                }
     5700                $inv_user_fullname=$this->invite->user->fullname;
    56765701
    5677                 $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 ) ) );
    5678                 $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 ) ) );
    5679                 $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 ) );
     5702                $this->invite->user->avatar       = bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'full',  'alt' => sprintf( __( 'Profile photo of %s', 'buddypress' ), $inv_user_fullname ), 'title'=>$inv_user_fullname ) );
     5703                $this->invite->user->avatar_thumb = bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile photo of %s', 'buddypress' ), $inv_user_fullname ), 'title'=>$inv_user_fullname ) );
     5704                $this->invite->user->avatar_mini  = bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile photo of %s', 'buddypress' ), $inv_user_fullname ), 'title'=>$inv_user_fullname,'width' => 30, 'height' => 30 ) );
    56805705                $this->invite->user->email        = $this->invite->user->user_email;
    56815706                $this->invite->user->user_url     = bp_core_get_user_domain( $user_id, $this->invite->user->user_nicename, $this->invite->user->user_login );
    56825707                $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-loader.php

     
    278278                        $bp->bp_options_avatar = bp_core_fetch_avatar( array(
    279279                                'item_id' => bp_displayed_user_id(),
    280280                                'type'    => 'thumb',
    281                                 'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), $bp->bp_options_title )
     281                                'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), $bp->bp_options_title ),
     282                                'title' => $bp->bp_options_title
    282283                        ) );
    283284                }
    284285
  • src/bp-members/bp-members-template.php

     
    934934         *     @type string   $alt     Default: 'Profile picture of [user name]'.
    935935         *     @type string   $class   Default: 'avatar'.
    936936         *     @type string   $type    Default: 'thumb'.
     937         *     @type string   $title   Default: '[user name]'.
    937938         *     @type int|bool $width   Default: false.
    938939         *     @type int|bool $height  Default: false.
    939940         *     @type bool     $id      Currently unused.
    … …  
    952953                        'height' => false,
    953954                        'class'  => 'avatar',
    954955                        'id'     => false,
    955                         'alt'    => sprintf( __( 'Profile picture of %s', 'buddypress' ), $fullname )
     956                        'alt'    => sprintf( __( 'Profile picture of %s', 'buddypress' ), $fullname ),
     957                        'title' => $fullname,
    956958                );
    957959
    958960                $r = wp_parse_args( $args, $defaults );
    … …  
    966968                 * @param string $value Formatted HTML <img> element,
    967969                 *                      or raw avatar URL based on $html arg.
    968970                 */
    969                 return apply_filters( 'bp_get_member_avatar', bp_core_fetch_avatar( array( 'item_id' => $members_template->member->id, 'type' => $type, 'alt' => $alt, 'css_id' => $id, 'class' => $class, 'width' => $width, 'height' => $height, 'email' => $members_template->member->user_email ) ) );
     971                return apply_filters( 'bp_get_member_avatar', bp_core_fetch_avatar( array( 'item_id' => $members_template->member->id, 'type' => $type, 'alt' => $alt, 'css_id' => $id, 'class' => $class, 'width' => $width, 'height' => $height, 'email' => $members_template->member->user_email, 'title' => $title ) ) );
    970972        }
    971973
    972974/**
    … …  
    14781480         *     For more information about the arguments, see
    14791481         *     {@link bp_core_fetch_avatar()}.
    14801482         *     @type string   $alt    Default: 'Profile picture of [user name]'.
     1483         *     @type string   $title  Default: ' [user name]'.
    14811484         *     @type bool     $html   Default: true.
    14821485         *     @type string   $type   Default: 'thumb'.
    14831486         *     @type int|bool $width  Default: false.
    … …  
    14931496                        'width'   => false,
    14941497                        'height'  => false,
    14951498                        'html'    => true,
    1496                         'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_loggedin_user_fullname() )
     1499                        'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_loggedin_user_fullname() ),
     1500                        'title'   => bp_get_loggedin_user_fullname()
    14971501                ) );
    14981502
     1503
     1504
    14991505                /**
    15001506                 * Filters the logged in user's avatar.
    15011507                 *
    … …  
    15271533         *     For more information about the arguments, see
    15281534         *     {@link bp_core_fetch_avatar()}.
    15291535         *     @type string   $alt    Default: 'Profile picture of [user name]'.
     1536         *     @type string   $title  Default: '[user name]'.
    15301537         *     @type bool     $html   Default: true.
    15311538         *     @type string   $type   Default: 'thumb'.
    15321539         *     @type int|bool $width  Default: false.
    … …  
    15421549                        'width'   => false,
    15431550                        'height'  => false,
    15441551                        'html'    => true,
    1545                         'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )
     1552                        'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() ),
     1553                        'title'   => bp_get_displayed_user_fullname()
    15461554                ) );
    15471555
    15481556                /**
    … …  
    22622270         *                         bp_core_avatar_full_width().
    22632271         *     @type string $class CSS class. Default: 'avatar'.
    22642272         *     @type string $alt   HTML 'alt' attribute. Default: 'Your Avatar'.
     2273         *     @type string $title HTML 'title' attribute. Default: 'Your Avatar'
    22652274         * }
    22662275         * @return string
    22672276         */
    … …  
    22712280                $defaults = array(
    22722281                        'size' => bp_core_avatar_full_width(),
    22732282                        'class' => 'avatar',
    2274                         'alt' => __( 'Your Profile Photo', 'buddypress' )
     2283                        'alt' => __( 'Your Profile Photo', 'buddypress' ),
     2284                        'title' => __( 'Your Profile Photo', 'buddypress' )
    22752285                );
    22762286
    22772287                $r = wp_parse_args( $args, $defaults );
    … …  
    22862296                                'type'       => 'full',
    22872297                                'width'      => $size,
    22882298                                'height'     => $size,
    2289                                 'alt'        => $alt,
     2299                                'alt'            => $alt,
     2300                                'title'          =>$title,
    22902301                                'class'      => $class
    22912302                        ) );
    22922303
  • src/bp-messages/bp-messages-loader.php

     
    314314                                $bp->bp_options_avatar = bp_core_fetch_avatar( array(
    315315                                        'item_id' => bp_displayed_user_id(),
    316316                                        'type'    => 'thumb',
    317                                         'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )
     317                                        'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() ),
     318                                        'title' => bp_get_displayed_user_fullname()
    318319                                ) );
    319320                                $bp->bp_options_title = bp_get_displayed_user_fullname();
    320321                        }
  • src/bp-messages/bp-messages-template.php

     
    10001000         *     @type string      $class  Default: 'avatar'.
    10011001         *     @type string|bool $id     Default: false.
    10021002         *     @type string      $alt    Default: 'Profile picture of [display name]'.
     1003         *     @type string      $title  Default: '[display name]'.
    10031004         * }
    10041005         * @return string User avatar string.
    10051006         */
    … …  
    10151016                        'height' => false,
    10161017                        'class'  => 'avatar',
    10171018                        'id'     => false,
    1018                         'alt'    => $alt
     1019                        'alt'    => $alt,
     1020                        'title'  => $fullname
    10191021                ) );
    10201022
    10211023                /**
    … …  
    10291031                        'item_id' => $messages_template->thread->last_sender_id,
    10301032                        'type'    => $r['type'],
    10311033                        'alt'     => $r['alt'],
     1034                        'title' => $r['title'],
    10321035                        'css_id'  => $r['id'],
    10331036                        'class'   => $r['class'],
    10341037                        'width'   => $r['width'],
    … …  
    23162319         *     @type string $type   Avatar type. Default: 'thumb'.
    23172320         *     @type int    $width  Avatar width. Default: default for your $type.
    23182321         *     @type int    $height Avatar height. Default: default for your $type.
     2322         *     @type string $alt        Avatar alt. Default: [user displayname].
     2323         *     @type string $title      Avatar title. Default: [user displayname].
    23192324         * }
    23202325         * @return string <img> tag containing the avatar.
    23212326         */
    … …  
    23262331                        'type'   => 'thumb',
    23272332                        'width'  => false,
    23282333                        'height' => false,
     2334                        'alt' => bp_core_get_user_displayname( $thread_template->message->sender_id ),
     2335                        'title' => bp_core_get_user_displayname( $thread_template->message->sender_id ),
    23292336                ) );
    23302337
    23312338                /**
    … …  
    23402347                        'type'    => $r['type'],
    23412348                        'width'   => $r['width'],
    23422349                        'height'  => $r['height'],
    2343                         'alt'     => bp_core_get_user_displayname( $thread_template->message->sender_id )
     2350                        'alt' => $r['alt'],
     2351                        'title' => $r['title'],
    23442352                ) ) );
    23452353        }
    23462354
  • src/bp-notifications/bp-notifications-loader.php

     
    235235                                $bp->bp_options_avatar = bp_core_fetch_avatar( array(
    236236                                        'item_id' => bp_displayed_user_id(),
    237237                                        'type'    => 'thumb',
    238                                         'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )
     238                                        'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() ),
     239                                        'title'   => bp_get_displayed_user_fullname()
    239240                                ) );
    240241                                $bp->bp_options_title = bp_get_displayed_user_fullname();
    241242                        }
  • src/bp-templates/bp-legacy/buddypress/groups/single/admin.php

     
    239239
    240240                        <?php while ( bp_members() ) : bp_the_member(); ?>
    241241                        <li>
    242                                 <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
     242                                <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ), 'title' => bp_get_member_name() ) ); ?>
    243243                                <h5>
    244244                                        <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a>
    245245                                        <?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?>
    … …  
    287287        <div class="bp-widget">
    288288                <h4><?php _e("Members", "buddypress"); ?></h4>
    289289
     290
     291
     292
     293
     294
    290295                <?php if ( bp_group_has_members( 'per_page=15&exclude_banned=0' ) ) : ?>
    291296
    292297                        <?php if ( bp_group_member_needs_pagination() ) : ?>
  • src/bp-xprofile/bp-xprofile-admin.php

     
    234234        // Updating
    235235        if ( isset( $_POST['save_group'] ) ) {
    236236
     237
    237238                // Validate $_POSTed data
    238239                if ( BP_XProfile_Group::admin_validate() ) {
    239240
    … …  
    10521053                                'item_id' => $user->ID,
    10531054                                'object'  => 'user',
    10541055                                'type'    => 'full',
     1056                                'alt' => $user->display_name,
    10551057                                'title'   => $user->display_name
    10561058                        ) ); ?>
    10571059