Title: WP Shortcodes API
Author: smccafferty
Published: <strong>2012 年 2 月 1 日</strong>
Last modified: 2012 年 10 月 18 日

---

搜尋外掛

![](https://ps.w.org/wordpress-shortcodes-api/assets/banner-772x250.png?rev=630313)

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

![](https://s.w.org/plugins/geopattern-icon/wordpress-shortcodes-api_d94965.svg)

# WP Shortcodes API

 由 [smccafferty](https://profiles.wordpress.org/smccafferty/) 開發

[下載](https://downloads.wordpress.org/plugin/wordpress-shortcodes-api.0.8.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/wordpress-shortcodes-api/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/wordpress-shortcodes-api/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/wordpress-shortcodes-api/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/wordpress-shortcodes-api/#developers)

 [技術支援](https://wordpress.org/support/plugin/wordpress-shortcodes-api/)

## 外掛說明

The plugin take all of the data registered and created a multi-dimensional
 array
in an option called ‘_shortcodes’. Existing shortcodes that WP is away of are also
stored here with just their name and callback.

A few static methods for checking on shortcode info are provided.
 GetShortcodeAtts(
$shortcode_name) ShortcodeInPost($shortcode_name, $post_id)

Creating a new media button in the editor is easy with the `add_media_button()`

method. Just pass your shortcode name, attributes, a page title, introductory text,
and an icon image url.

## 安裝方式

 1. Upload `wp-shortcodes-api.php` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. example implementation:
 4.     ```
        if (class_exists('WP_Shortcodes_API')) {
                WP_Shortcodes_API::GetInstance()->
                    add_shortcode($shortcode_name, $callback)->
                    add_att($att_name)->
                    add_att($att_name2)->
                    add_media_button(array(
                        'shortcode' => $shortcode_name,
                        'title' => $thickbox_title,
                        'icon_url' => $button_icon_url,
                        'intro' => $introduction_to_form,
                        'input_atts' => WP_Shortcodes_API::GetShortcodeAtts($shortcode_name)
                    ));
            } else {
                // fallback if the plugin is unavailable.
                add_shortcode($shorcode_name, $callback);
            }
        ```
    

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈WP Shortcodes API〉的開發相關工作。

參與者

 *   [ smccafferty ](https://profiles.wordpress.org/smccafferty/)
 *   [ markparolisi ](https://profiles.wordpress.org/markparolisi/)
 *   [ voceplatforms ](https://profiles.wordpress.org/voceplatforms/)

[將〈WP Shortcodes API〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/wordpress-shortcodes-api)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/wordpress-shortcodes-api/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/wordpress-shortcodes-api/)，
或透過 [RSS](https://plugins.trac.wordpress.org/log/wordpress-shortcodes-api/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/wordpress-shortcodes-api/)。

## 變更記錄

#### 0.1

Initial release.

## 中繼資料

 *  版本 **0.8**
 *  最後更新 **14 年前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 3.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **3.4.2**
 *  語言
 * [English (US)](https://wordpress.org/plugins/wordpress-shortcodes-api/)
 * 標籤:
 * [shortcode](https://tw.wordpress.org/plugins/tags/shortcode/)
 *  [進階檢視](https://tw.wordpress.org/plugins/wordpress-shortcodes-api/advanced/)

## 評分

這個項目尚無任何評論記錄。

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

[查看全部使用者評論](https://wordpress.org/support/plugin/wordpress-shortcodes-api/reviews/)

## 參與者

 *   [ smccafferty ](https://profiles.wordpress.org/smccafferty/)
 *   [ markparolisi ](https://profiles.wordpress.org/markparolisi/)
 *   [ voceplatforms ](https://profiles.wordpress.org/voceplatforms/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/wordpress-shortcodes-api/)