bnomei/kirby3-mobile-detect

Static Class and Page Methods for using Mobile Detect Lib

Installs: 121

Dependents: 0

Suggesters: 0

Stars: 5

Watchers: 0

Forks: 0

Open Issues: 0

Type:kirby-plugin

1.3.0 2019-02-05 22:43 UTC

README

GitHub release License Kirby Version Kirby 3 Pluginkit

Static Class and Page Methods for using Mobile Detect.

Commercial Usage

This plugin is free but if you use it in a commercial project please consider to

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 or
  • composer 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();

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

MIT

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.