BP_Attachment_Cover_Image::__construct()
The constuctor.
Source Source
File: bp-core/classes/class-bp-attachment-cover-image.php
public function __construct() { // Allowed cover image types & upload size. $allowed_types = bp_attachments_get_allowed_types( 'cover_image' ); $max_upload_file_size = bp_attachments_get_max_upload_file_size( 'cover_image' ); parent::__construct( array( 'action' => 'bp_cover_image_upload', 'file_input' => 'file', 'original_max_filesize' => $max_upload_file_size, 'base_dir' => bp_attachments_uploads_dir_get( 'dir' ), 'required_wp_files' => array( 'file', 'image' ), // Specific errors for cover images. 'upload_error_strings' => array( /* translators: %s: Max file size for the cover image */ 11 => sprintf( _x( 'That image is too big. Please upload one smaller than %s', 'cover image upload error', 'buddypress' ), size_format( $max_upload_file_size ) ), /* translators: %s: comma separated list of file types allowed for the cover image */ 12 => sprintf( _nx( 'Please upload only this file type: %s.', 'Please upload only these file types: %s.', count( $allowed_types ), 'cover image upload error', 'buddypress' ), self::get_cover_image_types( $allowed_types ) ), ), ) ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.4.0 | Introduced. |