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/twentyfifteen/inc/back-compat.php

    r45932 r51155  
    3535 */
    3636function twentyfifteen_upgrade_notice() {
    37     /* translators: %s: WordPress version. */
    38     $message = sprintf( __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), $GLOBALS['wp_version'] );
    39     printf( '<div class="error"><p>%s</p></div>', $message );
     37    printf(
     38        '<div class="error"><p>%s</p></div>',
     39        sprintf(
     40            /* translators: %s: WordPress version. */
     41            __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ),
     42            $GLOBALS['wp_version']
     43        )
     44    );
    4045}
    4146
     
    4752function twentyfifteen_customize() {
    4853    wp_die(
    49         /* translators: %s: WordPress version. */
    50         sprintf( __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), $GLOBALS['wp_version'] ),
     54        sprintf(
     55            /* translators: %s: WordPress version. */
     56            __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ),
     57            $GLOBALS['wp_version']
     58        ),
    5159        '',
    5260        array(
     
    6472function twentyfifteen_preview() {
    6573    if ( isset( $_GET['preview'] ) ) {
    66         /* translators: %s: WordPress version. */
    67         wp_die( sprintf( __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), $GLOBALS['wp_version'] ) );
     74        wp_die(
     75            sprintf(
     76                /* translators: %s: WordPress version. */
     77                __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ),
     78                $GLOBALS['wp_version']
     79            )
     80        );
    6881    }
    6982}
Note: See TracChangeset for help on using the changeset viewer.