WordPress.org

Make WordPress Core

Ticket #20737: 20737.4.2.diff

File 20737.4.2.diff, 3.7 KB (added by SergeyBiryukov, 2 years ago)
  • wp-admin/custom-background.php

     
    250250<tr valign="top"> 
    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> 
    266272</tbody> 
  • wp-admin/custom-header.php

     
    579579                <label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br /> 
    580580                <input type="file" id="upload" name="import" /> 
    581581                <input type="hidden" name="action" value="save" /> 
    582                 <?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ) ?> 
     582                <?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ); ?> 
    583583                <?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?> 
    584584        </p> 
    585         </form> 
    586585        <?php 
    587586                $image_library_url = get_upload_iframe_src( 'image', null, 'library' ); 
    588587                $image_library_url = remove_query_arg( 'TB_iframe', $image_library_url ); 
    589588                $image_library_url = add_query_arg( array( 'context' => 'custom-header', 'TB_iframe' => 1 ), $image_library_url ); 
    590589        ?> 
    591         <span class="howto"><?php _ex( 'or', 'Custom Header: 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> 
     590        <p> 
     591                <label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br /> 
     592                <a id="choose-from-library-link" class="button thickbox" href="<?php echo esc_url( $image_library_url ); ?>"><?php _e( 'Choose Image' ); ?></a> 
     593        </p> 
     594        </form> 
    592595</td> 
    593596</tr> 
    594597<?php endif; ?>