WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/15/2021 03:23:07 PM (3 months 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/twentyfourteen/inc/back-compat.php

    r45932 r51155  
    3535 */
    3636function twentyfourteen_upgrade_notice() {
    37     /* translators: %s: WordPress version. */
    38     $message = sprintf( __( 'Twenty Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentyfourteen' ), $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 Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentyfourteen' ),
     42            $GLOBALS['wp_version']
     43        )
     44    );
    4045}
    4146
     
    4752function twentyfourteen_customize() {
    4853    wp_die(
    49         /* translators: %s: WordPress version. */
    50         sprintf( __( 'Twenty Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentyfourteen' ), $GLOBALS['wp_version'] ),
     54        sprintf(
     55            /* translators: %s: WordPress version. */
     56            __( 'Twenty Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentyfourteen' ),
     57            $GLOBALS['wp_version']
     58        ),
    5159        '',
    5260        array(
     
    6472function twentyfourteen_preview() {
    6573    if ( isset( $_GET['preview'] ) ) {
    66         /* translators: %s: WordPress version. */
    67         wp_die( sprintf( __( 'Twenty Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentyfourteen' ), $GLOBALS['wp_version'] ) );
     74        wp_die(
     75            sprintf(
     76                /* translators: %s: WordPress version. */
     77                __( 'Twenty Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentyfourteen' ),
     78                $GLOBALS['wp_version']
     79            )
     80        );
    6881    }
    6982}
Note: See TracChangeset for help on using the changeset viewer.