taxonomy_meta_box_sanitize_cb_checkboxes( string $taxonomy, array $terms ): int[]
Sanitizes POST values from a checkbox taxonomy metabox.
Parameters
-
$taxonomy
string Required -
The taxonomy name.
-
$terms
array Required -
Raw term data from the
'tax_input'
field.
Return
int[] Array of sanitized term IDs.
Source
File: wp-admin/includes/post.php
.
View all references
function taxonomy_meta_box_sanitize_cb_checkboxes( $taxonomy, $terms ) {
return array_map( 'intval', $terms );
}
Changelog
Version | Description |
---|---|
5.1.0 | Introduced. |