Ticket #4503: 4503.diff
File 4503.diff, 1.3 KB (added by , 12 years ago) |
---|
-
bp-core/bp-core-avatars.php
228 228 if ( !empty( $css_id ) ) 229 229 $css_id = ' id="' . $css_id . '"'; 230 230 231 // Set image width 232 if ( false !== $width ) 233 $html_width = ' width="' . $width . '"'; 234 else 235 $html_width = ( 'thumb' == $type ) ? ' width="' . bp_core_avatar_thumb_width() . '"' : ' width="' . bp_core_avatar_full_width() . '"'; 231 // set the image width variable 232 if ( false !== $width ) { 233 $width = $width; 234 } elseif ( 'thumb' == $type ) { 235 $width = bp_core_avatar_thumb_width(); 236 } else { 237 $width = bp_core_avatar_full_width(); 238 } 239 240 // Set html width attribute 241 $html_width = ' width="' . esc_attr( $width ) . '"'; 236 242 237 243 // Set image height 238 244 if ( false !== $height ) … … 250 256 $avatar_folder_dir = apply_filters( 'bp_core_avatar_folder_dir', ( $avatar_loc->path . $avatar_loc->dir . $item_id ), $item_id, $object, $avatar_dir ); 251 257 252 258 // Add an identifying class 253 $class .= ' ' . $object . '-' . $item_id . '-avatar ';259 $class .= ' ' . $object . '-' . $item_id . '-avatar ' . sanitize_html_class( "avatar-$width" ) . ' photo'; 254 260 255 261 /**** 256 262 * Look for uploaded avatar first. Use it if it exists.