Changeset 58081
- Timestamp:
- 05/02/2024 05:03:36 PM (3 months ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/wp/updates.js
r58064 r58081 1106 1106 * @since 6.5.0 1107 1107 * 1108 * @param {Object} response 1109 * @param {string} response.slug 1110 * @param {string} response.pluginName 1111 * @param {string} response.plugin 1108 * @param {Object} response Response from the server. 1109 * @param {string} response.slug Slug of the activated plugin. 1110 * @param {string} response.pluginName Name of the activated plugin. 1111 * @param {string} response.plugin The plugin file, relative to the plugins directory. 1112 1112 */ 1113 1113 wp.updates.activatePluginSuccess = function( response ) { 1114 1114 var $message = $( '.plugin-card-' + response.slug + ', #plugin-information-footer' ).find( '.activating-message' ), 1115 1115 1116 buttonText = _x( 'Activated!', 'plugin' ), 1116 1117 ariaLabel = sprintf( … … 1118 1119 '%s activated successfully.', 1119 1120 response.pluginName 1120 ); 1121 1122 wp.a11y.speak( __( 'Activation completed successfully.' ) ); 1121 ), 1122 noticeData = { 1123 id: 'plugin-activated-successfully', 1124 className: 'notice-success', 1125 message: sprintf( 1126 /* translators: %s: The refresh link's attributes. */ 1127 __( 'Plugin activated. Some changes may not occur until you refresh the page. <a %s>Refresh Now</a>' ), 1128 'href="#" class="button button-secondary refresh-page"' 1129 ), 1130 slug: response.slug 1131 }, 1132 noticeTarget; 1133 1134 wp.a11y.speak( __( 'Activation completed successfully. Some changes may not occur until you refresh the page.' ) ); 1123 1135 $document.trigger( 'wp-plugin-activate-success', response ); 1124 1136 … … 1129 1141 .text( buttonText ); 1130 1142 1131 if ( 'plugin-information-footer' === $message.parent().attr( 'id' )) {1143 if ( ) { 1132 1144 wp.updates.setCardButtonStatus( 1133 1145 { … … 1140 1152 } 1141 1153 ); 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1142 1170 } 1143 1171 1144 1172 setTimeout( function() { 1145 $message.removeClass( 'activated-message' ) 1146 .text( _x( 'Active', 'plugin' ) ); 1147 1148 if ( 'plugin-information-footer' === $message.parent().attr( 'id' ) ) { 1173 if ( isInModal ) { 1149 1174 wp.updates.setCardButtonStatus( 1150 1175 { … … 1160 1185 } 1161 1186 ); 1187 1188 1162 1189 } 1163 1190 }, 1000 ); … … 3255 3282 } 3256 3283 3284 3285 3286 3287 3288 3257 3289 if ( 3258 3290 'undefined' !== typeof message.status && … … 3487 3519 } 3488 3520 ); 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3489 3538 } ); 3490 3539 })( jQuery, window.wp, window._wpUpdatesSettings ); -
trunk/src/wp-admin/css/common.css
r57697 r58081 1514 1514 } 1515 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1516 1535 .update-message p:before, 1517 1536 .updating-message p:before,
Note: See TracChangeset
for help on using the changeset viewer.