Make WordPress Core


Ignore:
Timestamp:
07/28/2020 11:29:28 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Themes: Include theme name in available update messages, for better accessibility and consistency with other similar messages.

Follow-up to [48652-48654].

See #48491.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-theme-control.php

    r48652 r48659  
    108108                    </div>
    109109                <# } else { #>
    110                     <div class="update-message notice inline notice-warning notice-alt" data-slug="{{ data.theme.id }}">
     110                    <div class="update-message notice inline notice-error notice-alt" data-slug="{{ data.theme.id }}">
    111111                        <p>
    112112                            <# if ( ! data.theme.updateResponse.compatibleWP && ! data.theme.updateResponse.compatiblePHP ) { #>
    113113                                <?php
    114                                 _e( 'There is a new version available, but it doesn&#8217;t work with your versions of WordPress and PHP.' );
     114                                printf(
     115                                    /* translators: %s: Theme name. */
     116                                    __( 'There is a new version of %s available, but it doesn&#8217;t work with your versions of WordPress and PHP.' ),
     117                                    '{{{ data.theme.name }}}'
     118                                );
    115119                                if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
    116120                                    printf(
     
    138142                            <# } else if ( ! data.theme.updateResponse.compatibleWP ) { #>
    139143                                <?php
    140                                 _e( 'There is a new version available, but it doesn&#8217;t work with your version of WordPress.' );
     144                                printf(
     145                                    /* translators: %s: Theme name. */
     146                                    __( 'There is a new version of %s available, but it doesn&#8217;t work with your version of WordPress.' ),
     147                                    '{{{ data.theme.name }}}'
     148                                );
    141149                                if ( current_user_can( 'update_core' ) ) {
    142150                                    printf(
     
    149157                            <# } else if ( ! data.theme.updateResponse.compatiblePHP ) { #>
    150158                                <?php
    151                                 _e( 'There is a new version available, but it doesn&#8217;t work with your version of PHP.' );
     159                                printf(
     160                                    /* translators: %s: Theme name. */
     161                                    __( 'There is a new version of %s available, but it doesn&#8217;t work with your version of PHP.' ),
     162                                    '{{{ data.theme.name }}}'
     163                                );
    152164                                if ( current_user_can( 'update_php' ) ) {
    153165                                    printf(
Note: See TracChangeset for help on using the changeset viewer.