Conversation
supportLooks like a very slick plugin 🙂 Just a quick question … what defines a is_mobile()? is it based on screen size or is there some server side detection happening? does it cover tablets? Many thank in advance https://wordpress.org/plugins/wp247-body-classes/
The is-mobile class is based on the results returned from WordPress wp_is_mobile() function. Documentation for this function can be located at http://codex.wordpress.org/Function_Reference/wp_is_mobile . wp_is_mobile() makes its decision based on the HTTP_USER_AGENT value that is provided by the browser. It has nothing to do with screen size. The following HTTP_USER_AGENT values result in wp_is_mobile() returning TRUE and thus, the is-mobile body class being set. Android Silk/ Kindle BlackBerry Opera Mini Opera Mobi Any other HTTP_USER_AGENT value results in wp_is_mobile() returning FALSE and the is-not-mobile body class being set.
Not sure what you mean by “does it cover tables?” Can you elaborate?
Hi, thats great and thanks for the quick reply 🙂 The other query was “tablets” as opposed to “tables”, so the likes of iPad etc … but your initial reply covers it Thanks again
Oops. Sorry about that. What a difference that little “t” makes.
🙂 for sure … spelling v semantics … have been there a few times 😉 excellent plugin … good luck with the downloads !!
Just an FYI – you asked for it, we delivered. WP247 Body Classes version 1.1 now supports various mobile attributes as determined by mobiledetect.net’s Mobile_Detect script. One of those attributes is whether or not the mobile device is a tablet. So, you can activate and then use .is-tablet or .is-not-tablet body classes.
The is-mobile class is based on the results returned from WordPress wp_is_mobile() function. Documentation for this function can be located at http://codex.wordpress.org/Function_Reference/wp_is_mobile . wp_is_mobile() makes its decision based on the HTTP_USER_AGENT value that is provided by the browser. It has nothing to do with screen size. The following HTTP_USER_AGENT values result in wp_is_mobile() returning TRUE and thus, the is-mobile body class being set. Android Silk/ Kindle BlackBerry Opera Mini Opera Mobi Any other HTTP_USER_AGENT value results in wp_is_mobile() returning FALSE and the is-not-mobile body class being set.
Not sure what you mean by “does it cover tables?” Can you elaborate?
Hi, thats great and thanks for the quick reply 🙂 The other query was “tablets” as opposed to “tables”, so the likes of iPad etc … but your initial reply covers it Thanks again
Oops. Sorry about that. What a difference that little “t” makes.
🙂 for sure … spelling v semantics … have been there a few times 😉 excellent plugin … good luck with the downloads !!
Just an FYI – you asked for it, we delivered. WP247 Body Classes version 1.1 now supports various mobile attributes as determined by mobiledetect.net’s Mobile_Detect script. One of those attributes is whether or not the mobile device is a tablet. So, you can activate and then use .is-tablet or .is-not-tablet body classes.