Ticket #20855: 20855.2.diff
File 20855.2.diff, 3.7 KB (added by , 12 years ago) |
---|
-
wp-admin/custom-background.php
256 256 <th scope="row"><?php _e('Select Image'); ?></th> 257 257 <td><form enctype="multipart/form-data" id="upload-form" method="post" action=""> 258 258 <p> 259 <input type="hidden" name="action" value="save" /> 260 <?php wp_nonce_field( 'custom-background-upload', '_wpnonce-custom-background-upload' ); ?> 259 261 <label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br /> 260 262 <input type="file" id="upload" name="import" /> 261 <input type="hidden" name="action" value="save" /> 262 <?php wp_nonce_field( 'custom-background-upload', '_wpnonce-custom-background-upload' ); ?> 263 <?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?> 263 <?php submit_button( __( 'Upload' ), 'button hide-if-js', 'submit', false ); ?> 264 264 </p> 265 265 <?php 266 266 $image_library_url = get_upload_iframe_src( 'image', null, 'library' ); -
wp-admin/custom-header.php
554 554 ?></p> 555 555 <form enctype="multipart/form-data" id="upload-form" method="post" action="<?php echo esc_attr( add_query_arg( 'step', 2 ) ) ?>"> 556 556 <p> 557 <input type="hidden" name="action" value="save" /> 558 <?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ); ?> 557 559 <label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br /> 558 560 <input type="file" id="upload" name="import" /> 559 <input type="hidden" name="action" value="save" /> 560 <?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ); ?> 561 <?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?> 561 <?php submit_button( __( 'Upload' ), 'button hide-if-js', 'submit', false ); ?> 562 562 </p> 563 563 <?php 564 564 $image_library_url = get_upload_iframe_src( 'image', null, 'library' ); -
wp-admin/js/custom-background.js
61 61 $(this).fadeOut(2); 62 62 }); 63 63 }); 64 65 $(document).ready(function() { 66 $('#upload').change(function() { 67 var submit = $(this).next('input[type="submit"]'); 68 ( '' === $(this).val() ) ? $(submit).hide() : $(submit).show(); 69 }); 70 }); 64 71 }); 65 72 66 73 })(jQuery); 74 No newline at end of file -
wp-admin/js/custom-header.js
1 (function($) { 2 3 $(document).ready(function() { 4 $('#upload').change(function() { 5 var submit = $(this).next('input[type="submit"]'); 6 ( '' === $(this).val() ) ? $(submit).hide() : $(submit).show(); 7 }); 8 }); 9 10 })(jQuery); 11 No newline at end of file -
wp-includes/script-loader.php
429 429 'saveAlert' => __('The changes you made will be lost if you navigate away from this page.') 430 430 ) ); 431 431 432 $scripts->add( 'custom-header', "/wp-admin/js/custom-header$suffix.js", array('jquery'), false, 1 ); 432 433 $scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array('farbtastic'), false, 1 ); 433 434 $scripts->add( 'media-gallery', "/wp-admin/js/media-gallery$suffix.js", array('jquery'), false, 1 ); 434 435 }