Changeset 10642 for branches/2.5/src/bp-core/bp-core-avatars.php
- Timestamp:
- 03/09/2016 11:41:25 AM (10 years ago)
- File:
-
- 1 edited
-
branches/2.5/src/bp-core/bp-core-avatars.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.5/src/bp-core/bp-core-avatars.php
r10497 r10642 704 704 extract( $args, EXTR_SKIP ); 705 705 706 /** 707 * Filters whether or not to handle deleting an existing avatar. 708 * 709 * If you want to override this function, make sure you return false. 710 * 711 * @since 2.5.1 712 * 713 * @param bool $value Whether or not to delete the avatar. 714 * @param array $args { 715 * Array of function parameters. 716 * 717 * @type bool|int $item_id ID of the item whose avatar you're deleting. 718 * Defaults to the current item of type $object. 719 * @type string $object Object type of the item whose avatar you're 720 * deleting. 'user', 'group', 'blog', or custom. 721 * Default: 'user'. 722 * @type bool|string $avatar_dir Subdirectory where avatar is located. 723 * Default: false, which falls back on the default location 724 * corresponding to the $object. 725 * } 726 */ 727 if ( ! apply_filters( 'bp_core_pre_delete_existing_avatar', true, $args ) ) { 728 return true; 729 } 730 706 731 if ( empty( $item_id ) ) { 707 732 if ( 'user' == $object ) … … 1068 1093 if ( empty( $data ) || empty( $item_id ) ) { 1069 1094 return false; 1095 } 1096 1097 /** 1098 * Filters whether or not to handle avatar webcam capture. 1099 * 1100 * If you want to override this function, make sure you return false. 1101 * 1102 * @since 2.5.1 1103 * 1104 * @param bool $value Whether or not to crop. 1105 * @param string $data Base64 encoded image. 1106 * @param int $item_id Item to associate. 1107 */ 1108 if ( ! apply_filters( 'bp_avatar_pre_handle_capture', true, $data, $item_id ) ) { 1109 return true; 1070 1110 } 1071 1111
Note: See TracChangeset
for help on using the changeset viewer.