Changeset 31333
- Timestamp:
- 02/05/2015 04:18:57 AM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/admin-ajax.php
r30649 r31333 62 62 'send-attachment-to-editor', 'save-attachment-order', 'heartbeat', 'get-revision-diffs', 63 63 'save-user-color-scheme', 'update-widget', 'query-themes', 'parse-embed', 'set-attachment-thumbnail', 64 'parse-media-shortcode', 'destroy-sessions' 64 'parse-media-shortcode', 'destroy-sessions', 'install-plugin', 'update-plugin' 65 65 ); 66 66 -
trunk/src/wp-admin/css/list-tables.css
r31181 r31333 1144 1144 .upgrade .plugins tr:last-of-type th, 1145 1145 .plugins tr.active + tr.inactive.update th, 1146 .plugins tr.active + tr.inactive.update td { 1146 .plugins tr.active + tr.inactive.update td, 1147 .plugins .updated td, 1148 .plugins .updated th, 1149 .plugins tr.active + tr.inactive.updated th, 1150 .plugins tr.active + tr.inactive.updated td { 1147 1151 -webkit-box-shadow: none; 1148 1152 box-shadow: none; … … 1155 1159 } 1156 1160 1157 .plugins .active th.check-column { 1161 .plugins .active th.check-column, 1162 .plugin-update-tr.active td { 1158 1163 border-left: 4px solid #2ea2cc; 1159 1164 } … … 1200 1205 } 1201 1206 1202 .plugin-update-tr .update-message:before { 1207 .plugin-update-tr .update-message:before, 1208 .plugin-card .update-now:before, 1209 .plugin-card .install-now:before { 1203 1210 color: #d54e21; 1204 content: '\f463';1205 1211 display: inline-block; 1206 1212 font: normal 20px/1 'dashicons'; 1207 1213 speak: none; 1208 margin: 0 8px 0 -2px;1209 1214 -webkit-font-smoothing: antialiased; 1210 1215 -moz-osx-font-smoothing: grayscale; 1211 1216 vertical-align: top; 1217 } 1218 1219 .plugin-update-tr .update-message:before, 1220 .plugin-card .update-now:before { 1221 content: '\f463'; 1222 } 1223 1224 .plugin-update-tr .update-message:before { 1225 margin: 0 8px 0 -2px; 1226 } 1227 1228 .plugin-card .update-now:before, 1229 .plugin-card .install-now:before { 1230 margin: 3px 5px 0 -2px; 1231 } 1232 1233 .plugin-update-tr .updating-message:before, 1234 .plugin-card .updating-message:before { 1235 content: '\f463'; 1236 -webkit-animation: rotation 2s infinite linear; 1237 } 1238 1239 @-webkit-keyframes rotation { 1240 from {-webkit-transform: rotate(0deg);} 1241 to {-webkit-transform: rotate(359deg);} 1242 } 1243 1244 .plugin-update-tr .updated-message:before, 1245 .plugin-card .updated-message:before { 1246 color: #79ba49; 1247 content: '\f147'; 1212 1248 } 1213 1249 … … 1224 1260 } 1225 1261 1226 tr.active + tr.plugin-update-tr .plugin-update .update-message {1262 tr.active + tr.plugin-update-tr:not(.updated) .plugin-update .update-message { 1227 1263 background-color: #fcf3ef; 1228 1264 } -
trunk/src/wp-admin/includes/ajax-actions.php
r31313 r31333 2829 2829 wp_send_json_success( array( 'message' => $message ) ); 2830 2830 } 2831 2832 /** 2833 * AJAX handler for installing a plugin. 2834 * 2835 * @since 4.2.0 2836 */ 2837 function wp_ajax_install_plugin() { 2838 check_ajax_referer( 'updates' ); 2839 2840 include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); 2841 include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); 2842 2843 $status = array( 2844 'install' => 'plugin', 2845 'slug' => sanitize_key( $_POST['slug'] ), 2846 ); 2847 2848 $api = plugins_api( 'plugin_information', array( 2849 'slug' => sanitize_key( $_POST['slug'] ), 2850 'fields' => array( 'sections' => false ) 2851 ) ); 2852 2853 if ( is_wp_error( $api ) ) { 2854 $status['error'] = $api->get_error_message(); 2855 wp_send_json_error( $status ); 2856 } 2857 2858 $upgrader = new Plugin_Upgrader( new Automatic_Upgrader_Skin() ); 2859 $result = $upgrader->install( $api->download_link ); 2860 2861 if ( is_wp_error( $result ) ) { 2862 $status['error'] = $result->get_error_message(); 2863 wp_send_json_error( $status ); 2864 } 2865 2866 $plugin_status = install_plugin_install_status( array( 'slug' => sanitize_key( $_POST['slug'] ) ) ); 2867 activate_plugin( $plugin_status['file'] ); 2868 2869 wp_send_json_success( $status ); 2870 } 2871 2872 /** 2873 * AJAX handler for updating a plugin. 2874 * 2875 * @since 4.2.0 2876 */ 2877 function wp_ajax_update_plugin() { 2878 check_ajax_referer( 'updates' ); 2879 2880 include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); 2881 2882 $plugin = urldecode( $_POST['plugin'] ); 2883 2884 $status = array( 2885 'update' => 'plugin', 2886 'plugin' => $plugin, 2887 'slug' => sanitize_key( $_POST['slug'] ), 2888 ); 2889 2890 $current = get_site_transient( 'update_plugins' ); 2891 if ( empty( $current ) ) { 2892 wp_update_plugins(); 2893 } 2894 2895 $upgrader = new Plugin_Upgrader( new Automatic_Upgrader_Skin() ); 2896 $result = $upgrader->bulk_upgrade( array( $plugin ) ); 2897 2898 if ( is_array( $result ) ) { 2899 $result = $result[ $plugin ]; 2900 } 2901 2902 if ( is_wp_error( $result ) ) { 2903 $status['error'] = $result->get_error_message(); 2904 wp_send_json_error( $status ); 2905 } 2906 2907 wp_send_json_success( $status ); 2908 } -
trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php
r31244 r31333 403 403 if ( $status['url'] ) { 404 404 /* translators: 1: Plugin name and version. */ 405 $action_links[] = '<a class="install-now button" href="' . $status['url']. '" aria-label="' . esc_attr( sprintf( __( 'Install %s now' ), $name ) ) . '">' . __( 'Install Now' ) . '</a>';405 $action_links[] = '<a class="install-now button" data-slug="' . esc_attr( $plugin['slug'] ) . '" href="' . esc_url( $status['url'] ) . '" aria-label="' . esc_attr( sprintf( __( 'Install %s now' ), $name ) ) . '">' . __( 'Install Now' ) . '</a>'; 406 406 } 407 407 … … 410 410 if ( $status['url'] ) { 411 411 /* translators: 1: Plugin name and version */ 412 $action_links[] = '<a class=" button" href="' . $status['url']. '" aria-label="' . esc_attr( sprintf( __( 'Update %s now' ), $name ) ) . '">' . __( 'Update Now' ) . '</a>';412 $action_links[] = '<a class="update-now button" data-plugin="' . esc_attr( $status['file'] ) . '" data-slug="' . esc_attr( $plugin['slug'] ) . '" href="' . esc_url( $status['url'] ) . '" aria-label="' . esc_attr( sprintf( __( 'Update %s now' ), $name ) ) . '">' . __( 'Update Now' ) . '</a>'; 413 413 } 414 414 … … 450 450 $last_updated_timestamp = strtotime( $plugin['last_updated'] ); 451 451 ?> 452 <div class="plugin-card ">452 <div class="plugin-card plugin-card-<?php echo sanitize_html_class( $plugin['slug'] ); ?>"> 453 453 <div class="plugin-card-top"> 454 454 <a href="<?php echo esc_url( $details_link ); ?>" class="thickbox plugin-icon"><img src="<?php echo esc_attr( $plugin_icon_url ) ?>" /></a> -
trunk/src/wp-admin/includes/plugin-install.php
r31326 r31333 277 277 $status = 'install'; 278 278 $url = false; 279 $update_file = false; 279 280 280 281 /* … … 305 306 $key = array_keys( $installed_plugin ); 306 307 $key = array_shift( $key ); //Use the first plugin regardless of the name, Could have issues for multiple-plugins in one directory if they share different version numbers 308 $update_file = $api->slug . '/' . $key; 307 309 if ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '=') ){ 308 310 $status = 'latest_installed'; … … 328 330 $url .= '&from=' . urlencode( wp_unslash( $_GET['from'] ) ); 329 331 330 return compact('status', 'url', 'version'); 332 $file = $update_file; 333 return compact( 'status', 'url', 'version', 'file' ); 331 334 } 332 335 -
trunk/src/wp-admin/includes/update.php
r31090 r31333 277 277 278 278 if ( is_network_admin() || !is_multisite() ) { 279 echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">'; 279 $active_class = ( is_plugin_active( $plugin_data['plugin'] ) ) ? ' active' : ''; 280 echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr( $r->slug . '-update' ) . '" data-slug="' . esc_attr( $r->slug ) . '" data-plugin="' . esc_attr( $file ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message">'; 280 281 281 282 if ( ! current_user_can( 'update_plugins' ) ) { … … 284 285 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version ); 285 286 } else { 286 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url( self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file) );287 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link">update now</a>.' ), $plugin_name, esc_url( $details_url ), esc_attr( $plugin_name ), $r->new_version, wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ) ); 287 288 } 288 289 /** -
trunk/src/wp-admin/js/plugin-install.js
r29583 r31333 70 70 $( '#section-' + tab ).show(); 71 71 }); 72 73 $( 'a.install-now' ).click( function() {74 return confirm( plugininstallL10n.ays );75 });76 72 }); -
trunk/src/wp-admin/js/updates.js
r29960 r31333 6 6 7 7 /** 8 * Decrement update counts throughout the various menus 8 * User nonce for ajax calls. 9 * 10 * @since 4.2.0 11 * 12 * @var string 13 */ 14 wp.updates.ajaxNonce = window._wpUpdatesSettings.ajax_nonce; 15 16 /** 17 * Localized strings. 18 * 19 * @since 4.2.0 20 * 21 * @var object 22 */ 23 wp.updates.l10n = window._wpUpdatesSettings.l10n; 24 25 /** 26 * Flag if we're waiting for an install/update to complete. 27 * 28 * @since 4.2.0 29 * 30 * @var bool 31 */ 32 wp.updates.updateLock = false; 33 34 /** 35 * If the user tries to install/update a plugin while an install/update is 36 * already happening, it can be placed in this queue to perform later. 37 * 38 * @since 4.2.0 39 * 40 * @var array 41 */ 42 wp.updates.updateQueue = []; 43 44 /** 45 * Decrement update counts throughout the various menus. 46 * 47 * @since 3.9.0 9 48 * 10 49 * @param {string} updateType 11 50 */ 12 51 wp.updates.decrementCount = function( upgradeType ) { 13 var count, pluginCount, $elem; 14 15 $elem = $( '#wp-admin-bar-updates .ab-label' ); 16 count = $elem.text(); 52 var count, 53 pluginCount, 54 $adminBarUpdateCount = $( '#wp-admin-bar-updates .ab-label' ), 55 $dashboardNavMenuUpdateCount = $( 'a[href="update-core.php"] .update-plugins' ) 56 $pluginsMenuItem = $( '#menu-plugins' ); 57 58 59 count = $adminBarUpdateCount.text(); 17 60 count = parseInt( count, 10 ) - 1; 18 61 if ( count < 0 || isNaN( count ) ) { … … 20 63 } 21 64 $( '#wp-admin-bar-updates .ab-item' ).removeAttr( 'title' ); 22 $ elem.text( count );23 24 $elem = $( 'a[href="update-core.php"] .update-plugins' ); 25 $ elem.each( function( index, elem ) {65 $adminBarUpdateCount.text( count ); 66 67 68 $dashboardNavMenuUpdateCount.each( function( index, elem ) { 26 69 elem.className = elem.className.replace( /count-\d+/, 'count-' + count ); 27 70 } ); 28 $ elem.removeAttr( 'title' );29 $ elem.find( '.update-count' ).text( count );71 $dashboardNavMenuUpdateCount.removeAttr( 'title' ); 72 $dashboardNavMenuUpdateCount.find( '.update-count' ).text( count ); 30 73 31 74 if ( 'plugin' === upgradeType ) { 32 $elem = $( '#menu-plugins' ); 33 pluginCount = $elem.find( '.plugin-count' ).eq(0).text(); 75 pluginCount = $pluginsMenuItem.find( '.plugin-count' ).eq(0).text(); 34 76 pluginCount = parseInt( pluginCount, 10 ) - 1; 35 77 if ( pluginCount < 0 || isNaN( pluginCount ) ) { 36 78 return; 37 79 } 38 $ elem.find( '.plugin-count' ).text( pluginCount );39 $ elem.find( '.update-plugins' ).each( function( index, elem ) {80 $pluginsMenuItem.find( '.plugin-count' ).text( pluginCount ); 81 $pluginsMenuItem.find( '.update-plugins' ).each( function( index, elem ) { 40 82 elem.className = elem.className.replace( /count-\d+/, 'count-' + pluginCount ); 41 83 } ); 42 } 43 }; 84 85 if (pluginCount > 0 ) { 86 $( '.subsubsub .upgrade .count' ).text( '(' + pluginCount + ')' ); 87 } else { 88 $( '.subsubsub .upgrade' ).remove(); 89 } 90 } 91 }; 92 93 /** 94 * Send an Ajax request to the server to update a plugin. 95 * 96 * @since 4.2.0 97 * 98 * @param {string} plugin 99 * @param {string} slug 100 */ 101 wp.updates.updatePlugin = function( plugin, slug ) { 102 var $message; 103 if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { 104 $message = $( '#' + slug ).next().find( '.update-message' ); 105 } else if ( 'plugin-install' === pagenow ) { 106 $message = $( '.plugin-card-' + slug ).find( '.update-now' ); 107 } 108 109 $message.addClass( 'updating-message' ); 110 $message.text( wp.updates.l10n.updating ); 111 112 if ( wp.updates.updateLock ) { 113 wp.updates.updateQueue.push( { 114 type: 'update-plugin', 115 data: { 116 plugin: plugin, 117 slug: slug 118 } 119 } ); 120 return; 121 } 122 123 wp.updates.updateLock = true; 124 125 var data = { 126 'action': 'update-plugin', 127 '_ajax_nonce': wp.updates.ajaxNonce, 128 'plugin': plugin, 129 'slug': slug 130 }; 131 132 $.ajax( { 133 type: 'post', 134 url: ajaxurl, 135 data: data, 136 complete: wp.updates.updateRequestComplete 137 } ); 138 }; 139 140 /** 141 * After an update attempt has completed, deal with the response. 142 * 143 * @since 4.2.0 144 * 145 * @param {jqXHR} jqxhr The jQuery XMLHttpRequest for the request. 146 */ 147 wp.updates.updateRequestComplete = function( jqxhr ) { 148 wp.updates.updateLock = false; 149 if ( jqxhr.responseJSON && jqxhr.responseJSON.success ) { 150 wp.updates.updateSuccess( jqxhr.responseJSON ); 151 } else { 152 var alertText = wp.updates.l10n.updateFailed; 153 if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.error ) { 154 alertText += ': ' + jqxhr.responseJSON.data.error; 155 } 156 alert( alertText ); 157 if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.slug ) { 158 wp.updates.updateError( jqxhr.responseJSON ); 159 } 160 } 161 /** 162 * Check the queue. 163 */ 164 wp.updates.queueChecker(); 165 } 166 167 /** 168 * On a successful plugin update, update the UI with the result. 169 * 170 * @since 4.2.0 171 * 172 * @param {object} response 173 */ 174 wp.updates.updateSuccess = function( response ) { 175 var $message; 176 if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { 177 $message = $( '#' + response.data.slug ).next().find( '.update-message' ); 178 $( '#' + response.data.slug ).addClass( 'updated' ).removeClass( 'update' ); 179 $( '#' + response.data.slug + '-update' ).addClass( 'updated' ).removeClass( 'update' ); 180 } else if ( 'plugin-install' === pagenow ) { 181 $message = $( '.plugin-card-' + response.data.slug ).find( '.update-now' ); 182 $message.addClass( 'button-disabled' ); 183 } 184 185 $message.removeClass( 'updating-message' ).addClass( 'updated-message' ); 186 $message.text( wp.updates.l10n.updated ); 187 188 wp.updates.decrementCount( 'plugin' ); 189 }; 190 191 /** 192 * On a plugin update error, update the UI appropriately. 193 * 194 * @since 4.2.0 195 * 196 * @param {object} response 197 */ 198 wp.updates.updateError = function( response ) { 199 var $message; 200 if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { 201 $message = $( '#' + response.data.slug ).next().find( '.update-message' ); 202 } else if ( 'plugin-install' === pagenow ) { 203 $message = $( '.plugin-card-' + response.data.slug ).find( '.update-now' ); 204 } 205 $message.removeClass( 'updating-message' ); 206 $message.text( wp.updates.l10n.updateFailed ); 207 }; 208 209 /** 210 * Send an Ajax request to the server to install a plugin. 211 * 212 * @since 4.2.0 213 * 214 * @param {string} slug 215 */ 216 wp.updates.installPlugin = function( slug ) { 217 var $message = $( '.plugin-card-' + slug ).find( '.install-now' ); 218 219 $message.addClass( 'updating-message' ); 220 $message.text( wp.updates.l10n.installing ); 221 222 if ( wp.updates.updateLock ) { 223 wp.updates.updateQueue.push( { 224 type: 'install-plugin', 225 data: { 226 slug: slug 227 } 228 } ); 229 return; 230 } 231 232 wp.updates.updateLock = true; 233 234 var data = { 235 'action': 'install-plugin', 236 '_ajax_nonce': wp.updates.ajaxNonce, 237 'slug': slug 238 }; 239 240 $.ajax( { 241 type: 'post', 242 url: ajaxurl, 243 data: data, 244 complete: wp.updates.installRequestComplete 245 } ); 246 }; 247 248 249 /** 250 * After an installation attempt has completed, deal with the response. 251 * 252 * @since 4.2.0 253 * 254 * @param {jqXHR} jqxhr The jQuery XMLHttpRequest for the request. 255 */ 256 wp.updates.installRequestComplete = function( jqxhr ) { 257 wp.updates.updateLock = false; 258 if ( jqxhr.responseJSON && jqxhr.responseJSON.success ) { 259 wp.updates.installSuccess( jqxhr.responseJSON ); 260 } else { 261 var alertText = wp.updates.l10n.installFailed; 262 if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.error ) { 263 alertText += ': ' + jqxhr.responseJSON.data.error; 264 } 265 alert( alertText ); 266 if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.slug ) { 267 wp.updates.installError( jqxhr.responseJSON ); 268 } 269 } 270 /** 271 * Check the queue. 272 */ 273 wp.updates.queueChecker(); 274 }; 275 276 /** 277 * On plugin install success, update the UI with the result. 278 * 279 * @since 4.2.0 280 * 281 * @param {object} response 282 */ 283 wp.updates.installSuccess = function( response ) { 284 var $message = $( '.plugin-card-' + response.data.slug ).find( '.install-now' ); 285 286 $message.removeClass( 'updating-message' ).addClass( 'updated-message button-disabled' ); 287 $message.text( wp.updates.l10n.installed ); 288 }; 289 290 /** 291 * On plugin install failure, update the UI appropriately. 292 * 293 * @since 4.2.0 294 * 295 * @param {object} response 296 */ 297 wp.updates.installError = function( response ) { 298 var $message = $( '.plugin-card-' + response.data.slug ).find( '.install-now' ); 299 300 $message.removeClass( 'updating-message' ); 301 $message.text( wp.updates.l10n.installNow ); 302 }; 303 304 305 /** 306 * If an install/update job has been placed in the queue, queueChecker pulls it out and runs it. 307 * 308 * @since 4.2.0 309 */ 310 wp.updates.queueChecker = function() { 311 if ( wp.updates.updateLock || wp.updates.updateQueue.length <= 0 ) { 312 return; 313 } 314 315 var job = wp.updates.updateQueue.shift(); 316 317 switch ( job.type ) { 318 case 'update-plugin': 319 wp.updates.updatePlugin( job.data.plugin, job.data.slug ); 320 break; 321 case 'install-plugin': 322 wp.updates.installPlugin( job.data.slug ); 323 break; 324 default: 325 console.log( 'Failed to exect queued update job.' ); 326 console.log( job ); 327 break; 328 } 329 }; 330 331 $( document ).ready( function() { 332 $( '.plugin-update-tr .update-link' ).on( 'click', function( e ) { 333 e.preventDefault(); 334 var $row = $( e.target ).parents( '.plugin-update-tr' ); 335 wp.updates.updatePlugin( $row.data( 'plugin' ), $row.data( 'slug' ) ); 336 } ); 337 338 $( '#bulk-action-form' ).on( 'submit', function( e ) { 339 var checkbox, plugin, slug; 340 341 if ( $( '#bulk-action-selector-top' ).val() == 'update-selected' ) { 342 e.preventDefault(); 343 344 $( 'input[name="checked[]"]:checked' ).each( function( index, elem ) { 345 $checkbox = $( elem ); 346 plugin = $checkbox.val(); 347 slug = $checkbox.parents( 'tr' ).prop( 'id' ); 348 349 wp.updates.updatePlugin( plugin, slug ); 350 351 $checkbox.attr( 'checked', false ); 352 } ); 353 } 354 } ); 355 356 $( '.plugin-card .update-now' ).on( 'click', function( e ) { 357 e.preventDefault(); 358 $button = $( e.target ); 359 wp.updates.updatePlugin( $button.data( 'plugin' ), $button.data( 'slug' ) ); 360 } ); 361 362 $( '.plugin-card .install-now' ).on( 'click', function( e ) { 363 e.preventDefault(); 364 $button = $( e.target ); 365 if ( $button.hasClass( 'button-disabled' ) ) { 366 return; 367 } 368 wp.updates.installPlugin( $button.data( 'slug' ) ); 369 } ); 370 } ); 44 371 45 372 $( window ).on( 'message', function( e ) { -
trunk/src/wp-admin/plugin-install.php
r30649 r31333 54 54 55 55 $body_id = $tab; 56 57 wp_enqueue_script( 'updates' ); 56 58 57 59 /** -
trunk/src/wp-admin/plugins.php
r31200 r31333 23 23 // Clean up request URI from temporary args for screen options/paging uri's to work as expected. 24 24 $_SERVER['REQUEST_URI'] = remove_query_arg(array('error', 'deleted', 'activate', 'activate-multi', 'deactivate', 'deactivate-multi', '_error_nonce'), $_SERVER['REQUEST_URI']); 25 26 wp_enqueue_script( 'updates' ); 25 27 26 28 if ( $action ) { … … 461 463 </form> 462 464 463 <form method="post" >465 <form method="post" id="bulk-action-form"> 464 466 465 467 <input type="hidden" name="plugin_status" value="<?php echo esc_attr($status) ?>" /> -
trunk/src/wp-includes/script-loader.php
r31322 r31333 502 502 503 503 $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery' ) ); 504 did_action( 'init' ) && $scripts->localize( 'updates', '_wpUpdatesSettings', array( 505 'ajax_nonce' => wp_create_nonce( 'updates' ), 506 'l10n' => array( 507 'updating' => __( 'Updating...' ), 508 'updated' => __( 'Updated!' ), 509 'updateFailed' => __( 'Update failed' ), 510 'installNow' => __( 'Install Now' ), 511 'installing' => __( 'Installing...' ), 512 'installed' => __( 'Installed!' ), 513 'installFailed' => __( 'Installation failed' ), 514 ) 515 ) ); 504 516 505 517 $scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' );
Note: See TracChangeset
for help on using the changeset viewer.