Controller::suppress_query_filters( array $query_args )
Modifies the Elementor posts widget query arguments to set ‘tribe_suppress_query_filters’ to true for the Event post type.
Contents
Parameters
- $query_args
-
(array) (Required) The Elementor posts widget query arguments.
Return
(array) The modified Elementor posts widget query arguments.
Source
File: src/Events/Integrations/Plugins/Elementor/Controller.php
public function suppress_query_filters( $query_args ): array {
/**
* Checks if the 'tribe_events' post type is present in the query arguments.
* If not, it returns the query arguments unmodified.
*/
if ( ! in_array( \Tribe__Events__Main::POSTTYPE, (array) $query_args['post_type'], true ) ) {
return $query_args;
}
// Set the 'tribe_suppress_query_filters' to true.
$query_args['tribe_suppress_query_filters'] = true;
return $query_args;
}