WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/05/2015 05:59:10 AM (6 years ago)
Author:
wonderboymusic
Message:

Allow inline editing of width and height parameters while previewing an embed in the media modal:

  • Use wp.shortcode() instead of manually constructing a shortcode in views/embed/link
  • Allow a URL to transition to a shortcode (and vice versa) when returning an embed to TinyMCE
  • In WP_Embed, store the last URL and last set of attributes requested in class properties
  • wp_ajax_parse_embed(), allow [embed]s to have attributes. Return attr in the response.

This is a first pass to allow broad testing with recent MCE view changes.

See #31139.

File:
1 edited

Legend:

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

    r31619 r31620  
    820820            <input type="text" class="alignment" data-setting="title" />
    821821        </label>
     822        <div class="embed-link-dimensions">
     823            <label class="setting width">
     824                <span><?php _e( 'Maximum Width' ); ?></span>
     825                <input type="text" class="alignment" data-setting="width" />
     826            </label>
     827            <label class="setting height">
     828                <span><?php _e( 'Maximum Height' ); ?></span>
     829                <input type="text" class="alignment" data-setting="height" />
     830            </label>
     831        </div>
    822832        <div class="embed-container" style="display: none;">
    823833            <div class="embed-preview"></div>
Note: See TracChangeset for help on using the changeset viewer.