dropdown_categories

函式
dropdown_categories ( $default_category = 0, $category_parent = 0, $popular_ids = array() )
引數
  • (int) $default_category Unused.
    Required:
  • (int) $category_parent Unused.
    Required:
  • (array) $popular_ids Unused.
    Required:
    Default: array()
相關
  • wp_category_checklist()
定義位置
相關方法
wp_dropdown_categoriesdropdown_link_categoriesdropdown_catswp_dropdown_catswp_dropdown_pages
引入
0.71
棄用
2.6.0

dropdown_categories: 這個函式以HTML形式生成一個類別的下拉選單。它通常用在WordPress網站的前端,讓使用者按類別過濾內容。

用於生成類別檢查表控制的Legacy函式。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function dropdown_categories( $default_category = 0, $category_parent = 0, $popular_ids = array() ) {
_deprecated_function( __FUNCTION__, '2.6.0', 'wp_category_checklist()' );
global $post_ID;
wp_category_checklist( $post_ID );
}
function dropdown_categories( $default_category = 0, $category_parent = 0, $popular_ids = array() ) { _deprecated_function( __FUNCTION__, '2.6.0', 'wp_category_checklist()' ); global $post_ID; wp_category_checklist( $post_ID ); }
function dropdown_categories( $default_category = 0, $category_parent = 0, $popular_ids = array() ) {
	_deprecated_function( __FUNCTION__, '2.6.0', 'wp_category_checklist()' );
	global $post_ID;
	wp_category_checklist( $post_ID );
}

常見問題

FAQs
檢視更多 >