Changes in branches/3.5/wp-includes/media.php [23317:23140]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.5/wp-includes/media.php
r23317 r23140 736 736 $itemtag = tag_escape($itemtag); 737 737 $captiontag = tag_escape($captiontag); 738 $icontag = tag_escape($icontag);739 $valid_tags = wp_kses_allowed_html( 'post' );740 if ( ! isset( $valid_tags[ $itemtag ] ) )741 $itemtag = 'dl';742 if ( ! isset( $valid_tags[ $captiontag ] ) )743 $captiontag = 'dd';744 if ( ! isset( $valid_tags[ $icontag ] ) )745 $icontag = 'dt';746 747 738 $columns = intval($columns); 748 739 $itemwidth = $columns > 0 ? floor(100/$columns) : 100; … … 1401 1392 1402 1393 // We have the actual image size, but might need to further constrain it if content_width is narrower. 1403 // Thumbnail, medium, and full sizes are also checked against the site's height/width options. 1404 list( $width, $height ) = image_constrain_size_for_editor( $size_meta['width'], $size_meta['height'], $size, 'edit' ); 1394 // This is not necessary for thumbnails and medium size. 1395 if ( 'thumbnail' == $size || 'medium' == $size ) { 1396 $width = $size_meta['width']; 1397 $height = $size_meta['height']; 1398 } else { 1399 list( $width, $height ) = image_constrain_size_for_editor( $size_meta['width'], $size_meta['height'], $size, 'edit' ); 1400 } 1405 1401 1406 1402 $sizes[ $size ] = array( … … 1436 1432 */ 1437 1433 function wp_enqueue_media( $args = array() ) { 1438 1439 // Enqueue me just once per page, please.1440 if ( did_action( 'wp_enqueue_media' ) )1441 return;1442 1443 1434 $defaults = array( 1444 1435 'post' => null, … … 1458 1449 $tabs = apply_filters( 'media_upload_tabs', $tabs ); 1459 1450 unset( $tabs['type'], $tabs['type_url'], $tabs['gallery'], $tabs['library'] ); 1460 1461 $props = array(1462 'link' => get_option( 'image_default_link_type' ), // db default is 'file'1463 'align' => get_option( 'image_default_align' ), // empty default1464 'size' => get_option( 'image_default_size' ), // empty default1465 );1466 1451 1467 1452 $settings = array( … … 1476 1461 'id' => 0, 1477 1462 ), 1478 'defaultProps' => $props,1479 1463 ); 1480 1464
Note: See TracChangeset
for help on using the changeset viewer.