Your cart is empty!
Build Body
apply_filters( 'vikappointments_build_body_export_ics', string $rules, mixed $handler )
Fires after creating the head of the ICS file.
Description
Trigger hook to allow the plugins to include custom options before the body of the ICS file.
It is possible to include new options by appending them to the $rules argument or by using the helper methods provided by $handler instance.
// append to return argument
$rules .= "X-VAP-CUSTOM:XYZ\n";
// append through the ICS handler
$handler->addLine('X-VAP-CUSTOM', 'XYZ');
Parameters
- $rules
-
(string) The rules to append at the beginning of the ICS body.
- $handler
-
(VAPOrderExportDriverIcs) The instance used to export the records. Provides some helper methods to encode the ICS lines.
Example
/**
* Trigger hook to allow the plugins to include custom options before
* the body of the ICS file.
*
* @param string $rules The rules to include within the head.
* @param mixed $handler The current handler instance.
*/
add_filter('vikappointments_build_body_export_ics', function($rules, $handler)
{
/**
* @todo it is possible to manipulate here the ICS body
*/
return $rules;
}, 10, 2);
Changelog
Version | Description |
---|---|
1.1.8 | Introduced. |
Last Update: 2021-08-08
Helpful?