Changeset 42046
- Timestamp:
- 10/31/2017 01:32:15 AM (7 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/customize-controls.css
r42036 r42046 2031 2031 } 2032 2032 2033 .themes-section-installed_themes .theme .notice-success {2033 .themes-section-installed_themes .theme .notice-success:not(.updated-message) { 2034 2034 display: none; /* Hide "installed" notice on installed themes tab. */ 2035 2035 } -
trunk/src/wp-admin/js/customize-controls.js
r42042 r42046 3348 3348 if ( 'theme' === control.params.type && control.params.theme.id === response.slug ) { 3349 3349 control.params.theme.hasUpdate = false; 3350 control.rerenderAsInstalled( true ); 3350 control.params.theme.version = response.newVersion; 3351 setTimeout( function() { 3352 control.rerenderAsInstalled( true ); 3353 }, 2000 ); 3351 3354 } 3352 3355 }); -
trunk/src/wp-admin/js/updates.js
r42018 r42046 938 938 939 939 // Update the theme details UI. 940 $notice = $( ' #update-theme' ).closest( '.notice' ).removeClass( 'notice-large' );940 $notice = $( '[data-slug="' + args.slug + '"].notice' ).removeClass( 'notice-large' ); 941 941 942 942 $notice.find( 'h3' ).remove(); 943 943 944 944 // Add the top-level UI, and update both. 945 $notice = $notice.add( $( '#customize-control- theme-installed_' + args.slug ).find( '.update-message' ) );945 $notice = $notice.add( $( '#customize-control-installed_theme_' + args.slug ).find( '.update-message' ) ); 946 946 $notice = $notice.addClass( 'updating-message' ).find( 'p' ); 947 947 … … 989 989 990 990 if ( 'customize' === pagenow ) { 991 $theme = wp.customize.control( 'installed_theme_' + response.slug ).container; 992 } 993 994 if ( 'themes-network' === pagenow ) { 991 $theme = $( '.updating-message' ).siblings( '.theme-name' ); 992 993 if ( $theme.length ) { 994 995 // Update the version number in the row. 996 newText = $theme.html().replace( response.oldVersion, response.newVersion ); 997 $theme.html( newText ); 998 } 999 1000 $notice = $( '.theme-info .notice' ).add( wp.customize.control( 'installed_theme_' + response.slug ).container.find( '.theme' ).find( '.update-message' ) ); 1001 } else if ( 'themes-network' === pagenow ) { 995 1002 $notice = $theme.find( '.update-message' ); 996 1003 … … 1017 1024 1018 1025 // Show updated message after modal re-rendered. 1019 if ( isModalOpen ) {1026 if ( isModalOpen && 'customize' !== pagenow ) { 1020 1027 $( '.theme-info .theme-author' ).after( wp.updates.adminNotice( updatedMessage ) ); 1021 1028 } … … 1047 1054 1048 1055 if ( 'customize' === pagenow ) { 1049 $theme = wp.customize.control( 'installed_theme_' + response.slug ).container ;1056 $theme = wp.customize.control( 'installed_theme_' + response.slug ).container.find( '.theme' ); 1050 1057 } 1051 1058 -
trunk/src/wp-includes/class-wp-customize-manager.php
r42039 r42046 4277 4277 if ( ! is_multisite() && ( current_user_can( 'install_themes' ) || current_user_can( 'update_themes' ) || current_user_can( 'delete_themes' ) ) ) { 4278 4278 wp_enqueue_script( 'updates' ); 4279 wp_localize_script( 'updates', '_wpUpdatesItemCounts', array( 4280 'totals' => wp_get_update_data(), 4281 ) ); 4279 4282 } 4280 4283 }
Note: See TracChangeset
for help on using the changeset viewer.