Recent

crp_get_primary_term filter

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

TypeNameDescription
array$returnPrimary term object at primary and optionally
int|\WP_Post$postPost ID or WP_Post object.
string$termTerm name.

Usage

add_filter( 'crp_get_primary_term', function($return, $post, $term) {
    // ...
    return $return;
} );