Changeset 5729 for trunk/bp-core/bp-core-avatars.php
- Timestamp:
- 02/11/2012 09:32:04 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-avatars.php
r5683 r5729 598 598 599 599 // Make sure we at least have a width and height for cropping 600 if ( !(int) $crop_w )600 if ( !(int) $crop_w ) 601 601 $crop_w = bp_core_avatar_full_width(); 602 602 603 if ( !(int) $crop_h )603 if ( !(int) $crop_h ) 604 604 $crop_h = bp_core_avatar_full_height(); 605 605 … … 609 609 610 610 // Crop the image 611 $full_cropped = wp_crop_image( $original_file, (int) $crop_x, (int)$crop_y, (int)$crop_w, (int)$crop_h, bp_core_avatar_full_width(), bp_core_avatar_full_height(), false, $avatar_folder_dir . '/' . $full_filename );612 $thumb_cropped = wp_crop_image( $original_file, (int) $crop_x, (int)$crop_y, (int)$crop_w, (int)$crop_h, bp_core_avatar_thumb_width(), bp_core_avatar_thumb_height(), false, $avatar_folder_dir . '/' . $thumb_filename );611 $full_cropped = wp_crop_image( $original_file, (int) $crop_x, (int) $crop_y, (int) $crop_w, (int) $crop_h, bp_core_avatar_full_width(), bp_core_avatar_full_height(), false, $avatar_folder_dir . '/' . $full_filename ); 612 $thumb_cropped = wp_crop_image( $original_file, (int) $crop_x, (int) $crop_y, (int) $crop_w, (int) $crop_h, bp_core_avatar_thumb_width(), bp_core_avatar_thumb_height(), false, $avatar_folder_dir . '/' . $thumb_filename ); 613 613 614 614 // Check for errors … … 808 808 global $bp; 809 809 810 $dim = isset( $bp->avatar->{$type}->{$h_or_w} ) ? (int) $bp->avatar->{$type}->{$h_or_w} : false;810 $dim = isset( $bp->avatar->{$type}->{$h_or_w} ) ? (int) $bp->avatar->{$type}->{$h_or_w} : false; 811 811 812 812 return apply_filters( 'bp_core_avatar_dimension', $dim, $type, $h_or_w ); … … 872 872 global $bp; 873 873 874 return apply_filters( 'bp_core_avatar_original_max_width', (int) $bp->avatar->original_max_width );874 return apply_filters( 'bp_core_avatar_original_max_width', (int) $bp->avatar->original_max_width ); 875 875 } 876 876 … … 886 886 global $bp; 887 887 888 return apply_filters( 'bp_core_avatar_original_max_filesize', (int) $bp->avatar->original_max_filesize );888 return apply_filters( 'bp_core_avatar_original_max_filesize', (int) $bp->avatar->original_max_filesize ); 889 889 } 890 890
Note: See TracChangeset
for help on using the changeset viewer.