內容簡介
這款基礎架構外掛程式會為單值分類法 (single-valued taxonomies) 新增基本的使用者介面,也就是提供了一個 select 的小工具。
使用方式
當您註冊自己的自訂分類法時,加入 single_value 參數設為 true 即可獲得單一值介面。如果需要選擇此項目,還需加上 required 參數設為 true。
register_taxonomy(
'astrological_sign',
array( 'person' ),
array(
'hierarchical' => false,
'show_ui' => true,
'required' => true,
'single_value' => true
)
);
本插件的開發由MIT Global Shakespeares贊助。
外掛標籤
開發者團隊
原文外掛簡介
This infrastructure plugin adds basic UI for single-valued taxonomies, i.e. a taxonomy with presents a select widget.
Usage
When registering your custom taxonomy, add the argument single_value set to true to get the single value UI. If a selection of this term is required, also add required set to true.
register_taxonomy(
'astrological_sign',
array( 'person' ),
array(
'hierarchical' => false,
'show_ui' => true,
'required' => true,
'single_value' => true
)
);
Development of this plugin supported by MIT Global Shakespeares.
