Changeset 22505 for trunk/wp-admin/custom-header.php
- Timestamp:
- 11/09/2012 11:59:05 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-header.php
r22470 r22505 173 173 if ( ( 1 == $step || 3 == $step ) ) { 174 174 add_thickbox(); 175 wp_enqueue_ script( 'media-upload');175 wp_enqueue_media(); 176 176 wp_enqueue_script( 'custom-header' ); 177 177 if ( current_theme_supports( 'custom-header', 'header-text' ) ) … … 535 535 </p> 536 536 <?php 537 $image_library_url = get_upload_iframe_src( 'image', null, 'library' ); 538 $image_library_url = remove_query_arg( 'TB_iframe', $image_library_url ); 539 $image_library_url = add_query_arg( array( 'context' => 'custom-header', 'TB_iframe' => 1 ), $image_library_url ); 537 $modal_update_href = esc_url( add_query_arg( array( 538 'page' => 'custom-header', 539 'step' => 2, 540 '_wpnonce-custom-header-upload' => wp_create_nonce('custom-header-upload'), 541 ), admin_url('themes.php') ) ); 540 542 ?> 541 543 <p> 542 544 <label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br /> 543 <a id="choose-from-library-link" class="button thickbox" href="<?php echo esc_url( $image_library_url ); ?>"><?php _e( 'Choose Image' ); ?></a> 545 <a id="choose-from-library-link" class="button" 546 data-update-link="<?php echo esc_attr( $modal_update_href ); ?>" 547 data-choose="<?php esc_attr_e( 'Choose a Custom Header' ); ?>" 548 data-update="<?php esc_attr_e( 'Set as header' ); ?>"><?php _e( 'Choose Image' ); ?></a> 544 549 </p> 545 550 </form> … … 747 752 <?php submit_button( __( 'Crop and Publish' ), 'primary', 'submit', false ); ?> 748 753 <?php 749 if ( isset( $oitar ) && 1 == $oitar && ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) ) 754 if ( isset( $oitar ) && 1 == $oitar && ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) ) 750 755 submit_button( __( 'Skip Cropping, Publish Image as Is' ), 'secondary', 'skip-cropping', false ); 751 756 ?> … … 801 806 if ( ! empty( $_POST['skip-cropping'] ) && ! ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) ) 802 807 wp_die( __( 'Cheatin’ uh?' ) ); 803 808 804 809 if ( $_POST['oitar'] > 1 ) { 805 810 $_POST['x1'] = $_POST['x1'] * $_POST['oitar'];
Note: See TracChangeset
for help on using the changeset viewer.