WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/15/2012 11:53:06 PM (9 years ago)
Author:
koopersmith
Message:

Media: Update in-grid captions.

  • Use input fields instead of textboxes (which provide better handling for smaller attachments).
  • Provide data-setting properties to properly sync the changes.

see #21390.

File:
1 edited

Legend:

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

    r22594 r22603  
    14481448        <# if ( data.describe ) { #>
    14491449            <# if ( 'image' === data.type ) { #>
    1450                 <textarea class="describe"
    1451                     placeholder="<?php esc_attr_e('Describe this image&hellip;'); ?>"
    1452                     >{{ data.caption }}</textarea>
     1450                <input type="text" value="{{ data.caption }}" class="describe" data-setting="caption"
     1451                    placeholder="<?php esc_attr_e('Describe this image&hellip;'); ?>" />
    14531452            <# } else { #>
    1454                 <textarea class="describe"
     1453                <input type="text" value="{{ data.title }}" class="describe" data-setting="title"
    14551454                    <# if ( 'video' === data.type ) { #>
    14561455                        placeholder="<?php esc_attr_e('Describe this video&hellip;'); ?>"
     
    14591458                    <# } else { #>
    14601459                        placeholder="<?php esc_attr_e('Describe this media file&hellip;'); ?>"
    1461                     <# } #>
    1462                     >{{ data.title }}</textarea>
     1460                    <# } #> />
    14631461            <# } #>
    14641462        <# } #>
Note: See TracChangeset for help on using the changeset viewer.