Ticket #6525: 6525_2.patch
| File 6525_2.patch, 20.5 KB (added by , 11 years ago) |
|---|
-
src/bp-activity/bp-activity-loader.php
347 347 $bp->bp_options_avatar = bp_core_fetch_avatar( array( 348 348 'item_id' => bp_displayed_user_id(), 349 349 '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() 351 352 ) ); 352 353 $bp->bp_options_title = bp_get_displayed_user_fullname(); 353 354 } -
src/bp-activity/bp-activity-template.php
1449 1449 * @type string $class Default: 'avatar'. 1450 1450 * @type string|bool $email Default: Email of the activity's 1451 1451 * associated user, if available. Otherwise false. 1452 * @type string $title Default: [user name]' if activity user name is 1453 * available, otherwise '' 1452 1454 * @type string $type Default: 'full' when viewing a single activity 1453 1455 * permalink page, otherwise 'thumb'. 1454 1456 * @type int|bool $user_id Default: ID of the activity's user. … … 1477 1479 'alt' => $alt_default, 1478 1480 'class' => 'avatar', 1479 1481 'email' => false, 1482 'title' => $dn_default, 1480 1483 'type' => $type_default, 1481 1484 'user_id' => false 1482 1485 ); … … 1541 1544 'object' => $object, 1542 1545 'type' => $type, 1543 1546 'alt' => $alt, 1547 'title' => $title, 1544 1548 'class' => $class, 1545 1549 'width' => $width, 1546 1550 'height' => $height, … … 1580 1584 * For a complete description of arguments, see {@link bp_core_fetch_avatar()}. 1581 1585 * @type string $alt Default value varies based on current activity 1582 1586 * item component. 1587 * @type string $title Default value varies based on current activity 1588 * item component. 1583 1589 * @type string $type Default: 'full' when viewing a single activity 1584 1590 * permalink page, otherwise 'thumb'. 1585 1591 * @type string $class Default: 'avatar'. … … 1593 1599 1594 1600 $r = wp_parse_args( $args, array( 1595 1601 'alt' => '', 1602 'title' => '', 1596 1603 'type' => 'thumb', 1597 1604 'width' => 20, 1598 1605 'height' => 20, … … 1701 1708 'object' => $object, 1702 1709 'type' => $type, 1703 1710 'alt' => $alt, 1711 'title' => $title, 1704 1712 'class' => $class, 1705 1713 'width' => $width, 1706 1714 'height' => $height, -
src/bp-groups/bp-groups-template.php
873 873 echo bp_get_group_avatar( $args ); 874 874 } 875 875 /** 876 * Return the group avatar while in the groups loop.876 * Get a group's avatar. 877 877 * 878 878 * @since BuddyPress (1.0.0) 879 879 * 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. 887 893 * } 888 * @return string 894 * @return string Group avatar string. 889 895 */ 890 896 function bp_get_group_avatar( $args = '' ) { 891 897 global $groups_template; … … 902 908 'height' => false, 903 909 'class' => 'avatar', 904 910 '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, 906 913 ) ); 907 914 908 915 // Fetch the avatar from the folder 909 916 $avatar = bp_core_fetch_avatar( array( 910 917 'item_id' => $groups_template->group->id, 911 'title' => $ groups_template->group->name,918 'title' => $r['title'], 912 919 'avatar_dir' => 'group-avatars', 913 920 'object' => 'group', 914 921 'type' => $r['type'], … … 3982 3989 'item_id' => $members_template->member->user_id, 3983 3990 'type' => 'full', 3984 3991 '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 3986 3994 ) ); 3987 3995 3988 3996 /** … … 4023 4031 'item_id' => $members_template->member->user_id, 4024 4032 'type' => 'thumb', 4025 4033 '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 4027 4036 ) ); 4028 4037 4029 4038 /** … … 4067 4076 'email' => $members_template->member->user_email, 4068 4077 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), $members_template->member->display_name ), 4069 4078 'width' => absint( $width ), 4070 'height' => absint( $height ) 4079 'height' => absint( $height ), 4080 'title' => $members_template->member->display_name 4071 4081 ) ); 4072 4082 4073 4083 /** … … 4691 4701 * 4692 4702 * @since BuddyPress (1.1.0) 4693 4703 * 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 * } 4697 4718 * @return string The avatar for the group being created 4698 4719 */ 4699 4720 function bp_get_new_group_avatar( $args = '' ) { … … 4706 4727 'class' => 'avatar', 4707 4728 'id' => 'avatar-crop-preview', 4708 4729 'alt' => __( 'Group photo', 'buddypress' ), 4730 'title' => '', 4709 4731 'no_grav' => false 4710 4732 ), 'get_new_group_avatar' ); 4711 4733 … … 5087 5109 'type' => $type, 5088 5110 'avatar_dir' => 'group-avatars', 5089 5111 'alt' => __( 'Group avatar', 'buddypress' ), 5112 'title' => '', 5090 5113 'class' => 'avatar' 5091 5114 ) ); 5092 5115 … … 5382 5405 function bp_group_request_user_avatar_thumb() { 5383 5406 global $requests_template; 5384 5407 5408 $user_display_name = bp_core_get_user_displayname( $requests_template->request->user_id ); 5385 5409 /** 5386 5410 * Filters the requesting user's avatar thumbnail. 5387 5411 * … … 5389 5413 * 5390 5414 * @param string $value HTML markup for the user's avatar thumbnail. 5391 5415 */ 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'=>'') ) ); 5393 5417 } 5394 5418 5395 5419 function bp_group_request_reject_link() { … … 5673 5697 if ( bp_is_active( 'xprofile' ) ) { 5674 5698 $this->invite->user->profile_data = BP_XProfile_ProfileData::get_all_for_user( $user_id ); 5675 5699 } 5700 $inv_user_fullname=$this->invite->user->fullname; 5676 5701 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 ) ); 5680 5705 $this->invite->user->email = $this->invite->user->user_email; 5681 5706 $this->invite->user->user_url = bp_core_get_user_domain( $user_id, $this->invite->user->user_nicename, $this->invite->user->user_login ); 5682 5707 $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
278 278 $bp->bp_options_avatar = bp_core_fetch_avatar( array( 279 279 'item_id' => bp_displayed_user_id(), 280 280 '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 282 283 ) ); 283 284 } 284 285 -
src/bp-members/bp-members-template.php
934 934 * @type string $alt Default: 'Profile picture of [user name]'. 935 935 * @type string $class Default: 'avatar'. 936 936 * @type string $type Default: 'thumb'. 937 * @type string $title Default: '[user name]'. 937 938 * @type int|bool $width Default: false. 938 939 * @type int|bool $height Default: false. 939 940 * @type bool $id Currently unused. … … 952 953 'height' => false, 953 954 'class' => 'avatar', 954 955 'id' => false, 955 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), $fullname ) 956 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), $fullname ), 957 'title' => $fullname, 956 958 ); 957 959 958 960 $r = wp_parse_args( $args, $defaults ); … … 966 968 * @param string $value Formatted HTML <img> element, 967 969 * or raw avatar URL based on $html arg. 968 970 */ 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 ) ) ); 970 972 } 971 973 972 974 /** … … 1478 1480 * For more information about the arguments, see 1479 1481 * {@link bp_core_fetch_avatar()}. 1480 1482 * @type string $alt Default: 'Profile picture of [user name]'. 1483 * @type string $title Default: ' [user name]'. 1481 1484 * @type bool $html Default: true. 1482 1485 * @type string $type Default: 'thumb'. 1483 1486 * @type int|bool $width Default: false. … … 1493 1496 'width' => false, 1494 1497 'height' => false, 1495 1498 '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() 1497 1501 ) ); 1498 1502 1503 1504 1499 1505 /** 1500 1506 * Filters the logged in user's avatar. 1501 1507 * … … 1527 1533 * For more information about the arguments, see 1528 1534 * {@link bp_core_fetch_avatar()}. 1529 1535 * @type string $alt Default: 'Profile picture of [user name]'. 1536 * @type string $title Default: '[user name]'. 1530 1537 * @type bool $html Default: true. 1531 1538 * @type string $type Default: 'thumb'. 1532 1539 * @type int|bool $width Default: false. … … 1542 1549 'width' => false, 1543 1550 'height' => false, 1544 1551 '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() 1546 1554 ) ); 1547 1555 1548 1556 /** … … 2262 2270 * bp_core_avatar_full_width(). 2263 2271 * @type string $class CSS class. Default: 'avatar'. 2264 2272 * @type string $alt HTML 'alt' attribute. Default: 'Your Avatar'. 2273 * @type string $title HTML 'title' attribute. Default: 'Your Avatar' 2265 2274 * } 2266 2275 * @return string 2267 2276 */ … … 2271 2280 $defaults = array( 2272 2281 'size' => bp_core_avatar_full_width(), 2273 2282 'class' => 'avatar', 2274 'alt' => __( 'Your Profile Photo', 'buddypress' ) 2283 'alt' => __( 'Your Profile Photo', 'buddypress' ), 2284 'title' => __( 'Your Profile Photo', 'buddypress' ) 2275 2285 ); 2276 2286 2277 2287 $r = wp_parse_args( $args, $defaults ); … … 2286 2296 'type' => 'full', 2287 2297 'width' => $size, 2288 2298 'height' => $size, 2289 'alt' => $alt, 2299 'alt' => $alt, 2300 'title' =>$title, 2290 2301 'class' => $class 2291 2302 ) ); 2292 2303 -
src/bp-messages/bp-messages-loader.php
314 314 $bp->bp_options_avatar = bp_core_fetch_avatar( array( 315 315 'item_id' => bp_displayed_user_id(), 316 316 '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() 318 319 ) ); 319 320 $bp->bp_options_title = bp_get_displayed_user_fullname(); 320 321 } -
src/bp-messages/bp-messages-template.php
1000 1000 * @type string $class Default: 'avatar'. 1001 1001 * @type string|bool $id Default: false. 1002 1002 * @type string $alt Default: 'Profile picture of [display name]'. 1003 * @type string $title Default: '[display name]'. 1003 1004 * } 1004 1005 * @return string User avatar string. 1005 1006 */ … … 1015 1016 'height' => false, 1016 1017 'class' => 'avatar', 1017 1018 'id' => false, 1018 'alt' => $alt 1019 'alt' => $alt, 1020 'title' => $fullname 1019 1021 ) ); 1020 1022 1021 1023 /** … … 1029 1031 'item_id' => $messages_template->thread->last_sender_id, 1030 1032 'type' => $r['type'], 1031 1033 'alt' => $r['alt'], 1034 'title' => $r['title'], 1032 1035 'css_id' => $r['id'], 1033 1036 'class' => $r['class'], 1034 1037 'width' => $r['width'], … … 2316 2319 * @type string $type Avatar type. Default: 'thumb'. 2317 2320 * @type int $width Avatar width. Default: default for your $type. 2318 2321 * @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]. 2319 2324 * } 2320 2325 * @return string <img> tag containing the avatar. 2321 2326 */ … … 2326 2331 'type' => 'thumb', 2327 2332 'width' => false, 2328 2333 '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 ), 2329 2336 ) ); 2330 2337 2331 2338 /** … … 2340 2347 'type' => $r['type'], 2341 2348 'width' => $r['width'], 2342 2349 'height' => $r['height'], 2343 'alt' => bp_core_get_user_displayname( $thread_template->message->sender_id ) 2350 'alt' => $r['alt'], 2351 'title' => $r['title'], 2344 2352 ) ) ); 2345 2353 } 2346 2354 -
src/bp-notifications/bp-notifications-loader.php
235 235 $bp->bp_options_avatar = bp_core_fetch_avatar( array( 236 236 'item_id' => bp_displayed_user_id(), 237 237 '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() 239 240 ) ); 240 241 $bp->bp_options_title = bp_get_displayed_user_fullname(); 241 242 } -
src/bp-templates/bp-legacy/buddypress/groups/single/admin.php
239 239 240 240 <?php while ( bp_members() ) : bp_the_member(); ?> 241 241 <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() ) ); ?> 243 243 <h5> 244 244 <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a> 245 245 <?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?> … … 287 287 <div class="bp-widget"> 288 288 <h4><?php _e("Members", "buddypress"); ?></h4> 289 289 290 291 292 293 294 290 295 <?php if ( bp_group_has_members( 'per_page=15&exclude_banned=0' ) ) : ?> 291 296 292 297 <?php if ( bp_group_member_needs_pagination() ) : ?> -
src/bp-xprofile/bp-xprofile-admin.php
234 234 // Updating 235 235 if ( isset( $_POST['save_group'] ) ) { 236 236 237 237 238 // Validate $_POSTed data 238 239 if ( BP_XProfile_Group::admin_validate() ) { 239 240 … … 1052 1053 'item_id' => $user->ID, 1053 1054 'object' => 'user', 1054 1055 'type' => 'full', 1056 'alt' => $user->display_name, 1055 1057 'title' => $user->display_name 1056 1058 ) ); ?> 1057 1059
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)