Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.5/wp-includes/media.php

    r23317 r23140  
    736736    $itemtag = tag_escape($itemtag);
    737737    $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 
    747738    $columns = intval($columns);
    748739    $itemwidth = $columns > 0 ? floor(100/$columns) : 100;
     
    14011392
    14021393                // 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                }
    14051401
    14061402                $sizes[ $size ] = array(
     
    14361432 */
    14371433function wp_enqueue_media( $args = array() ) {
    1438 
    1439     // Enqueue me just once per page, please.
    1440     if ( did_action( 'wp_enqueue_media' ) )
    1441         return;
    1442 
    14431434    $defaults = array(
    14441435        'post' => null,
     
    14581449    $tabs = apply_filters( 'media_upload_tabs', $tabs );
    14591450    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     );
    14661451
    14671452    $settings = array(
     
    14761461            'id' => 0,
    14771462        ),
    1478         'defaultProps' => $props,
    14791463    );
    14801464
Note: See TracChangeset for help on using the changeset viewer.