Available since: 3.0
searchwp_acf_remove_field_reference
View Parameters »Note: Use of this hook will require a manual reindex
This hook allows for individual processing of Advanced Custom Fields field reference post meta records. In order for this hook to fire searchwp_acf_remove_field_references
must be set to return true
.
When applicable, using this hook you have individual control over reach ACF field reference metadata record.
See also: https://searchwp.com/docs/hooks/searchwp_acf_remove_field_references/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'searchwp_acf_remove_field_reference', function( $remove, $context ) { | |
// TODO: Determine whether this field should be removed. | |
return $remove; // true/false | |
}, 20, 2 ); |
Parameters
Parameter | Type | Description |
---|---|---|
$remove |
Boolean |
Whether the single ACF field reference should be removed |
$context |
Array |
|