WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/20/2019 10:01:36 PM (11 months ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Remove all code using a version_compare() with a PHP version older than PHP 5.6.

Props jrf.
Fixes #48074.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-locale.php

    r45932 r46214  
    200200        $thousands_sep = __( 'number_format_thousands_sep' );
    201201
    202         if ( version_compare( PHP_VERSION, '5.4', '>=' ) ) {
    203             // Replace space with a non-breaking space to avoid wrapping.
    204             $thousands_sep = str_replace( ' ', ' ', $thousands_sep );
    205         } else {
    206             // PHP < 5.4.0 does not support multiple bytes in thousands separator.
    207             $thousands_sep = str_replace( array( '&nbsp;', '&#160;' ), ' ', $thousands_sep );
    208         }
     202        // Replace space with a non-breaking space to avoid wrapping.
     203        $thousands_sep = str_replace( ' ', '&nbsp;', $thousands_sep );
    209204
    210205        $this->number_format['thousands_sep'] = ( 'number_format_thousands_sep' === $thousands_sep ) ? ',' : $thousands_sep;
Note: See TracChangeset for help on using the changeset viewer.