Skip to:
Content

BuddyPress.org

Ticket #6634: 6634.patch

File 6634.patch, 986 bytes (added by imath, 9 years ago)
  • src/bp-core/classes/class-bp-attachment-avatar.php

    diff --git src/bp-core/classes/class-bp-attachment-avatar.php src/bp-core/classes/class-bp-attachment-avatar.php
    index 980b1bc..91cd15c 100644
    class BP_Attachment_Avatar extends BP_Attachment { 
    269269                $avatar_types = array( 'full' => '', 'thumb' => '' );
    270270
    271271                foreach ( $avatar_types as $key_type => $type ) {
    272                         $args['dst_w']    = bp_core_avatar_full_width();
    273                         $args['dst_h']    = bp_core_avatar_full_height();
     272                        if ( 'thumb' === $key_type ) {
     273                                $args['dst_w'] = bp_core_avatar_thumb_width();
     274                                $args['dst_h'] = bp_core_avatar_thumb_height();
     275                        } else {
     276                                $args['dst_w'] = bp_core_avatar_full_width();
     277                                $args['dst_h'] = bp_core_avatar_full_height();
     278                        }
     279
    274280                        $args['dst_file'] = $avatar_folder_dir . '/' . wp_hash( $absolute_path . time() ) . '-bp' . $key_type . '.' . $ext;
    275281
    276282                        $avatar_types[ $key_type ] = parent::crop( $args );