mc_set_primary_category - joedolson/my-calendar GitHub Wiki
Filter primary category decision. Primary category is normally the alphabetically first listed category or the first selected private category.
Auto-generated Example
add_filter(
'mc_set_primary_category',
function(
int $primary,
array $cats,
array $post
) {
// Your code here.
return $primary;
},
10,
3
);
Parameters
int$primaryPrimary category ID.array$catsAll selected categories.array$postSubmitted query.
Returns
int
Files
apply_filters( 'mc_set_primary_category', $primary, $cats, $post )