relevanssi_parent_query_filter

apply_filters( 'relevanssi_parent_query_filter', string $query_restrictions, array $parent_query )

This filter hook filters the post parent query MySQL.

Parameters

$query_restrictions
(string) The MySQL query restrictions.

$post_query
(array) An array of post parent query parameters: ‘parent in’ and ‘parent not in’.

More information

When Relevanssi processes query variables, it converts them to MySQL query restrictions. This filter hook lets you modify the MySQL query for post parent query parameters, post_parent__in and post_parent__not_in.

These parameters become “ AND relevanssi.doc IN ( SELECT ID FROM $wpdb->posts WHERE post_parent IN ( post IDs ) )” and “ AND relevanssi.doc NOT IN ( SELECT ID FROM $wpdb->posts WHERE post_parent IN ( post IDs ) )” respectively.