SearchWP

This Documentation is for SearchWP Version 3

Available since: 3.0

searchwp_is_used_taxonomy

View Parameters »

Note: Use of this hook will require a manual reindex

When indexing taxonomy terms, SearchWP will check to make sure that a taxonomy is in use by engine configuration before indexing it. This is done to keep the index as small as possible. You can use this hook to control whether SearchWP thinks a particular taxonomy is in use:

Note: This applies to all post types across all engines.

<?php
add_filter( 'searchwp_is_used_taxonomy', function( $used, $taxonomy ) {
// TODO: Determine whether the taxonomy is in use.
return $used; // true/false
}, 20, 2 );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$used Boolean

Whether the taxonomy is in use

$taxonomy String

Taxonomy  name