BP_Attachment_Avatar::__construct()
Construct Upload parameters.
Description Description
See also See also
- BP_Attachment::__construct(): for list of parameters
Source Source
File: bp-core/classes/class-bp-attachment-avatar.php
public function __construct() {
// Allowed avatar types.
$allowed_types = bp_core_get_allowed_avatar_types();
parent::__construct( array(
'action' => 'bp_avatar_upload',
'file_input' => 'file',
'original_max_filesize' => bp_core_avatar_original_max_filesize(),
// Specific errors for avatars.
'upload_error_strings' => array(
9 => sprintf( __( 'That photo is too big. Please upload one smaller than %s', 'buddypress' ), size_format( bp_core_avatar_original_max_filesize() ) ),
10 => sprintf( _n( 'Please upload only this file type: %s.', 'Please upload only these file types: %s.', count( $allowed_types ), 'buddypress' ), self::get_avatar_types( $allowed_types ) ),
),
) );
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.3.0 | Introduced. |