wp-includes/class-wp-theme-json.php:790Converts a valid viewport breakpoint size to pixels for ordering checks.
$valuemixedfloat|null private static function get_viewport_breakpoint_value_in_pixels( $value ) { if ( ! static::is_valid_viewport_breakpoint_size( $value ) ) { return null; } $value = trim( $value ); $unit = substr( $value, -3 ); if ( 'rem' === $unit ) { $number = (float) substr( $value, 0, -3 ); } else { $unit = substr( $value, -2 ); $number = (float) substr( $value, 0, -2 ); } /* * Use the most common browser default font size as the base for em/rem * media query conversions. This pixel value is only used to compare * breakpoint order; generated media queries keep the original units. */ return 'px' === $unit ? $number : $number * 16; }Introduced in 7.1.0.
Signature, return type and hooks compared across 1 parsed release.
src/wp-includes/class-wp-theme-json.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.