General: Add missing initial-scale value in viewport meta tags.

The viewport meta should include `initial-scale=1.0` to ensure that high DPI/mobile display works as expected.

References:
* [https://css-tricks.com/probably-use-initial-scale1/ CSS-Tricks: Probably Use initial-scale=1]
* [https://www.sitepoint.com/community/t/is-it-necessary-to-include-initial-scale-1-0-in-the-meta-viewport-tag/455119 SitePoint Forums: Is it necessary to include initial-scale=1.0 in the meta viewport tag?]

Follow-up to [59026].

Props dhruvang21, sabernhardt, kkmuffme, mukesh27, narenin, swissspidy, SergeyBiryukov.
Fixes #61988.
Built from https://develop.svn.wordpress.org/trunk@59027


git-svn-id: http://core.svn.wordpress.org/trunk@58423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2024-09-17 00:03:54 +00:00
parent 7a04eb9b86
commit 3cd067ee34
7 changed files with 7 additions and 7 deletions

View File

@ -67,7 +67,7 @@ function display_header( $body_classes = '' ) {
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta name="viewport" content="width=device-width" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow" />
<title><?php _e( 'WordPress &rsaquo; Installation' ); ?></title>

View File

@ -14,7 +14,7 @@ header( 'Content-Type: text/html; charset=utf-8' );
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta name="viewport" content="width=device-width" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow" />
<title><?php _e( 'WordPress &rsaquo; Database Repair' ); ?></title>

View File

@ -105,7 +105,7 @@ function setup_config_display_header( $body_classes = array() ) {
<!DOCTYPE html>
<html<?php echo $dir_attr; ?>>
<head>
<meta name="viewport" content="width=device-width" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow" />
<title><?php _e( 'WordPress &rsaquo; Setup Configuration File' ); ?></title>

View File

@ -59,7 +59,7 @@ header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta name="viewport" content="width=device-width" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php echo get_option( 'blog_charset' ); ?>" />
<meta name="robots" content="noindex,nofollow" />
<title><?php _e( 'WordPress &rsaquo; Update' ); ?></title>

View File

@ -3868,7 +3868,7 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) {
<html <?php echo $dir_attr; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $parsed_args['charset']; ?>" />
<meta name="viewport" content="width=device-width">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php
if ( function_exists( 'wp_robots' ) && function_exists( 'wp_robots_no_robots' ) && function_exists( 'add_filter' ) ) {
add_filter( 'wp_robots', 'wp_robots_no_robots' );

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7-alpha-59026';
$wp_version = '6.7-alpha-59027';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -462,7 +462,7 @@ function wp_shake_js() {
*/
function wp_login_viewport_meta() {
?>
<meta name="viewport" content="width=device-width" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<?php
}