WPAS_Tickets_List::set_ordering_query_var PHP Method

set_ordering_query_var() public method

$wp_query->query_var['wpas_order_by_urgency'] Setting this to true will trigger modifications to the query that will be made in the apply_ordering_criteria() function called by the 'posts_clauses' filter hook.
Since: 3.3
public set_ordering_query_var ( WP_Query $query ) : void
$query WP_Query
return void
    public function set_ordering_query_var($query)
    {
        global $pagenow;
        if ($query->is_main_query() && 'edit.php' === $pagenow && 'ticket' === $query->get('post_type') && wpas_has_smart_tickets_order()) {
            /**
             * Inspect the current context and if appropriate specify a query_var to allow
             * WP_Query to modify itself based on arguments passed to WP_Query.
             */
            $query->set('wpas_order_by_urgency', true);
        }
    }