iCalendar_Handler::ical_properties( string $content )
Add iCal REFRESH and TTL headers.
Contents
Some clients may ignore these refresh headers. https://support.google.com/calendar/answer/37100?hl=en&ref_topic=1672445
REFRESH-INTERVAL (iCalendar standards, so Google and iCal): https://icalendar.org/New-Properties-for-iCalendar-RFC-7986/5-7-refresh-interval-property.html
X-PUBLISHED-TTL (Recommended update interval for subscription to the calendar via extension, used by Microsoft): https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxcical/1fc7b244-ecd1-4d28-ac0c-2bb4df855a1f
X-Robots-Tag (keep robots from indexing the downloads pages): https://developers.google.com/search/docs/advanced/crawling/block-indexing
Note: PT1H means Once per hour.
See also
- `tribe_ical_properties`: filter.
Parameters
- $content
-
(string) (Required) The iCal content.
Return
(string) The filtered content.
Source
File: src/Tribe/Views/V2/iCalendar/iCalendar_Handler.php
public function ical_properties( $content ) {
$content .= "REFRESH-INTERVAL;VALUE=DURATION:PT1H\r\n";
$content .= "X-Robots-Tag:noindex\r\n";
$content .= "X-PUBLISHED-TTL:PT1H\r\n";
return $content;
}
Changelog
| Version | Description |
|---|---|
| 5.12.0 | Introduced. |