Making WordPress.org

Changeset 8066


Ignore:
Timestamp:
01/10/2019 06:05:24 AM (6 years ago)
Author:
dd32
Message:

WordPress.org Main Theme: Use the Serve Happy constants for the PHP requirements to reduce the number of locations it needs updating in.

Props flixos90, dd32.
Fixes #4009.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-requirements.php

    r7389 r8066  
    99
    1010namespace WordPressdotorg\MainTheme;
     11use WordPressdotorg\API\Serve_Happy\RECOMMENDED_PHP;
     12use WordPressdotorg\API\Serve_Happy\MINIMUM_PHP;
    1113
    1214$GLOBALS['menu_items'] = [
     
    4446                            <?php
    4547                            /* translators: 1: URL to PHP; 2: PHP Version */
    46                             printf( wp_kses_post( __( '<a href="%1$s">PHP</a> version %2$s or greater.', 'wporg' ) ), esc_url( 'http://www.php.net/' ), '7.2' );
     48                            printf( wp_kses_post( __( '<a href="%1$s">PHP</a> version %2$s or greater.', 'wporg' ) ), esc_url( 'http://www.php.net/' ), RECOMMENDED_PHP );
    4749                            ?>
    4850                        </li>
     
    7375                            /* translators: 1: PHP Version including; 2: MySQL Version */
    7476                            wp_kses_post( __( 'Note: If you are in a legacy environment where you only have older PHP or MySQL versions, WordPress also works with PHP %1$s+ and MySQL %2$s+, but these versions have reached official End Of Life and as such <strong>may expose your site to security vulnerabilities</strong>.', 'wporg' ) ),
    75                             '5.2.4',
     77                            MINIMUM_PHP,
    7678                            '5.0'
    7779                        );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-download.php

    r7756 r8066  
    99
    1010namespace WordPressdotorg\MainTheme;
     11use WordPressdotorg\API\Serve_Happy\RECOMMENDED_PHP;
    1112
    1213$hosts = [
     
    147148                            <?php
    148149                            printf(
    149                                 /* translators: 1: URL to PHP website; 2: URL to MySQL website; 3: URL to MariaDB website */
    150                                 wp_kses_post( __( 'We recommend servers running version 7.2 or greater of <a href="%1$s">PHP</a> and <a href="%2$s">MySQL</a> version 5.6 <em>OR</em> <a href="%3$s">MariaDB</a> version 10.0 or greater.', 'wporg' ) ),
    151                                 esc_url( 'http://www.php.net/' ),
     150                                /* translators: 1: PHP version; 2: URL to PHP website; 3: URL to MySQL website; 4: MySQL version; 5: URL to MariaDB website; 6: MariaDB version */
     151                                wp_kses_post( __( 'We recommend servers running version %1$s or greater of <a href="%2$s">PHP</a> and <a href="%3$s">MySQL</a> version %4$s <em>OR</em> <a href="%5$s">MariaDB</a> version %6$s or greater.', 'wporg' ) ),
     152                                RECOMMENDED_PHP,
     153                                esc_url( 'https://www.php.net/' ),
    152154                                esc_url( 'https://www.mysql.com/' ),
    153                                 esc_url( 'https://mariadb.org/' )
     155                                '5.6',
     156                                esc_url( 'https://mariadb.org/' ),
     157                                '10.0'
    154158                            );
    155159                            ?>
Note: See TracChangeset for help on using the changeset viewer.