[wp-trac] [WordPress Trac] #21390: Upload/Insert media revamp

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 31 04:54:26 UTC 2012


#21390: Upload/Insert media revamp
----------------------------+--------------------------
 Reporter:  nacin           |       Owner:  koopersmith
     Type:  task (blessed)  |      Status:  accepted
 Priority:  normal          |   Milestone:  3.5
Component:  Media           |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |
----------------------------+--------------------------

Comment (by koopersmith):

 In [21683]:
 {{{
 #!CommitTicketReference repository="" revision="21683"
 Add new media workflow scripts, styles, and templates.


 Please note that this commit does not integrate media into the existing
 UI. If you would like to see the new UI, navigate to the post editor and
 run the following in your browser's Javascript console:

         new wp.media.controller.Workflow().render().modal.open();


 The Javascript is broken up into two files, with the slugs media-models
 and media-views.

 * media-models: The models are UI agnostic, and can be used independent of
 the views. If you'd like to create custom UIs, this is the script for you.

 * media-views: This is the Media Experience. The views (and controllers)
 depend on the models (which are listed as a dependency and will
 automatically be included thanks to wp_enqueue_script). The views also
 require the media templates, media-view styles, and the plupload bridge
 settings. Perhaps we should create a function to include the whole
 shebang, but in the meantime...

 To include media-views in the admin, run the following PHP in or after
 'admin_enqueue_scripts':

         wp_enqueue_script( 'media-views' );
         wp_enqueue_style( 'media-views' );
         wp_plupload_default_settings();
         add_action( 'admin_footer', 'wp_print_media_templates' );

 see #21390.
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21390#comment:34>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list