Changeset 23262
- Timestamp:
- 01/04/2013 08:02:16 AM (12 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/media-editor.js
r23247 r23262 10 10 // attachment's type. 11 11 props: function( props, attachment ) { 12 var link, linkUrl, size, sizes, fallbacks; 12 var link, linkUrl, size, sizes, fallbacks, 13 defaultProps = wp.media.view.settings.defaultProps; 13 14 14 15 // Final fallbacks run after all processing has been completed. … … 30 31 if ( 'image' === props.type ) { 31 32 props = _.defaults( props || {}, { 32 align: getUserSetting( 'align', 'none' ),33 size: getUserSetting( 'imgsize', 'medium' ),33 align: defaultProps.align || getUserSetting( 'align', 'none' ), 34 size: defaultProps.size || getUserSetting( 'imgsize', 'medium' ), 34 35 url: '', 35 36 classes: [] … … 43 44 props.title = props.title || attachment.title; 44 45 45 link = props.link || getUserSetting( 'urlbutton', 'post' );46 link = props.link || defaultProps.link || getUserSetting( 'urlbutton', 'file' ); 46 47 if ( 'file' === link ) 47 48 linkUrl = attachment.url; -
trunk/wp-includes/js/media-views.js
r23261 r23262 439 439 440 440 resetDisplays: function() { 441 var defaultProps = media.view.settings.defaultProps; 441 442 this._displays = []; 442 443 this._defaultDisplaySettings = { 443 align: getUserSetting( 'align', 'none' ),444 size: getUserSetting( 'imgsize', 'medium' ),445 link: getUserSetting( 'urlbutton', 'post' )444 align: defaultProps.align || getUserSetting( 'align', 'none' ), 445 size: defaultProps.size || getUserSetting( 'imgsize', 'medium' ), 446 link: defaultProps.link || getUserSetting( 'urlbutton', 'file' ) 446 447 }; 447 448 }, -
trunk/wp-includes/media-template.php
r23135 r23262 292 292 <?php esc_attr_e('Custom URL'); ?> 293 293 </option> 294 <option value="post" selected> 294 <option value="file" selected> 295 <?php esc_attr_e('Media File'); ?> 296 </option> 297 <option value="post"> 295 298 <?php esc_attr_e('Attachment Page'); ?> 296 </option>297 <option value="file">298 <?php esc_attr_e('Media File'); ?>299 299 </option> 300 300 <option value="none"> … … 348 348 <# } #>> 349 349 350 <option value="post" selected> 350 <option value="file" selected> 351 <?php esc_attr_e('Media File'); ?> 352 </option> 353 <option value="post"> 351 354 <?php esc_attr_e('Attachment Page'); ?> 352 </option>353 <option value="file">354 <?php esc_attr_e('Media File'); ?>355 355 </option> 356 356 </select> -
trunk/wp-includes/media.php
r23214 r23262 1455 1455 unset( $tabs['type'], $tabs['type_url'], $tabs['gallery'], $tabs['library'] ); 1456 1456 1457 $props = array( 1458 'link' => get_option( 'image_default_link_type' ), // db default is 'file' 1459 'align' => get_option( 'image_default_align' ), // empty default 1460 'size' => get_option( 'image_default_size' ), // empty default 1461 ); 1462 1457 1463 $settings = array( 1458 1464 'tabs' => $tabs, … … 1466 1472 'id' => 0, 1467 1473 ), 1474 'defaultProps' => $props, 1468 1475 ); 1469 1476
Note: See TracChangeset
for help on using the changeset viewer.