[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-core/classes/ -> class-bp-attachment-cover-image.php (summary)

Core Cover Image attachment class.

File Size: 261 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BP_Attachment_Cover_Image:: (7 methods):
  __construct()
  get_cover_image_types()
  validate_upload()
  upload_dir_filter()
  fit()
  generate_filename()
  script_data()


Class: BP_Attachment_Cover_Image  - X-Ref

BP Attachment Cover Image class.

Extends BP Attachment to manage the cover images uploads.

__construct()   X-Ref
The constuctor.

since: 2.4.0

get_cover_image_types( $allowed_types = array()   X-Ref
Gets the available cover image types.

param: array $allowed_types Array of allowed cover image types.
since: 2.4.0
return: string $value Comma-separated list of allowed cover image types.

validate_upload( $file = array()   X-Ref
Cover image specific rules.

Adds an error if the cover image size or type don't match BuddyPress needs.
The error code is the index of $upload_error_strings.

param: array $file The temporary file attributes (before it has been moved).
since: 2.4.0
return: array $file The file with extra errors if needed.

upload_dir_filter( $upload_dir = array()   X-Ref
Set the directory when uploading a file.

param: array $upload_dir The original Uploads dir.
since: 2.4.0
return: array $value Upload data (path, url, basedir...).

fit( $file = '', $dimensions = array()   X-Ref
Adjust the cover image to fit with advised width & height.

param: string $file       The absolute path to the file.
param: array  $dimensions Array of dimensions for the cover image.
since: 2.4.0
return: mixed

generate_filename( $file = '' )   X-Ref
Generate a filename for the cover image.

param: string $file The absolute path to the file.
since: 2.4.0
return: false|string $value The absolute path to the new file name.

script_data()   X-Ref
Build script datas for the Uploader UI.

since: 2.4.0
return: array The javascript localization data



Generated: Fri Apr 19 01:01:08 2024 Cross-referenced by PHPXref 0.7.1