SearchWP

This Documentation is for SearchWP Version 3

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/

<?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 );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$remove Boolean

Whether the single ACF field reference should be removed

$context Array

$context['metakey'] The meta key
$context['post_type'] The post type

[wpforms id="3080"]