W3cubDocs

/WordPress

WP_Customize_Manager::is_ios(): bool

Determines whether the user agent is iOS.

Return

bool Whether the user agent is iOS.

Source

public function is_ios() {
	return wp_is_mobile() && preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] );
}

Changelog

Version Description
4.4.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_manager/is_ios