前言介紹
- 這款 WordPress 外掛「Browser Body Classes with Shortcodes」是 2013-09-30 上架。
- 目前有 20 個安裝啟用數。
- 上一次更新是 2014-05-09,距離現在已有 4013 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.3 以上版本才可以安裝。
- 有 4 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
class | browser | classes | Body Classes | Browser Body Classes |
內容簡介
該外掛為網站增加瀏覽器特定的 body class,讓網站樣式設計更加容易,並提供 shortcode 功能,可讓特定瀏覽器和裝置上顯示或隱藏內容。
此版本(v1.6)相容於 WordPress 3.9 以上版本。
此版本(v1.5)新增了許多 body classes,其中包括常用的 desktop、handheld、mobile 和 tablet 等。
此版本(v1.4)增加了 Shortcode Generator Modal Window 功能和 16 種新的瀏覽器 body classes,共計 33 種。
此版本(v1.3)加入了 Shortcode Generator Meta Box 功能和 Options 頁面,讓您可以限制使用者權限以存取 Meta Box 或完全禁用此功能。
「Browser Body Classes with Shortcodes」外掛提供超過 40 種瀏覽器特定的 body class,讓您輕鬆設計不同平台和裝置的網站樣式。此外掛還提供兩個強大且簡單的 shortcode 功能,可指定要在哪些瀏覽器或裝置上顯示或隱藏內容。對於不想記得所有瀏覽器名稱的人來說,這個外掛還提供兩種 shortcode 產生器,讓您控制誰可以使用這些功能。
這兩個 shortcode 都只有一個必填屬性:[showto browser=””][/showto] 和 [hidefrom browser=””][/hidefrom]
例如:[showto browser=”firefox ie10″] 您的內容 [/showto]
此內容僅會在 Firefox 和 IE10 上顯示。
例如:[hidefrom browser=”opera safari chrome”] 您的內容 [/hidefrom]
此內容僅不會在 Opera、Chrome 和 Safari 上顯示。
例如:[hidefrom browser=”unknown”] 您的內容 [/hidefrom]
此內容會在以下瀏覽器選項以外的瀏覽器上顯示。
注意:您可以在這些 shortcode 內使用其他 shortcode。您也可以在 [showto] shortcode 中放入 [hidefrom] shortcode,但不能反過來放。
例如:[showto browser=”firefox chrome”]Chrome 和 Firefox 看得到此內容。 [hidefrom browser=”firefox”]只有 Chrome 能看到但 Firefox 看不到。[/hidefrom][/showto]
瀏覽器選項必須全部小寫,而如果使用多個瀏覽器選項,則它們之間必須包含空格或逗號。可接受的瀏覽器選項如下:
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
原文外掛簡介
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+
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Browser Body Classes with Shortcodes」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
js | 1.0 | 1.1 | 1.2 | 1.5 | css | images | includes | readme.txt | browser-body-classes-with-shortcodes.php |
延伸相關外掛(你可能也想知道)
Custom Body Class 》這個外掛程式可供您為頁面或文章添加獨特的 CSS 類別。, 範例, TasteWP 已經準備好一個快速的 WordPress 實例來展示此外掛程式,您可以在 此範例 中試用它。,...。
Widget Classes 》Widget Classes 讓您可以在個別的小工具上添加類別,供主題使用。這是通過在小工具表單的末尾附加一個額外的表單欄位來完成的,您可以在這個欄位中輸入該類別...。
The School Management – Education & Learning Management 》學校管理系統是一個 WordPress 外掛程式,可管理學校及其實體,例如班級、分科、學生、學生證、教師、員工、費用、發票、公告板等等。, 如何使用短代碼?, 在...。
Add Custom Body Class 》這是一種非常簡單的方式可以加入 body class,特別適合用於建立主題或網站。。
Add URL Slugs as Body Classes 》此外掛會將 URL 轉換成多個片段作為 body 標籤的額外, 分類。例如,如果您的頁面 URL 是:, http://www.example.com/2012/02/24/wordpress-plugin-add-url-sl...。
Slug as body class 》想要針對每個頁面或文章應用不同的 CSS 樣式嗎?, 此外掛會在 HTML 的 body tag 中添加一個獨特的類別。這個類別的格式為「[post_type]-[post_name]」。例如...。
Navigation Menu IDs & Classes 》這個外掛僅會在導覽選單中添加符合佈景主題所有者所需的類別,, 並為每個 li 加入一個唯一 ID,同時移除所有空的 class 屬性。, 更多關於這個外掛的資訊可以...。
Holiday class post calendar 》Holiday Class Post Calendarは、日曜、土曜、祭日及び独自の休日などのスタイル設定をするためのclassを付加する投稿カレンダーです。, 独自の休日のスタイ...。
Plugin Name: Classy wp_list_pages 》這個外掛會在 WordPress 的 wp_list_pages() 和 wp_nav_menu() 函式所產生的 LI 標籤中,新增類別或 ID(由您選擇)。, 在沒有存取這些屬性的情況下,要對這...。
LH Add Roles to Body Class 》您是否想要根據登入使用者角色,不同地樣式化您的內容呢?, 現在您可以啦!只需啟用這個外掛,您的網站就能夠做到。, 喜歡這個外掛嗎?請考慮留下5星評價。, ...。
Extra Classes 》新增遺漏的類別, 新增遺漏的選單狀態。新增的類別包括:, , current-page-parent 和 current_page_parent, current-page-ancestor 和 current_page_ancestor,...。
WP-HideThat 》這個外掛程式允許您指定特定的 CSS 類別和 ID 被隱藏。您可以透過 CSS 選擇器指定標題或其他任何內容以移除它們。, 可以啟用於每個頁面的基礎上。, 您可以在...。
Blocky! – Additional Content Blocks 》你曾經有需要新增網頁內容區塊卻沒有必要加入 div 或者編輯主題檔案或使用 widget 嗎?你是 WordPress 新手,對於前面那句話毫不理解嗎?不用害怕,現在有 Bl...。
WP Teacher 》WP Teacher 是一個外掛,允許老師利用 WordPress 將課程內容整合到他們的個人網站中,以增強學生的學習效果。 WP Teacher 具有易於使用的功能,可以使老師的 ...。
UORS External Course List 》這款外掛會在 WordPress 網誌的側欄上增加一個「快速預定」小工具。透過此小工具,您可以在側欄上顯示您提供的服務列表,讓顧客能夠在線上預約。在開發此外掛...。