[ Index ] |
PHP Cross Reference of BuddyPress |
[Source view] [Print] [Project Stats]
Core Avatars attachment class.
File Size: | 491 lines (14 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
BP_Attachment_Avatar:: (10 methods):
__construct()
get_avatar_types()
set_upload_dir()
validate_upload()
shrink()
is_too_small()
crop()
get_user_id()
get_group_id()
script_data()
Class: BP_Attachment_Avatar - X-Ref
BP Attachment Avatar class.__construct() X-Ref |
Construct Upload parameters. since: 2.3.0 |
get_avatar_types( $allowed_types = array() X-Ref |
Gets the available avatar types. return: string comma separated list of allowed avatar types. param: array $allowed_types Array of allowed avatar types. since: 2.3.0 |
set_upload_dir() X-Ref |
Set Upload Dir data for avatars. since: 2.3.0 |
validate_upload( $file = array() X-Ref |
Avatar specific rules. Adds an error if the avatar size or type don't match BuddyPress needs. The error code is the index of $upload_error_strings. return: array the file with extra errors if needed. param: array $file the temporary file attributes (before it has been moved). since: 2.3.0 |
shrink( $file = '', $ui_available_width = 0 ) X-Ref |
Maybe shrink the attachment to fit maximum allowed width. return: false|string|WP_Image_Editor|WP_Error param: string $file The absolute path to the file. param: int $ui_available_width Available width for the UI. since: 2.3.0 since: 2.4.0 Add the $ui_available_width parameter, to inform about the Avatar UI width. |
is_too_small( $file = '' ) X-Ref |
Check if the image dimensions are smaller than full avatar dimensions. return: bool param: string $file the absolute path to the file. since: 2.3.0 |
crop( $args = array() X-Ref |
Crop the avatar. return: array The cropped avatars (full, thumb and the timestamp). param: array $args Array of arguments for the cropping. since: 2.3.0 |
get_user_id() X-Ref |
Get the user id to set its avatar. return: integer The user ID. since: 2.3.0 |
get_group_id() X-Ref |
Get the group id to set its avatar. return: integer The group ID. since: 2.3.0 |
script_data() X-Ref |
Build script data for the Uploader UI. return: array The javascript localization data. since: 2.3.0 |
Generated: Thu Nov 21 01:00:57 2024 | Cross-referenced by PHPXref 0.7.1 |