WordPress.org

Make WordPress Core

Changeset 51155


Ignore:
Timestamp:
06/15/2021 03:23:07 PM (6 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.

Location:
trunk/src/wp-content/themes
Files:
6 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}
  • 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}
  • trunk/src/wp-content/themes/twentynineteen/inc/back-compat.php

    r46586 r51155  
    3737 */
    3838function twentynineteen_upgrade_notice() {
    39     /* translators: %s: WordPress version. */
    40     $message = sprintf( __( 'Twenty Nineteen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentynineteen' ), $GLOBALS['wp_version'] );
    41     printf( '<div class="error"><p>%s</p></div>', $message );
     39    printf(
     40        '<div class="error"><p>%s</p></div>',
     41        sprintf(
     42            /* translators: %s: WordPress version. */
     43            __( 'Twenty Nineteen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentynineteen' ),
     44            $GLOBALS['wp_version']
     45        )
     46    );
    4247}
    4348
     
    7378function twentynineteen_preview() {
    7479    if ( isset( $_GET['preview'] ) ) {
    75         /* translators: %s: WordPress version. */
    76         wp_die( sprintf( __( 'Twenty Nineteen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentynineteen' ), $GLOBALS['wp_version'] ) );
     80        wp_die(
     81            sprintf(
     82                /* translators: %s: WordPress version. */
     83                __( 'Twenty Nineteen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentynineteen' ),
     84                $GLOBALS['wp_version']
     85            )
     86        );
    7787    }
    7888}
  • trunk/src/wp-content/themes/twentyseventeen/inc/back-compat.php

    r46586 r51155  
    3737 */
    3838function twentyseventeen_upgrade_notice() {
    39     /* translators: %s: The current WordPress version. */
    40     $message = sprintf( __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ), $GLOBALS['wp_version'] );
    41     printf( '<div class="error"><p>%s</p></div>', $message );
     39    printf(
     40        '<div class="error"><p>%s</p></div>',
     41        sprintf(
     42            /* translators: %s: The current WordPress version. */
     43            __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ),
     44            $GLOBALS['wp_version']
     45        )
     46    );
    4247}
    4348
     
    5156function twentyseventeen_customize() {
    5257    wp_die(
    53         /* translators: %s: The current WordPress version. */
    54         sprintf( __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ), $GLOBALS['wp_version'] ),
     58        sprintf(
     59            /* translators: %s: The current WordPress version. */
     60            __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ),
     61            $GLOBALS['wp_version']
     62        ),
    5563        '',
    5664        array(
     
    7078function twentyseventeen_preview() {
    7179    if ( isset( $_GET['preview'] ) ) {
    72         /* translators: %s: The current WordPress version. */
    73         wp_die( sprintf( __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ), $GLOBALS['wp_version'] ) );
     80        wp_die(
     81            sprintf(
     82                /* translators: %s: The current WordPress version. */
     83                __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ),
     84                $GLOBALS['wp_version']
     85            )
     86        );
    7487    }
    7588}
  • 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}
  • trunk/src/wp-content/themes/twentythirteen/inc/back-compat.php

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