2.0 * * @param View|null $view * * @return array */ public function get_subscribe_links( View $view = null ) { // Set up the list of links. $subscribe_links = []; /** * Allows each link type to dynamically add itself to the list for Calendar views. * * @since 5.12.0 * * @param array $subscribe_links The array of links. * @param View|null $view The View implementation. */ return apply_filters( 'tec_views_v2_subscribe_links', $subscribe_links, $view ); } /** * Replace (overwrite) the default single event links with subscription links. * * @see `tribe_events_ical_single_event_links` filter. * * @since 5.12.0 * @since 5.16.0 - Move to Single_Events class to handle Outlook. * * @param string $calendar_links The link content. * * @return string The altered link content. */ public function single_event_links( $calendar_links ) { // If someone has opted out of the new subscribe links - don't change anything! if ( ! $this->use_subscribe_links() ) { return $calendar_links; } $subscribe_links = $this->get_subscribe_links(); return $this->container->make( Single_Events::class )->single_event_links( $calendar_links, $subscribe_links ); } /** * Add iCal REFRESH and TTL headers. * * 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 `tribe_ical_properties` filter. * * @since 5.12.0 * * @param string $content The iCal content. * * @return string The filtered content. */ 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; } /** * Add x-robots tag to response headers for ical download links. * * @since 6.2.6 */ 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' ); } }
Fatal error: Uncaught TEC\Common\Exceptions\Not_Bound_Exception: Error while making Tribe\Events\Views\V2\iCalendar\iCalendar_Handler: nothing is bound to the 'Tribe\Events\Views\V2\iCalendar\iCalendar_Handler' id and it's not an existing or instantiable class. in /htdocs/wp-content/plugins/the-events-calendar/common/src/Common/Contracts/Container.php:27 Stack trace: #0 /htdocs/wp-content/plugins/the-events-calendar/common/vendor/vendor-prefixed/lucatume/di52/src/Container.php(461): TEC\Common\Contracts\Container->get('Tribe\\Events\\Vi...') #1 /htdocs/wp-content/plugins/the-events-calendar/common/src/Common/Contracts/Container.php(46): TEC\Common\lucatume\DI52\Container->register('Tribe\\Events\\Vi...') #2 /htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/Service_Provider.php(53): TEC\Common\Contracts\Container->register('Tribe\\Events\\Vi...') #3 /htdocs/wp-content/plugins/the-events-calendar/common/vendor/vendor-prefixed/lucatume/di52/src/Container.php(463): Tribe\Events\Views\V2\Service_Provider->register() #4 /htdocs/wp-content/plugins/the-events-calendar/common/src/Common/Contracts/Container.php(46): TEC\Common\lucatume\DI52\Container->register('Tribe\\Events\\Vi...') #5 /htdocs/wp-content/plugins/the-events-calendar/common/src/Tribe/Container.php(305): TEC\Common\Contracts\Container->register('Tribe\\Events\\Vi...') #6 /htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Main.php(655): tribe_register_provider('Tribe\\Events\\Vi...') #7 /htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Main.php(528): Tribe__Events__Main->bind_implementations() #8 /htdocs/wp-includes/class-wp-hook.php(324): Tribe__Events__Main->bootstrap('') #9 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #10 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #11 /htdocs/wp-content/plugins/the-events-calendar/common/src/Tribe/Main.php(128): do_action('tribe_common_lo...') #12 /htdocs/wp-includes/class-wp-hook.php(324): Tribe__Main->plugins_loaded('') #13 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #14 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #15 /htdocs/wp-settings.php(555): do_action('plugins_loaded') #16 /htdocs/wp-config.php(92): require_once('/htdocs/wp-sett...') #17 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #18 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #19 /htdocs/index.php(17): require('/htdocs/wp-blog...') #20 {main} thrown in /htdocs/wp-content/plugins/the-events-calendar/common/src/Common/Contracts/Container.php on line 27