Skip to:
Content

BuddyPress.org

Timestamp:
04/16/2015 10:25:09 PM (5 years ago)
Author:
imath
Message:

Avatar UI: Add BuddyPress Attachments specific functions.

  • bp_attachments_enqueue_scripts() requires one parameter the name of the class you are using to extend BP_Attachment, eg: BP_Attachment_Avatar. It will use the class script_data() method to finish building the Plupload settings and strings. It also makes sure the script are only loaded once per page load.
  • bp_attachments_current_user_can() is used to check the current user capabilities in front-end and back-end.
  • bp_attachments_json_response() is a wrapper of WordPress json response function that makes sure the json response is correctly sent for html5 or html4 uploads.
  • bp_attachments_get_template_part() is used to safely load our Backbone templates into the administration screens or use bp_get_template_part() when on front-end.

Props boonebgorges, DJPaul, johnjamesjacoby.

See #6290

File:
1 added

Note: See TracChangeset for help on using the changeset viewer.