parse_terms()
parse_terms(string $taxonomy, string $terms, boolean $return_objects = false) : array
Convert comma-separated list of terms to term IDs
Parameters
string | $taxonomy | taxonomy slug (category, post_tag, etc.) |
string | $terms | comma-separated list of term slugs |
boolean | $return_objects | return term objects if true, IDs if false |
Returns
array —array of term IDs