SearchWP

This Documentation is for SearchWP Version 3

Available since: 3.0

searchwp_is_used_meta_key

View Parameters »

Note: Use of this hook will require a manual reindex

When indexing Custom Fields, SearchWP will check to make sure that a Custom Field 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 meta key is in use:

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

<?php
add_filter( 'searchwp_is_used_meta_key', function( $used, $meta_key ) {
// TODO: Determine whether the meta key 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 meta key is used

$meta_key String

The meta key

[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]