Ticket #20855: 20855.6.diff
File 20855.6.diff, 5.3 KB (added by , 11 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" id="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') ?>141 <input type="file" name="themezip" />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" id="upload-form" action="<?php echo self_admin_url('update.php?action=upload-theme'); ?>"> 140 <?php wp_nonce_field( 'theme-upload'); ?> 141 <input type="file" id="themezip" name="themezip" /> 142 142 <?php submit_button( __( 'Install Now' ), 'button', 'install-theme-submit', false ); ?> 143 143 </form> 144 144 <?php -
wp-admin/js/custom-background.js
19 19 $('input[name="background-repeat"]').change(function() { 20 20 bgImage.css('background-repeat', $(this).val()); 21 21 }); 22 23 toggleUploadButton = function() { 24 $('#upload-form #submit').prop( 'disabled', '' === $('#upload').val() ); 25 }; 26 27 toggleUploadButton(); 28 $('#upload').change( toggleUploadButton ); 22 29 }); 23 30 24 })(jQuery); 25 No newline at end of file 31 })(jQuery); -
wp-admin/js/custom-header.js
1 (function($) { 2 3 $(document).ready( function() { 4 toggleUploadButton = function() { 5 $('#upload-form #submit').prop( 'disabled', '' === $('#upload').val() ); 6 }; 7 8 toggleUploadButton(); 9 $('#upload').change( toggleUploadButton ); 10 }); 11 12 })(jQuery); -
wp-admin/js/plugin-install.js
50 50 $('a.install-now').click( function() { 51 51 return confirm( plugininstallL10n.ays ); 52 52 }); 53 54 toggleUploadButton = function() { 55 $('#upload-form #install-plugin-submit').prop( 'disabled', '' === $('#pluginzip').val() ); 56 }; 57 58 toggleUploadButton(); 59 $('#pluginzip').change( toggleUploadButton ); 53 60 }); -
wp-admin/js/theme.js
112 112 jQuery( document ).ready( function($) { 113 113 theme_viewer = new ThemeViewer(); 114 114 theme_viewer.init(); 115 116 toggleUploadButton = function() { 117 $('#upload-form #install-theme-submit').prop( 'disabled', '' === $('#themezip').val() ); 118 }; 119 120 toggleUploadButton(); 121 $('#themezip').change( toggleUploadButton ); 115 122 }); 116 123 117 124 -
wp-includes/script-loader.php
470 470 'saveAlert' => __('The changes you made will be lost if you navigate away from this page.') 471 471 ) ); 472 472 473 $scripts->add( 'custom-header', "/wp-admin/js/custom-header$suffix.js", array( 'jquery' ), false, 1 ); 473 474 $scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array( 'wp-color-picker' ), false, 1 ); 474 475 $scripts->add( 'media-gallery', "/wp-admin/js/media-gallery$suffix.js", array('jquery'), false, 1 ); 475 476 }