
內容簡介
這個外掛將所有註冊的資料創建成一個多維陣列,並存儲在名為 ‘_shortcodes’ 的選項中。現有的 WordPress 知道的短碼也存儲在這裡,只有它們的名稱和回調。
還提供了一些檢查短碼資訊的靜態方法。
GetShortcodeAtts($shortcode_name)
ShortcodeInPost($shortcode_name, $post_id)。
使用 add_media_button() 方法在編輯器中創建新的媒體按鈕非常簡單。只需傳遞您的短碼名稱、屬性、頁面標題、介紹文本和圖標圖像網址即可。
外掛標籤
開發者團隊
原文外掛簡介
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.
