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/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}
Note: See TracChangeset for help on using the changeset viewer.