WordPress action hook
vik_widget_before_dispatch_site
Fired by 5 WordPress plugins, running on 13K+ sites between them.
“Plugins can manipulate the configuration of the widget at runtime. Fires before dispatching the widget in the front-end.”
How to use vik_widget_before_dispatch_site
It's an action: your callback runs at that point. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'vik_widget_before_dispatch_site', function( $_id, $params ) {
// Your code runs here.
}, 10, 2 );Argument names come from VikBooking Hotel Booking Engine & PMS's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
5 plugins that fire vik_widget_before_dispatch_site
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
VikBooking Hotel Booking Engine & PMS7,000+ installs
do_action_ref_array( 'vik_widget_before_dispatch_site', array($this->_id, &$params) )libraries/adapter/module/widget.php:232 -
VikRentCar Car Rental Management System4,000+ installs
do_action_ref_array( 'vik_widget_before_dispatch_site', array($this->_id, &$params) )libraries/adapter/module/widget.php:232 -
VikRentItems Flexible Rental Management System600+ installs
do_action_ref_array( 'vik_widget_before_dispatch_site', array($this->_id, &$params) )libraries/adapter/module/widget.php:232 -
VikRestaurants Table Reservations and Take-Away500+ installs
do_action_ref_array( 'vik_widget_before_dispatch_site', array($this->_id, &$params) )libraries/adapter/module/widget.php:224 -
VikAppointments Services Booking Calendar500+ installs
do_action_ref_array( 'vik_widget_before_dispatch_site', array($this->_id, &$params) )libraries/adapter/module/widget.php:224
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.