/**
  * The constuctor
  *
  * @since 2.4.0
  */
 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'), 'upload_error_strings' => array(11 => sprintf(__('That image is too big. Please upload one smaller than %s', 'buddypress'), size_format($max_upload_file_size)), 12 => sprintf(_n('Please upload only this file type: %s.', 'Please upload only these file types: %s.', count($allowed_types), 'buddypress'), self::get_cover_image_types($allowed_types)))));
 }
 /**
  * Construct Upload parameters.
  *
  * @since 2.3.0
  *
  * @see  BP_Attachment::__construct() for list of parameters
  * @uses bp_core_avatar_original_max_filesize()
  * @uses BP_Attachment::__construct()
  */
 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(), '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)))));
 }
 public function __construct($args = array())
 {
     return parent::__construct($args);
 }
Ejemplo n.º 4
0
 public function __construct()
 {
     parent::__construct(array('action' => 'bp_group_cover_upload', 'file_input' => 'group_cover', 'allowed_mime_types' => array('png', 'jpg'), 'base_dir' => 'group_cover'));
 }
 /**
  * The constuctor
  *
  * @since 1.3.0
  */
 public function __construct()
 {
     parent::__construct(array('action' => 'buddydrive_upload', 'file_input' => 'buddyfile-upload', 'base_dir' => 'buddydrive', 'upload_error_strings' => buddydrive_get_upload_error_strings(), 'allowed_mime_types' => buddydrive_get_allowed_upload_exts()));
 }
 /**
  * The constuctor
  */
 public function __construct()
 {
     parent::__construct(array('action' => 'front_end_upload', 'file_input' => 'front-end-upload', 'base_dir' => 'front-end', 'required_wp_files' => array('file', 'image')));
 }