Developer documentation for GF_Query

Does anyone know of any good developer documentation for GF_Query? I’ve previously added my GravityView filter conditions using the gravityview_search_criteria filter hook, but it looks like it’s getting replaced by GF_Query. Unfortunately, I can’t figure out how to add (working) additional filters using the GF_Query and I haven’t found any good developer documentation.

What I’m basically looking for the modern and correct way to add field filters like this one.

$criteria['search_criteria']['field_filters'][] = array(
  'key' => $field_id,
  'operator' => 'is',
  'value' => 'something' );

Cross-posted in Facebook group: Redirecting....

Hi Karl,

Please use this other filter: gravityview_fe_search_criteria

add_filter( 'gravityview_fe_search_criteria', function ( $search_criteria ) {
	if ( empty( $search_criteria['field_filters'] ) ) {
		return $search_criteria;
	}
	...

	return $search_criteria;
} );

Hi @rafaehlers.

Thanks for the reply. If I understand you correctly, the gravityview_fe_search_criteria filter won’t be deprecated along with gravityview_search_criteria, so it is safe to use for the foreseeable future.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.