Permalink
Browse files

Hookable Uploader

Assign the wp.Uploader into a variable that is available to have
properties and methods overridden in order ot provide custom
functionality around the uploader.
  • Loading branch information...
1 parent 6f0857f commit 212e64d022ae0eee650f0b4800c3e23385e68f95 @zbtirrell zbtirrell committed Aug 30, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 js/plupload.js
  2. +1 −1 liveblog.php
View
@@ -1,5 +1,5 @@
jQuery(document).ready(function($) {
- new wp.Uploader({
+ liveblog.uploader = new wp.Uploader({
   /* Selectors */
browser: '#liveblog-messages',
View
@@ -436,7 +436,7 @@ public static function enqueue_scripts() {
if ( self::current_user_can_edit_liveblog() ) {
wp_enqueue_script( 'liveblog-publisher', plugins_url( 'js/liveblog-publisher.js', __FILE__ ), array( self::key, 'jquery-ui-tabs' ), self::version, true );
- wp_enqueue_script( 'liveblog-plupload', plugins_url( 'js/plupload.js', __FILE__ ), array( 'wp-plupload', 'jquery' ) );
+ wp_enqueue_script( 'liveblog-plupload', plugins_url( 'js/plupload.js', __FILE__ ), array( self::key, 'wp-plupload', 'jquery' ) );
self::add_default_plupload_settings();
}

0 comments on commit 212e64d

Please sign in to comment.