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.
定义位置
  • wp-admin/includes/post.php
    , line 2106
引入
5.1.0
弃用

Sanitizes POST values from a checkbox taxonomy metabox.

function taxonomy_meta_box_sanitize_cb_checkboxes( $taxonomy, $terms ) {
	return array_map( 'intval', $terms );
}