crp_get_primary_term
Filters the primary category/term for the given post.
Type: filter
Since: 3.2.0
Source: includes/util/class-helpers.php line 227
Parameters
| Type | Name | Description |
|---|---|---|
array | $return | Primary term object at primary and optionally |
int|\WP_Post | $post | Post ID or WP_Post object. |
string | $term | Term name. |
Usage
add_filter( 'crp_get_primary_term', function($return, $post, $term) {
// ...
return $return;
} );