plugin-icon

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.
Évaluations
5
Mis à jour récemment
May 9, 2014
Version
1.6
Installations actives
40
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.

  • 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+

Gratuitsur le plan Creator
En procédant à l’installation, vous acceptez les Conditions d’utilisation de WordPress.com ainsi que les Conditions de l’extension tierce.
Installations actives
40
Testé jusqu’à version
3.9.40
Cette extension est disponible en téléchargement pour être utilisée sur votre installation WordPress auto-hébergée.