Ticket #20855: 20855.8.diff
File 20855.8.diff, 5.8 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/plugin-install.php
142 142 */ 143 143 function install_plugins_upload( $page = 1 ) { 144 144 ?> 145 <h4><?php _e('Install a plugin in .zip format') ?></h4>146 <p class="install-help"><?php _e('If you have a plugin in a .zip format, you may install it by uploading it here.') ?></p>147 <form method="post" enctype="multipart/form-data" action="<?php echo self_admin_url('update.php?action=upload-plugin')?>">148 <?php wp_nonce_field( 'plugin-upload') ?>145 <h4><?php _e('Install a plugin in .zip format'); ?></h4> 146 <p class="install-help"><?php _e('If you have a plugin in a .zip format, you may install it by uploading it here.'); ?></p> 147 <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url('update.php?action=upload-plugin'); ?>"> 148 <?php wp_nonce_field( 'plugin-upload'); ?> 149 149 <label class="screen-reader-text" for="pluginzip"><?php _e('Plugin zip file'); ?></label> 150 150 <input type="file" id="pluginzip" name="pluginzip" /> 151 < input type="submit" class="button" value="<?php esc_attr_e('Install Now') ?>" />151 <?php submit_button( __( 'Install Now' ), 'button', 'install-plugin-submit', false ); ?> 152 152 </form> 153 153 <?php 154 154 } -
wp-admin/includes/theme-install.php
134 134 135 135 function install_themes_upload($page = 1) { 136 136 ?> 137 <h4><?php _e('Install a theme in .zip format') ?></h4>138 <p class="install-help"><?php _e('If you have a theme in a .zip format, you may install it by uploading it here.') ?></p>139 <form method="post" enctype="multipart/form-data" action="<?php echo self_admin_url('update.php?action=upload-theme')?>">140 <?php wp_nonce_field( 'theme-upload') ?>137 <h4><?php _e('Install a theme in .zip format'); ?></h4> 138 <p class="install-help"><?php _e('If you have a theme in a .zip format, you may install it by uploading it here.'); ?></p> 139 <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url('update.php?action=upload-theme'); ?>"> 140 <?php wp_nonce_field( 'theme-upload'); ?> 141 141 <input type="file" name="themezip" /> 142 142 <?php submit_button( __( 'Install Now' ), 'button', 'install-theme-submit', false ); ?> 143 143 </form> -
wp-admin/includes/template.php
787 787 <p><strong><?php echo $upload_dir['error']; ?></strong></p></div><?php 788 788 else : 789 789 ?> 790 <form enctype="multipart/form-data" id="import-upload-form" method="post" action="<?php echo esc_attr(wp_nonce_url($action, 'import-upload')); ?>">790 <form enctype="multipart/form-data" id="import-upload-form" method="post" class="wp-upload-form" action="<?php echo esc_attr(wp_nonce_url($action, 'import-upload')); ?>"> 791 791 <p> 792 792 <label for="upload"><?php _e( 'Choose a file from your computer:' ); ?></label> (<?php printf( __('Maximum size: %s' ), $size ); ?>) 793 793 <input type="file" id="upload" name="import" size="25" /> -
wp-admin/js/common.js
161 161 162 162 $(document).ready( function() { 163 163 var lastClicked = false, checks, first, last, checked, menu = $('#adminmenu'), 164 pageInput = $('input.current-page'), currentPage = pageInput.val(); 164 pageInput = $('input.current-page'), currentPage = pageInput.val(), 165 uploadButton = $('.wp-upload-form input[type="submit"]'), 166 fileInput = uploadButton.closest('form').find('input[type="file"]'); 165 167 166 168 // when the menu is folded, make the fly-out submenu header clickable 167 169 menu.on('click.wp-submenu-head', '.wp-submenu-head', function(e){ … … 369 371 $(document).on('click.wp-accessibility-blur', 'a', function() { 370 372 $(this).blur(); 371 373 }); 374 375 // Disable submit button if no file was selected. 376 toggleUploadButton = function() { 377 uploadButton.prop( 'disabled', '' === fileInput.val() ); 378 }; 379 toggleUploadButton(); 380 fileInput.on( 'change', toggleUploadButton ); 372 381 }); 373 382 374 383 // internal use -
wp-admin/custom-header.php
525 525 printf( __( 'Suggested height is <strong>%1$d pixels</strong>.' ) . ' ', get_theme_support( 'custom-header', 'height' ) ); 526 526 } 527 527 ?></p> 528 <form enctype="multipart/form-data" id="upload-form" method="post" action="<?php echo esc_attr( add_query_arg( 'step', 2 ) ) ?>">528 <form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post" action="<?php echo esc_attr( add_query_arg( 'step', 2 ) ) ?>"> 529 529 <p> 530 530 <label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br /> 531 531 <input type="file" id="upload" name="import" /> -
wp-admin/custom-background.php
254 254 <?php endif; ?> 255 255 <tr valign="top"> 256 256 <th scope="row"><?php _e('Select Image'); ?></th> 257 <td><form enctype="multipart/form-data" id="upload-form" method="post" action="">257 <td><form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post" action=""> 258 258 <p> 259 259 <label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br /> 260 260 <input type="file" id="upload" name="import" />