Title: Browser Body Classes with Shortcodes
Author: thomstark
Published: <strong>01.10.2013</strong>
Last modified: 09.05.2014

---

Търсене на разширения

![](https://ps.w.org/browser-body-classes-with-shortcodes/assets/banner-772x250.
jpg?rev=785060)

Това разширение **не е обновявано повече от 2 години**. Може вече да не се поддържа
и да има проблеми със съвместимостта при използването му на по-нови версии на WordPress.

![](https://s.w.org/plugins/geopattern-icon/browser-body-classes-with-shortcodes_ebecee.
svg)

# Browser Body Classes with Shortcodes

 От [thomstark](https://profiles.wordpress.org/thomstark/)

[Изтегляне](https://downloads.wordpress.org/plugin/browser-body-classes-with-shortcodes.zip)

 * [Детайли](https://bg.wordpress.org/plugins/browser-body-classes-with-shortcodes/#description)
 * [Оценки](https://bg.wordpress.org/plugins/browser-body-classes-with-shortcodes/#reviews)
 *  [Инсталиране](https://bg.wordpress.org/plugins/browser-body-classes-with-shortcodes/#installation)
 * [Разработка](https://bg.wordpress.org/plugins/browser-body-classes-with-shortcodes/#developers)

 [Поддръжка](https://wordpress.org/support/plugin/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+

## Снимки на разширението

[⌊A shiny button.⌉⌊A shiny button.⌉[

A shiny button.

[⌊To insert the shortcode, you have to click stuff. Sorry, no direct Brain-to-WordPress
feature yet, but it's in the plans.⌉⌊To insert the shortcode, you have to click 
stuff. Sorry, no direct Brain-to-WordPress feature yet, but it's in the plans.⌉[

To insert the shortcode, you have to click stuff. Sorry, no direct Brain-to-WordPress
feature yet, but it’s in the plans.

[⌊See what happens when you click stuff? Wait... what's that shiny box down below?⌉⌊
See what happens when you click stuff? Wait... what's that shiny box down below?⌉[

See what happens when you click stuff? Wait… what’s that shiny box down below?

[⌊Oh, it's the meta box, with another shortcode generator. You know... options. 
People like options.⌉⌊Oh, it's the meta box, with another shortcode generator. You
know... options. People like options.⌉[

Oh, it’s the meta box, with another shortcode generator. You know… options. People
like options.

[⌊Yes, you have to click stuff here too.⌉⌊Yes, you have to click stuff here too.⌉[

Yes, you have to click stuff here too.

[⌊And more stuff. Then you have to copy and paste it. What a rip-off.⌉⌊And more 
stuff. Then you have to copy and paste it. What a rip-off.⌉[

And more stuff. Then you have to copy and paste it. What a rip-off.

[⌊Look. More options.⌉⌊Look. More options.⌉[

Look. More options.

## Инсталиране

 1. Upload ‘browser-body-classes-with-shortcodes/’ to the ‘/wp-content/plugins/’ directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Configure your Options at Settings > Browser Body Classes Options
 4. Use the provided shortcodes on your pages and posts, or use the provided body classes
    to style your own browser-specific and device-specific content.

## Отзиви

There are no reviews for this plugin.

## Сътрудници и разработчици

“Browser Body Classes with Shortcodes” е софтуер с отворен код. Към разширението
са допринесли следните хора:

Сътрудници

 *   [ thomstark ](https://profiles.wordpress.org/thomstark/)

[Превеждане на “Browser Body Classes with Shortcodes” на вашия език.](https://translate.wordpress.org/projects/wp-plugins/browser-body-classes-with-shortcodes)

### Имате интерес към разработване?

[Преглеждане на кода](https://plugins.trac.wordpress.org/browser/browser-body-classes-with-shortcodes/),
разглеждане на [SVN хранилище](https://plugins.svn.wordpress.org/browser-body-classes-with-shortcodes/),
или абонамент към [програмната история (log)](https://plugins.trac.wordpress.org/log/browser-body-classes-with-shortcodes/)
чрез [RSS](https://plugins.trac.wordpress.org/log/browser-body-classes-with-shortcodes/?limit=100&mode=stop_on_copy&format=rss).

## Списък с промени

#### 1.6

 * Compat with WordPress 3.9.

#### 1.5

Some important additions in this release:

 * Added 9 new device-specific body-classes, including catch-alls like: desktop,
   handheld, tablet, mobile, ios.
 * Added option to choose onto which row of the TinyMCE panel your shortcode button
   will go.
 * Fixed a few minor bugs.

#### 1.4

Major Additions in this release:

 * Added 16 new browser and device-specific body classes, bringing the total to 
   33.
 * Added another option for automated shortcode generation: a button on your Visual
   Editor toolbar opens up the generator in a modal window. You still have the Meta
   Box. Either or both can be disabled, or access-controlled based on user capabilities.
 * The „Configure Options“ button in the Meta Box now only shows up for Administrators.
 * Completely revamped the PHP that powers the shortcodes, now optimized to reduce
   server load.
 * Fixed some problems with a few of the existing body classes, specifically Opera,
   Android, and iPhone. All better.
 * Tweaked some styles.
 * Added support and review links to the Options page.

#### 1.3

Major Additions:

 * Now includes Shortcode Generator Meta Box located beneath the page editor, and
   an Options page, with the option to restrict access to the Meta Box according
   to user capability, or disable it altogether.

#### 1.2

 * Cleaned up code for IE version checker. No functional change from 1.1

#### 1.1

 * This version no longer uses CSS to show or hide content. Everything is done with
   PHP.
 * Fixed problem with IE.

#### 1.0

 * Initial release

## Мета

 *  Version **1.6**
 *  Last updated **Преди 12 години **
 *  Active installations **10+**
 *  WordPress version ** 3.3 или по-висока **
 *  Tested up to **3.9.40**
 *  Language
 * [English (US)](https://wordpress.org/plugins/browser-body-classes-with-shortcodes/)
 * Tags
 * [browser](https://bg.wordpress.org/plugins/tags/browser/)[classes](https://bg.wordpress.org/plugins/tags/classes/)
 *  [Разширен изглед](https://bg.wordpress.org/plugins/browser-body-classes-with-shortcodes/advanced/)

## Оценки

 5 out of 5 stars.

 *  [  4 5-star reviews     ](https://wordpress.org/support/plugin/browser-body-classes-with-shortcodes/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/browser-body-classes-with-shortcodes/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/browser-body-classes-with-shortcodes/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/browser-body-classes-with-shortcodes/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/browser-body-classes-with-shortcodes/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/browser-body-classes-with-shortcodes/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/browser-body-classes-with-shortcodes/reviews/)

## Сътрудници

 *   [ thomstark ](https://profiles.wordpress.org/thomstark/)

## Поддръжка

Имате да кажете нещо? Имете нужда от помощ?

 [Разглеждане на форумите за поддръжка](https://wordpress.org/support/plugin/browser-body-classes-with-shortcodes/)