Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/yehudatiram/atr-mobile-detect/archive/refs/heads/master.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Wordpress plugin - Detect mobile devices.
Based on https://github.com/serbanghita/Mobile-Detect
Acivate the plugin and then you can use the condtion in functions.php or your plugin code.
Use:
(see code examples at https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples )
$mobile_detect = new ATR_Mobile_Detect;
if ( $mobile_detect->isMobile() ) {
//Do something
}