English (United Kingdom)
Knowledge Base  >  Vik Restaurants  >  Hooks  >  Deals  >  Before Query

do_action_ref_array( 'vikrestaurants_before_query_take_away_deals', mixed &$query )

Fires while building the query used to fetch the available take-away deals.


Description

Trigger hook to allow external plugins to manipulate the query used to load the details of the available take-away deals.


Parameters

&$query

(mixed)  Either a query builder object or a string.


Example

/**
 * Trigger hook to allow external plugins to manipulate the query used
 * to load the details of the available take-away deals.
 *
 * @param  mixed  &$query  The query string or a query builder object.
 */
add_action('vikrestaurants_before_query_take_away_deals', function(&$query) {
    /**
     * @todo it is possible to manipulate here the query
     */
});

Changelog

Version Description
1.3 Introduced.
Last Update: 2023-12-28
Helpful?