_customizer_mobile_viewport_meta() WordPress Function

This function allows you to modify the mobile viewport meta tag. This can be used to improve the mobile browsing experience on your site.

_customizer_mobile_viewport_meta( string $viewport_meta ) #

Adds viewport meta for mobile in Customizer.


Description

Hooked to the ‘admin_viewport_meta’ filter.


Top ↑

Parameters

$viewport_meta

(string)(Required)The viewport meta.


Top ↑

Return

(string) Filtered viewport meta.


Top ↑

Source

File: wp-admin/includes/misc.php

function _customizer_mobile_viewport_meta( $viewport_meta ) {
	return trim( $viewport_meta, ',' ) . ',minimum-scale=0.5,maximum-scale=1.2';
}

Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.