apply_filters( 'relevanssi_post_status_query_filter', string $query_restrictions, string $post_status )

This filter hook filters the post status MySQL.


(string) The MySQL query restrictions.

(string) The post status parameter, a comma-separated list of values.

More information

When Relevanssi processes query variables, it converts them to MySQL query restrictions. This filter hook lets you modify the MySQL query for the post status parameter.

The post status parameter becomes ” AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM $wpdb->posts AS posts WHERE posts.post_status IN ( post_statuses ))))” in MySQL.