Sanitizes POST values from a checkbox taxonomy metabox.
Parameters
$taxonomystringrequired- The taxonomy name.
$termsarrayrequired- Raw term data from the
'tax_input'field.
Source
function taxonomy_meta_box_sanitize_cb_checkboxes( $taxonomy, $terms ) {
return array_map( 'intval', $terms );
}
Changelog
| Version | Description |
|---|---|
| 5.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.