Please see the example (from the upstream library) at https://mobiledetect.net/ . Basically, we use the class name TinyWP_Mobile_Detect
instead of the default Mobile_Detect
to avoid conflict with other plugins that may include the same upstream package.
Basically, your code would look like this…
$detect = new TinyWP_Mobile_Detect;
// Any tablet device.
if( $detect->isTablet() ){
}
I hope that helps!
-
This reply was modified 4 years, 2 months ago by Pothi Kalimuthu. Reason: Fix class name