Make WordPress Core


Ignore:
Timestamp:
06/15/2021 03:23:07 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Remove a one-time $message variable in WordPress version requirement notices for bundled themes.

This makes the formatting of these messages more consistent.

Follow-up to [23816], [51154].

See #52627.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentysixteen/inc/back-compat.php

    r45932 r51155  
    3939 */
    4040function twentysixteen_upgrade_notice() {
    41     /* translators: %s: The current WordPress version. */
    42     $message = sprintf( __( 'Twenty Sixteen requires at least WordPress version 4.4. You are running version %s. Please upgrade and try again.', 'twentysixteen' ), $GLOBALS['wp_version'] );
    43     printf( '<div class="error"><p>%s</p></div>', $message );
     41    printf(
     42        '<div class="error"><p>%s</p></div>',
     43        sprintf(
     44            /* translators: %s: The current WordPress version. */
     45            __( 'Twenty Sixteen requires at least WordPress version 4.4. You are running version %s. Please upgrade and try again.', 'twentysixteen' ),
     46            $GLOBALS['wp_version']
     47        )
     48    );
    4449}
    4550
     
    5358function twentysixteen_customize() {
    5459    wp_die(
    55         /* translators: %s: The current WordPress version. */
    56         sprintf( __( 'Twenty Sixteen requires at least WordPress version 4.4. You are running version %s. Please upgrade and try again.', 'twentysixteen' ), $GLOBALS['wp_version'] ),
     60        sprintf(
     61            /* translators: %s: The current WordPress version. */
     62            __( 'Twenty Sixteen requires at least WordPress version 4.4. You are running version %s. Please upgrade and try again.', 'twentysixteen' ),
     63            $GLOBALS['wp_version']
     64        ),
    5765        '',
    5866        array(
     
    7280function twentysixteen_preview() {
    7381    if ( isset( $_GET['preview'] ) ) {
    74         /* translators: %s: The current WordPress version. */
    75         wp_die( sprintf( __( 'Twenty Sixteen requires at least WordPress version 4.4. You are running version %s. Please upgrade and try again.', 'twentysixteen' ), $GLOBALS['wp_version'] ) );
     82        wp_die(
     83            sprintf(
     84                /* translators: %s: The current WordPress version. */
     85                __( 'Twenty Sixteen requires at least WordPress version 4.4. You are running version %s. Please upgrade and try again.', 'twentysixteen' ),
     86                $GLOBALS['wp_version']
     87            )
     88        );
    7689    }
    7790}
Note: See TracChangeset for help on using the changeset viewer.