関数 _device_can_upload()
定義ファイル :/blog/wp-includes/functions.php 22
_device_can_upload()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | /** * Test if the current device has the capability to upload files. * * @since 3.4.0 * @access private * * @return bool true|false Whether the device is able to upload files. */ function _device_can_upload() { if ( ! wp_is_mobile() ) return true; $ua = $_SERVER['HTTP_USER_AGENT']; if ( strpos($ua, 'iPhone') !== false || strpos($ua, 'iPad') !== false || strpos($ua, 'iPod') !== false ) { return preg_match( '#OS ([\d_]+) like Mac OS X#', $ua, $version ) && version_compare( $version[1], '6', '>=' ); } return true; } |