taxonomy_meta_box_sanitize_cb_checkboxes

函式
taxonomy_meta_box_sanitize_cb_checkboxes ( $taxonomy, $terms )
引數
  • (string) $taxonomy The taxonomy name.
    Required:
  • (array) $terms Raw term data from the 'tax_input' field.
    Required:
返回值
  • (int[]) Array of sanitized term IDs.
定義位置
相關方法
taxonomy_meta_box_sanitize_cb_inputwp_nav_menu_taxonomy_meta_boxesrest_sanitize_object
引入
5.1.0
棄用
-

taxonomy_meta_box_sanitize_cb_checkboxes: 此函式用於對帶有覈取方塊的分類法元框的輸入進行淨化。

對覈取方塊分類元框的POST值進行淨化。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function taxonomy_meta_box_sanitize_cb_checkboxes( $taxonomy, $terms ) {
return array_map( 'intval', $terms );
}
function taxonomy_meta_box_sanitize_cb_checkboxes( $taxonomy, $terms ) { return array_map( 'intval', $terms ); }
function taxonomy_meta_box_sanitize_cb_checkboxes( $taxonomy, $terms ) {
	return array_map( 'intval', $terms );
}

常見問題

FAQs
檢視更多 >