groups_screen_group_admin_avatar

  • do_action( 'groups_screen_group_admin_avatar', $bp->groups->current_group->id )

    Source Reference:

    • Component: BuddyPress:: bp-groups
      File: /bp-groups/bp-groups-screens.php :: Trac Source Line: 594
      			check_admin_referer( 'bp_avatar_cropstore' );
      
      			if ( !bp_core_avatar_handle_crop( array( 'object' => 'group', 'avatar_dir' => 'group-avatars', 'item_id' => $bp->groups->current_group->id, 'original_file' => $_POST['image_src'], 'crop_x' => $_POST['x'], 'crop_y' => $_POST['y'], 'crop_w' => $_POST['w'], 'crop_h' => $_POST['h'] ) ) )
      				bp_core_add_message( __( 'There was a problem cropping the avatar, please try uploading it again', 'buddypress' ) );
      			else
      				bp_core_add_message( __( 'The new group avatar was uploaded successfully!', 'buddypress' ) );
      
      		}
      
      		do_action( 'groups_screen_group_admin_avatar', $bp->groups->current_group->id );
      
      		bp_core_load_template( apply_filters( 'groups_template_group_admin_avatar', 'groups/single/home' ) );
      	}
      }
      add_action( 'bp_screens', 'groups_screen_group_admin_avatar' );
      
      /**
       * This function handles actions related to member management on the group admin.
       *
       * @package BuddyPress
      

Comments are closed.