[buddypress-trac] [BuddyPress Trac] #6278: Attachment Library

buddypress-trac noreply at wordpress.org
Thu Mar 5 18:24:29 UTC 2015


#6278: Attachment Library
------------------------------------+------------------
 Reporter:  imath                   |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  2.3
Component:  API                     |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------

Comment (by imath):

 with 6278.05.patch, uploading an avatar looks like

 {{{
 // Upload the file
 $avatar_attachment = new BP_Attachment_Avatar();
 $bp->avatar_admin->original = $avatar_attachment->upload( $file,
 $upload_dir_filter );
 }}}

 I've reverted {{{bp_core_set_avatar_globals()}}} the way it was before, so
 removed the unit test.
 I've reverted most of the `bp_core_get_upload_dir()` code except that it's
 now using a new function that can be used by any component:
 bp_upload_dir();

 And @johnjamesjacoby, we need the switch_blog() dance because when on a
 multisite, bp_core_fetch_avatar() is using `bp_core_get_upload_dir()`

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6278#comment:19>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list