Automattic\Jetpack\Device_Detection

User_Agent_Info::is_wordpress_for_ios()public staticWPSCache 1.0

Detects if the current UA is WordPress for iOS

Method of the class: User_Agent_Info{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = User_Agent_Info::is_wordpress_for_ios();

User_Agent_Info::is_wordpress_for_ios() code WPSCache 1.11.0

public static function is_wordpress_for_ios() {
	if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
		return false;
	}

	$ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating.
	if ( false !== strpos( $ua, 'wp-iphone' ) ) {
		return true;
	} else {
		return false;
	}
}