Browser Body Classes with Shortcodes

Browser Body Classes with Shortcodes Install Statistics

-11
0%
Today: 0 Yesterday: 11 All-time: 7,117 downloads
Browser Body Classes with Shortcodes Icon

Try plugin: Browser Body Classes with Shortcodes

We'll create fresh WordPress site with Browser Body Classes with Shortcodes installed. You have 20 minutes to test the plugin after that site we'll be deleted.

Takes ~10 seconds to install.

About Browser Body Classes with Shortcodes

Adds browser-specific body classes for styling, and shortcodes to show or hide content to/from specified browsers and devices.

4


0


0


0


0

updated: 10 years ago
since: 11 years ago
author: Thom Stark

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+