Changeset 22459
- Timestamp:
- 11/07/2012 11:54:03 PM (12 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-background.php
r22030 r22459 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 /> -
trunk/wp-admin/custom-header.php
r22030 r22459 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 /> -
trunk/wp-admin/includes/plugin-install.php
r22026 r22459 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 -
trunk/wp-admin/includes/template.php
r22396 r22459 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 ); ?>) -
trunk/wp-admin/includes/theme-install.php
r21323 r22459 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 ); ?> -
trunk/wp-admin/js/common.js
r22268 r22459 250 250 interval: 90 251 251 }); 252 252 253 253 menu.on('focus.adminmenu', '.wp-submenu a', function(e){ 254 254 $(e.target).closest('li.menu-top').addClass('opensub'); … … 389 389 e.target.scrollIntoView(false); 390 390 }); 391 392 // Disable upload buttons until files are selected 393 (function(){ 394 var button, input, form = $('form.wp-upload-form'); 395 if ( ! form.length ) 396 return; 397 button = form.find('input[type="submit"]'); 398 input = form.find('input[type="file"]'); 399 function toggleUploadButton() { 400 button.prop('disabled', '' === input.val()); 401 } 402 toggleUploadButton(); 403 input.on('change', toggleUploadButton); 404 })(); 391 405 }); 392 406
Note: See TracChangeset
for help on using the changeset viewer.