apply_filters( 'relevanssi_acf_field_value', mixed $field_content, string $field_name, int $post_id )

Filters the ACF Select field choices values before they are used by Relevanssi.


(any) The ACF field value, read from get_field_object( $field_name, $post_id )['choices'][ $field_value ].

(string) The ACF field name.

(int) The post ID.

More information

This filter hook is used in the relevanssi_index_acf() function that processes the ACF field values before they are indexed by Relevanssi to convert choice options to reasonable values. The values are passed through this filter.

The value is used as an array key, so it needs to be an integer or a string. If your custom field values are arrays or objects, use this filter hook to convert them into strings.