Version Description
= [5.0] =
Please see the changelog for the complete list of changes in this release. Previous versions of The Events Calendar are not cross-compatible with 5.X add-ons. Remember to always make a backup of your database and files before updating!
Download this release
Release Info
Developer | Camwynsp |
Plugin | The Events Calendar |
Version | 5.16.1 |
Comparing to | |
See all releases |
Code changes from version 5.16.0 to 5.16.1
- common/vendor/autoload.php +1 -1
- common/vendor/autoload_52.php +1 -1
- common/vendor/composer/autoload_real.php +4 -4
- common/vendor/composer/autoload_real_52.php +3 -3
- common/vendor/composer/autoload_static.php +5 -5
- lang/the-events-calendar-da_DK.mo +0 -0
- lang/the-events-calendar-de_CH.mo +0 -0
- lang/the-events-calendar-de_DE.mo +0 -0
- lang/the-events-calendar-fr_FR.mo +0 -0
- lang/the-events-calendar-nl_NL.mo +0 -0
- lang/the-events-calendar-pl_PL.mo +0 -0
- readme.txt +13 -2
- src/Tribe/Main.php +2 -3
- src/Tribe/Query.php +3 -3
- src/Tribe/REST/V1/EA_Messages.php +3 -2
- src/Tribe/Template/Month.php +2 -1
- src/Tribe/Views/V2/Assets.php +17 -0
- src/Tribe/Views/V2/Rest_Endpoint.php +1 -1
- src/Tribe/Views/V2/Views/Day_View.php +114 -3
- src/Tribe/Views/V2/Views/Month_View.php +117 -29
- src/Tribe/Views/V2/iCalendar/Links/Google_Calendar.php +5 -0
- src/Tribe/Views/V2/iCalendar/Links/Link_Abstract.php +21 -5
- src/Tribe/Views/V2/iCalendar/Links/Outlook_365.php +5 -0
- src/Tribe/Views/V2/iCalendar/Links/Outlook_Live.php +5 -0
- src/Tribe/Views/V2/iCalendar/Links/iCal.php +5 -0
- src/Tribe/iCal.php +2 -2
- src/admin-views/aggregator/origins/limit.php +3 -1
- src/admin-views/aggregator/origins/url.php +5 -3
- src/admin-views/aggregator/tabs/import-form.php +5 -3
- src/resources/css/tribe-events-single-blocks.min.css +1 -1
- src/views/blocks/event-links.php +17 -24
- src/views/blocks/parts/subscribe-list.php +1 -1
- src/views/blocks/parts/subscribe-single.php +1 -1
- src/views/v2/components/subscribe-links/item.php +1 -1
- src/views/v2/components/subscribe-links/single.php +1 -1
- src/views/v2/day/nav/next.php +1 -0
- src/views/v2/day/nav/prev.php +1 -0
- src/views/v2/day/top-bar/nav/next.php +1 -0
- src/views/v2/day/top-bar/nav/prev.php +1 -0
- src/views/v2/month/mobile-events/nav/next.php +1 -0
- src/views/v2/month/mobile-events/nav/prev.php +1 -0
- src/views/v2/month/top-bar/nav/next.php +1 -0
- src/views/v2/month/top-bar/nav/prev.php +1 -0
- the-events-calendar.php +1 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
common/vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit36add6d681622638ec14b4973a80e965::getLoader();
|
common/vendor/autoload_52.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit62f29bb3a31fef27ff36a5257eaa75ee::getLoader();
|
common/vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit2ebde898df18e3908150f90372d53e5f
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit36add6d681622638ec14b4973a80e965
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit36add6d681622638ec14b4973a80e965', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit36add6d681622638ec14b4973a80e965', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit36add6d681622638ec14b4973a80e965::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
common/vendor/composer/autoload_real_52.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
-
class
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitf82aec81871277e5d90733942d93eed6 {
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
+
class ComposerAutoloaderInit62f29bb3a31fef27ff36a5257eaa75ee {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit62f29bb3a31fef27ff36a5257eaa75ee', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit62f29bb3a31fef27ff36a5257eaa75ee', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
common/vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
@@ -269,10 +269,10 @@ class ComposerStaticInit2ebde898df18e3908150f90372d53e5f
|
|
269 |
public static function getInitializer(ClassLoader $loader)
|
270 |
{
|
271 |
return \Closure::bind(function () use ($loader) {
|
272 |
-
$loader->prefixLengthsPsr4 =
|
273 |
-
$loader->prefixDirsPsr4 =
|
274 |
-
$loader->prefixesPsr0 =
|
275 |
-
$loader->classMap =
|
276 |
|
277 |
}, null, ClassLoader::class);
|
278 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit36add6d681622638ec14b4973a80e965
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
269 |
public static function getInitializer(ClassLoader $loader)
|
270 |
{
|
271 |
return \Closure::bind(function () use ($loader) {
|
272 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit36add6d681622638ec14b4973a80e965::$prefixLengthsPsr4;
|
273 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit36add6d681622638ec14b4973a80e965::$prefixDirsPsr4;
|
274 |
+
$loader->prefixesPsr0 = ComposerStaticInit36add6d681622638ec14b4973a80e965::$prefixesPsr0;
|
275 |
+
$loader->classMap = ComposerStaticInit36add6d681622638ec14b4973a80e965::$classMap;
|
276 |
|
277 |
}, null, ClassLoader::class);
|
278 |
}
|
lang/the-events-calendar-da_DK.mo
CHANGED
Binary file
|
lang/the-events-calendar-de_CH.mo
CHANGED
Binary file
|
lang/the-events-calendar-de_DE.mo
CHANGED
Binary file
|
lang/the-events-calendar-fr_FR.mo
CHANGED
Binary file
|
lang/the-events-calendar-nl_NL.mo
CHANGED
Binary file
|
lang/the-events-calendar-pl_PL.mo
CHANGED
Binary file
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: theeventscalendar, borkweb, bordoni, brianjessee, aguseo, camwynsp
|
|
4 |
Tags: events, calendar, event, schedule, organizer
|
5 |
Donate link: https://evnt.is/29
|
6 |
Requires at least: 5.6
|
7 |
-
Stable tag: 5.16.
|
8 |
Tested up to: 6.0
|
9 |
Requires PHP: 7.1
|
10 |
License: GPLv2 or later
|
@@ -223,6 +223,17 @@ Remember to always make a backup of your database and files before updating!
|
|
223 |
|
224 |
== Changelog ==
|
225 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
= [5.16.0] 2022-05-31 =
|
227 |
|
228 |
* Feature - Add subscribe links for Outlook 365 and Outlook Live to the event views. [TEC-4168]
|
@@ -247,7 +258,7 @@ Remember to always make a backup of your database and files before updating!
|
|
247 |
|
248 |
* Version - The Events Calendar 5.15.0 is only compatible with Event Tickets 5.4.0 and higher
|
249 |
* Version - The Events Calendar 5.15.0 is only compatible with Events Calendar PRO 5.14.0 and higher
|
250 |
-
* Version - The Events Calendar 5.15.0 is only compatible with Events Filterbar
|
251 |
* Version - The Events Calendar 5.15.0 is only compatible with Events Virtual 1.10.0 and higher
|
252 |
* Version - The Events Calendar 5.15.0 is only compatible with Events Community 4.9.0 and higher
|
253 |
* Version - The Events Calendar 5.15.0 is only compatible with Eventbrite Tickets 4.6.11 and higher
|
4 |
Tags: events, calendar, event, schedule, organizer
|
5 |
Donate link: https://evnt.is/29
|
6 |
Requires at least: 5.6
|
7 |
+
Stable tag: 5.16.1
|
8 |
Tested up to: 6.0
|
9 |
Requires PHP: 7.1
|
10 |
License: GPLv2 or later
|
223 |
|
224 |
== Changelog ==
|
225 |
|
226 |
+
= [5.16.1] 2022-06-09 =
|
227 |
+
|
228 |
+
* Fix - Add rel="noindex" to links that point to empty Month and Day Views so as to not dilute SEO with empty results. [TEC-4354]
|
229 |
+
* Fix - Clean up some borked CSS in some sections of the Elementor `Event` widget. [ECP-1105]
|
230 |
+
* Fix - Fix admin links to work with the new admin page structure. [TEC-4380]
|
231 |
+
* Tweak - Removed filters: `tribe_settings_admin_slug`, `tribe_settings_url`, `tribe_events_enable_month_view_cache`
|
232 |
+
* Tweak - Changed views: `blocks/event-links`, `blocks/parts/subscribe-list`, `blocks/parts/subscribe-single`,
|
233 |
+
`v2/components/subscribe-links/item`, `v2/components/subscribe-links/single`, `v2/day/nav/next`,
|
234 |
+
`v2/day/nav/prev`, `v2/day/top-bar/nav/next`, `v2/day/top-bar/nav/prev`, `v2/month/mobile-events/nav/next`,
|
235 |
+
`v2/month/mobile-events/nav/prev`, `v2/month/top-bar/nav/next`, `v2/month/top-bar/nav/prev`
|
236 |
+
|
237 |
= [5.16.0] 2022-05-31 =
|
238 |
|
239 |
* Feature - Add subscribe links for Outlook 365 and Outlook Live to the event views. [TEC-4168]
|
258 |
|
259 |
* Version - The Events Calendar 5.15.0 is only compatible with Event Tickets 5.4.0 and higher
|
260 |
* Version - The Events Calendar 5.15.0 is only compatible with Events Calendar PRO 5.14.0 and higher
|
261 |
+
* Version - The Events Calendar 5.15.0 is only compatible with Events Filterbar 5.3.0 and higher
|
262 |
* Version - The Events Calendar 5.15.0 is only compatible with Events Virtual 1.10.0 and higher
|
263 |
* Version - The Events Calendar 5.15.0 is only compatible with Events Community 4.9.0 and higher
|
264 |
* Version - The Events Calendar 5.15.0 is only compatible with Eventbrite Tickets 4.6.11 and higher
|
src/Tribe/Main.php
CHANGED
@@ -33,7 +33,7 @@ if ( ! class_exists( 'Tribe__Events__Main' ) ) {
|
|
33 |
const VENUE_POST_TYPE = 'tribe_venue';
|
34 |
const ORGANIZER_POST_TYPE = 'tribe_organizer';
|
35 |
|
36 |
-
const VERSION = '5.16.
|
37 |
|
38 |
/**
|
39 |
* Min Pro Addon
|
@@ -1293,8 +1293,7 @@ if ( ! class_exists( 'Tribe__Events__Main' ) ) {
|
|
1293 |
$edit_settings_link = __( ' ask the site administrator to set a different Events URL slug.', 'the-events-calendar' );
|
1294 |
|
1295 |
if ( current_user_can( $settings_cap ) ) {
|
1296 |
-
$
|
1297 |
-
$setting_page_link = apply_filters( 'tribe_settings_url', admin_url( 'edit.php?page=' . $admin_slug . '#tribe-field-eventsSlug' ) );
|
1298 |
$edit_settings_link = sprintf( '<a href="%1$s">%2$s</a>', $setting_page_link, __( 'edit Events settings.', 'the-events-calendar' ) );
|
1299 |
}
|
1300 |
|
33 |
const VENUE_POST_TYPE = 'tribe_venue';
|
34 |
const ORGANIZER_POST_TYPE = 'tribe_organizer';
|
35 |
|
36 |
+
const VERSION = '5.16.1';
|
37 |
|
38 |
/**
|
39 |
* Min Pro Addon
|
1293 |
$edit_settings_link = __( ' ask the site administrator to set a different Events URL slug.', 'the-events-calendar' );
|
1294 |
|
1295 |
if ( current_user_can( $settings_cap ) ) {
|
1296 |
+
$setting_page_link = tribe( Tribe\Events\Admin\Settings::class )->get_url() . '#tribe-field-eventsSlug';
|
|
|
1297 |
$edit_settings_link = sprintf( '<a href="%1$s">%2$s</a>', $setting_page_link, __( 'edit Events settings.', 'the-events-calendar' ) );
|
1298 |
}
|
1299 |
|
src/Tribe/Query.php
CHANGED
@@ -817,7 +817,7 @@ if ( ! class_exists( 'Tribe__Events__Query' ) ) {
|
|
817 |
|
818 |
/**
|
819 |
* Internal method for properly setting a curated orderby value to $wp_query
|
820 |
-
* Internal method for properly setting a
|
821 |
*
|
822 |
* If optional param $default is not provided it will default to 'event_date' - unless a custom
|
823 |
* orderby param was specified (via tribe_get_events() for example) - in which case that value
|
@@ -859,7 +859,7 @@ if ( ! class_exists( 'Tribe__Events__Query' ) ) {
|
|
859 |
}
|
860 |
|
861 |
/**
|
862 |
-
* Internal method for properly setting a
|
863 |
*
|
864 |
* If optional param $default is not provided it will default to 'ASC' - unless a custom order
|
865 |
* was specified (via tribe_get_events() for example) - in which case that value will be used.
|
@@ -1549,7 +1549,7 @@ if ( ! class_exists( 'Tribe__Events__Query' ) ) {
|
|
1549 |
*
|
1550 |
* variables when using pre_get_posts or posts_where
|
1551 |
*
|
1552 |
-
* This filter is removed when this
|
1553 |
*
|
1554 |
* @since 4.6.15
|
1555 |
*
|
817 |
|
818 |
/**
|
819 |
* Internal method for properly setting a curated orderby value to $wp_query
|
820 |
+
* Internal method for properly setting a curated orderby value to $wp_query.
|
821 |
*
|
822 |
* If optional param $default is not provided it will default to 'event_date' - unless a custom
|
823 |
* orderby param was specified (via tribe_get_events() for example) - in which case that value
|
859 |
}
|
860 |
|
861 |
/**
|
862 |
+
* Internal method for properly setting a curated order value to $wp_query.
|
863 |
*
|
864 |
* If optional param $default is not provided it will default to 'ASC' - unless a custom order
|
865 |
* was specified (via tribe_get_events() for example) - in which case that value will be used.
|
1549 |
*
|
1550 |
* variables when using pre_get_posts or posts_where
|
1551 |
*
|
1552 |
+
* This filter is removed when this functions has finished the execution
|
1553 |
*
|
1554 |
* @since 4.6.15
|
1555 |
*
|
src/Tribe/REST/V1/EA_Messages.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
|
3 |
class Tribe__Events__REST__V1__EA_Messages extends Tribe__Events__REST__V1__Messages implements Tribe__REST__Messages_Interface {
|
4 |
public function __construct() {
|
@@ -54,8 +55,8 @@ class Tribe__Events__REST__V1__EA_Messages extends Tribe__Events__REST__V1__Mess
|
|
54 |
'tec-rest-api-single-event-empty',
|
55 |
];
|
56 |
|
57 |
-
$adjust_link
|
58 |
-
$adjust_message
|
59 |
$adjust_message_html = sprintf( '<p><a href="%s" target="_blank">%s</a></p> ', $adjust_link, $adjust_message );
|
60 |
|
61 |
foreach ( $adjustable_map as $message_code ) {
|
1 |
<?php
|
2 |
+
use Tribe\Events\Admin\Settings as Plugin_Settings;
|
3 |
|
4 |
class Tribe__Events__REST__V1__EA_Messages extends Tribe__Events__REST__V1__Messages implements Tribe__REST__Messages_Interface {
|
5 |
public function __construct() {
|
55 |
'tec-rest-api-single-event-empty',
|
56 |
];
|
57 |
|
58 |
+
$adjust_link = esc_url( tribe( Plugin_Settings::class )->get_url( [ 'tab' => 'imports#tribe-field-tribe_aggregator_default_url_import_range' ] ) );
|
59 |
+
$adjust_message = esc_html__( 'Try to adjust your import settings and try again.', 'the-events-calendar' );
|
60 |
$adjust_message_html = sprintf( '<p><a href="%s" target="_blank">%s</a></p> ', $adjust_link, $adjust_message );
|
61 |
|
62 |
foreach ( $adjustable_map as $message_code ) {
|
src/Tribe/Template/Month.php
CHANGED
@@ -178,7 +178,8 @@ if ( ! class_exists( 'Tribe__Events__Template__Month' ) ) {
|
|
178 |
* @param boolean $enable
|
179 |
* @param array $args
|
180 |
*/
|
181 |
-
$this->use_cache = apply_filters(
|
|
|
182 |
$this->should_enable_month_view_cache(),
|
183 |
$this->args
|
184 |
);
|
178 |
* @param boolean $enable
|
179 |
* @param array $args
|
180 |
*/
|
181 |
+
$this->use_cache = apply_filters(
|
182 |
+
'tribe_events_enable_month_view_cache',
|
183 |
$this->should_enable_month_view_cache(),
|
184 |
$this->args
|
185 |
);
|
src/Tribe/Views/V2/Assets.php
CHANGED
@@ -650,6 +650,23 @@ class Assets extends \tad_DI52_ServiceProvider {
|
|
650 |
* @return boolean
|
651 |
*/
|
652 |
public function should_enqueue_single_event_block_editor_styles() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
653 |
// Bail if not Single Event V2.
|
654 |
if ( ! tribe_events_single_view_v2_is_enabled() ) {
|
655 |
return false;
|
650 |
* @return boolean
|
651 |
*/
|
652 |
public function should_enqueue_single_event_block_editor_styles() {
|
653 |
+
/**
|
654 |
+
* Checks whether the page is being viewed in Elementor preview mode.
|
655 |
+
*
|
656 |
+
* @since 5.16.1
|
657 |
+
*
|
658 |
+
* @return bool Should the assets be enqueued.
|
659 |
+
*/
|
660 |
+
if (
|
661 |
+
defined( 'ELEMENTOR_PATH' )
|
662 |
+
|
663 |
+
&& ! empty( ELEMENTOR_PATH )
|
664 |
+
|
665 |
+
&& isset( $_GET[ 'elementor-preview' ] )
|
666 |
+
) {
|
667 |
+
return true;
|
668 |
+
}
|
669 |
+
|
670 |
// Bail if not Single Event V2.
|
671 |
if ( ! tribe_events_single_view_v2_is_enabled() ) {
|
672 |
return false;
|
src/Tribe/Views/V2/Rest_Endpoint.php
CHANGED
@@ -75,7 +75,7 @@ class Rest_Endpoint {
|
|
75 |
*
|
76 |
* @param string $url The View endpoint URL, either a REST API URL or a admin-ajax.php fallback URL if REST API
|
77 |
* is not available.
|
78 |
-
* @param bool $rest_available Whether the REST API
|
79 |
*/
|
80 |
$url = apply_filters( 'tribe_events_views_v2_endpoint_url', $url, $rest_available );
|
81 |
|
75 |
*
|
76 |
* @param string $url The View endpoint URL, either a REST API URL or a admin-ajax.php fallback URL if REST API
|
77 |
* is not available.
|
78 |
+
* @param bool $rest_available Whether the REST API endpoint URL is available on the current site or not.
|
79 |
*/
|
80 |
$url = apply_filters( 'tribe_events_views_v2_endpoint_url', $url, $rest_available );
|
81 |
|
src/Tribe/Views/V2/Views/Day_View.php
CHANGED
@@ -27,6 +27,15 @@ class Day_View extends View {
|
|
27 |
*/
|
28 |
protected $slug = 'day';
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
/**
|
31 |
* Visibility for this view.
|
32 |
*
|
@@ -37,6 +46,51 @@ class Day_View extends View {
|
|
37 |
*/
|
38 |
protected static $publicly_visible = true;
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
/**
|
41 |
* {@inheritDoc}
|
42 |
*/
|
@@ -67,6 +121,50 @@ class Day_View extends View {
|
|
67 |
return $url;
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
/**
|
71 |
* {@inheritDoc}
|
72 |
*/
|
@@ -174,11 +272,24 @@ class Day_View extends View {
|
|
174 |
* {@inheritDoc}
|
175 |
*/
|
176 |
protected function setup_template_vars() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
|
178 |
-
$
|
179 |
-
$
|
180 |
|
181 |
-
$template_vars['events']
|
|
|
|
|
182 |
|
183 |
return $template_vars;
|
184 |
}
|
27 |
*/
|
28 |
protected $slug = 'day';
|
29 |
|
30 |
+
/**
|
31 |
+
* Cached dates for the prev/next links.
|
32 |
+
*
|
33 |
+
* @since 5.16.1
|
34 |
+
*
|
35 |
+
* @var array
|
36 |
+
*/
|
37 |
+
protected $cached_event_dates = [];
|
38 |
+
|
39 |
/**
|
40 |
* Visibility for this view.
|
41 |
*
|
46 |
*/
|
47 |
protected static $publicly_visible = true;
|
48 |
|
49 |
+
/**
|
50 |
+
* Get the date of the event immediately previous to the current view date.
|
51 |
+
*
|
52 |
+
* @since 5.16.1
|
53 |
+
*
|
54 |
+
* @param DateTime|false $current_date A DateTime object signifying the current date for the view.
|
55 |
+
*
|
56 |
+
* @return DateTime|false Either the previous event chronologically, the previous month, or false if no next event found.
|
57 |
+
*/
|
58 |
+
public function get_previous_event_date( $current_date ) {
|
59 |
+
$context = $this->context instanceof Tribe__Context ? $this->context : null;
|
60 |
+
$args = $this->filter_repository_args( $this->setup_repository_args( $context ) );
|
61 |
+
// This value will mess up our query.
|
62 |
+
unset( $args['date_overlaps'] );
|
63 |
+
|
64 |
+
// Use cache to reduce the performance impact.
|
65 |
+
$cache_key = __METHOD__ . '_' . substr( md5( wp_json_encode( [ $current_date, $args ] ) ), 10 );
|
66 |
+
|
67 |
+
if ( isset( $this->cached_event_dates[ $cache_key ] ) ) {
|
68 |
+
return $this->cached_event_dates[ $cache_key ];
|
69 |
+
}
|
70 |
+
|
71 |
+
// Find the first event that starts before the start of today.
|
72 |
+
$prev_event = tribe_events()
|
73 |
+
->by_args( $args )
|
74 |
+
->where( 'starts_before', tribe_beginning_of_day( $current_date->format( 'Y-m-d' ) ) )
|
75 |
+
->order( 'DESC' )
|
76 |
+
->first();
|
77 |
+
|
78 |
+
if ( ! $prev_event instanceof \WP_Post ) {
|
79 |
+
return false;
|
80 |
+
}
|
81 |
+
|
82 |
+
// Show the closest date on which that event appears (but not the current date).
|
83 |
+
$prev_event_date = Dates::build_date_object( $prev_event->dates->start );
|
84 |
+
$prev_date = min(
|
85 |
+
$prev_event_date,
|
86 |
+
$current_date->sub( new \DateInterval( 'P1D' ) )
|
87 |
+
);
|
88 |
+
|
89 |
+
$this->cached_event_dates[ $cache_key ] = $prev_date;
|
90 |
+
|
91 |
+
return $prev_date;
|
92 |
+
}
|
93 |
+
|
94 |
/**
|
95 |
* {@inheritDoc}
|
96 |
*/
|
121 |
return $url;
|
122 |
}
|
123 |
|
124 |
+
/**
|
125 |
+
* Get the date of the event immediately after to the current view date.
|
126 |
+
*
|
127 |
+
* @since 5.16.1
|
128 |
+
*
|
129 |
+
* @param DateTime|false $current_date A DateTime object signifying the current date for the view.
|
130 |
+
*
|
131 |
+
* @return DateTime|false Either the next event chronologically, the next month, or false if no next event found.
|
132 |
+
*/
|
133 |
+
public function get_next_event_date( $current_date ) {
|
134 |
+
$context = $this->context instanceof Tribe__Context ? $this->context : null;
|
135 |
+
$args = $this->filter_repository_args( $this->setup_repository_args( $context ) );
|
136 |
+
// This value will mess up our query.
|
137 |
+
unset( $args['date_overlaps'] );
|
138 |
+
|
139 |
+
// Use cache to reduce the performance impact.
|
140 |
+
$cache_key = __METHOD__ . '_' . substr( md5( wp_json_encode( [ $current_date, $args ] ) ), 10 );
|
141 |
+
|
142 |
+
if ( isset( $this->cached_event_dates[ $cache_key ] ) ) {
|
143 |
+
return $this->cached_event_dates[ $cache_key ];
|
144 |
+
}
|
145 |
+
|
146 |
+
// The first event that ends after the end of the month; it could still begin in this month.
|
147 |
+
$next_event = tribe_events()
|
148 |
+
->by_args( $args )
|
149 |
+
->where( 'starts_after', tribe_end_of_day( $current_date->format( 'Y-m-d' ) ) )
|
150 |
+
->order( 'ASC' )
|
151 |
+
->first();
|
152 |
+
|
153 |
+
if ( ! $next_event instanceof \WP_Post ) {
|
154 |
+
return false;
|
155 |
+
}
|
156 |
+
|
157 |
+
// At a minimum pick the next month or the month the next event starts in.
|
158 |
+
$next_date = max(
|
159 |
+
Dates::build_date_object( $next_event->dates->start ),
|
160 |
+
$current_date->add( new \DateInterval( 'P1D' ) )
|
161 |
+
);
|
162 |
+
|
163 |
+
$this->cached_event_dates[ $cache_key ] = $next_date;
|
164 |
+
|
165 |
+
return $next_date;
|
166 |
+
}
|
167 |
+
|
168 |
/**
|
169 |
* {@inheritDoc}
|
170 |
*/
|
272 |
* {@inheritDoc}
|
273 |
*/
|
274 |
protected function setup_template_vars() {
|
275 |
+
$template_vars = parent::setup_template_vars();
|
276 |
+
$sorted_events = $this->sort_events( $template_vars['events'] );
|
277 |
+
|
278 |
+
$next_date = Dates::build_date_object( $template_vars['url_event_date'] )->add( new \DateInterval( 'P1D' ) )->format( 'Y-m-d' );
|
279 |
+
$prev_date = Dates::build_date_object( $template_vars['url_event_date'] )->sub( new \DateInterval( 'P1D' ) )->format( 'Y-m-d' );
|
280 |
+
|
281 |
+
$next_event_date = $this->get_next_event_date( Dates::build_date_object( $template_vars['url_event_date'] ) );
|
282 |
+
$prev_event_date = $this->get_previous_event_date( Dates::build_date_object( $template_vars['url_event_date'] ) );
|
283 |
+
|
284 |
+
$index_next_rel = $next_event_date && $next_date === $next_event_date->format( 'Y-m-d' );
|
285 |
+
$index_prev_rel = $prev_event_date && $prev_date === $prev_event_date->format( 'Y-m-d' );
|
286 |
|
287 |
+
$next_rel = $index_next_rel ? 'next' : 'noindex';
|
288 |
+
$prev_rel = $index_prev_rel ? 'prev' : 'noindex';
|
289 |
|
290 |
+
$template_vars['events'] = $sorted_events;
|
291 |
+
$template_vars['next_rel'] = $next_rel;
|
292 |
+
$template_vars['prev_rel'] = $prev_rel;
|
293 |
|
294 |
return $template_vars;
|
295 |
}
|
src/Tribe/Views/V2/Views/Month_View.php
CHANGED
@@ -37,6 +37,15 @@ class Month_View extends By_Day_View {
|
|
37 |
*/
|
38 |
protected $slug = 'month';
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
/**
|
41 |
* Visibility for this view.
|
42 |
*
|
@@ -56,6 +65,48 @@ class Month_View extends By_Day_View {
|
|
56 |
*/
|
57 |
protected $grid_days = [];
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
/**
|
60 |
* {@inheritDoc}
|
61 |
*/
|
@@ -72,21 +123,11 @@ class Month_View extends By_Day_View {
|
|
72 |
$current_date = Dates::build_date_object( $date );
|
73 |
|
74 |
if ( $this->skip_empty() ) {
|
75 |
-
//
|
76 |
-
$
|
77 |
-
|
78 |
-
->where( 'starts_before', tribe_beginning_of_day( $current_date->format( 'Y-m-01' ) ) )
|
79 |
-
->order( 'DESC' )
|
80 |
-
->first();
|
81 |
-
if ( ! $prev_event instanceof \WP_Post ) {
|
82 |
return $this->filter_prev_url( $canonical, '' );
|
83 |
}
|
84 |
-
|
85 |
-
// Show the closest date on which that event appears (but not the current date).
|
86 |
-
$prev_date = min(
|
87 |
-
$prev_event->dates->start,
|
88 |
-
$current_date->sub( new \DateInterval( 'P1M' ) )
|
89 |
-
);
|
90 |
} else {
|
91 |
$prev_date = Dates::build_date_object( $current_date->format( 'Y-m-01' ) );
|
92 |
$prev_date->sub( new \DateInterval( 'P1M' ) );
|
@@ -105,6 +146,46 @@ class Month_View extends By_Day_View {
|
|
105 |
return $url;
|
106 |
}
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
/**
|
109 |
* {@inheritDoc}
|
110 |
*/
|
@@ -121,21 +202,11 @@ class Month_View extends By_Day_View {
|
|
121 |
$current_date = Dates::build_date_object( $date );
|
122 |
|
123 |
if ( $this->skip_empty() ) {
|
124 |
-
//
|
125 |
-
$
|
126 |
-
|
127 |
-
->where( 'ends_after', tribe_end_of_day( $current_date->format( 'Y-m-t' ) ) )
|
128 |
-
->order( 'ASC' )
|
129 |
-
->first();
|
130 |
-
if ( ! $next_event instanceof \WP_Post ) {
|
131 |
return $this->filter_next_url( $canonical, '' );
|
132 |
}
|
133 |
-
|
134 |
-
// At a minimum pick the next month or the month the next event starts in.
|
135 |
-
$next_date = max(
|
136 |
-
$next_event->dates->start,
|
137 |
-
$current_date->add( new \DateInterval( 'P1M' ) )
|
138 |
-
);
|
139 |
} else {
|
140 |
$next_date = Dates::build_date_object( $current_date->format( 'Y-m-01' ) );
|
141 |
$next_date->add( new \DateInterval( 'P1M' ) );
|
@@ -236,10 +307,23 @@ class Month_View extends By_Day_View {
|
|
236 |
$month_and_year_format = tribe_get_option( 'monthAndYearFormat', 'F Y' );
|
237 |
$month_and_year_format_compact = Dates::datepicker_formats( tribe_get_option( 'datepickerFormat', 'm1' ) );
|
238 |
|
239 |
-
$prev_month_num = Dates::build_date_object( $grid_date_str )->modify( 'first day of last month' )->format( 'n' );
|
240 |
$next_month_num = Dates::build_date_object( $grid_date_str )->modify( 'first day of next month' )->format( 'n' );
|
241 |
-
$
|
242 |
$next_month = Dates::wp_locale_month( $next_month_num, 'short' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
|
244 |
$mobile_messages = $this->get_mobile_messages();
|
245 |
|
@@ -251,8 +335,12 @@ class Month_View extends By_Day_View {
|
|
251 |
$template_vars['formatted_grid_date_mobile'] = $grid_date->format( $month_and_year_format_compact );
|
252 |
$template_vars['events'] = $grid_days;
|
253 |
$template_vars['days'] = $days;
|
254 |
-
$template_vars['
|
|
|
|
|
|
|
255 |
$template_vars['next_label'] = $next_month;
|
|
|
256 |
$template_vars['messages'] = $this->messages->to_array();
|
257 |
$template_vars['mobile_messages'] = $mobile_messages;
|
258 |
$template_vars['grid_start_date'] = $grid_start_date;
|
37 |
*/
|
38 |
protected $slug = 'month';
|
39 |
|
40 |
+
/**
|
41 |
+
* Cached dates for the prev/next links.
|
42 |
+
*
|
43 |
+
* @since 5.16.1
|
44 |
+
*
|
45 |
+
* @var array
|
46 |
+
*/
|
47 |
+
protected $cached_event_dates = [];
|
48 |
+
|
49 |
/**
|
50 |
* Visibility for this view.
|
51 |
*
|
65 |
*/
|
66 |
protected $grid_days = [];
|
67 |
|
68 |
+
/**
|
69 |
+
* Get the date of the event immediately previous to the current view date.
|
70 |
+
*
|
71 |
+
* @since 5.16.1
|
72 |
+
*
|
73 |
+
* @param DateTime $current_date A DateTime object signifying the current date for the view.
|
74 |
+
*
|
75 |
+
* @return DateTime|false Either the previous event chronologically, the previous month, or false if no next event found.
|
76 |
+
*/
|
77 |
+
public function get_previous_event_date( $current_date ) {
|
78 |
+
$args = $this->filter_repository_args( parent::setup_repository_args( $this->context ) );
|
79 |
+
|
80 |
+
|
81 |
+
// Use cache to reduce the performance impact.
|
82 |
+
$cache_key = __METHOD__ . '_' . substr( md5( wp_json_encode( [ $current_date, $args ] ) ), 10 );
|
83 |
+
|
84 |
+
if ( isset( $this->cached_event_dates[ $cache_key ] ) ) {
|
85 |
+
return $this->cached_event_dates[ $cache_key ];
|
86 |
+
}
|
87 |
+
|
88 |
+
// Find the first event that starts before the start of this month.
|
89 |
+
$prev_event = tribe_events()
|
90 |
+
->by_args( $args )
|
91 |
+
->where( 'starts_before', tribe_beginning_of_day( $current_date->format( 'Y-m-01' ) ) )
|
92 |
+
->order( 'DESC' )
|
93 |
+
->first();
|
94 |
+
|
95 |
+
if ( ! $prev_event instanceof \WP_Post ) {
|
96 |
+
return false;
|
97 |
+
}
|
98 |
+
|
99 |
+
// Show the closest date on which that event appears (but not the current date).
|
100 |
+
$prev_date = min(
|
101 |
+
Dates::build_date_object( $prev_event->dates->start ),
|
102 |
+
$current_date->modify( '-1 month' )
|
103 |
+
);
|
104 |
+
|
105 |
+
$this->cached_event_dates[ $cache_key ] = $prev_date;
|
106 |
+
|
107 |
+
return $prev_date;
|
108 |
+
}
|
109 |
+
|
110 |
/**
|
111 |
* {@inheritDoc}
|
112 |
*/
|
123 |
$current_date = Dates::build_date_object( $date );
|
124 |
|
125 |
if ( $this->skip_empty() ) {
|
126 |
+
// Show the closest date on which that event appears (but not the current date).
|
127 |
+
$prev_date = $this->get_previous_event_date( $current_date, $canonical );
|
128 |
+
if ( ! $prev_date ) {
|
|
|
|
|
|
|
|
|
129 |
return $this->filter_prev_url( $canonical, '' );
|
130 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
} else {
|
132 |
$prev_date = Dates::build_date_object( $current_date->format( 'Y-m-01' ) );
|
133 |
$prev_date->sub( new \DateInterval( 'P1M' ) );
|
146 |
return $url;
|
147 |
}
|
148 |
|
149 |
+
/**
|
150 |
+
* Get the date of the event immediately after to the current view date.
|
151 |
+
*
|
152 |
+
* @since 5.16.1
|
153 |
+
*
|
154 |
+
* @param DateTime|false $current_date A DateTime object signifying the current date for the view.
|
155 |
+
*
|
156 |
+
* @return DateTime|false Either the next event chronologically, the next month, or false if no next event found.
|
157 |
+
*/
|
158 |
+
public function get_next_event_date( $current_date ) {
|
159 |
+
$args = $this->filter_repository_args( parent::setup_repository_args( $this->context ) );
|
160 |
+
// Use cache to reduce the performance impact.
|
161 |
+
$cache_key = __METHOD__ . '_' . substr( md5( wp_json_encode( [ $current_date, $args ] ) ), 10 );
|
162 |
+
|
163 |
+
if ( isset( $this->cached_event_dates[ $cache_key ] ) ) {
|
164 |
+
return $this->cached_event_dates[ $cache_key ];
|
165 |
+
}
|
166 |
+
|
167 |
+
// The first event that ends after the end of the month; it could still begin in this month.
|
168 |
+
$next_event = tribe_events()
|
169 |
+
->by_args( $this->filter_repository_args( $args ) )
|
170 |
+
->where( 'starts_after', tribe_end_of_day( $current_date->format( 'Y-m-t' ) ) )
|
171 |
+
->order( 'ASC' )
|
172 |
+
->first();
|
173 |
+
|
174 |
+
if ( ! $next_event instanceof \WP_Post ) {
|
175 |
+
return false;
|
176 |
+
}
|
177 |
+
|
178 |
+
// At a minimum pick the next month or the month the next event starts in.
|
179 |
+
$next_date = max(
|
180 |
+
Dates::build_date_object( $next_event->dates->start ),
|
181 |
+
$current_date->modify( '+1 month' )
|
182 |
+
);
|
183 |
+
|
184 |
+
$this->cached_event_dates[ $cache_key ] = $next_date;
|
185 |
+
|
186 |
+
return $next_date;
|
187 |
+
}
|
188 |
+
|
189 |
/**
|
190 |
* {@inheritDoc}
|
191 |
*/
|
202 |
$current_date = Dates::build_date_object( $date );
|
203 |
|
204 |
if ( $this->skip_empty() ) {
|
205 |
+
// At a minimum pick the next month or the month the next event starts in.
|
206 |
+
$next_date = $this->get_next_event_date( $current_date, $canonical );
|
207 |
+
if ( ! $next_date ) {
|
|
|
|
|
|
|
|
|
208 |
return $this->filter_next_url( $canonical, '' );
|
209 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
} else {
|
211 |
$next_date = Dates::build_date_object( $current_date->format( 'Y-m-01' ) );
|
212 |
$next_date->add( new \DateInterval( 'P1M' ) );
|
307 |
$month_and_year_format = tribe_get_option( 'monthAndYearFormat', 'F Y' );
|
308 |
$month_and_year_format_compact = Dates::datepicker_formats( tribe_get_option( 'datepickerFormat', 'm1' ) );
|
309 |
|
|
|
310 |
$next_month_num = Dates::build_date_object( $grid_date_str )->modify( 'first day of next month' )->format( 'n' );
|
311 |
+
$prev_month_num = Dates::build_date_object( $grid_date_str )->modify( 'first day of last month' )->format( 'n' );
|
312 |
$next_month = Dates::wp_locale_month( $next_month_num, 'short' );
|
313 |
+
$prev_month = Dates::wp_locale_month( $prev_month_num, 'short' );
|
314 |
+
$index_next_rel = true;
|
315 |
+
$index_prev_rel = true;
|
316 |
+
|
317 |
+
if ( ! $this->skip_empty() ) {
|
318 |
+
$next_event_date = $this->get_next_event_date( Dates::build_date_object( $grid_date_str ) );
|
319 |
+
$previous_event_date = $this->get_previous_event_date( Dates::build_date_object( $grid_date_str ) );
|
320 |
+
|
321 |
+
$index_next_rel = $next_event_date && $next_month_num === $next_event_date->format( 'n' );
|
322 |
+
$index_prev_rel = $previous_event_date && $prev_month_num === $previous_event_date->format( 'n' );
|
323 |
+
}
|
324 |
+
|
325 |
+
$next_rel = $index_next_rel ? 'next' : 'noindex';
|
326 |
+
$prev_rel = $index_prev_rel ? 'prev' : 'noindex';
|
327 |
|
328 |
$mobile_messages = $this->get_mobile_messages();
|
329 |
|
335 |
$template_vars['formatted_grid_date_mobile'] = $grid_date->format( $month_and_year_format_compact );
|
336 |
$template_vars['events'] = $grid_days;
|
337 |
$template_vars['days'] = $days;
|
338 |
+
$template_vars['next_month'] = $next_month_num;
|
339 |
+
$template_vars['prev_month'] = $prev_month_num;
|
340 |
+
$template_vars['next_rel'] = $next_rel;
|
341 |
+
$template_vars['prev_rel'] = $prev_rel;
|
342 |
$template_vars['next_label'] = $next_month;
|
343 |
+
$template_vars['prev_label'] = $prev_month;
|
344 |
$template_vars['messages'] = $this->messages->to_array();
|
345 |
$template_vars['mobile_messages'] = $mobile_messages;
|
346 |
$template_vars['grid_start_date'] = $grid_start_date;
|
src/Tribe/Views/V2/iCalendar/Links/Google_Calendar.php
CHANGED
@@ -28,6 +28,11 @@ class Google_Calendar extends Link_Abstract {
|
|
28 |
*/
|
29 |
public static $slug = 'gcal';
|
30 |
|
|
|
|
|
|
|
|
|
|
|
31 |
/**
|
32 |
* {@inheritDoc}
|
33 |
*/
|
28 |
*/
|
29 |
public static $slug = 'gcal';
|
30 |
|
31 |
+
/**
|
32 |
+
* {@inheritDoc}
|
33 |
+
*/
|
34 |
+
public $block_slug = 'hasGoogleCalendar';
|
35 |
+
|
36 |
/**
|
37 |
* {@inheritDoc}
|
38 |
*/
|
src/Tribe/Views/V2/iCalendar/Links/Link_Abstract.php
CHANGED
@@ -47,7 +47,7 @@ abstract class Link_Abstract implements Link_Interface {
|
|
47 |
public $visible = true;
|
48 |
|
49 |
/**
|
50 |
-
*
|
51 |
*
|
52 |
* @since 5.12.0
|
53 |
*
|
@@ -55,6 +55,15 @@ abstract class Link_Abstract implements Link_Interface {
|
|
55 |
*/
|
56 |
public static $slug;
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
/**
|
59 |
* Determines if this instance of the class has it's actions and filters hooked.
|
60 |
*
|
@@ -131,10 +140,13 @@ abstract class Link_Abstract implements Link_Interface {
|
|
131 |
}
|
132 |
|
133 |
$class = sanitize_html_class( 'tribe-events-' . self::get_slug() );
|
134 |
-
$links[ self::get_slug() ] =
|
135 |
-
|
136 |
-
|
137 |
-
|
|
|
|
|
|
|
138 |
|
139 |
return $links;
|
140 |
}
|
@@ -245,6 +257,10 @@ abstract class Link_Abstract implements Link_Interface {
|
|
245 |
$feed_url = $this->get_canonical_ics_feed_url( $view );
|
246 |
}
|
247 |
|
|
|
|
|
|
|
|
|
248 |
$feed_url = str_replace( [ 'http://', 'https://' ], 'webcal://', $feed_url );
|
249 |
|
250 |
return $feed_url;
|
47 |
public $visible = true;
|
48 |
|
49 |
/**
|
50 |
+
* The link provider slug.
|
51 |
*
|
52 |
* @since 5.12.0
|
53 |
*
|
55 |
*/
|
56 |
public static $slug;
|
57 |
|
58 |
+
/**
|
59 |
+
* The slug used for the single event sharing block toggle.
|
60 |
+
*
|
61 |
+
* @since 5.16.1
|
62 |
+
*
|
63 |
+
* @var string
|
64 |
+
*/
|
65 |
+
public $block_slug;
|
66 |
+
|
67 |
/**
|
68 |
* Determines if this instance of the class has it's actions and filters hooked.
|
69 |
*
|
140 |
}
|
141 |
|
142 |
$class = sanitize_html_class( 'tribe-events-' . self::get_slug() );
|
143 |
+
$links[ self::get_slug() ] = sprintf(
|
144 |
+
'<a class="tribe-events-button %1$s" href="%2$s" title="%3$s" rel="noopener noreferrer noindex">%4$s</a>',
|
145 |
+
$class,
|
146 |
+
esc_url( $uri ),
|
147 |
+
esc_attr( $label ),
|
148 |
+
esc_html( $label )
|
149 |
+
);
|
150 |
|
151 |
return $links;
|
152 |
}
|
257 |
$feed_url = $this->get_canonical_ics_feed_url( $view );
|
258 |
}
|
259 |
|
260 |
+
if ( empty( $feed_url ) ) {
|
261 |
+
return '';
|
262 |
+
}
|
263 |
+
|
264 |
$feed_url = str_replace( [ 'http://', 'https://' ], 'webcal://', $feed_url );
|
265 |
|
266 |
return $feed_url;
|
src/Tribe/Views/V2/iCalendar/Links/Outlook_365.php
CHANGED
@@ -32,6 +32,11 @@ class Outlook_365 extends Link_Abstract {
|
|
32 |
*/
|
33 |
public static $calendar_slug = 'office';
|
34 |
|
|
|
|
|
|
|
|
|
|
|
35 |
/**
|
36 |
* {@inheritDoc}
|
37 |
*/
|
32 |
*/
|
33 |
public static $calendar_slug = 'office';
|
34 |
|
35 |
+
/**
|
36 |
+
* {@inheritDoc}
|
37 |
+
*/
|
38 |
+
public $block_slug = 'hasOutlook365';
|
39 |
+
|
40 |
/**
|
41 |
* {@inheritDoc}
|
42 |
*/
|
src/Tribe/Views/V2/iCalendar/Links/Outlook_Live.php
CHANGED
@@ -27,6 +27,11 @@ class Outlook_Live extends Link_Abstract {
|
|
27 |
*/
|
28 |
public static $slug = 'outlook-live';
|
29 |
|
|
|
|
|
|
|
|
|
|
|
30 |
/**
|
31 |
* {@inheritDoc}
|
32 |
*/
|
27 |
*/
|
28 |
public static $slug = 'outlook-live';
|
29 |
|
30 |
+
/**
|
31 |
+
* {@inheritDoc}
|
32 |
+
*/
|
33 |
+
public $block_slug = 'hasOutlookLive';
|
34 |
+
|
35 |
/**
|
36 |
* {@inheritDoc}
|
37 |
*/
|
src/Tribe/Views/V2/iCalendar/Links/iCal.php
CHANGED
@@ -22,6 +22,11 @@ class iCal extends Link_Abstract {
|
|
22 |
*/
|
23 |
public static $slug = 'ical';
|
24 |
|
|
|
|
|
|
|
|
|
|
|
25 |
/**
|
26 |
* {@inheritDoc}
|
27 |
*/
|
22 |
*/
|
23 |
public static $slug = 'ical';
|
24 |
|
25 |
+
/**
|
26 |
+
* {@inheritDoc}
|
27 |
+
*/
|
28 |
+
public $block_slug = 'hasiCal';
|
29 |
+
|
30 |
/**
|
31 |
* {@inheritDoc}
|
32 |
*/
|
src/Tribe/iCal.php
CHANGED
@@ -138,8 +138,8 @@ class Tribe__Events__iCal {
|
|
138 |
return;
|
139 |
}
|
140 |
$calendar_links = '<div class="tribe-events-cal-links">';
|
141 |
-
$calendar_links .= '<a class="tribe-events-gcal tribe-events-button" href="' . Tribe__Events__Main::instance()->esc_gcal_url( tribe_get_gcal_link() ) . '" target="_blank" rel="noopener noreferrer" title="' . esc_attr__( 'Add to Google Calendar', 'the-events-calendar' ) . '">+ ' . esc_html__( 'Google Calendar', 'the-events-calendar' ) . '</a>';
|
142 |
-
$calendar_links .= '<a class="tribe-events-ical tribe-events-button" href="' . esc_url( tribe_get_single_ical_link() ) . '" title="' . esc_attr__( 'Download .ics file', 'the-events-calendar' ) . '" >+ ' . esc_html__( 'Add to iCalendar', 'the-events-calendar' ) . '</a>';
|
143 |
$calendar_links .= '</div><!-- .tribe-events-cal-links -->';
|
144 |
|
145 |
/**
|
138 |
return;
|
139 |
}
|
140 |
$calendar_links = '<div class="tribe-events-cal-links">';
|
141 |
+
$calendar_links .= '<a class="tribe-events-gcal tribe-events-button" href="' . Tribe__Events__Main::instance()->esc_gcal_url( tribe_get_gcal_link() ) . '" target="_blank" rel="noopener noreferrer noindex" title="' . esc_attr__( 'Add to Google Calendar', 'the-events-calendar' ) . '">+ ' . esc_html__( 'Google Calendar', 'the-events-calendar' ) . '</a>';
|
142 |
+
$calendar_links .= '<a class="tribe-events-ical tribe-events-button" href="' . esc_url( tribe_get_single_ical_link() ) . '" title="' . esc_attr__( 'Download .ics file', 'the-events-calendar' ) . '" rel="noopener noreferrer noindex" >+ ' . esc_html__( 'Add to iCalendar', 'the-events-calendar' ) . '</a>';
|
143 |
$calendar_links .= '</div><!-- .tribe-events-cal-links -->';
|
144 |
|
145 |
/**
|
src/admin-views/aggregator/origins/limit.php
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
/** @var \Tribe__Events__Aggregator__Settings $settings */
|
3 |
$settings = tribe( 'events-aggregator.settings' );
|
4 |
$global_limit_type = tribe_get_option( 'tribe_aggregator_default_import_limit_type', 'count' );
|
@@ -33,7 +35,7 @@ if ( 'range' === $global_limit_type ) {
|
|
33 |
);
|
34 |
}
|
35 |
|
36 |
-
$import_limit_link = esc_url(
|
37 |
$import_limit_message = $global_limit_message . ' ' . sprintf( '<a href="%s" target="_blank">%s</a> ', $import_limit_link, esc_html__( 'you can modify this setting here.', 'the-events-calendar' ) );
|
38 |
?>
|
39 |
|
1 |
<?php
|
2 |
+
use Tribe\Events\Admin\Settings as Plugin_Settings;
|
3 |
+
|
4 |
/** @var \Tribe__Events__Aggregator__Settings $settings */
|
5 |
$settings = tribe( 'events-aggregator.settings' );
|
6 |
$global_limit_type = tribe_get_option( 'tribe_aggregator_default_import_limit_type', 'count' );
|
35 |
);
|
36 |
}
|
37 |
|
38 |
+
$import_limit_link = esc_url( tribe( Plugin_Settings::class )->get_url( [ 'tab' => 'imports#tribe-field-tribe_aggregator_default_import_limit_type' ] ) );
|
39 |
$import_limit_message = $global_limit_message . ' ' . sprintf( '<a href="%s" target="_blank">%s</a> ', $import_limit_link, esc_html__( 'you can modify this setting here.', 'the-events-calendar' ) );
|
40 |
?>
|
41 |
|
src/admin-views/aggregator/origins/url.php
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
$tab = $this->tabs->get_active();
|
3 |
$origin_slug = 'url';
|
4 |
$field = (object) [];
|
@@ -89,11 +91,11 @@ $field->label = __( 'URL:', 'the-events-calendar' );
|
|
89 |
$field->placeholder = __( 'example.com/', 'the-events-calendar' );
|
90 |
$field->help = __( 'Enter the url for the calendar, website, or event you would like to import. Event Aggregator will attempt to import events at that location.', 'the-events-calendar' );
|
91 |
|
92 |
-
$range_option
|
93 |
$range_strings = tribe( 'events-aggregator.settings' )->get_url_import_range_options( false );
|
94 |
-
$range_string
|
95 |
$range_message = esc_html( sprintf( __( 'Event Aggregator will try to fetch events starting within the next %s from the current date or the specified date;', 'the-events-calendar' ), $range_string ) );
|
96 |
-
$link
|
97 |
$field->range_message = $range_message . ' ' . sprintf( '<a href="%s" target="_blank">%s</a> ', $link, esc_html__( 'you can modify this setting here.', 'the-events-calendar' ) );
|
98 |
?>
|
99 |
<tr class="tribe-dependent" data-depends="#tribe-ea-field-url_import_type" data-condition-not-empty>
|
1 |
<?php
|
2 |
+
use Tribe\Events\Admin\Settings as Plugin_Settings;
|
3 |
+
|
4 |
$tab = $this->tabs->get_active();
|
5 |
$origin_slug = 'url';
|
6 |
$field = (object) [];
|
91 |
$field->placeholder = __( 'example.com/', 'the-events-calendar' );
|
92 |
$field->help = __( 'Enter the url for the calendar, website, or event you would like to import. Event Aggregator will attempt to import events at that location.', 'the-events-calendar' );
|
93 |
|
94 |
+
$range_option = tribe_get_option( 'tribe_aggregator_default_url_import_range', 30 * DAY_IN_SECONDS );
|
95 |
$range_strings = tribe( 'events-aggregator.settings' )->get_url_import_range_options( false );
|
96 |
+
$range_string = $range_strings[ $range_option ];
|
97 |
$range_message = esc_html( sprintf( __( 'Event Aggregator will try to fetch events starting within the next %s from the current date or the specified date;', 'the-events-calendar' ), $range_string ) );
|
98 |
+
$link = esc_attr( tribe( Plugin_Settings::class )->get_url( [ 'tab' => 'imports#tribe-field-tribe_aggregator_default_url_import_range' ] ) );
|
99 |
$field->range_message = $range_message . ' ' . sprintf( '<a href="%s" target="_blank">%s</a> ', $link, esc_html__( 'you can modify this setting here.', 'the-events-calendar' ) );
|
100 |
?>
|
101 |
<tr class="tribe-dependent" data-depends="#tribe-ea-field-url_import_type" data-condition-not-empty>
|
src/admin-views/aggregator/tabs/import-form.php
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
$has_license_key = tribe( 'events-aggregator.main' )->is_service_active();
|
3 |
$hide_upsell = tec_should_hide_upsell();
|
4 |
|
@@ -334,7 +336,7 @@ $scheduled_save_help = esc_html__( 'When you save this scheduled import, the eve
|
|
334 |
<?php echo sprintf(
|
335 |
'%1$s %2$s%3$s%4$s %5$s',
|
336 |
esc_html__( 'Events will be imported with the same timezone as defined on eventbrite.com. You can make use of The Events Calendar\'s', 'the-events-calendar' ),
|
337 |
-
'<a href="' . esc_url( tribe(
|
338 |
esc_html__( 'timezone settings', 'the-events-calendar' ),
|
339 |
'</a>',
|
340 |
esc_html__( 'to change how the actual time is displayed on your calendar.', 'the-events-calendar' )
|
@@ -345,7 +347,7 @@ $scheduled_save_help = esc_html__( 'When you save this scheduled import, the eve
|
|
345 |
<div class="tribe-dependent" data-depends="#tribe-ea-field-origin" data-condition-not="eventbrite">
|
346 |
<p class="tribe-limits-message">
|
347 |
<?php echo sprintf( esc_html__( 'The number of events available in the preview may be limited by your %1$sImport Settings.%2$s', 'the-events-calendar' ),
|
348 |
-
'<a href="' . esc_url(
|
349 |
'</a>' ); ?>
|
350 |
</p>
|
351 |
</div>
|
@@ -354,7 +356,7 @@ $scheduled_save_help = esc_html__( 'When you save this scheduled import, the eve
|
|
354 |
<?php echo sprintf(
|
355 |
'%1$s %2$s%3$s%4$s',
|
356 |
esc_html__( 'Events will be imported with the time zone defined by the source. If no time zone is specified, events will be assigned your site\'s default time zone ( see', 'the-events-calendar' ),
|
357 |
-
'<a href="' . esc_url( tribe(
|
358 |
esc_html__( 'Settings > General', 'the-events-calendar' ),
|
359 |
'</a> ).'
|
360 |
);
|
1 |
<?php
|
2 |
+
use Tribe\Events\Admin\Settings as Plugin_Settings;
|
3 |
+
|
4 |
$has_license_key = tribe( 'events-aggregator.main' )->is_service_active();
|
5 |
$hide_upsell = tec_should_hide_upsell();
|
6 |
|
336 |
<?php echo sprintf(
|
337 |
'%1$s %2$s%3$s%4$s %5$s',
|
338 |
esc_html__( 'Events will be imported with the same timezone as defined on eventbrite.com. You can make use of The Events Calendar\'s', 'the-events-calendar' ),
|
339 |
+
'<a href="' . esc_url( tribe( Plugin_Settings::class )->get_url() ) . '#tribe-field-tribe_events_timezone_mode">',
|
340 |
esc_html__( 'timezone settings', 'the-events-calendar' ),
|
341 |
'</a>',
|
342 |
esc_html__( 'to change how the actual time is displayed on your calendar.', 'the-events-calendar' )
|
347 |
<div class="tribe-dependent" data-depends="#tribe-ea-field-origin" data-condition-not="eventbrite">
|
348 |
<p class="tribe-limits-message">
|
349 |
<?php echo sprintf( esc_html__( 'The number of events available in the preview may be limited by your %1$sImport Settings.%2$s', 'the-events-calendar' ),
|
350 |
+
'<a href="' . esc_url( tribe( Plugin_Settings::class )->get_url( [ 'tab' => 'imports#tribe-field-tribe_aggregator_default_import_limit_type' ] ) ) . '#tribe-field-tribe_events_timezone_mode">',
|
351 |
'</a>' ); ?>
|
352 |
</p>
|
353 |
</div>
|
356 |
<?php echo sprintf(
|
357 |
'%1$s %2$s%3$s%4$s',
|
358 |
esc_html__( 'Events will be imported with the time zone defined by the source. If no time zone is specified, events will be assigned your site\'s default time zone ( see', 'the-events-calendar' ),
|
359 |
+
'<a href="' . esc_url( tribe( Plugin_Settings::class )->get_url() ) . '#tribe-field-tribe_events_timezone_mode">',
|
360 |
esc_html__( 'Settings > General', 'the-events-calendar' ),
|
361 |
'</a> ).'
|
362 |
);
|
src/resources/css/tribe-events-single-blocks.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.single-tribe_events .tribe-blocks-editor .tribe-events-single-event-title{font-size:revert;line-height:revert}.tribe-block__event-website{font-family:var(--tec-font-family-sans-serif);padding:20px 0}.tribe-block__event-website a{background-color:var(--tec-color-accent-primary);border:none;border-radius:4px;font-size:var(--tec-font-size-3);font-weight:var(--tec-font-weight-bold);min-height:40px;padding:0 20px}#tribe-events-content .tribe-block__event-website a,#tribe-events-content .tribe-block__event-website a:active,#tribe-events-content .tribe-block__event-website a:focus,#tribe-events-content .tribe-block__event-website a:hover{color:var(--tec-color-background)}.tribe-block__venue{border-top:1px solid var(--tec-color-border-default);flex-direction:column-reverse;font-family:var(--tec-font-family-sans-serif);justify-content:flex-start;padding:22.5px 0}.tribe-block__venue.tribe-block__venue--has-map .tribe-block__venue__map,.tribe-block__venue.tribe-block__venue--has-map .tribe-block__venue__meta{flex:none;width:100%}.tribe-block__venue .tribe-block__venue__meta{margin-top:24px}.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__name h3{font-size:var(--tec-font-size-3);font-weight:400;letter-spacing:normal;line-height:1.64}.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address{margin-bottom:0}.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address a{color:var(--tec-color-link-accent);margin-top:17px}.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address .tribe-region.tribe-events-abbr{text-decoration:none}.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__phone{margin-bottom:0}.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address,.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__phone,.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website{color:var(--tec-color-text-primary);font-weight:400;letter-spacing:normal;line-height:1.64}.tribe-block__organizer__details{border-top:1px solid var(--tec-color-border-default);font-family:var(--tec-font-family-sans-serif);padding:22.5px 0}.tribe-block__organizer__details h3{font-size:var(--tec-font-size-3);font-weight:400;letter-spacing:normal;line-height:1.64}.tribe-block__organizer__details h3 a{color:var(--tec-color-link-accent)}.tribe-block__organizer__details p{color:var(--tec-color-text-primary);font-size:var(--tec-font-size-3);letter-spacing:normal;line-height:1.64}.tribe-block__events-link{font-family:var(--tec-font-family-sans-serif);padding:20px 0}.tribe-block__events-link .tribe-block__btn--link:before{content:url("data:image/svg+xml;charset=utf-8,%3Csvg width='25' height='19' viewBox='0 0 25 19' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 .431V17.57c0 .238.163.431.364.431h17.273c.2 0 .363-.193.363-.431V.43C18 .193 17.837 0 17.637 0H.364C.163 0 0 .193 0 .431zm18 7.585h-1.015V4.687H.991v12.07h15.994v-3.753H18V8.016zM.99 1.239h15.995v2.315H.991V1.239z' fill='%23141827'/%3E%3Cpath d='M22.918 10.5H9.207M20.695 7.245l3.252 3.272-3.213 3.213' stroke='%23141827' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");margin:5px 5px 0 0}.tribe-block__events-link .tribe-block__btn--link a{background-color:transparent;border:none;color:var(--tec-color-link-accent);display:block;font-weight:400;margin:10px 15px 10px 0;min-height:revert;padding:0}.tribe-block__events-link .tribe-block__btn--link a:before{color:var(--tec-color-link-accent);content:"+";margin-right:3px}.tribe-block__events-link .tribe-block__btn--link img{display:none}.tribe-block__event-price{font-family:var(--tec-font-family-sans-serif);padding:20px 0 10px}.tribe-block__event-price .tribe-block__event-price__cost,.tribe-block__event-price .tribe-block__event-price__description{font-size:var(--tec-font-size-3)}.single-tribe_events .tribe-blocks-editor .tribe-events-single-event-recurrence-description{background-color:var(--tec-color-background-secondary);border-radius:40px;display:inline-flex;font-family:var(--tec-font-family-sans-serif);min-height:40px;padding:0 13px 0 10px;position:relative}.single-tribe_events .tribe-blocks-editor .tribe-events-single-event-recurrence-description:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.333 3.826c0 .065 0 .13-.02.174 0 .022-.02.065-.02.087a.9.9 0 0 1-.197.37L10.45 7.37a.797.797 0 0 1-.592.26.797.797 0 0 1-.593-.26c-.316-.348-.316-.935 0-1.305l1.225-1.348H6.3c-2.547 0-4.64 2.283-4.64 5.11 0 1.369.474 2.651 1.363 3.608.316.348.316.935 0 1.304A.797.797 0 0 1 2.43 15a.797.797 0 0 1-.593-.26C.652 13.434 0 11.695 0 9.847c0-3.826 2.825-6.935 6.301-6.935h4.208L9.284 1.565c-.316-.348-.316-.935 0-1.304.316-.348.85-.348 1.185 0l2.647 2.913a.952.952 0 0 1 .198.37c0 .021.02.065.02.086v.196zM20 10.152c0 3.826-2.825 6.935-6.301 6.935H9.49l1.225 1.348c.336.348.336.935 0 1.304a.797.797 0 0 1-.593.261.83.83 0 0 1-.592-.26l-2.627-2.936a.948.948 0 0 1-.198-.37c0-.021-.02-.064-.02-.086-.02-.065-.02-.109-.02-.174 0-.065 0-.13.02-.174 0-.022.02-.065.02-.087a.9.9 0 0 1 .198-.37L9.55 12.63c.316-.347.849-.347 1.185 0 .336.348.336.935 0 1.305L9.51 15.283h4.208c2.548 0 4.641-2.283 4.641-5.11 0-1.369-.474-2.651-1.362-3.608a.97.97 0 0 1 0-1.304c.316-.348.849-.348 1.185 0C19.348 6.543 20 8.283 20 10.152z'/%3E%3C/svg%3E") 0/12px no-repeat;content:"";height:20px;left:20px;position:absolute;top:50%;transform:translateY(-50%);width:20px}.single-tribe_events .tribe-blocks-editor .tribe-events-single-event-recurrence-description img{display:none}.single-tribe_events .tribe-blocks-editor .tribe-events-single-event-recurrence-description span{color:var(--tec-color-text-primary);font-size:var(--tec-font-size-3);font-weight:700;padding-left:30px}.single-tribe_events .tribe-blocks-editor .tribe-events-single-event-recurrence-description a{color:var(--tec-color-link-accent);font-size:var(--tec-font-size-3)}.single-tribe_events .tribe-blocks-editor .tribe-events-schedule{background:transparent;border:none;margin:10px 0 15px;padding:0}.single-tribe_events .tribe-blocks-editor .tribe-events-schedule .tribe-events-schedule__datetime{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-3);font-weight:400;letter-spacing:normal;line-height:1.63}.tribe-block__related-events__title{font-size:var(--tec-font-size-9);line-height:1.64;margin-bottom:15px}.single-tribe_events ul.tribe-related-events .tribe-related-events-title{font-size:var(--tec-font-size-3);line-height:1.64}.tribe-blocks-editor .tribe-related-event-info .timezone,.tribe-blocks-editor .tribe-related-event-info .tribe-event-date-start,.tribe-blocks-editor .tribe-related-event-info .tribe-event-time{font-size:var(--tec-font-size-2);line-height:1.64}.single-tribe_events #tribe-events-content.tribe-blocks-editor .tribe-events-event-meta{background:transparent;border:none;margin:0}.single-tribe_events #tribe-events-content.tribe-blocks-editor .tribe-events-event-meta .tribe-events-meta-group{padding:0}.single-tribe_events #tribe-events-content.tribe-blocks-editor .tribe-events-event-meta .tribe-events-single-section-title{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-4);font-weight:700;letter-spacing:normal;line-height:1.64}.single-tribe_events #tribe-events-content.tribe-blocks-editor .tribe-events-event-meta dl{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-3);letter-spacing:normal;line-height:1.64}.single-tribe_events #tribe-events-content.tribe-blocks-editor .tribe-events-event-meta dl dd{margin:5px 0 10px}.single-tribe_events #tribe-events-content.tribe-blocks-editor .tribe-events-event-meta dl dd .tribe-events-abbr{text-decoration:none}.tribe-theme-twentytwentyone .tribe-block__event-website a{font-size:var(--tec-font-size-4)}.tribe-theme-twentytwentyone .tribe-block__event-website a:focus:not(.wp-block-button__link):not(.wp-block-file__button){background-color:var(--tec-color-accent-primary)}.tribe-theme-twentytwentyone .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address,.tribe-theme-twentytwentyone .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address a,.tribe-theme-twentytwentyone .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__name h3,.tribe-theme-twentytwentyone .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__phone,.tribe-theme-twentytwentyone .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website{font-size:var(--tec-font-size-4)}.tribe-theme-twentytwentyone .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website a{color:var(--tec-color-link-accent)}.tribe-theme-twentytwentyone .tribe-block__events-link .tribe-block__btn--link a,.tribe-theme-twentytwentyone .tribe-block__organizer__details h3,.tribe-theme-twentytwentyone .tribe-block__organizer__details p{font-size:var(--tec-font-size-4)}.tribe-theme-twentytwentyone .tribe-block__events-link .tribe-block__btn--link a:focus:not(.wp-block-button__link):not(.wp-block-file__button){background-color:transparent}.tribe-theme-twentytwenty .tribe-block__event-website a,.tribe-theme-twentytwenty .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address,.tribe-theme-twentytwenty .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address a,.tribe-theme-twentytwenty .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__name h3,.tribe-theme-twentytwenty .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__phone,.tribe-theme-twentytwenty .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website,.tribe-theme-twentytwentyone .tribe-block__event-price__cost,.tribe-theme-twentytwentyone .tribe-block__event-price__description{font-size:var(--tec-font-size-4)}.tribe-theme-twentytwenty .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website a{color:var(--tec-color-link-accent)}.tribe-theme-twentytwenty .tribe-block__event-price__cost,.tribe-theme-twentytwenty .tribe-block__event-price__description,.tribe-theme-twentytwenty .tribe-block__events-link .tribe-block__btn--link a,.tribe-theme-twentytwenty .tribe-block__organizer__details h3,.tribe-theme-twentytwenty .tribe-block__organizer__details p{font-size:var(--tec-font-size-4)}.tribe-theme-twentyseventeen .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__name h3,.tribe-theme-twentyseventeen .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website a{color:var(--tec-color-link-accent)}.tribe-theme-genesis .tribe-block__event-website a,.tribe-theme-genesis .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address,.tribe-theme-genesis .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__name h3,.tribe-theme-genesis .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__phone,.tribe-theme-genesis .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website{font-size:var(--tec-font-size-4)}.tribe-theme-genesis .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website a{color:var(--tec-color-link-accent)}.tribe-theme-genesis .tribe-block__event-price__cost,.tribe-theme-genesis .tribe-block__event-price__description,.tribe-theme-genesis .tribe-block__events-link .tribe-block__btn--link a,.tribe-theme-genesis .tribe-block__organizer__details h3,.tribe-theme-genesis .tribe-block__organizer__details p{font-size:var(--tec-font-size-4)}.tribe-theme-divi .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address,.tribe-theme-divi .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__name h3,.tribe-theme-divi .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__phone,.tribe-theme-divi .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website{padding-bottom:0}.tribe-theme-divi .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website a{color:var(--tec-color-link-accent)}.tribe-theme-divi .tribe-block__organizer__details h3,.tribe-theme-divi .tribe-block__organizer__details p{padding-bottom:0}.tribe-theme-enfold .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__name h3,.tribe-theme-enfold .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website a{color:var(--tec-color-link-accent)}.tribe-theme-enfold .tribe-block__organizer__details h3{color:var(--tec-color-accent-primary)}@media screen and (min-width:768px){.tribe-block__venue{flex-direction:row;padding:32px 0}.tribe-block__venue.tribe-block__venue--has-map .tribe-block__venue__map,.tribe-block__venue.tribe-block__venue--has-map .tribe-block__venue__meta{width:50%}.tribe-block__venue .tribe-block__venue__meta{margin-top:0}.tribe-block__organizer__details{padding:32px 0}}@media screen and (min-width:1200px){.tribe-block__venue.tribe-block__venue--has-map .tribe-block__venue__meta{margin-right:20px;width:35%}}
|
1 |
+
.single-tribe_events .tribe-blocks-editor .tribe-events-single-event-title{font-size:revert;line-height:revert}.tribe-block__event-website{font-family:var(--tec-font-family-sans-serif)}.tribe-block__event-website a{background-color:var(--tec-color-accent-primary);border:none;border-radius:4px;font-size:var(--tec-font-size-3);font-weight:var(--tec-font-weight-bold);padding:var(--tec-spacer-2) var(--tec-spacer-4)}#tribe-events-content .tribe-block__event-website a,#tribe-events-content .tribe-block__event-website a:active,#tribe-events-content .tribe-block__event-website a:focus,#tribe-events-content .tribe-block__event-website a:hover{color:var(--tec-color-background)}.tribe-block__venue{border-top:1px solid var(--tec-color-border-default);flex-direction:column-reverse;font-family:var(--tec-font-family-sans-serif);justify-content:flex-start;padding:22.5px 0}.tribe-block__venue.tribe-block__venue--has-map .tribe-block__venue__map,.tribe-block__venue.tribe-block__venue--has-map .tribe-block__venue__meta{flex:none;width:100%}.tribe-block__venue .tribe-block__venue__meta{margin-top:24px}.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__name h3{font-size:var(--tec-font-size-3);font-weight:400;letter-spacing:normal;line-height:1.64}.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address{margin-bottom:0}.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address a{color:var(--tec-color-link-accent);margin-top:17px}.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address .tribe-region.tribe-events-abbr{text-decoration:none}.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__phone{margin-bottom:0}.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address,.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__phone,.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website{color:var(--tec-color-text-primary);font-weight:400;letter-spacing:normal;line-height:1.64}.tribe-block__organizer__details{border-top:1px solid var(--tec-color-border-default);font-family:var(--tec-font-family-sans-serif);padding:22.5px 0}.tribe-block__organizer__details h3{font-size:var(--tec-font-size-3);font-weight:400;letter-spacing:normal;line-height:1.64}.tribe-block__organizer__details h3 a{color:var(--tec-color-link-accent)}.tribe-block__organizer__details p{color:var(--tec-color-text-primary);font-size:var(--tec-font-size-3);letter-spacing:normal;line-height:1.64}.tribe-block__events-link{font-family:var(--tec-font-family-sans-serif);padding:20px 0}.tribe-block__events-link .tribe-block__btn--link:before{content:url("data:image/svg+xml;charset=utf-8,%3Csvg width='25' height='19' viewBox='0 0 25 19' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 .431V17.57c0 .238.163.431.364.431h17.273c.2 0 .363-.193.363-.431V.43C18 .193 17.837 0 17.637 0H.364C.163 0 0 .193 0 .431zm18 7.585h-1.015V4.687H.991v12.07h15.994v-3.753H18V8.016zM.99 1.239h15.995v2.315H.991V1.239z' fill='%23141827'/%3E%3Cpath d='M22.918 10.5H9.207M20.695 7.245l3.252 3.272-3.213 3.213' stroke='%23141827' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");margin:5px 5px 0 0}.tribe-block__events-link .tribe-block__btn--link a{background-color:transparent;border:none;color:var(--tec-color-link-accent);display:block;font-weight:400;margin:10px 15px 10px 0;min-height:revert;padding:0}.tribe-block__events-link .tribe-block__btn--link a:before{color:var(--tec-color-link-accent);content:"+";margin-right:3px}.tribe-block__events-link .tribe-block__btn--link img{display:none}.tribe-block__event-price{font-family:var(--tec-font-family-sans-serif);padding:20px 0 10px}.tribe-block__event-price .tribe-block__event-price__cost,.tribe-block__event-price .tribe-block__event-price__description{font-size:var(--tec-font-size-3)}.single-tribe_events .tribe-blocks-editor .tribe-events-single-event-recurrence-description{background-color:var(--tec-color-background-secondary);border-radius:40px;display:inline-flex;font-family:var(--tec-font-family-sans-serif);min-height:40px;padding:0 13px 0 10px;position:relative}.single-tribe_events .tribe-blocks-editor .tribe-events-single-event-recurrence-description:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.333 3.826c0 .065 0 .13-.02.174 0 .022-.02.065-.02.087a.9.9 0 0 1-.197.37L10.45 7.37a.797.797 0 0 1-.592.26.797.797 0 0 1-.593-.26c-.316-.348-.316-.935 0-1.305l1.225-1.348H6.3c-2.547 0-4.64 2.283-4.64 5.11 0 1.369.474 2.651 1.363 3.608.316.348.316.935 0 1.304A.797.797 0 0 1 2.43 15a.797.797 0 0 1-.593-.26C.652 13.434 0 11.695 0 9.847c0-3.826 2.825-6.935 6.301-6.935h4.208L9.284 1.565c-.316-.348-.316-.935 0-1.304.316-.348.85-.348 1.185 0l2.647 2.913a.952.952 0 0 1 .198.37c0 .021.02.065.02.086v.196zM20 10.152c0 3.826-2.825 6.935-6.301 6.935H9.49l1.225 1.348c.336.348.336.935 0 1.304a.797.797 0 0 1-.593.261.83.83 0 0 1-.592-.26l-2.627-2.936a.948.948 0 0 1-.198-.37c0-.021-.02-.064-.02-.086-.02-.065-.02-.109-.02-.174 0-.065 0-.13.02-.174 0-.022.02-.065.02-.087a.9.9 0 0 1 .198-.37L9.55 12.63c.316-.347.849-.347 1.185 0 .336.348.336.935 0 1.305L9.51 15.283h4.208c2.548 0 4.641-2.283 4.641-5.11 0-1.369-.474-2.651-1.362-3.608a.97.97 0 0 1 0-1.304c.316-.348.849-.348 1.185 0C19.348 6.543 20 8.283 20 10.152z'/%3E%3C/svg%3E") 0/12px no-repeat;content:"";height:20px;left:20px;position:absolute;top:50%;transform:translateY(-50%);width:20px}.single-tribe_events .tribe-blocks-editor .tribe-events-single-event-recurrence-description img{display:none}.single-tribe_events .tribe-blocks-editor .tribe-events-single-event-recurrence-description span{color:var(--tec-color-text-primary);font-size:var(--tec-font-size-3);font-weight:700;padding-left:30px}.single-tribe_events .tribe-blocks-editor .tribe-events-single-event-recurrence-description a{color:var(--tec-color-link-accent);font-size:var(--tec-font-size-3)}.single-tribe_events .tribe-blocks-editor .tribe-events-schedule{background:transparent;border:none;margin:10px 0 15px;padding:0}.single-tribe_events .tribe-blocks-editor .tribe-events-schedule .tribe-events-schedule__datetime{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-3);font-weight:400;letter-spacing:normal;line-height:1.63}.tribe-block__related-events__title{font-size:var(--tec-font-size-9);line-height:1.64;margin-bottom:15px}.single-tribe_events ul.tribe-related-events .tribe-related-events-title{font-size:var(--tec-font-size-3);line-height:1.64}.tribe-blocks-editor .tribe-related-event-info .timezone,.tribe-blocks-editor .tribe-related-event-info .tribe-event-date-start,.tribe-blocks-editor .tribe-related-event-info .tribe-event-time{font-size:var(--tec-font-size-2);line-height:1.64}.single-tribe_events #tribe-events-content.tribe-blocks-editor .tribe-events-event-meta{background:transparent;border:none;margin:0}.single-tribe_events #tribe-events-content.tribe-blocks-editor .tribe-events-event-meta .tribe-events-meta-group{padding:0}.single-tribe_events #tribe-events-content.tribe-blocks-editor .tribe-events-event-meta .tribe-events-single-section-title{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-4);font-weight:700;letter-spacing:normal;line-height:1.64}.single-tribe_events #tribe-events-content.tribe-blocks-editor .tribe-events-event-meta dl{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-3);letter-spacing:normal;line-height:1.64}.single-tribe_events #tribe-events-content.tribe-blocks-editor .tribe-events-event-meta dl dd{margin:5px 0 10px}.single-tribe_events #tribe-events-content.tribe-blocks-editor .tribe-events-event-meta dl dd .tribe-events-abbr{text-decoration:none}.tribe-theme-twentytwentyone .tribe-block__event-website a{font-size:var(--tec-font-size-4)}.tribe-theme-twentytwentyone .tribe-block__event-website a:focus:not(.wp-block-button__link):not(.wp-block-file__button){background-color:var(--tec-color-accent-primary)}.tribe-theme-twentytwentyone .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address,.tribe-theme-twentytwentyone .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address a,.tribe-theme-twentytwentyone .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__name h3,.tribe-theme-twentytwentyone .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__phone,.tribe-theme-twentytwentyone .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website{font-size:var(--tec-font-size-4)}.tribe-theme-twentytwentyone .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website a{color:var(--tec-color-link-accent)}.tribe-theme-twentytwentyone .tribe-block__events-link .tribe-block__btn--link a,.tribe-theme-twentytwentyone .tribe-block__organizer__details h3,.tribe-theme-twentytwentyone .tribe-block__organizer__details p{font-size:var(--tec-font-size-4)}.tribe-theme-twentytwentyone .tribe-block__events-link .tribe-block__btn--link a:focus:not(.wp-block-button__link):not(.wp-block-file__button){background-color:transparent}.tribe-theme-twentytwenty .tribe-block__event-website a,.tribe-theme-twentytwenty .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address,.tribe-theme-twentytwenty .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address a,.tribe-theme-twentytwenty .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__name h3,.tribe-theme-twentytwenty .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__phone,.tribe-theme-twentytwenty .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website,.tribe-theme-twentytwentyone .tribe-block__event-price__cost,.tribe-theme-twentytwentyone .tribe-block__event-price__description{font-size:var(--tec-font-size-4)}.tribe-theme-twentytwenty .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website a{color:var(--tec-color-link-accent)}.tribe-theme-twentytwenty .tribe-block__event-price__cost,.tribe-theme-twentytwenty .tribe-block__event-price__description,.tribe-theme-twentytwenty .tribe-block__events-link .tribe-block__btn--link a,.tribe-theme-twentytwenty .tribe-block__organizer__details h3,.tribe-theme-twentytwenty .tribe-block__organizer__details p{font-size:var(--tec-font-size-4)}.tribe-theme-twentyseventeen .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__name h3,.tribe-theme-twentyseventeen .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website a{color:var(--tec-color-link-accent)}.tribe-theme-genesis .tribe-block__event-website a,.tribe-theme-genesis .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address,.tribe-theme-genesis .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__name h3,.tribe-theme-genesis .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__phone,.tribe-theme-genesis .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website{font-size:var(--tec-font-size-4)}.tribe-theme-genesis .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website a{color:var(--tec-color-link-accent)}.tribe-theme-genesis .tribe-block__event-price__cost,.tribe-theme-genesis .tribe-block__event-price__description,.tribe-theme-genesis .tribe-block__events-link .tribe-block__btn--link a,.tribe-theme-genesis .tribe-block__organizer__details h3,.tribe-theme-genesis .tribe-block__organizer__details p{font-size:var(--tec-font-size-4)}.tribe-theme-divi .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__address,.tribe-theme-divi .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__name h3,.tribe-theme-divi .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__phone,.tribe-theme-divi .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website{padding-bottom:0}.tribe-theme-divi .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website a{color:var(--tec-color-link-accent)}.tribe-theme-divi .tribe-block__organizer__details h3,.tribe-theme-divi .tribe-block__organizer__details p{padding-bottom:0}.tribe-theme-enfold .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__name h3,.tribe-theme-enfold .tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__website a{color:var(--tec-color-link-accent)}.tribe-theme-enfold .tribe-block__organizer__details h3{color:var(--tec-color-accent-primary)}@media screen and (min-width:768px){.tribe-block__venue{flex-direction:row;padding:32px 0}.tribe-block__venue.tribe-block__venue--has-map .tribe-block__venue__map,.tribe-block__venue.tribe-block__venue--has-map .tribe-block__venue__meta{width:50%}.tribe-block__venue .tribe-block__venue__meta{margin-top:0}.tribe-block__organizer__details{padding:32px 0}}@media screen and (min-width:1200px){.tribe-block__venue.tribe-block__venue--has-map .tribe-block__venue__meta{margin-right:20px;width:35%}}
|
src/views/blocks/event-links.php
CHANGED
@@ -25,39 +25,32 @@ $has_ical = $this->attr( 'hasiCal' );
|
|
25 |
$has_outlook_365 = $this->attr( 'hasOutlook365' );
|
26 |
$has_outlook_live = $this->attr( 'hasOutlookLive' );
|
27 |
|
28 |
-
|
29 |
-
remove_filter( 'the_content', 'do_blocks', 9 );
|
30 |
$subscribe_links = empty( $this->get( ['subscribe_links'] ) ) ? false : $this->get( ['subscribe_links'] );
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
$items = [];
|
35 |
-
|
36 |
-
if ( $has_google_cal && $this->get( [ 'subscribe_links', 'gcal' ] ) instanceof Link_Abstract ) {
|
37 |
-
$items[] = $this->get( [ 'subscribe_links', 'gcal' ] );
|
38 |
-
}
|
39 |
-
|
40 |
-
if ( $has_ical && $this->get( [ 'subscribe_links', 'ical' ] ) instanceof Link_Abstract ) {
|
41 |
-
$items[] = $this->get( [ 'subscribe_links', 'ical' ] );
|
42 |
-
}
|
43 |
-
|
44 |
-
if ( $has_outlook_365 && $this->get( [ 'subscribe_links', 'outlook-365' ] ) instanceof Link_Abstract ) {
|
45 |
-
$items[] = $this->get( [ 'subscribe_links', 'outlook-365' ] );
|
46 |
}
|
47 |
|
48 |
-
|
49 |
-
$
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
-
if ( empty( $
|
53 |
return;
|
54 |
}
|
55 |
|
56 |
-
|
|
|
|
|
57 |
// If we only have one link in the list, show a "button".
|
58 |
-
$item = array_shift( $
|
59 |
$this->template( 'blocks/parts/subscribe-single', [ 'item' => $item ] );
|
60 |
} else {
|
61 |
// If we have multiple links in the list, show a "dropdown".
|
62 |
-
$this->template( 'blocks/parts/subscribe-list', [ 'items' => $
|
63 |
}
|
25 |
$has_outlook_365 = $this->attr( 'hasOutlook365' );
|
26 |
$has_outlook_live = $this->attr( 'hasOutlookLive' );
|
27 |
|
|
|
|
|
28 |
$subscribe_links = empty( $this->get( ['subscribe_links'] ) ) ? false : $this->get( ['subscribe_links'] );
|
29 |
+
// Just bail.
|
30 |
+
if ( empty( $subscribe_links ) ) {
|
31 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
|
34 |
+
$subscribe_links = array_filter(
|
35 |
+
$subscribe_links,
|
36 |
+
function( $item ) {
|
37 |
+
return $item instanceof Link_Abstract
|
38 |
+
&& isset( $item->block_slug )
|
39 |
+
&& $this->attr( $item->block_slug );
|
40 |
+
}
|
41 |
+
);
|
42 |
|
43 |
+
if ( empty( $subscribe_links ) ) {
|
44 |
return;
|
45 |
}
|
46 |
|
47 |
+
remove_filter( 'the_content', 'do_blocks', 9 );
|
48 |
+
|
49 |
+
if ( 1 === count( $subscribe_links ) ) {
|
50 |
// If we only have one link in the list, show a "button".
|
51 |
+
$item = array_shift( $subscribe_links );
|
52 |
$this->template( 'blocks/parts/subscribe-single', [ 'item' => $item ] );
|
53 |
} else {
|
54 |
// If we have multiple links in the list, show a "dropdown".
|
55 |
+
$this->template( 'blocks/parts/subscribe-list', [ 'items' => $subscribe_links ] );
|
56 |
}
|
src/views/blocks/parts/subscribe-list.php
CHANGED
@@ -40,7 +40,7 @@ remove_filter( 'the_content', 'do_blocks', 9 );
|
|
40 |
class="tribe-events-c-subscribe-dropdown__list-item-link"
|
41 |
tabindex="0"
|
42 |
target="_blank"
|
43 |
-
rel="noopener noreferrer nofollow"
|
44 |
>
|
45 |
<?php echo esc_html( $item->get_label( null ) ); ?>
|
46 |
</a>
|
40 |
class="tribe-events-c-subscribe-dropdown__list-item-link"
|
41 |
tabindex="0"
|
42 |
target="_blank"
|
43 |
+
rel="noopener noreferrer nofollow noindex"
|
44 |
>
|
45 |
<?php echo esc_html( $item->get_label( null ) ); ?>
|
46 |
</a>
|
src/views/blocks/parts/subscribe-single.php
CHANGED
@@ -31,7 +31,7 @@ remove_filter( 'the_content', 'do_blocks', 9 );
|
|
31 |
title="<?php echo esc_attr( $item->get_single_label() ); ?>"
|
32 |
href="<?php echo esc_url( $item->get_uri() ); ?>"
|
33 |
target="_blank"
|
34 |
-
rel="noopener noreferrer nofollow"
|
35 |
>
|
36 |
<?php $this->template( 'v2/components/icons/plus', [ 'classes' => [ 'tribe-events-c-ical__link-icon-svg' ] ] ); ?>
|
37 |
<?php echo esc_html( $item->get_single_label() ); ?>
|
31 |
title="<?php echo esc_attr( $item->get_single_label() ); ?>"
|
32 |
href="<?php echo esc_url( $item->get_uri() ); ?>"
|
33 |
target="_blank"
|
34 |
+
rel="noopener noreferrer nofollow noindex"
|
35 |
>
|
36 |
<?php $this->template( 'v2/components/icons/plus', [ 'classes' => [ 'tribe-events-c-ical__link-icon-svg' ] ] ); ?>
|
37 |
<?php echo esc_html( $item->get_single_label() ); ?>
|
src/views/v2/components/subscribe-links/item.php
CHANGED
@@ -33,7 +33,7 @@ if( ! $item->is_visible( $view ) ) {
|
|
33 |
class="tribe-events-c-subscribe-dropdown__list-item-link"
|
34 |
tabindex="0"
|
35 |
target="_blank"
|
36 |
-
rel="noopener noreferrer nofollow"
|
37 |
>
|
38 |
<?php echo esc_html( $item->get_label( $view ) ); ?>
|
39 |
</a>
|
33 |
class="tribe-events-c-subscribe-dropdown__list-item-link"
|
34 |
tabindex="0"
|
35 |
target="_blank"
|
36 |
+
rel="noopener noreferrer nofollow noindex"
|
37 |
>
|
38 |
<?php echo esc_html( $item->get_label( $view ) ); ?>
|
39 |
</a>
|
src/views/v2/components/subscribe-links/single.php
CHANGED
@@ -34,7 +34,7 @@ if( ! $item->is_visible( $view ) ) {
|
|
34 |
title="<?php echo esc_attr( $item->get_single_label( $view ) ); ?>"
|
35 |
href="<?php echo esc_url( $item->get_uri( $view ) ); ?>"
|
36 |
target="_blank"
|
37 |
-
rel="noopener noreferrer nofollow"
|
38 |
>
|
39 |
<?php $this->template( 'components/icons/plus', [ 'classes' => [ 'tribe-events-c-ical__link-icon-svg' ] ] ); ?>
|
40 |
<?php echo esc_html( $item->get_single_label( $view ) ); ?>
|
34 |
title="<?php echo esc_attr( $item->get_single_label( $view ) ); ?>"
|
35 |
href="<?php echo esc_url( $item->get_uri( $view ) ); ?>"
|
36 |
target="_blank"
|
37 |
+
rel="noopener noreferrer nofollow noindex"
|
38 |
>
|
39 |
<?php $this->template( 'components/icons/plus', [ 'classes' => [ 'tribe-events-c-ical__link-icon-svg' ] ] ); ?>
|
40 |
<?php echo esc_html( $item->get_single_label( $view ) ); ?>
|
src/views/v2/day/nav/next.php
CHANGED
@@ -23,6 +23,7 @@
|
|
23 |
data-js="tribe-events-view-link"
|
24 |
aria-label="<?php esc_attr_e( 'Next Day', 'the-events-calendar' ); ?>"
|
25 |
title="<?php esc_attr_e( 'Next Day', 'the-events-calendar' ); ?>"
|
|
|
26 |
>
|
27 |
<?php esc_html_e( 'Next Day', 'the-events-calendar' ); ?>
|
28 |
<?php $this->template( 'components/icons/caret-right', [ 'classes' => [ 'tribe-events-c-nav__next-icon-svg' ] ] ); ?>
|
23 |
data-js="tribe-events-view-link"
|
24 |
aria-label="<?php esc_attr_e( 'Next Day', 'the-events-calendar' ); ?>"
|
25 |
title="<?php esc_attr_e( 'Next Day', 'the-events-calendar' ); ?>"
|
26 |
+
rel="<?php echo esc_attr( $next_rel ); ?>"
|
27 |
>
|
28 |
<?php esc_html_e( 'Next Day', 'the-events-calendar' ); ?>
|
29 |
<?php $this->template( 'components/icons/caret-right', [ 'classes' => [ 'tribe-events-c-nav__next-icon-svg' ] ] ); ?>
|
src/views/v2/day/nav/prev.php
CHANGED
@@ -23,6 +23,7 @@
|
|
23 |
data-js="tribe-events-view-link"
|
24 |
aria-label="<?php esc_attr_e( 'Previous Day', 'the-events-calendar' ); ?>"
|
25 |
title="<?php esc_attr_e( 'Previous Day', 'the-events-calendar' ); ?>"
|
|
|
26 |
>
|
27 |
<?php $this->template( 'components/icons/caret-left', [ 'classes' => [ 'tribe-events-c-nav__prev-icon-svg' ] ] ); ?>
|
28 |
<?php esc_html_e( 'Previous Day', 'the-events-calendar' ); ?>
|
23 |
data-js="tribe-events-view-link"
|
24 |
aria-label="<?php esc_attr_e( 'Previous Day', 'the-events-calendar' ); ?>"
|
25 |
title="<?php esc_attr_e( 'Previous Day', 'the-events-calendar' ); ?>"
|
26 |
+
rel="<?php echo esc_attr( $prev_rel ); ?>"
|
27 |
>
|
28 |
<?php $this->template( 'components/icons/caret-left', [ 'classes' => [ 'tribe-events-c-nav__prev-icon-svg' ] ] ); ?>
|
29 |
<?php esc_html_e( 'Previous Day', 'the-events-calendar' ); ?>
|
src/views/v2/day/top-bar/nav/next.php
CHANGED
@@ -22,6 +22,7 @@
|
|
22 |
aria-label="<?php esc_attr_e( 'Next day', 'the-events-calendar' ); ?>"
|
23 |
title="<?php esc_attr_e( 'Next day', 'the-events-calendar' ); ?>"
|
24 |
data-js="tribe-events-view-link"
|
|
|
25 |
>
|
26 |
<?php $this->template( 'components/icons/caret-right', [ 'classes' => [ 'tribe-common-c-btn-icon__icon-svg', 'tribe-events-c-top-bar__nav-link-icon-svg' ] ] ); ?>
|
27 |
</a>
|
22 |
aria-label="<?php esc_attr_e( 'Next day', 'the-events-calendar' ); ?>"
|
23 |
title="<?php esc_attr_e( 'Next day', 'the-events-calendar' ); ?>"
|
24 |
data-js="tribe-events-view-link"
|
25 |
+
rel="<?php echo esc_attr( $next_rel ); ?>"
|
26 |
>
|
27 |
<?php $this->template( 'components/icons/caret-right', [ 'classes' => [ 'tribe-common-c-btn-icon__icon-svg', 'tribe-events-c-top-bar__nav-link-icon-svg' ] ] ); ?>
|
28 |
</a>
|
src/views/v2/day/top-bar/nav/prev.php
CHANGED
@@ -22,6 +22,7 @@
|
|
22 |
aria-label="<?php esc_attr_e( 'Previous day', 'the-events-calendar' ); ?>"
|
23 |
title="<?php esc_attr_e( 'Previous day', 'the-events-calendar' ); ?>"
|
24 |
data-js="tribe-events-view-link"
|
|
|
25 |
>
|
26 |
<?php $this->template( 'components/icons/caret-left', [ 'classes' => [ 'tribe-common-c-btn-icon__icon-svg', 'tribe-events-c-top-bar__nav-link-icon-svg' ] ] ); ?>
|
27 |
</a>
|
22 |
aria-label="<?php esc_attr_e( 'Previous day', 'the-events-calendar' ); ?>"
|
23 |
title="<?php esc_attr_e( 'Previous day', 'the-events-calendar' ); ?>"
|
24 |
data-js="tribe-events-view-link"
|
25 |
+
rel="<?php echo esc_attr( $prev_rel ); ?>"
|
26 |
>
|
27 |
<?php $this->template( 'components/icons/caret-left', [ 'classes' => [ 'tribe-common-c-btn-icon__icon-svg', 'tribe-events-c-top-bar__nav-link-icon-svg' ] ] ); ?>
|
28 |
</a>
|
src/views/v2/month/mobile-events/nav/next.php
CHANGED
@@ -24,6 +24,7 @@
|
|
24 |
data-js="tribe-events-view-link"
|
25 |
aria-label="<?php echo esc_attr( sprintf( __( 'Next month, %1$s', 'the-events-calendar' ), $label ) ); ?>"
|
26 |
title="<?php echo esc_attr( sprintf( __( 'Next month, %1$s', 'the-events-calendar' ), $label ) ); ?>"
|
|
|
27 |
>
|
28 |
<?php echo esc_html( $label ); ?>
|
29 |
<?php $this->template( 'components/icons/caret-right', [ 'classes' => [ 'tribe-events-c-nav__next-icon-svg' ] ] ); ?>
|
24 |
data-js="tribe-events-view-link"
|
25 |
aria-label="<?php echo esc_attr( sprintf( __( 'Next month, %1$s', 'the-events-calendar' ), $label ) ); ?>"
|
26 |
title="<?php echo esc_attr( sprintf( __( 'Next month, %1$s', 'the-events-calendar' ), $label ) ); ?>"
|
27 |
+
rel="<?php echo esc_attr( $next_rel ); ?>"
|
28 |
>
|
29 |
<?php echo esc_html( $label ); ?>
|
30 |
<?php $this->template( 'components/icons/caret-right', [ 'classes' => [ 'tribe-events-c-nav__next-icon-svg' ] ] ); ?>
|
src/views/v2/month/mobile-events/nav/prev.php
CHANGED
@@ -24,6 +24,7 @@
|
|
24 |
data-js="tribe-events-view-link"
|
25 |
aria-label="<?php echo esc_attr( sprintf( __( 'Previous month, %1$s', 'the-events-calendar' ), $label ) ); ?>"
|
26 |
title="<?php echo esc_attr( sprintf( __( 'Previous month, %1$s', 'the-events-calendar' ), $label ) ); ?>"
|
|
|
27 |
>
|
28 |
<?php $this->template( 'components/icons/caret-left', [ 'classes' => [ 'tribe-events-c-nav__prev-icon-svg' ] ] ); ?>
|
29 |
<?php echo esc_html( $label ); ?>
|
24 |
data-js="tribe-events-view-link"
|
25 |
aria-label="<?php echo esc_attr( sprintf( __( 'Previous month, %1$s', 'the-events-calendar' ), $label ) ); ?>"
|
26 |
title="<?php echo esc_attr( sprintf( __( 'Previous month, %1$s', 'the-events-calendar' ), $label ) ); ?>"
|
27 |
+
rel="<?php echo esc_attr( $prev_rel ); ?>"
|
28 |
>
|
29 |
<?php $this->template( 'components/icons/caret-left', [ 'classes' => [ 'tribe-events-c-nav__prev-icon-svg' ] ] ); ?>
|
30 |
<?php echo esc_html( $label ); ?>
|
src/views/v2/month/top-bar/nav/next.php
CHANGED
@@ -22,6 +22,7 @@
|
|
22 |
aria-label="<?php esc_attr_e( 'Next month', 'the-events-calendar' ); ?>"
|
23 |
title="<?php esc_attr_e( 'Next month', 'the-events-calendar' ); ?>"
|
24 |
data-js="tribe-events-view-link"
|
|
|
25 |
>
|
26 |
<?php $this->template( 'components/icons/caret-right', [ 'classes' => [ 'tribe-common-c-btn-icon__icon-svg', 'tribe-events-c-top-bar__nav-link-icon-svg' ] ] ); ?>
|
27 |
</a>
|
22 |
aria-label="<?php esc_attr_e( 'Next month', 'the-events-calendar' ); ?>"
|
23 |
title="<?php esc_attr_e( 'Next month', 'the-events-calendar' ); ?>"
|
24 |
data-js="tribe-events-view-link"
|
25 |
+
rel="<?php echo esc_attr( $next_rel ); ?>"
|
26 |
>
|
27 |
<?php $this->template( 'components/icons/caret-right', [ 'classes' => [ 'tribe-common-c-btn-icon__icon-svg', 'tribe-events-c-top-bar__nav-link-icon-svg' ] ] ); ?>
|
28 |
</a>
|
src/views/v2/month/top-bar/nav/prev.php
CHANGED
@@ -22,6 +22,7 @@
|
|
22 |
aria-label="<?php esc_attr_e( 'Previous month', 'the-events-calendar' ); ?>"
|
23 |
title="<?php esc_attr_e( 'Previous month', 'the-events-calendar' ); ?>"
|
24 |
data-js="tribe-events-view-link"
|
|
|
25 |
>
|
26 |
<?php $this->template( 'components/icons/caret-left', [ 'classes' => [ 'tribe-common-c-btn-icon__icon-svg', 'tribe-events-c-top-bar__nav-link-icon-svg' ] ] ); ?>
|
27 |
</a>
|
22 |
aria-label="<?php esc_attr_e( 'Previous month', 'the-events-calendar' ); ?>"
|
23 |
title="<?php esc_attr_e( 'Previous month', 'the-events-calendar' ); ?>"
|
24 |
data-js="tribe-events-view-link"
|
25 |
+
rel="<?php echo esc_attr( $prev_rel ); ?>"
|
26 |
>
|
27 |
<?php $this->template( 'components/icons/caret-left', [ 'classes' => [ 'tribe-common-c-btn-icon__icon-svg', 'tribe-events-c-top-bar__nav-link-icon-svg' ] ] ); ?>
|
28 |
</a>
|
the-events-calendar.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: The Events Calendar
|
4 |
* Description: The Events Calendar is a carefully crafted, extensible plugin that lets you easily share your events. Beautiful. Solid. Awesome.
|
5 |
-
* Version: 5.16.
|
6 |
* Author: The Events Calendar
|
7 |
* Author URI: https://evnt.is/1x
|
8 |
* Text Domain: the-events-calendar
|
2 |
/**
|
3 |
* Plugin Name: The Events Calendar
|
4 |
* Description: The Events Calendar is a carefully crafted, extensible plugin that lets you easily share your events. Beautiful. Solid. Awesome.
|
5 |
+
* Version: 5.16.1
|
6 |
* Author: The Events Calendar
|
7 |
* Author URI: https://evnt.is/1x
|
8 |
* Text Domain: the-events-calendar
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit274b5f1a860eb5d01ef362ffb4712ca6::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInite94e8bd186eaaf92f6e28dc9adaada28
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit274b5f1a860eb5d01ef362ffb4712ca6
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit274b5f1a860eb5d01ef362ffb4712ca6', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit274b5f1a860eb5d01ef362ffb4712ca6', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit274b5f1a860eb5d01ef362ffb4712ca6::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
@@ -155,9 +155,9 @@ class ComposerStaticInite94e8bd186eaaf92f6e28dc9adaada28
|
|
155 |
public static function getInitializer(ClassLoader $loader)
|
156 |
{
|
157 |
return \Closure::bind(function () use ($loader) {
|
158 |
-
$loader->prefixLengthsPsr4 =
|
159 |
-
$loader->prefixDirsPsr4 =
|
160 |
-
$loader->classMap =
|
161 |
|
162 |
}, null, ClassLoader::class);
|
163 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit274b5f1a860eb5d01ef362ffb4712ca6
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
155 |
public static function getInitializer(ClassLoader $loader)
|
156 |
{
|
157 |
return \Closure::bind(function () use ($loader) {
|
158 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit274b5f1a860eb5d01ef362ffb4712ca6::$prefixLengthsPsr4;
|
159 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit274b5f1a860eb5d01ef362ffb4712ca6::$prefixDirsPsr4;
|
160 |
+
$loader->classMap = ComposerStaticInit274b5f1a860eb5d01ef362ffb4712ca6::$classMap;
|
161 |
|
162 |
}, null, ClassLoader::class);
|
163 |
}
|