Make WordPress Core


Ignore:
Timestamp:
11/07/2012 08:14:41 PM (12 years ago)
Author:
koopersmith
Message:

Media: Integrate the gallery workflow with the media menu.

wp.media.model.Query.more()

  • If a request has already been sent out for more attachments, return that request object instead of creating another.

wp.media.controller.Region

  • A region allows views to be swapped in and out of a section of the page without either view having to know about the other.
  • Application components can use the same callbacks and resources by leveraging Region.mode(), which triggers a set of callbacks to create or transform the current view, but only if necessary.

wp.media.view.Frame

  • Leverage Region controllers instead of forcing states to swap view objects, which causes states to fit more comfortably in the controller-camp.
  • Add previous(), a method to fetch the previous state id.
  • Separate out the default settings over several objects (so blank frames can be instantiated).

wp.media.view.MediaFrame

  • The base Frame used for media management: handles integration with the Modal and UploaderWindow views.

wp.media.view.MediaFrame.Post

  • Includes all default media states and callbacks necessary for inserting media into a post.

see #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r22415 r22437  
    14151415
    14161416    <script type="text/html" id="tmpl-attachment-display-settings">
     1417        <h3><?php _e('Attachment Display Settings'); ?></h3>
     1418
    14171419        <h4><?php _e('Alignment'); ?></h4>
    14181420        <div class="alignment button-group button-large" data-setting="align">
     
    14461448
    14471449    <script type="text/html" id="tmpl-gallery-settings">
     1450        <h3><?php _e('Gallery Settings'); ?></h3>
     1451
    14481452        <h4><?php _e('Link To'); ?></h4>
    14491453        <div class="link-to button-group" data-setting="link">
     
    14591463
    14601464        <select class="columns" name="columns" data-setting="columns">
    1461             <?php for( $i = 1; $i <= 9; $i++ ) : ?>
     1465            <?php for ( $i = 1; $i <= 9; $i++ ) : ?>
    14621466                <option value="<?php echo esc_attr( $i ); ?>">
    14631467                    <?php echo esc_html( $i ); ?>
Note: See TracChangeset for help on using the changeset viewer.