這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Accordion Shortcode

描述

To make the accordions appear the way you want you need to add your own styling to them
Lets you add accordion to your post and pages.

By using the following shortcodes

[accordions]
[accordion title="title1"] tab content [/accordion]
[accordion title="title2"] another content tab [/accordion]
[/accordions]

will generate the following html.

<div id="random-accordion-id-872" class="accordions-shortcode">
            <h3 id="title1-0" ><a href="#title1-0">title1</a></h3>

            <div class="accordian-shortcode-content" >


 Some Text<br />
            </div>

            <h3 id="title2-1" ><a href="#title2-1">title2</a></h3>

            <div class="accordian-shortcode-content " >


 Some Text<br />
            </div>

</div>

Additional attributes that you could pass into the shortcode
[accordions autoHeight=’true’ disabled=’false’ active=0 clearStyle=false collapsible=false fillSpace=false ]
[accordion title=’title1′ class=’new-class’]
Some Text
[/accordion]
[accordion title=’title2′ class=’new-class’]
Some Text
[/accordion]
[/accordions]

Sample CSS

Here is some sample css to get you started.
Another place to look for it would be the http://jqueryui.com/themeroller/, The shortcode used the jQuery UI to generate the accordion.

.ui-accordion-header{
    margin:5px 0 0;
}
.ui-accordion-header a{
    padding:5px 12px;
    background: #CCC; 
    color:#FFF;
    display:block;
}
.ui-accordion-header.ui-state-active a,
.ui-accordion-header a:hover{
    background-color: #DDD;
}
.ui-accordion-content{
    padding-top:10px;
}

安裝

  1. Extract the zip file into wp-content/plugins/ in your WordPress installation
  2. Go to plugins page to activate
  3. Add styles to make the accordion look the way you want.

評價

There are no reviews for this plugin.

貢獻者及開發者

“Accordion Shortcode” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Accordion Shortcode 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.2.1

  • removed php warnings

1.2

Trying to commit the changes from git

1.1

  • improved js loading. js only gets loaded when it is needed
  • fixed bugs

1.0

  • Initial release