Make WordPress Core


Ignore:
Timestamp:
05/24/2012 09:03:38 PM (14 years ago)
Author:
ryan
Message:

Improve appearance of "choose from library" link for headers and backgrounds. Props SergeyBiryukov, sabreuse. see #20737

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/custom-background.php

    r20839 r20884  
    251251<th scope="row"><?php _e('Upload Image'); ?></th>
    252252<td><form enctype="multipart/form-data" id="upload-form" method="post" action="">
    253 <label for="upload"><?php _e('Choose an image from your computer:'); ?></label><br /><input type="file" id="upload" name="import" />
    254 <input type="hidden" name="action" value="save" />
    255 <?php wp_nonce_field('custom-background-upload', '_wpnonce-custom-background-upload') ?>
    256 <?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?>
    257 <?php
    258         $image_library_url = get_upload_iframe_src( 'image', null, 'library' );
    259         $image_library_url = remove_query_arg( 'TB_iframe', $image_library_url );
    260         $image_library_url = add_query_arg( array( 'context' => 'custom-background', 'TB_iframe' => 1 ), $image_library_url );
    261 ?>
     253        <p>
     254                <label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br />
     255                <input type="file" id="upload" name="import" />
     256                <input type="hidden" name="action" value="save" />
     257                <?php wp_nonce_field( 'custom-background-upload', '_wpnonce-custom-background-upload' ); ?>
     258                <?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?>
     259        </p>
     260        <?php
     261                $image_library_url = get_upload_iframe_src( 'image', null, 'library' );
     262                $image_library_url = remove_query_arg( 'TB_iframe', $image_library_url );
     263                $image_library_url = add_query_arg( array( 'context' => 'custom-background', 'TB_iframe' => 1 ), $image_library_url );
     264        ?>
     265        <p>
     266                <label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
     267                <a id="choose-from-library-link" class="button thickbox" href="<?php echo esc_url( $image_library_url ); ?>"><?php _e( 'Choose Image' ); ?></a>
     268        </p>
    262269        </form>
    263         <span class="howto"><?php _ex( 'or', 'Custom Background: Choose an image from your computer - or - Choose from image library' ); ?></span> <a id="choose-from-library-link" class="thickbox" href="<?php echo $image_library_url; ?>"><?php _e( 'Choose from image library' ); ?></a>
    264270</td>
    265271</tr>
Note: See TracChangeset for help on using the changeset viewer.