Plugin / Browser Body Classes with Shortcodes
Thom StarkDescription
Description
Adds browser-specific body classes for styling, and shortcodes to show or hide content to/from specified browsers and devices.
-
As of v1.6, compatible with WordPress 3.9.
-
As of v1.5, includes new body classes, including catch-alls like: desktop, handheld, mobile, and tablet.
-
As of v1.4, includes Shortcode Generator Modal Window, and 16 new Browser Body Classes, for a total of 33.
-
As of v1.3, includes Shortcode Generator Meta Box, and an Options page, with the option to restrict access to the Meta Box according to user capability, or disable it altogether.
Browser Body Classes with Shortcodes provides more than 40 browser-specific body classes to make styling your site for different platforms and devices a cinch. The plugin also comes with two powerful, yet simple, shortcodes to specify which browsers/devices to show content to, and which to hide it from. Still don’t feel like typing all those browser names? No worries! Browser Body Classes with Shortcodes comes with two different shortcode generators, with options to control who gets to use them.
The two shortcodes each have just one required attribute: [showto browser=””][/showto] and [hidefrom browser=””][/hidefrom]
- Example: [showto browser=”firefox ie10″] Your Content [/showto]
This will show the content only to Firefox and IE10.
- Example: [hidefrom browser=”opera safari chrome”] Your Content [/hidefrom]
This will hide the content only from Opera, Chrome, and Safari.
- Example: [hidefrom browser=”unknown”] Your Content [/hidefrom]
This will hide the content from any browser not in the list of browser options below.
Note: You can use other shortcodes inside these shortcodes. You can also put a [hidefrom] shortcode inside a [showto] shortcode, but not the other way around.
- Example: [showto browser=”firefox chrome”]Chrome and Firefox will see this. [hidefrom browser=”firefox”]Firefox won’t see this but Chrome will.[/hidefrom][/showto]
Browser options must be all lowercase and must contain a space or a comma between them if multiple are used. Acceptable Browser options are:
-
desktop
-
handheld
-
tablet
-
mobile
-
ios
-
firefox
-
chrome
-
safari
-
opera
-
maxthon
-
msie
-
ie5
-
ie6
-
ie7
-
ie8
-
ie9
-
ie10
-
ie11
-
ns4
-
lynx
-
samsunggalaxytablet
-
kindlefire
-
kindlesilk
-
ipad
-
iphone
-
ipod
-
android
-
blackberry
-
skyfire
-
operamobile
-
operamini
-
samsung
-
winmobile
-
iemobile
-
nokia
-
motorola
-
palm
-
symbian
-
lg
-
blazer
-
bolt
-
unknown
Requirements
-
PHP 5.2+
-
WordPress 3.3+
Ratings
Rating breakdown
DIRECTORY DISCLAIMER
The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.
The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.
Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.
While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.
wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.