Abstract_Export::format_value( string $value, string $key_name, string $type )
Format the exported value to conform to the export type’s standard.
Contents
Parameters
- $value
-
(string) (Required) The value being exported.
- $key_name
-
(string) (Required) The key name to add to the value.
- $type
-
(string) (Required) The name of the export, ie ical, gcal, etc...
Return
(string) The value to add to the export.
Source
File: src/Tribe/Export/Abstract_Export.php
public function format_value( $value, $key_name, $type ) {
if ( 'ical' === $type ) {
/**
* With iCal we have to include the key name with the url
* or the export will only include the url without the defining tag.
* Example of expected output: - Location: https://tri.be?326t3425225
*/
$value = $key_name . ':' . $value;
}
return $value;
}
Changelog
| Version | Description |
|---|---|
| 1.7.3 | Introduced. |