Changes in branches/3.5/wp-includes/media.php [23140:23317]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.5/wp-includes/media.php
r23140 r23317 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 738 747 $columns = intval($columns); 739 748 $itemwidth = $columns > 0 ? floor(100/$columns) : 100; … … 1392 1401 1393 1402 // We have the actual image size, but might need to further constrain it if content_width is narrower. 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 } 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' ); 1401 1405 1402 1406 $sizes[ $size ] = array( … … 1432 1436 */ 1433 1437 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 1434 1443 $defaults = array( 1435 1444 'post' => null, … … 1449 1458 $tabs = apply_filters( 'media_upload_tabs', $tabs ); 1450 1459 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 default 1464 'size' => get_option( 'image_default_size' ), // empty default 1465 ); 1451 1466 1452 1467 $settings = array( … … 1461 1476 'id' => 0, 1462 1477 ), 1478 'defaultProps' => $props, 1463 1479 ); 1464 1480
Note: See TracChangeset
for help on using the changeset viewer.