Make WordPress Core

Ticket #42365: 42365.2.diff

File 42365.2.diff, 3.0 KB (added by obenland, 8 years ago)
  • src/wp-admin/css/customize-controls.css

     
    20302030        display: none;
    20312031}
    20322032
    2033 .themes-section-installed_themes .theme .notice-success {
     2033.themes-section-installed_themes .theme .notice-success:not(.updated-message) {
    20342034        display: none; /* Hide "installed" notice on installed themes tab. */
    20352035}
    20362036
  • src/wp-admin/js/updates.js

     
    937937                } else if ( 'customize' === pagenow ) {
    938938
    939939                        // Update the theme details UI.
    940                         $notice = $( '#update-theme' ).closest( '.notice' ).removeClass( 'notice-large' );
     940                        $notice = $( '[data-slug="' + args.slug + '"].notice' ).removeClass( 'notice-large' );
    941941
    942942                        $notice.find( 'h3' ).remove();
    943943
     
    988988                        $notice, newText;
    989989
    990990                if ( 'customize' === pagenow ) {
    991                         $theme = wp.customize.control( 'installed_theme_' + response.slug ).container;
    992                 }
     991                        $theme = $( '.updating-message' ).siblings( '.theme-name' );
     992                        // Update the version number in the row.
     993                        newText = $theme.html().replace( response.oldVersion, response.newVersion );
     994                        $theme.html( newText );
    993995
    994                 if ( 'themes-network' === pagenow ) {
     996                        $notice = $( '.theme-info .notice' ).add( wp.customize.control( 'installed_theme_' + response.slug ).container.find( '.theme' ).find( '.update-message' ) );
     997                } else if ( 'themes-network' === pagenow ) {
    995998                        $notice = $theme.find( '.update-message' );
    996999
    9971000                        // Update the version number in the row.
     
    10161019                $document.trigger( 'wp-theme-update-success', response );
    10171020
    10181021                // Show updated message after modal re-rendered.
    1019                 if ( isModalOpen ) {
     1022                if ( isModalOpen && 'customize' !== pagenow ) {
    10201023                        $( '.theme-info .theme-author' ).after( wp.updates.adminNotice( updatedMessage ) );
    10211024                }
    10221025        };
     
    10461049                }
    10471050
    10481051                if ( 'customize' === pagenow ) {
    1049                         $theme = wp.customize.control( 'installed_theme_' + response.slug ).container;
     1052                        $theme = wp.customize.control( 'installed_theme_' + response.slug ).container.find( '.theme' );
    10501053                }
    10511054
    10521055                if ( 'themes-network' === pagenow ) {
  • src/wp-includes/customize/class-wp-customize-themes-section.php

     
    6969         * @since 4.9.0
    7070         */
    7171        protected function render_template() {
     72                wp_localize_script( 'updates', '_wpUpdatesItemCounts', array(
     73                        'totals' => wp_get_update_data(),
     74                ) );
    7275                ?>
    7376                <li id="accordion-section-{{ data.id }}" class="theme-section">
    7477                        <button type="button" class="customize-themes-section-title themes-section-{{ data.id }}">{{ data.title }}</button>