Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/16/2015 10:25:09 PM (9 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 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-loader.php

    r9739 r9756  
    452452
    453453        // Require all of the BuddyPress core libraries
    454         require( $this->plugin_dir . 'bp-core/bp-core-dependency.php' );
    455         require( $this->plugin_dir . 'bp-core/bp-core-actions.php'    );
    456         require( $this->plugin_dir . 'bp-core/bp-core-caps.php'       );
    457         require( $this->plugin_dir . 'bp-core/bp-core-cache.php'      );
    458         require( $this->plugin_dir . 'bp-core/bp-core-cssjs.php'      );
    459         require( $this->plugin_dir . 'bp-core/bp-core-update.php'     );
    460         require( $this->plugin_dir . 'bp-core/bp-core-options.php'    );
    461         require( $this->plugin_dir . 'bp-core/bp-core-classes.php'    );
    462         require( $this->plugin_dir . 'bp-core/bp-core-taxonomy.php'   );
    463         require( $this->plugin_dir . 'bp-core/bp-core-filters.php'    );
    464         require( $this->plugin_dir . 'bp-core/bp-core-avatars.php'    );
    465         require( $this->plugin_dir . 'bp-core/bp-core-widgets.php'    );
    466         require( $this->plugin_dir . 'bp-core/bp-core-template.php'   );
    467         require( $this->plugin_dir . 'bp-core/bp-core-adminbar.php'   );
    468         require( $this->plugin_dir . 'bp-core/bp-core-buddybar.php'   );
    469         require( $this->plugin_dir . 'bp-core/bp-core-catchuri.php'   );
    470         require( $this->plugin_dir . 'bp-core/bp-core-component.php'  );
    471         require( $this->plugin_dir . 'bp-core/bp-core-functions.php'  );
    472         require( $this->plugin_dir . 'bp-core/bp-core-moderation.php' );
    473         require( $this->plugin_dir . 'bp-core/bp-core-loader.php'     );
     454        require( $this->plugin_dir . 'bp-core/bp-core-dependency.php'  );
     455        require( $this->plugin_dir . 'bp-core/bp-core-actions.php'     );
     456        require( $this->plugin_dir . 'bp-core/bp-core-caps.php'        );
     457        require( $this->plugin_dir . 'bp-core/bp-core-cache.php'       );
     458        require( $this->plugin_dir . 'bp-core/bp-core-cssjs.php'       );
     459        require( $this->plugin_dir . 'bp-core/bp-core-update.php'      );
     460        require( $this->plugin_dir . 'bp-core/bp-core-options.php'     );
     461        require( $this->plugin_dir . 'bp-core/bp-core-classes.php'     );
     462        require( $this->plugin_dir . 'bp-core/bp-core-taxonomy.php'    );
     463        require( $this->plugin_dir . 'bp-core/bp-core-filters.php'     );
     464        require( $this->plugin_dir . 'bp-core/bp-core-attachments.php' );
     465        require( $this->plugin_dir . 'bp-core/bp-core-avatars.php'     );
     466        require( $this->plugin_dir . 'bp-core/bp-core-widgets.php'     );
     467        require( $this->plugin_dir . 'bp-core/bp-core-template.php'    );
     468        require( $this->plugin_dir . 'bp-core/bp-core-adminbar.php'    );
     469        require( $this->plugin_dir . 'bp-core/bp-core-buddybar.php'    );
     470        require( $this->plugin_dir . 'bp-core/bp-core-catchuri.php'    );
     471        require( $this->plugin_dir . 'bp-core/bp-core-component.php'   );
     472        require( $this->plugin_dir . 'bp-core/bp-core-functions.php'   );
     473        require( $this->plugin_dir . 'bp-core/bp-core-moderation.php'  );
     474        require( $this->plugin_dir . 'bp-core/bp-core-loader.php'      );
    474475
    475476        // Skip or load deprecated content
Note: See TracChangeset for help on using the changeset viewer.