iCalendar_Handler::ical_header_properties()
Add x-robots tag to response headers for ical download links.
Source
File: src/Tribe/Views/V2/iCalendar/iCalendar_Handler.php
public function ical_header_properties() {
/**
* Allows short-circuiting the logic to prevent the x-robots tag from being added to the response headers.
*
* @param bool $add If the x-robots tag should be added to the response headers.
*/
$add = (bool) apply_filters( 'tec_events_ical_header_noindex', true );
if ( ! $add ) {
return;
}
if ( ! tribe_get_request_var( 'ical' ) && ! tribe_get_request_var( 'outlook-ical' ) ) {
return;
}
header( 'X-Robots-Tag:noindex, nofollow' );
}
Changelog
| Version | Description |
|---|---|
| 6.2.6 | Introduced. |