Changeset 20884
- Timestamp:
- 05/24/2012 09:03:38 PM (13 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-background.php
r20839 r20884 251 251 <th scope="row"><?php _e('Upload Image'); ?></th> 252 252 <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> 262 269 </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>264 270 </td> 265 271 </tr> -
trunk/wp-admin/custom-header.php
r20839 r20884 580 580 <input type="file" id="upload" name="import" /> 581 581 <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' ); ?> 583 583 <?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?> 584 584 </p> 585 </form>586 585 <?php 587 586 $image_library_url = get_upload_iframe_src( 'image', null, 'library' ); … … 589 588 $image_library_url = add_query_arg( array( 'context' => 'custom-header', 'TB_iframe' => 1 ), $image_library_url ); 590 589 ?> 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> 592 595 </td> 593 596 </tr>
Note: See TracChangeset
for help on using the changeset viewer.