PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / 1.2.18
VikAppointments Services Booking Calendar v1.2.18
trunk 1.2.17 1.2.18 1.2.19
vikappointments / libraries / hooks.md
vikappointments / libraries Last commit date
adapter 5 months ago dashboard 5 months ago html 5 months ago language 5 months ago layout 5 months ago lite 5 months ago loader 5 months ago mvc 5 months ago system 5 months ago update 5 months ago wizard 5 months ago hooks.md 5 months ago
hooks.md
419 lines
1 # Here is the list of all the HOOKS triggered by the plugin
2
3 ## PAYMENTS
4
5 #### vikappointments_payment_before_admin_params
6 `do_action('vikappointments_payment_before_admin_params_{driver}', JPayment $payment)`
7
8 ##### Parameters
9 - **$payment** (JPayment)
10 The payment object that has been instantiated (passed by reference).
11
12 ##### Description
13 Plugins can manipulate the properties of this object.
14 Fires before the configuration array is generated.
15 The driver name will be always appended at the end of the hook.
16
17 `@since 1.0`
18
19 ---
20
21 #### vikappointments_payment_after_admin_params
22 `do_action('vikappointments_payment_after_admin_params_{driver}', JPayment $payment, array $config)`
23
24 ##### Parameters
25 - **$payment** (JPayment)
26 The payment object that has been instantiated (passed by reference).
27 - **$config** (array)
28 The configuration array (passed by reference).
29
30 ##### Description
31 Plugins can manipulate the configuration form of the payment.
32 Fires after generating the form that will be used as configuration.
33 The driver name will be always appended at the end of the hook.
34
35 `@since 1.0`
36
37 ---
38
39 #### vikappointments_payment_before_begin_transaction
40 `do_action('vikappointments_payment_before_begin_transaction_{driver}', JPayment $payment)`
41
42 ##### Parameters
43 - **$payment** (JPayment)
44 The payment object that has been instantiated (passed by reference).
45
46 ##### Description
47 Plugins can manipulate the properties of this object.
48 Fires before the payment form is initiated.
49 The driver name will be always appended at the end of the hook.
50
51 `@since 1.0`
52
53 ---
54
55 #### vikappointments_payment_after_begin_transaction
56 `do_action('vikappointments_payment_after_begin_transaction_{driver}', JPayment $payment, string $html)`
57
58 ##### Parameters
59 - **$payment** (JPayment)
60 The payment object that has been instantiated (passed by reference).
61 - **$html** (string)
62 The resulting HTML form (passed by reference).
63
64 ##### Description
65 Plugins can manipulate the generated HTML form.
66 Fires after generating the HTML payment form.
67 The driver name will be always appended at the end of the hook.
68
69 `@since 1.0`
70
71 ---
72
73 #### vikappointments_payment_before_validate_transaction
74 `do_action('vikappointments_payment_before_validate_transaction_{driver}', JPayment $payment)`
75
76 ##### Parameters
77 - **$payment** (JPayment)
78 The payment object that has been instantiated (passed by reference).
79
80 ##### Description
81 Plugins can manipulate the properties of this object.
82 Fires before the payment transaction is validated.
83 The driver name will be always appended at the end of the hook.
84
85 `@since 1.0`
86
87 ---
88
89 #### vikappointments_payment_after_validate_transaction
90 `do_action('vikappointments_payment_after_validate_transaction_{driver}', JPayment $payment, JPaymentStatus $status, mixed $response)`
91
92 ##### Parameters
93 - **$payment** (JPayment)
94 The payment object that has been instantiated (passed by reference).
95 - **$status** (JPaymentStatus)
96 The object containing the status information about the transaction (passed by reference).
97 - **$response** (mixed)
98 An object containing the final response (passed by reference).
99 If not manipulated, this value will be NULL.
100
101 ##### Description
102 Plugins can manipulate the response object to return.
103 By filling the `&$response` variable, this method will return it instead of the
104 default `&$status` one.
105 Fires after validating the payment transaction.
106 The driver name will be always appended at the end of the hook.
107
108 `@since 1.0`
109
110 ---
111
112 #### vikappointments_payment_on_after_validation
113 `do_action('vikappointments_payment_on_after_validation_{driver}', JPayment $payment, boolean $res)`
114
115 ##### Parameters
116 - **$payment** (JPayment)
117 The payment object that has been instantiated (passed by reference).
118 - **$res** (boolean)
119 The result of the transaction (*true* when verified, *false* on failure).
120
121 ##### Description
122 Plugins can manipulate the properties of this object.
123 Fires before the payment process is completed.
124 The driver name will be always appended at the end of the hook.
125
126 `@since 1.0`
127
128 ---
129
130 #### vikappointments_payment_before_refund_transaction
131 `do_action('vikappointments_payment_before_refund_transaction_{driver}', JPayment $payment)`
132
133 ##### Parameters
134 - **$payment** (JPayment)
135 The payment object that has been instantiated (passed by reference).
136
137 ##### Description
138 Plugins can manipulate the properties of this object.
139 Fires before the the refund request is made.
140 The name of the driver will be always appended at the end of the hook.
141
142 `@since 1.1.10`
143
144 ---
145
146 #### vikappointments_payment_after_refund_transaction
147 `do_action('vikappointments_payment_after_refund_transaction_{driver}', JPayment $payment, JPaymentStatus $status, mixed $response)`
148
149 ##### Parameters
150 - **$payment** (JPayment)
151 The payment object that has been instantiated (passed by reference).
152 - **$status** (JPaymentStatus)
153 The object containing the status information about the transaction (passed by reference).
154 - **$response** (mixed)
155 An object containing the final response (passed by reference).
156 If not manipulated, this value will be NULL.
157
158 ##### Description
159 Plugins can manipulate the response object to return.
160 By filling the `&$response` variable, this method will return it instead of the
161 default `&$status` one.
162 Fires after validating the refund request.
163 The name of the driver will be always appended at the end of the hook.
164
165 `@since 1.1.10`
166
167 ---
168
169 #### load_payment_gateway_vikappointments
170 `do_action_ref_array('load_payment_gateway_vikappointments', array $drivers, string $payment)`
171
172 ##### Parameters
173 - **$drivers** (array)
174 A list of supported drivers (passed by reference).
175 - **$payment** (string)
176 The name of the gateway to load.
177
178 ##### Description
179 Trigger action to obtain a list of classnames of the payment gateway.
180 The action should autoload the file that contains the classname.
181 In case the payment should be loaded, the classname MUST be
182 pushed within the `&$drivers` array.
183 Fires before the instantiation of the returned classname.
184
185 `@since 1.0`
186
187 ---
188
189 ### get_supported_payments_vikappointments
190 `apply_filters('get_supported_payments_vikappointments', array $drivers)`
191
192 ##### Parameters
193 - **$drivers** (array)
194 An array containing the list of the supported payments.
195
196 ##### Description
197 Hook used to filter the list of all the supported drivers.
198 Every plugin attached to this filter will be able to push one
199 or more gateways within the `$drivers` array.
200
201 It is also possible to manipulate the elements in the array,
202 for example to detach a deprecated payment.
203
204 `@since 1.0`
205
206 ---
207
208 ## SYSTEM
209
210 #### vikappointments_before_dispatch
211 `do_action('vikappointments_before_dispatch')`
212
213 ##### Description
214 Fires before the controller of VikAppointments is dispatched.
215 Useful to require libraries and to check user global permissions.
216
217 `@since 1.0`
218
219 ---
220
221 #### vikappointments_after_dispatch
222 `do_action('vikappointments_after_dispatch')`
223
224 ##### Description
225 Fires after the controller of VikAppointments is dispatched. Useful to include
226 web resources (CSS and JS). In case the controller terminates the process
227 (exit or die), this hook won't be fired.
228
229 `@since 1.0`
230
231 ---
232
233 #### vikappointments_before_display_{VIEW}
234 `do_action_ref_array('vikappointments_before_display_{VIEW}', JView &$view)`
235
236 ##### Parameters
237 - **&$view** (JView)
238 The instance of the view to display (passed by reference).
239
240 ##### Description
241 Fires before the controller of VikAppointments displays the requested {VIEW}.
242
243 `@since 1.0`
244
245 ---
246
247 #### vikappointments_after_display_{VIEW}
248 `do_action('vikappointments_after_display_{VIEW}', JView $view)`
249
250 ##### Parameters
251 - **$view** (JView)
252 The instance of the displayed view.
253
254 ##### Description
255 Fires after the controller of vikappointments has displayed the requested {VIEW}.
256
257 `@since 1.0`
258
259 ---
260
261 ## DATABASE
262
263 #### vik_get_db_prefix
264 `apply_filters('vik_get_db_prefix', string $prefix)`
265
266 ##### Parameters
267 - **$prefix** (string)
268 The database prefix to use for queries.
269
270 ##### Description
271 Hook used to filter the default WP database prefix before it is used.
272
273 `@since 1.0`
274
275 ---
276
277 #### vik_db_suppress_errors
278 `apply_filters('vik_db_suppress_errors', boolean $suppress)`
279
280 ##### Parameters
281 - **$suppress** (boolean)
282 True to suppress the errors, false otherwise (false by default).
283
284 ##### Description
285 Hook used to suppress/enable database errors.
286
287 `@since 1.0`
288
289 ---
290
291 #### vik_db_show_errors
292 `apply_filters('vik_db_show_errors', boolean $show)`
293
294 ##### Parameters
295 - **$show** (boolean)
296 True to show the errors, false otherwise (true by default).
297
298 ##### Description
299 In case errors are suppressed, this hook would result useless.
300 Errors can be shown only if they are NOT suppressed.
301
302 `@since 1.0`
303
304 ---
305
306 ## DATE
307
308 #### vik_date_default_timezone
309 `apply_filters('vik_date_default_timezone', string $timezone)`
310
311 ##### Parameters
312 - **$timezone** (string)
313 The default server timezone that will be registered.
314
315 ##### Description
316 Hook used to define a different timezone instead of the one of the server.
317
318 `@since 1.0`
319
320 ---
321
322 ## RESOURCES
323
324 #### vik_before_include_script
325 `apply_filters('vik_before_include_script', boolean true, string $url, string $id, string $version, boolean $footer)`
326
327 ##### Parameters
328 - **$load** (boolean)
329 True to load the resource, false to ignore it.
330 - **$url** (string)
331 The resource URL.
332 - **$id** (string)
333 The script ID attribute.
334 - **$version** (string)
335 The script version, if specified.
336 - **$footer** (string)
337 True whether the script is going to be loaded in the footer.
338
339 ##### Description
340 Hook used to approve/deny the loading of the given script.
341
342 `@since 1.1.1`
343
344 ---
345
346 #### vik_before_include_style
347 `apply_filters('vik_before_include_style', boolean true, string $url, string $id, string $version)`
348
349 ##### Parameters
350 - **$load** (boolean)
351 True to load the resource, false to ignore it.
352 - **$url** (string)
353 The resource URL.
354 - **$id** (string)
355 The stylesheet ID attribute.
356 - **$version** (string)
357 The stylesheet version, if specified.
358
359 ##### Description
360 Hook used to approve/deny the loading of the given stylesheet.
361
362 `@since 1.1.1`
363
364 ---
365
366 ## WIDGETS
367
368 #### vik_widget_before_dispatch_site
369 `do_action_ref_array('vik_widget_before_dispatch_site', array(string $id, JObject &$params))`
370
371 ##### Parameters
372 - **$id** (string)
373 The widget ID (path name).
374 - **&$params** (JObject)
375 The widget configuration registry.
376
377 ##### Description
378 Plugins can manipulate the configuration of the widget at runtime.
379 Fires before dispatching the widget in the front-end.
380
381 `@since 1.1.3`
382
383 ---
384
385 #### vik_widget_after_dispatch_site
386 `do_action_ref_array('vik_widget_after_dispatch_site', array(string $id, string &$html))`
387
388 ##### Parameters
389 - **$id** (string)
390 The widget ID (path name).
391 - **&$html** (string)
392 The HTML of the widget to display.
393
394 ##### Description
395 Plugins can manipulate the configuration of the widget at runtime.
396 Fires before dispatching the widget in the front-end.
397
398 `@since 1.1.3`
399
400 ---
401
402 ## LANGUAGE
403
404 #### vik_plugin_load_language
405 `apply_filters('vik_plugin_load_language', boolean $loaded, string $domain)`
406
407 ##### Parameters
408 - **$loaded** (boolean)
409 True if a translation for the requested domain has been already loaded.
410 - **&$domain** (string)
411 The plugin text domain.
412
413 ##### Description
414 Plugins can use this filter to load the plugin translations from different folders.
415
416 `@since 1.1.6`
417
418 ---
419