wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
_device_can_upload is private and should not be used in themes or plugins directly.
_device_can_upload › WordPress Function
Seit3.4.0
Veraltetn/v
› _device_can_upload ( Keine Parameter )
Zugriff: |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Tests if the current device has the capability to upload files.
Ähnliche Funktionen: media_handle_upload, _wp_handle_upload, wp_import_handle_upload, wp_handle_upload, media_upload_form
Quellcode
function _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; }