wp-includes/functions.php:7335Tests if the current device has the capability to upload files.
boolfunction _device_can_upload() { if ( ! wp_is_mobile() ) { return true; } $ua = $_SERVER['HTTP_USER_AGENT']; if ( str_contains( $ua, 'iPhone' ) || str_contains( $ua, 'iPad' ) || str_contains( $ua, 'iPod' ) ) { return preg_match( '#OS ([\d_]+) like Mac OS X#', $ua, $version ) && version_compare( $version[1], '6', '>=' ); } return true;}Introduced in 3.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.