bnomei / kirby3-mobile-detect
Static Class and Page Methods for using Mobile Detect Lib
Fund package maintenance!
bnomei
Patreon
buymeacoff.ee/bnomei
paypal.me/bnomei
Installs: 1 842
Dependents: 0
Suggesters: 1
Security: 0
Stars: 17
Watchers: 1
Forks: 0
Open Issues: 1
Type:kirby-plugin
Requires
- php: >=8.0
- getkirby/composer-installer: ^1.1
- mobiledetect/mobiledetectlib: ^2.8
Requires (Dev)
- getkirby/cms: ^3.5
- php-coveralls/php-coveralls: ^2.1
- phpunit/phpunit: ^9.5
README
Static Class and Page Methods for using Mobile Detect.
Commercial Usage
Support open source!
This plugin is free but if you use it in a commercial project please consider to sponsor me or make a donation.
If my work helped you to make some cash it seems fair to me that I might get a little reward as well, right?
Be kind. Share a little. Thanks.
‐ Bruno
Installation
- unzip master.zip as folder
site/plugins/kirby3-mobile-detect
or git submodule add https://github.com/bnomei/kirby3-mobile-detect.git site/plugins/kirby3-mobile-detect
orcomposer require bnomei/kirby3-mobile-detect
$detect = $page->detect(); // https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples $detect->is('Chrome'); $isMobile = $page->isMobile(); // or $isMobile = Bnomei\MobileDetect::instance()->isMobile(); $isTablet = $page->isTablet();
TIP: With
Bnomei\MobileDetect::instance()
you have access to all detections functions.
Dependencies
Disclaimer
This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please create a new issue.
License
It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.