Changeset 12555 for trunk/src/bp-core/bp-core-avatars.php
- Timestamp:
- 02/29/2020 03:38:06 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-avatars.php
r12536 r12555 1006 1006 $needs_reset = array(); 1007 1007 1008 if ( 'user' === $bp_params['object'] && bp_is_active( ' xprofile' ) ) {1009 $bp_params['upload_dir_filter'] = ' xprofile_avatar_upload_dir';1008 if ( 'user' === $bp_params['object'] && bp_is_active( 'members' ) ) { 1009 $bp_params['upload_dir_filter'] = 'bp_members_avatar_upload_dir'; 1010 1010 1011 1011 if ( ! bp_displayed_user_id() && ! empty( $bp_params['item_id'] ) ) { … … 1298 1298 ); 1299 1299 1300 /** This action is documented in wp-includes/deprecated.php */ 1301 do_action_deprecated( 'xprofile_avatar_uploaded', array( (int) $avatar_data['item_id'], $avatar_data['type'], $avatar_data ), '6.0.0', 'bp_members_avatar_uploaded' ); 1302 1300 1303 /** 1301 1304 * Fires if the new avatar was successfully captured. 1302 1305 * 1303 * @since 1.1.0 Used to inform the avatar was successfully cropped 1304 * @since 2.3.4 Add two new parameters to inform about the user id and 1305 * about the way the avatar was set (eg: 'crop' or 'camera') 1306 * Move the action at the right place, once the avatar is set 1307 * @since 2.8.0 Added the `$avatar_data` parameter. 1306 * @since 6.0.0 1308 1307 * 1309 1308 * @param string $item_id Inform about the user id the avatar was set for. … … 1311 1310 * @param array $avatar_data Array of parameters passed to the avatar handler. 1312 1311 */ 1313 do_action( ' xprofile_avatar_uploaded', (int) $avatar_data['item_id'], $avatar_data['type'], $avatar_data );1312 do_action( 'bp_members_avatar_uploaded', (int) $avatar_data['item_id'], $avatar_data['type'], $avatar_data ); 1314 1313 1315 1314 wp_send_json_success( $return ); … … 1356 1355 1357 1356 if ( 'user' === $avatar_data['object'] ) { 1357 /** This action is documented in wp-includes/deprecated.php */ 1358 do_action_deprecated( 'xprofile_avatar_uploaded', array( (int) $avatar_data['item_id'], $avatar_data['type'], $r ), '6.0.0', 'bp_members_avatar_uploaded' ); 1359 1358 1360 /** This action is documented in bp-core/bp-core-avatars.php */ 1359 do_action( ' xprofile_avatar_uploaded', (int) $avatar_data['item_id'], $avatar_data['type'], $r );1361 do_action( 'bp_members_avatar_uploaded', (int) $avatar_data['item_id'], $avatar_data['type'], $r ); 1360 1362 } elseif ( 'group' === $avatar_data['object'] ) { 1361 1363 /** This action is documented in bp-groups/bp-groups-screens.php */ … … 1937 1939 $retval = false; 1938 1940 1939 // No need to carry on if the current WordPress version is not supported.1940 if ( ! bp_attachments_is_wp_version_supported() ) {1941 return $retval;1942 }1943 1944 1941 if ( bp_is_user_change_avatar() && 'crop-image' !== bp_get_avatar_admin_step() ) { 1945 1942 $retval = ! bp_core_get_root_option( 'bp-disable-avatar-uploads' );
Note: See TracChangeset
for help on using the changeset viewer.