Make WordPress Core

Changeset 22556


Ignore:
Timestamp:
11/13/2012 01:23:18 AM (12 years ago)
Author:
koopersmith
Message:

Media: Improve backwards compatibility for image_size_names_choose filter. see #22186, #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r22552 r22556  
    15881588                        'medium'    => __('Medium'),
    15891589                        'large'     => __('Large'),
     1590                        'full'      => __('Full Size'),
    15901591                    ) );
    15911592
    1592                     foreach ( $sizes as $value => $name ) : ?>
     1593                    foreach ( $sizes as $value => $name ) :
     1594                        if ( 'full' === $name )
     1595                            continue;
     1596                        ?>
    15931597                        <# if ( sizes['<?php echo esc_js( $value ); ?>'] ) { #>
    15941598                            <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, 'medium' ); ?>>
     
    15961600                            </option>
    15971601                        <# } #>>
    1598                     <?php endforeach; ?>
    1599 
    1600                     <option value="full">
    1601                         <?php echo esc_html_e( 'Full Size' ); ?>
    1602                     </option>
     1602                    <?php endforeach;
     1603
     1604                    if ( ! empty( $sizes['full'] ) ) : ?>
     1605                        <option value="full">
     1606                            <?php echo esc_html( $sizes['full'] ); ?>
     1607                        </option>
     1608                    <?php endif; ?>
    16031609                </select>
    16041610            </label>
Note: See TracChangeset for help on using the changeset viewer.