Changeset 13152
- Timestamp:
- 11/14/2021 08:39:57 PM (2 years ago)
- Location:
- trunk/src/bp-core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-avatars.php
r13108 r13152 982 982 983 983 // Maybe resize. 984 $original_file_size = $avatar_attachment->get_image_data( $bp->avatar_admin->original['file'] ); 984 985 $bp->avatar_admin->resized = $avatar_attachment->shrink( $bp->avatar_admin->original['file'], $ui_available_width ); 985 986 $bp->avatar_admin->image = new stdClass(); … … 1004 1005 // If the uploaded image is smaller than the "full" dimensions, throw a warning. 1005 1006 if ( $avatar_attachment->is_too_small( $bp->avatar_admin->image->file ) ) { 1006 /* translators: 1: the advised width size in pixels. 2: the advised height size in pixels. */ 1007 bp_core_add_message( sprintf( __( 'You have selected an image that is smaller than recommended. For best results, upload a picture larger than %1$d x %2$d pixels.', 'buddypress' ), bp_core_avatar_full_width(), bp_core_avatar_full_height() ), 'error' ); 1007 if ( isset( $original_file_size['width'] ) && $original_file_size['width'] > bp_core_avatar_full_width() ) { 1008 $aspect_ratio = number_format_i18n( bp_core_avatar_full_width() / bp_core_avatar_full_height(), 2 ); 1009 1010 /* translators: %s: the value of the aspect ratio. */ 1011 bp_core_add_message( sprintf( __( 'The aspect ratio of the image you selected is too great compared to the profile photo one. For best results, upload a picture having an aspect ratio closer to %s.', 'buddypress' ), $aspect_ratio ), 'error' ); 1012 } else { 1013 1014 /* translators: 1: the advised width size in pixels. 2: the advised height size in pixels. */ 1015 bp_core_add_message( sprintf( __( 'You have selected an image that is smaller than recommended. For best results, upload a picture larger than %1$d x %2$d pixels.', 'buddypress' ), bp_core_avatar_full_width(), bp_core_avatar_full_height() ), 'error' ); 1016 } 1008 1017 } 1009 1018 -
trunk/src/bp-core/js/bp-plupload.js
r12856 r13152 81 81 */ 82 82 if ( 'bp_avatar_upload' === uploader.settings.multipart_params.action ) { 83 83 uploader.settings.multipart_params.bp_params.ui_available_width = container.width(); 84 84 } 85 85
Note: See TracChangeset
for help on using the changeset viewer.