_device_can_upload
函数
_device_can_upload ( No parameters )
- Access
- Private
- 返回值
-
- (bool) Whether the device is able to upload files.
- 定义位置
-
-
wp-includes/functions.php
, line 7003
-
wp-includes/functions.php
- 引入
- 3.4.0
- 弃用
- –
Tests if the current device has the capability 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; }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。