Changeset 22761
- Timestamp:
- 11/21/2012 02:27:22 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/media-upload.js
r22760 r22761 119 119 120 120 if ( attachment ) { 121 attachment = attachment.toJSON();122 123 121 _.extend( props, { 124 122 title: attachment.title || attachment.filename, … … 154 152 155 153 if ( attachment ) { 156 attachment = attachment.toJSON();157 158 154 classes.push( 'wp-image-' + attachment.id ); 159 155 … … 398 394 delete details[ attachment.cid ]; 399 395 400 if ( 'image' === attachment.get('type') ) 396 attachment = attachment.toJSON(); 397 398 // If captions are disabled, clear the caption. 399 if ( ! wp.media.view.settings.captions ) 400 delete attachment.caption; 401 402 if ( 'image' === attachment.type ) 401 403 this.insert( wp.media.string.image( detail, attachment ) + ' ' ); 402 404 else -
trunk/wp-includes/media.php
r22747 r22761 1328 1328 'tabUrl' => add_query_arg( array( 'chromeless' => true ), admin_url('media-upload.php') ), 1329 1329 'mimeTypes' => wp_list_pluck( get_post_mime_types(), 0 ), 1330 'captions' => ! apply_filters( 'disable_captions', '' ), 1330 1331 ); 1331 1332 … … 1692 1693 </div> 1693 1694 1694 <label class="setting caption"> 1695 <span><?php _e('Caption'); ?></span> 1696 <textarea data-setting="caption" /> 1697 </label> 1695 <?php if ( ! apply_filters( 'disable_captions', '' ) ) : ?> 1696 <label class="setting caption"> 1697 <span><?php _e('Caption'); ?></span> 1698 <textarea data-setting="caption" /> 1699 </label> 1700 <?php endif; ?> 1698 1701 1699 1702 <label class="setting alt-text">
Note: See TracChangeset
for help on using the changeset viewer.