Changeset 5466
- Timestamp:
- 12/09/2011 01:17:57 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-avatars.php
r5455 r5466 146 146 // Get item name for alt/title tags 147 147 $item_name = ''; 148 149 // Don't do this query if we don't have to 150 if ( !$alt || !$title ) { 148 149 // Backpat for the 'alt' parameter, which used to encourage sprintf()-style values 150 if ( false !== strpos( $alt, '%s' ) || false !== strpos( $alt, '%1$s' ) ) { 151 var_dump( 'yes' ); 151 152 if ( 'user' == $object ) 152 153 $item_name = bp_core_get_user_displayname( $item_id ); … … 155 156 elseif ( 'blog' == $object ) 156 157 $item_name = get_blog_option( $item_id, 'blogname' ); 157 } 158 159 if ( !$alt && $item_name ) { 160 $alt = sprintf( __( "Avatar Image: %s", 'buddypress' ), apply_filters( 'bp_core_avatar_alt', $item_name, $item_id, $object ) ); 161 } elseif ( !$alt ) { 158 159 $alt = sprintf( $alt, apply_filters( 'bp_core_avatar_alt', $item_name, $item_id, $object ) ); 160 } 161 162 // Get a fallback for the 'alt' parameter 163 if ( !$alt ) { 162 164 $alt = __( 'Avatar Image', 'buddypress' ); 163 165 } 164 166 165 // Set title tag 167 // Set title tag, if it's been provided 166 168 if ( $title ) 167 169 $title = " title='" . esc_attr( apply_filters( 'bp_core_avatar_title', $title, $item_id, $object ) ) . "'"; 168 elseif ( $item_name )169 $title = " title='" . esc_attr( apply_filters( 'bp_core_avatar_title', $item_name, $item_id, $object ) ) . "'";170 170 171 171 // Set CSS ID if passed -
trunk/bp-members/bp-members-adminbar.php
r5346 r5466 33 33 'email' => $bp->loggedin_user->userdata->user_email, 34 34 'width' => 16, 35 'height' => 16 35 'height' => 16, 36 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_loggedin_user_fullname() ) 36 37 ) ); 37 38 … … 112 113 'email' => $bp->displayed_user->userdata->user_email, 113 114 'width' => 16, 114 'height' => 16 115 'height' => 16, 116 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() ) 115 117 ) ); 116 118 -
trunk/bp-members/bp-members-buddybar.php
r5307 r5466 70 70 echo '<li>'; 71 71 echo '<a href="' . bp_core_get_user_domain( $author->user_id, $author->user_nicename, $author->user_login ) . '">'; 72 echo bp_core_fetch_avatar( array( 'item_id' => $author->user_id, 'email' => $author->user_email, 'width' => 15, 'height' => 15 ) ) ; 72 echo bp_core_fetch_avatar( array( 73 'item_id' => $author->user_id, 74 'email' => $author->user_email, 75 'width' => 15, 76 'height' => 15, 77 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), $author->display_name ) 78 ) ); 73 79 echo ' ' . $author->display_name . '</a>'; 74 80 echo '<div class="admin-bar-clear"></div>'; -
trunk/bp-members/bp-members-loader.php
r5412 r5466 179 179 $bp->bp_options_avatar = bp_core_fetch_avatar( array( 180 180 'item_id' => bp_displayed_user_id(), 181 'type' => 'thumb' 181 'type' => 'thumb', 182 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() ) 182 183 ) ); 183 184 $bp->bp_options_title = $bp->displayed_user->fullname; -
trunk/bp-members/bp-members-template.php
r5458 r5466 480 480 'class' => 'avatar', 481 481 'id' => false, 482 'alt' => __( 'Profile picture of %s', 'buddypress')482 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), $members_template->member->fullname ) 483 483 ); 484 484 … … 776 776 'height' => false, 777 777 'html' => true, 778 'alt' => __( 'Profile picture of %s', 'buddypress')778 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_loggedin_user_fullname() ) 779 779 ); 780 780 … … 796 796 'height' => false, 797 797 'html' => true, 798 'alt' => __( 'Profile picture of %s', 'buddypress')798 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() ) 799 799 ); 800 800
Note: See TracChangeset
for help on using the changeset viewer.