Version Description
Download this release
Release Info
Developer | bordoni |
Plugin | Event Tickets |
Version | 4.11.5 |
Comparing to | |
See all releases |
Code changes from version 4.11.4 to 4.11.5
- common/lang/tribe-common-de_DE.mo +0 -0
- common/src/Tribe/Main.php +1 -1
- common/src/Tribe/Promoter/Connector.php +1 -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
- event-tickets.php +1 -1
- lang/event-tickets-cs_CZ.mo +0 -0
- lang/event-tickets-da_DK.mo +0 -0
- lang/event-tickets-de_DE.mo +0 -0
- lang/event-tickets-es_ES.mo +0 -0
- lang/event-tickets-fr_FR.mo +0 -0
- lang/event-tickets-nb_NO.mo +0 -0
- lang/event-tickets-nl_NL.mo +0 -0
- lang/event-tickets.pot +77 -54
- readme.txt +18 -2
- src/Tribe/Commerce/PayPal/Main.php +20 -6
- src/Tribe/Data_API.php +1 -1
- src/Tribe/Editor/Blocks/Tickets.php +4 -2
- src/Tribe/Editor/Meta.php +112 -21
- src/Tribe/Editor/Provider.php +6 -21
- src/Tribe/Integrations/Freemius.php +386 -0
- src/Tribe/Integrations/Manager.php +56 -0
- src/Tribe/Main.php +5 -2
- src/Tribe/Promoter/Observer.php +109 -13
- src/Tribe/REST/V1/Post_Repository.php +4 -3
- src/Tribe/RSVP.php +1 -1
- src/Tribe/Tickets.php +7 -4
- src/Tribe/Tickets_Handler.php +83 -11
- src/resources/css/freemius.css +265 -0
- src/resources/css/freemius.min.css +1 -0
- src/resources/icons/freemius-logo.svg +1 -0
- src/resources/icons/mailplane.svg +1 -0
- src/resources/icons/megaphone.svg +1 -0
- src/resources/icons/plug.svg +1 -0
- src/resources/icons/settings.svg +1 -0
- src/resources/icons/stethoscope.svg +1 -0
- src/resources/icons/user.svg +1 -0
- src/resources/images/event-tickets.svg +1 -0
- src/resources/js/rsvp-block.js +40 -1
- src/resources/js/rsvp-block.min.js +1 -1
- src/resources/js/tickets-block.js +6 -1
- src/resources/js/tickets-block.min.js +1 -1
- src/resources/postcss/freemius.pcss +227 -0
- src/template-tags/tickets.php +42 -16
- src/views/blocks/rsvp/form/attendee-meta.php +5 -4
- src/views/blocks/rsvp/form/details.php +8 -7
- src/views/blocks/rsvp/form/quantity-input.php +13 -10
- src/views/blocks/rsvp/form/quantity.php +8 -4
- src/views/blocks/tickets/extra-available.php +28 -21
- src/views/blocks/tickets/quantity-number.php +17 -12
- src/views/tickets/rsvp.php +21 -18
- src/views/tickets/tpp.php +36 -29
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
common/lang/tribe-common-de_DE.mo
CHANGED
Binary file
|
common/src/Tribe/Main.php
CHANGED
@@ -17,7 +17,7 @@ class Tribe__Main {
|
|
17 |
const OPTIONNAME = 'tribe_events_calendar_options';
|
18 |
const OPTIONNAMENETWORK = 'tribe_events_calendar_network_options';
|
19 |
|
20 |
-
const VERSION = '4.11.
|
21 |
|
22 |
const FEED_URL = 'https://theeventscalendar.com/feed/';
|
23 |
|
17 |
const OPTIONNAME = 'tribe_events_calendar_options';
|
18 |
const OPTIONNAMENETWORK = 'tribe_events_calendar_network_options';
|
19 |
|
20 |
+
const VERSION = '4.11.4';
|
21 |
|
22 |
const FEED_URL = 'https://theeventscalendar.com/feed/';
|
23 |
|
common/src/Tribe/Promoter/Connector.php
CHANGED
@@ -192,7 +192,7 @@ class Tribe__Promoter__Connector {
|
|
192 |
|
193 |
$payload = [
|
194 |
'licenseKey' => $license_key,
|
195 |
-
'sourceId' => $post_id,
|
196 |
];
|
197 |
|
198 |
$token = \Firebase\JWT\JWT::encode( $payload, $secret_key );
|
192 |
|
193 |
$payload = [
|
194 |
'licenseKey' => $license_key,
|
195 |
+
'sourceId' => $post_id instanceof WP_Post ? $post_id->ID : $post_id,
|
196 |
];
|
197 |
|
198 |
$token = \Firebase\JWT\JWT::encode( $payload, $secret_key );
|
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 ComposerAutoloaderInit6476570d794ba642ae33c38f51ce7a14::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 ComposerAutoloaderInite77f895f4544aa5e410aab32d9ac0c70::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 ComposerAutoloaderInitf8b5c55bff45960f38343404de9fdb63
|
|
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 ComposerAutoloaderInit6476570d794ba642ae33c38f51ce7a14
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit6476570d794ba642ae33c38f51ce7a14', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit6476570d794ba642ae33c38f51ce7a14', '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\ComposerStaticInit6476570d794ba642ae33c38f51ce7a14::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 ComposerAutoloaderInit989a74b51d626ef62e9723dc8f11a572 {
|
|
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 ComposerAutoloaderInite77f895f4544aa5e410aab32d9ac0c70 {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInite77f895f4544aa5e410aab32d9ac0c70', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInite77f895f4544aa5e410aab32d9ac0c70', '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' =>
|
@@ -207,10 +207,10 @@ class ComposerStaticInitf8b5c55bff45960f38343404de9fdb63
|
|
207 |
public static function getInitializer(ClassLoader $loader)
|
208 |
{
|
209 |
return \Closure::bind(function () use ($loader) {
|
210 |
-
$loader->prefixLengthsPsr4 =
|
211 |
-
$loader->prefixDirsPsr4 =
|
212 |
-
$loader->prefixesPsr0 =
|
213 |
-
$loader->classMap =
|
214 |
|
215 |
}, null, ClassLoader::class);
|
216 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit6476570d794ba642ae33c38f51ce7a14
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
207 |
public static function getInitializer(ClassLoader $loader)
|
208 |
{
|
209 |
return \Closure::bind(function () use ($loader) {
|
210 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit6476570d794ba642ae33c38f51ce7a14::$prefixLengthsPsr4;
|
211 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit6476570d794ba642ae33c38f51ce7a14::$prefixDirsPsr4;
|
212 |
+
$loader->prefixesPsr0 = ComposerStaticInit6476570d794ba642ae33c38f51ce7a14::$prefixesPsr0;
|
213 |
+
$loader->classMap = ComposerStaticInit6476570d794ba642ae33c38f51ce7a14::$classMap;
|
214 |
|
215 |
}, null, ClassLoader::class);
|
216 |
}
|
event-tickets.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Event Tickets
|
4 |
Plugin URI: http://m.tri.be/1acb
|
5 |
Description: Event Tickets allows you to sell basic tickets and collect RSVPs from any post, page, or event.
|
6 |
-
Version: 4.11.
|
7 |
Author: Modern Tribe, Inc.
|
8 |
Author URI: http://m.tri.be/28
|
9 |
License: GPLv2 or later
|
3 |
Plugin Name: Event Tickets
|
4 |
Plugin URI: http://m.tri.be/1acb
|
5 |
Description: Event Tickets allows you to sell basic tickets and collect RSVPs from any post, page, or event.
|
6 |
+
Version: 4.11.5
|
7 |
Author: Modern Tribe, Inc.
|
8 |
Author URI: http://m.tri.be/28
|
9 |
License: GPLv2 or later
|
lang/event-tickets-cs_CZ.mo
CHANGED
Binary file
|
lang/event-tickets-da_DK.mo
CHANGED
Binary file
|
lang/event-tickets-de_DE.mo
CHANGED
Binary file
|
lang/event-tickets-es_ES.mo
CHANGED
Binary file
|
lang/event-tickets-fr_FR.mo
CHANGED
Binary file
|
lang/event-tickets-nb_NO.mo
CHANGED
Binary file
|
lang/event-tickets-nl_NL.mo
CHANGED
Binary file
|
lang/event-tickets.pot
CHANGED
@@ -2,17 +2,17 @@
|
|
2 |
# This file is distributed under the same license as the Event Tickets package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Event Tickets 4.11.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/event-tickets\n"
|
7 |
-
"POT-Creation-Date: 2020-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2020-
|
12 |
"Last-Translator: \n"
|
13 |
"Language-Team: \n"
|
14 |
|
15 |
-
#. #-#-#-#-# event-tickets.pot (Event Tickets 4.11.
|
16 |
#. Plugin Name of the plugin/theme
|
17 |
#: event-tickets.php:62 src/Tribe/Main.php:676 src/Tribe/Privacy.php:59
|
18 |
msgid "Event Tickets"
|
@@ -406,7 +406,7 @@ msgstr ""
|
|
406 |
#: src/Tribe/Commerce/PayPal/Orders/Table.php:100 src/Tribe/Privacy.php:189
|
407 |
#: src/Tribe/Privacy.php:470 src/Tribe/Privacy.php:566
|
408 |
#: src/admin-views/admin-welcome-message.php:62
|
409 |
-
#: src/views/blocks/rsvp/form/email.php:32 src/views/tickets/rsvp.php:
|
410 |
msgid "Email"
|
411 |
msgstr ""
|
412 |
|
@@ -721,39 +721,39 @@ msgstr ""
|
|
721 |
msgid "Your tickets from %s"
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
725 |
msgid "Sales report"
|
726 |
msgstr ""
|
727 |
|
728 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
729 |
msgid "Report"
|
730 |
msgstr ""
|
731 |
|
732 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
733 |
msgid "Return to the %1$sAttendees Report%2$s."
|
734 |
msgstr ""
|
735 |
|
736 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
737 |
msgid "Post updated. %1$s"
|
738 |
msgstr ""
|
739 |
|
740 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
741 |
msgid "Post published. %1$s"
|
742 |
msgstr ""
|
743 |
|
744 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
745 |
msgid "Post submitted."
|
746 |
msgstr ""
|
747 |
|
748 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
749 |
msgid "Post scheduled."
|
750 |
msgstr ""
|
751 |
|
752 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
753 |
msgid "Post draft updated."
|
754 |
msgstr ""
|
755 |
|
756 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
757 |
msgid "(deleted)"
|
758 |
msgstr ""
|
759 |
|
@@ -912,27 +912,27 @@ msgstr ""
|
|
912 |
msgid "Who's coming?"
|
913 |
msgstr ""
|
914 |
|
915 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:
|
916 |
msgctxt "Error message title, will be followed by the error code."
|
917 |
msgid "API Error"
|
918 |
msgstr ""
|
919 |
|
920 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:
|
921 |
msgid ""
|
922 |
"Refresh this page or wait a few minutes before trying again. If this happens "
|
923 |
"repeatedly, please contact the Site Admin."
|
924 |
msgstr ""
|
925 |
|
926 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:
|
927 |
msgid ""
|
928 |
"The ticket for this event has sold out and has been removed from your cart."
|
929 |
msgstr ""
|
930 |
|
931 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:
|
932 |
msgid "Whoops!"
|
933 |
msgstr ""
|
934 |
|
935 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:
|
936 |
msgctxt "The %s will change based on the error produced."
|
937 |
msgid "You have %s ticket(s) with a field that requires information."
|
938 |
msgstr ""
|
@@ -994,6 +994,26 @@ msgctxt "list view buy now ticket button"
|
|
994 |
msgid "Get %s"
|
995 |
msgstr ""
|
996 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
997 |
#: src/Tribe/JSON_LD/Order.php:132 src/Tribe/RSVP.php:1065
|
998 |
#: src/admin-views/editor/column-body-price.php:18
|
999 |
msgid "Free"
|
@@ -1097,15 +1117,15 @@ msgid ""
|
|
1097 |
"respond to your thread within 24-48 hours (during the week)."
|
1098 |
msgstr ""
|
1099 |
|
1100 |
-
#: src/Tribe/Main.php:
|
1101 |
msgid "Welcome to Event Tickets!"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
-
#: src/Tribe/Main.php:
|
1105 |
msgid "Buy"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
-
#: src/Tribe/Main.php:
|
1109 |
msgid ""
|
1110 |
"When Event Tickets and Event Tickets Plus are both activated, Event Tickets "
|
1111 |
"Plus must be running version %1$s or greater. Please %2$smanually update now"
|
@@ -1178,7 +1198,7 @@ msgid "RSVP Title"
|
|
1178 |
msgstr ""
|
1179 |
|
1180 |
#: src/Tribe/Privacy.php:184 src/Tribe/Privacy.php:465
|
1181 |
-
#: src/views/blocks/rsvp/form/name.php:31 src/views/tickets/rsvp.php:
|
1182 |
msgid "Full Name"
|
1183 |
msgstr ""
|
1184 |
|
@@ -2039,35 +2059,35 @@ msgstr ""
|
|
2039 |
msgid "Move %s"
|
2040 |
msgstr ""
|
2041 |
|
2042 |
-
#: src/Tribe/Tickets.php:
|
2043 |
msgid "Shared capacity with other tickets"
|
2044 |
msgstr ""
|
2045 |
|
2046 |
-
#: src/Tribe/Tickets.php:
|
2047 |
msgid "Set capacity for this ticket only"
|
2048 |
msgstr ""
|
2049 |
|
2050 |
-
#: src/Tribe/Tickets.php:
|
2051 |
msgid "%s are not available as this %s has passed."
|
2052 |
msgstr ""
|
2053 |
|
2054 |
-
#: src/Tribe/Tickets.php:
|
2055 |
msgid "%s will be available on "
|
2056 |
msgstr ""
|
2057 |
|
2058 |
-
#: src/Tribe/Tickets.php:
|
2059 |
msgid " at "
|
2060 |
msgstr ""
|
2061 |
|
2062 |
-
#: src/Tribe/Tickets.php:
|
2063 |
msgid "%s are not yet available"
|
2064 |
msgstr ""
|
2065 |
|
2066 |
-
#: src/Tribe/Tickets.php:
|
2067 |
msgid "%s are no longer available."
|
2068 |
msgstr ""
|
2069 |
|
2070 |
-
#: src/Tribe/Tickets.php:
|
2071 |
msgid "There are no %s available at this time."
|
2072 |
msgstr ""
|
2073 |
|
@@ -3174,66 +3194,69 @@ msgctxt "list view buy now ticket button"
|
|
3174 |
msgid "Buy Now!"
|
3175 |
msgstr ""
|
3176 |
|
3177 |
-
#: src/template-tags/tickets.php:
|
3178 |
msgid "issued"
|
3179 |
msgstr ""
|
3180 |
|
3181 |
-
#: src/template-tags/tickets.php:
|
3182 |
msgctxt "RSVPs going"
|
3183 |
msgid "%s'd going"
|
3184 |
msgstr ""
|
3185 |
|
3186 |
-
|
|
|
3187 |
msgctxt "unlimited remaining stock message"
|
3188 |
msgid "%1$s available"
|
3189 |
msgstr ""
|
3190 |
|
3191 |
-
|
|
|
3192 |
msgctxt "ticket shared capacity message (remaining stock)"
|
3193 |
-
msgid "%1$
|
3194 |
msgstr ""
|
3195 |
|
3196 |
-
|
|
|
3197 |
msgctxt "ticket stock message (remaining stock)"
|
3198 |
-
msgid "%1$
|
3199 |
msgstr ""
|
3200 |
|
3201 |
-
#: src/template-tags/tickets.php:
|
3202 |
msgctxt "singular label for RSVP"
|
3203 |
msgid "RSVP"
|
3204 |
msgstr ""
|
3205 |
|
3206 |
-
#: src/template-tags/tickets.php:
|
3207 |
msgctxt "lowercase singular label for RSVP"
|
3208 |
msgid "rsvp"
|
3209 |
msgstr ""
|
3210 |
|
3211 |
-
#: src/template-tags/tickets.php:
|
3212 |
msgctxt "plural label for RSVPs"
|
3213 |
msgid "RSVPs"
|
3214 |
msgstr ""
|
3215 |
|
3216 |
-
#: src/template-tags/tickets.php:
|
3217 |
msgctxt "lowercase plural label for RSVPs"
|
3218 |
msgid "rsvps"
|
3219 |
msgstr ""
|
3220 |
|
3221 |
-
#: src/template-tags/tickets.php:
|
3222 |
msgctxt "singular label for Ticket"
|
3223 |
msgid "Ticket"
|
3224 |
msgstr ""
|
3225 |
|
3226 |
-
#: src/template-tags/tickets.php:
|
3227 |
msgctxt "lowercase singular label for Ticket"
|
3228 |
msgid "ticket"
|
3229 |
msgstr ""
|
3230 |
|
3231 |
-
#: src/template-tags/tickets.php:
|
3232 |
msgctxt "plural label for Tickets"
|
3233 |
msgid "Tickets"
|
3234 |
msgstr ""
|
3235 |
|
3236 |
-
#: src/template-tags/tickets.php:
|
3237 |
msgctxt "lowercase plural label for Tickets"
|
3238 |
msgid "tickets"
|
3239 |
msgstr ""
|
@@ -3289,7 +3312,7 @@ msgid "%s are not yet available"
|
|
3289 |
msgstr ""
|
3290 |
|
3291 |
#: src/views/blocks/rsvp/details/availability.php:52
|
3292 |
-
#: src/views/tickets/rsvp.php:
|
3293 |
msgid "Out of stock!"
|
3294 |
msgstr ""
|
3295 |
|
@@ -3702,24 +3725,24 @@ msgstr ""
|
|
3702 |
msgid "Please fill in the RSVP quantity, confirmation name, and email fields."
|
3703 |
msgstr ""
|
3704 |
|
3705 |
-
#: src/views/tickets/rsvp.php:
|
3706 |
msgid "%1$s available"
|
3707 |
msgstr ""
|
3708 |
|
3709 |
-
#: src/views/tickets/rsvp.php:
|
3710 |
msgid "Send RSVP confirmation to:"
|
3711 |
msgstr ""
|
3712 |
|
3713 |
-
#: src/views/tickets/rsvp.php:
|
3714 |
msgid "Login to RSVP"
|
3715 |
msgstr ""
|
3716 |
|
3717 |
-
#: src/views/tickets/rsvp.php:
|
3718 |
msgctxt "tickets process button text"
|
3719 |
msgid "Confirm %s"
|
3720 |
msgstr ""
|
3721 |
|
3722 |
-
#: src/views/tickets/rsvp.php:
|
3723 |
msgid ""
|
3724 |
"You must have JavaScript activated to purchase tickets. Please enable "
|
3725 |
"JavaScript in your browser."
|
@@ -3770,11 +3793,11 @@ msgctxt "Success page tickets table header"
|
|
3770 |
msgid "Subtotal"
|
3771 |
msgstr ""
|
3772 |
|
3773 |
-
#: src/views/tickets/tpp.php:
|
3774 |
msgid "Please fill in the ticket confirmation name and email fields."
|
3775 |
msgstr ""
|
3776 |
|
3777 |
-
#: src/views/tickets/tpp.php:
|
3778 |
msgid "Buy now"
|
3779 |
msgstr ""
|
3780 |
|
2 |
# This file is distributed under the same license as the Event Tickets package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Event Tickets 4.11.5\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/event-tickets\n"
|
7 |
+
"POT-Creation-Date: 2020-03-13 20:56:28+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2020-03-13 20:56\n"
|
12 |
"Last-Translator: \n"
|
13 |
"Language-Team: \n"
|
14 |
|
15 |
+
#. #-#-#-#-# event-tickets.pot (Event Tickets 4.11.5) #-#-#-#-#
|
16 |
#. Plugin Name of the plugin/theme
|
17 |
#: event-tickets.php:62 src/Tribe/Main.php:676 src/Tribe/Privacy.php:59
|
18 |
msgid "Event Tickets"
|
406 |
#: src/Tribe/Commerce/PayPal/Orders/Table.php:100 src/Tribe/Privacy.php:189
|
407 |
#: src/Tribe/Privacy.php:470 src/Tribe/Privacy.php:566
|
408 |
#: src/admin-views/admin-welcome-message.php:62
|
409 |
+
#: src/views/blocks/rsvp/form/email.php:32 src/views/tickets/rsvp.php:229
|
410 |
msgid "Email"
|
411 |
msgstr ""
|
412 |
|
721 |
msgid "Your tickets from %s"
|
722 |
msgstr ""
|
723 |
|
724 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1741
|
725 |
msgid "Sales report"
|
726 |
msgstr ""
|
727 |
|
728 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1767
|
729 |
msgid "Report"
|
730 |
msgstr ""
|
731 |
|
732 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1924 src/Tribe/RSVP.php:1775
|
733 |
msgid "Return to the %1$sAttendees Report%2$s."
|
734 |
msgstr ""
|
735 |
|
736 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1931 src/Tribe/RSVP.php:1782
|
737 |
msgid "Post updated. %1$s"
|
738 |
msgstr ""
|
739 |
|
740 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1935 src/Tribe/RSVP.php:1786
|
741 |
msgid "Post published. %1$s"
|
742 |
msgstr ""
|
743 |
|
744 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1938 src/Tribe/RSVP.php:1789
|
745 |
msgid "Post submitted."
|
746 |
msgstr ""
|
747 |
|
748 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1939 src/Tribe/RSVP.php:1790
|
749 |
msgid "Post scheduled."
|
750 |
msgstr ""
|
751 |
|
752 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1940 src/Tribe/RSVP.php:1791
|
753 |
msgid "Post draft updated."
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: src/Tribe/Commerce/PayPal/Main.php:2988 src/Tribe/RSVP.php:1447
|
757 |
msgid "(deleted)"
|
758 |
msgstr ""
|
759 |
|
912 |
msgid "Who's coming?"
|
913 |
msgstr ""
|
914 |
|
915 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:318 src/Tribe/Tickets.php:3091
|
916 |
msgctxt "Error message title, will be followed by the error code."
|
917 |
msgid "API Error"
|
918 |
msgstr ""
|
919 |
|
920 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:319 src/Tribe/Tickets.php:3092
|
921 |
msgid ""
|
922 |
"Refresh this page or wait a few minutes before trying again. If this happens "
|
923 |
"repeatedly, please contact the Site Admin."
|
924 |
msgstr ""
|
925 |
|
926 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:320 src/Tribe/Tickets.php:3093
|
927 |
msgid ""
|
928 |
"The ticket for this event has sold out and has been removed from your cart."
|
929 |
msgstr ""
|
930 |
|
931 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:321 src/Tribe/Tickets.php:3094
|
932 |
msgid "Whoops!"
|
933 |
msgstr ""
|
934 |
|
935 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:322 src/Tribe/Tickets.php:3095
|
936 |
msgctxt "The %s will change based on the error produced."
|
937 |
msgid "You have %s ticket(s) with a field that requires information."
|
938 |
msgstr ""
|
994 |
msgid "Get %s"
|
995 |
msgstr ""
|
996 |
|
997 |
+
#: src/Tribe/Integrations/Freemius.php:331
|
998 |
+
msgid "We hope you love %1$s"
|
999 |
+
msgstr ""
|
1000 |
+
|
1001 |
+
#: src/Tribe/Integrations/Freemius.php:336
|
1002 |
+
msgid ""
|
1003 |
+
"Hi, %1$s! This is an invitation to help our %2$s community. If you opt-in, "
|
1004 |
+
"some data about your usage of %2$s will be shared with our teams (so they "
|
1005 |
+
"can work their butts off to improve). We will also share some helpful info "
|
1006 |
+
"on events management, WordPress, and our products from time to time."
|
1007 |
+
msgstr ""
|
1008 |
+
|
1009 |
+
#: src/Tribe/Integrations/Freemius.php:340
|
1010 |
+
msgid "And if you skip this, that's okay! %1$s will still work just fine."
|
1011 |
+
msgstr ""
|
1012 |
+
|
1013 |
+
#: src/Tribe/Integrations/Freemius.php:344
|
1014 |
+
msgid "Powered by"
|
1015 |
+
msgstr ""
|
1016 |
+
|
1017 |
#: src/Tribe/JSON_LD/Order.php:132 src/Tribe/RSVP.php:1065
|
1018 |
#: src/admin-views/editor/column-body-price.php:18
|
1019 |
msgid "Free"
|
1117 |
"respond to your thread within 24-48 hours (during the week)."
|
1118 |
msgstr ""
|
1119 |
|
1120 |
+
#: src/Tribe/Main.php:792
|
1121 |
msgid "Welcome to Event Tickets!"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: src/Tribe/Main.php:929
|
1125 |
msgid "Buy"
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: src/Tribe/Main.php:1008
|
1129 |
msgid ""
|
1130 |
"When Event Tickets and Event Tickets Plus are both activated, Event Tickets "
|
1131 |
"Plus must be running version %1$s or greater. Please %2$smanually update now"
|
1198 |
msgstr ""
|
1199 |
|
1200 |
#: src/Tribe/Privacy.php:184 src/Tribe/Privacy.php:465
|
1201 |
+
#: src/views/blocks/rsvp/form/name.php:31 src/views/tickets/rsvp.php:221
|
1202 |
msgid "Full Name"
|
1203 |
msgstr ""
|
1204 |
|
2059 |
msgid "Move %s"
|
2060 |
msgstr ""
|
2061 |
|
2062 |
+
#: src/Tribe/Tickets.php:1549
|
2063 |
msgid "Shared capacity with other tickets"
|
2064 |
msgstr ""
|
2065 |
|
2066 |
+
#: src/Tribe/Tickets.php:1550
|
2067 |
msgid "Set capacity for this ticket only"
|
2068 |
msgstr ""
|
2069 |
|
2070 |
+
#: src/Tribe/Tickets.php:2358
|
2071 |
msgid "%s are not available as this %s has passed."
|
2072 |
msgstr ""
|
2073 |
|
2074 |
+
#: src/Tribe/Tickets.php:2394
|
2075 |
msgid "%s will be available on "
|
2076 |
msgstr ""
|
2077 |
|
2078 |
+
#: src/Tribe/Tickets.php:2400
|
2079 |
msgid " at "
|
2080 |
msgstr ""
|
2081 |
|
2082 |
+
#: src/Tribe/Tickets.php:2403
|
2083 |
msgid "%s are not yet available"
|
2084 |
msgstr ""
|
2085 |
|
2086 |
+
#: src/Tribe/Tickets.php:2406
|
2087 |
msgid "%s are no longer available."
|
2088 |
msgstr ""
|
2089 |
|
2090 |
+
#: src/Tribe/Tickets.php:2408
|
2091 |
msgid "There are no %s available at this time."
|
2092 |
msgstr ""
|
2093 |
|
3194 |
msgid "Buy Now!"
|
3195 |
msgstr ""
|
3196 |
|
3197 |
+
#: src/template-tags/tickets.php:516
|
3198 |
msgid "issued"
|
3199 |
msgstr ""
|
3200 |
|
3201 |
+
#: src/template-tags/tickets.php:518
|
3202 |
msgctxt "RSVPs going"
|
3203 |
msgid "%s'd going"
|
3204 |
msgstr ""
|
3205 |
|
3206 |
+
#. translators: %1$s: formatted quantity remaining
|
3207 |
+
#: src/template-tags/tickets.php:525
|
3208 |
msgctxt "unlimited remaining stock message"
|
3209 |
msgid "%1$s available"
|
3210 |
msgstr ""
|
3211 |
|
3212 |
+
#. translators: %1$s: formatted quantity remaining
|
3213 |
+
#: src/template-tags/tickets.php:535
|
3214 |
msgctxt "ticket shared capacity message (remaining stock)"
|
3215 |
+
msgid "%1$s available of shared capacity"
|
3216 |
msgstr ""
|
3217 |
|
3218 |
+
#. translators: %1$s: formatted quantity remaining
|
3219 |
+
#: src/template-tags/tickets.php:546
|
3220 |
msgctxt "ticket stock message (remaining stock)"
|
3221 |
+
msgid "%1$s available"
|
3222 |
msgstr ""
|
3223 |
|
3224 |
+
#: src/template-tags/tickets.php:1303
|
3225 |
msgctxt "singular label for RSVP"
|
3226 |
msgid "RSVP"
|
3227 |
msgstr ""
|
3228 |
|
3229 |
+
#: src/template-tags/tickets.php:1327
|
3230 |
msgctxt "lowercase singular label for RSVP"
|
3231 |
msgid "rsvp"
|
3232 |
msgstr ""
|
3233 |
|
3234 |
+
#: src/template-tags/tickets.php:1351
|
3235 |
msgctxt "plural label for RSVPs"
|
3236 |
msgid "RSVPs"
|
3237 |
msgstr ""
|
3238 |
|
3239 |
+
#: src/template-tags/tickets.php:1375
|
3240 |
msgctxt "lowercase plural label for RSVPs"
|
3241 |
msgid "rsvps"
|
3242 |
msgstr ""
|
3243 |
|
3244 |
+
#: src/template-tags/tickets.php:1399
|
3245 |
msgctxt "singular label for Ticket"
|
3246 |
msgid "Ticket"
|
3247 |
msgstr ""
|
3248 |
|
3249 |
+
#: src/template-tags/tickets.php:1423
|
3250 |
msgctxt "lowercase singular label for Ticket"
|
3251 |
msgid "ticket"
|
3252 |
msgstr ""
|
3253 |
|
3254 |
+
#: src/template-tags/tickets.php:1447
|
3255 |
msgctxt "plural label for Tickets"
|
3256 |
msgid "Tickets"
|
3257 |
msgstr ""
|
3258 |
|
3259 |
+
#: src/template-tags/tickets.php:1471
|
3260 |
msgctxt "lowercase plural label for Tickets"
|
3261 |
msgid "tickets"
|
3262 |
msgstr ""
|
3312 |
msgstr ""
|
3313 |
|
3314 |
#: src/views/blocks/rsvp/details/availability.php:52
|
3315 |
+
#: src/views/tickets/rsvp.php:164 src/views/tickets/tpp.php:150
|
3316 |
msgid "Out of stock!"
|
3317 |
msgstr ""
|
3318 |
|
3725 |
msgid "Please fill in the RSVP quantity, confirmation name, and email fields."
|
3726 |
msgstr ""
|
3727 |
|
3728 |
+
#: src/views/tickets/rsvp.php:157 src/views/tickets/tpp.php:143
|
3729 |
msgid "%1$s available"
|
3730 |
msgstr ""
|
3731 |
|
3732 |
+
#: src/views/tickets/rsvp.php:191
|
3733 |
msgid "Send RSVP confirmation to:"
|
3734 |
msgstr ""
|
3735 |
|
3736 |
+
#: src/views/tickets/rsvp.php:279
|
3737 |
msgid "Login to RSVP"
|
3738 |
msgstr ""
|
3739 |
|
3740 |
+
#: src/views/tickets/rsvp.php:292
|
3741 |
msgctxt "tickets process button text"
|
3742 |
msgid "Confirm %s"
|
3743 |
msgstr ""
|
3744 |
|
3745 |
+
#: src/views/tickets/rsvp.php:304 src/views/tickets/tpp.php:211
|
3746 |
msgid ""
|
3747 |
"You must have JavaScript activated to purchase tickets. Please enable "
|
3748 |
"JavaScript in your browser."
|
3793 |
msgid "Subtotal"
|
3794 |
msgstr ""
|
3795 |
|
3796 |
+
#: src/views/tickets/tpp.php:83
|
3797 |
msgid "Please fill in the ticket confirmation name and email fields."
|
3798 |
msgstr ""
|
3799 |
|
3800 |
+
#: src/views/tickets/tpp.php:168
|
3801 |
msgid "Buy now"
|
3802 |
msgstr ""
|
3803 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
Contributors: ModernTribe, brianjessee, camwynsp, paulkim, sc0ttkclark, aguseo, bordoni, borkweb, barry.hughes, cliffpaulick, courane01, faction23, GeoffBel, geoffgraham, ggwicz, jbrinley, jentheo, leahkoerper, lucatume, mastromktg, MZAWeb, neillmcshea, nicosantos, patriciahillebrandt, peterchester, reid.peifer, roblagatta, ryancurban, shane.pearlman, vicskf, zbtirrell
|
4 |
Tags: RSVP, events, tickets, event management, calendar, ticket sales, community, registration, api, dates, date, posts, workshop, conference, meeting, seminar, concert, summit, ticket integration, event ticketing
|
5 |
Requires at least: 4.9
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 4.11.
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -117,6 +117,22 @@ Currently, the following add-ons are available for Event Tickets:
|
|
117 |
|
118 |
== Changelog ==
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
= [4.11.4] 2020-02-26 =
|
121 |
|
122 |
* Fix - Update file path in the docblocks of the templates for The Events Calendar new views. [ET-713]
|
3 |
Contributors: ModernTribe, brianjessee, camwynsp, paulkim, sc0ttkclark, aguseo, bordoni, borkweb, barry.hughes, cliffpaulick, courane01, faction23, GeoffBel, geoffgraham, ggwicz, jbrinley, jentheo, leahkoerper, lucatume, mastromktg, MZAWeb, neillmcshea, nicosantos, patriciahillebrandt, peterchester, reid.peifer, roblagatta, ryancurban, shane.pearlman, vicskf, zbtirrell
|
4 |
Tags: RSVP, events, tickets, event management, calendar, ticket sales, community, registration, api, dates, date, posts, workshop, conference, meeting, seminar, concert, summit, ticket integration, event ticketing
|
5 |
Requires at least: 4.9
|
6 |
+
Tested up to: 5.4
|
7 |
+
Stable tag: 4.11.5
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
117 |
|
118 |
== Changelog ==
|
119 |
|
120 |
+
= [4.11.5] 2020-03-18 =
|
121 |
+
|
122 |
+
* Feature - Include Freemius integration to allow opt-in information collection. [ET-595]
|
123 |
+
* Fix - Prevent unintentionally clearing global capacity settings when saving event/post while using Block Editor is enabled. [ETP-267]
|
124 |
+
* Fix - Save updated shared capacity for event/post if the argument is passed to the REST API endpoint for a Tribe Commerce ticket. [ETP-267]
|
125 |
+
* Fix - Make sure when changing unlimited ticket to be a shared capacity ticket that the empty individual capacity gets properly overridden to the shared capacity for Tribe Commerce. [ET-752]
|
126 |
+
* Fix - Prevent ticket capacity showing sold out when you have unlimited tickets or RSVPs alongside shared capacity tickets unless it really is sold out. [ET-744]
|
127 |
+
* Fix - The quantity allowed in a single "add to cart" action is now always set (defaults to `100`, filterable via `tribe_tickets_get_ticket_max_purchase`), for sanity and performance reasons. [ETP-149]
|
128 |
+
* Fix - Correct the displayed quantity of tickets available in the Attendees Report admin screen. It was forcing the formatted number string (e.g. `2,000`) to an integer (this example was displaying as `2`) so only affected tickets with available quantities greater than 999 that weren't Unlimited. [ET-756]
|
129 |
+
* Fix - Make it so the ticket quantity in the tickets block doesn't jump around when it gets to the maximum available in Safari and you try to increase it. [ET-758]
|
130 |
+
* Tweak - Notify Promoter of changes when tickets are moved to other Events. [ET-741]
|
131 |
+
* Tweak - Improved compatibility between Tribe Commerce and Promoter by extending the actions that notify Promoter of Attendee modifications. [ET-746]
|
132 |
+
* Tweak - Added filters: `tribe_tickets_integrations_should_load_freemius`, `tribe_tickets_get_ticket_default_max_purchase`
|
133 |
+
* Tweak - Changed views: `blocks/rsvp/form/attendee-meta`, `blocks/rsvp/form/details`, `blocks/rsvp/form/quantity-input`, `blocks/rsvp/form/quantity`, `blocks/tickets/extra-available`, `blocks/tickets/quantity-number`, `tickets/rsvp`, `tickets/tpp`
|
134 |
+
* Language - 4 new strings added, 47 updated, 2 fuzzied, and 0 obsoleted
|
135 |
+
|
136 |
= [4.11.4] 2020-02-26 =
|
137 |
|
138 |
* Fix - Update file path in the docblocks of the templates for The Events Calendar new views. [ET-713]
|
src/Tribe/Commerce/PayPal/Main.php
CHANGED
@@ -1214,12 +1214,11 @@ class Tribe__Tickets__Commerce__PayPal__Main extends Tribe__Tickets__Tickets {
|
|
1214 |
return false;
|
1215 |
}
|
1216 |
|
1217 |
-
// Updates if we should show Description
|
1218 |
-
$ticket->show_description = isset( $ticket->show_description ) && tribe_is_truthy( $ticket->show_description ) ? 'yes' : 'no';
|
1219 |
-
|
1220 |
/** @var Tribe__Tickets__Tickets_Handler $tickets_handler */
|
1221 |
$tickets_handler = tribe( 'tickets.handler' );
|
1222 |
|
|
|
|
|
1223 |
update_post_meta( $ticket->ID, $tickets_handler->key_show_description, $ticket->show_description );
|
1224 |
|
1225 |
// let's make sure float price values are formatted to "0.xyz"
|
@@ -1295,7 +1294,15 @@ class Tribe__Tickets__Commerce__PayPal__Main extends Tribe__Tickets__Tickets {
|
|
1295 |
}
|
1296 |
} else {
|
1297 |
// If the Global Stock is configured we pull it from the Event
|
1298 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1299 |
}
|
1300 |
|
1301 |
// Default Capacity will be 0
|
@@ -1334,6 +1341,11 @@ class Tribe__Tickets__Commerce__PayPal__Main extends Tribe__Tickets__Tickets {
|
|
1334 |
// Makes sure it's an Int after this point
|
1335 |
$data['stock'] = (int) $data['stock'];
|
1336 |
|
|
|
|
|
|
|
|
|
|
|
1337 |
$mode = isset( $data['mode'] ) ? $data['mode'] : 'own';
|
1338 |
|
1339 |
if ( '' !== $mode ) {
|
@@ -1355,8 +1367,10 @@ class Tribe__Tickets__Commerce__PayPal__Main extends Tribe__Tickets__Tickets {
|
|
1355 |
if (
|
1356 |
$event_stock->is_enabled()
|
1357 |
&& Tribe__Tickets__Global_Stock::OWN_STOCK_MODE !== $mode
|
1358 |
-
&&
|
1359 |
-
|
|
|
|
|
1360 |
) {
|
1361 |
$data['capacity'] = $data['event_capacity'];
|
1362 |
}
|
1214 |
return false;
|
1215 |
}
|
1216 |
|
|
|
|
|
|
|
1217 |
/** @var Tribe__Tickets__Tickets_Handler $tickets_handler */
|
1218 |
$tickets_handler = tribe( 'tickets.handler' );
|
1219 |
|
1220 |
+
// Updates if we should show Description.
|
1221 |
+
$ticket->show_description = isset( $ticket->show_description ) && tribe_is_truthy( $ticket->show_description ) ? 'yes' : 'no';
|
1222 |
update_post_meta( $ticket->ID, $tickets_handler->key_show_description, $ticket->show_description );
|
1223 |
|
1224 |
// let's make sure float price values are formatted to "0.xyz"
|
1294 |
}
|
1295 |
} else {
|
1296 |
// If the Global Stock is configured we pull it from the Event
|
1297 |
+
$global_capacity = tribe_tickets_get_capacity( $post_id );
|
1298 |
+
|
1299 |
+
if ( ! empty( $data['event_capacity'] ) && $data['event_capacity'] !== $global_capacity ) {
|
1300 |
+
// Update stock level with $data['event_capacity'].
|
1301 |
+
$event_stock->set_stock_level( $data['event_capacity'], true );
|
1302 |
+
} else {
|
1303 |
+
// Set $data['event_capacity'] with what we know.
|
1304 |
+
$data['event_capacity'] = $global_capacity;
|
1305 |
+
}
|
1306 |
}
|
1307 |
|
1308 |
// Default Capacity will be 0
|
1341 |
// Makes sure it's an Int after this point
|
1342 |
$data['stock'] = (int) $data['stock'];
|
1343 |
|
1344 |
+
// The only available value lower than zero is -1 which is unlimited.
|
1345 |
+
if ( 0 > $data['stock'] ) {
|
1346 |
+
$data['stock'] = -1;
|
1347 |
+
}
|
1348 |
+
|
1349 |
$mode = isset( $data['mode'] ) ? $data['mode'] : 'own';
|
1350 |
|
1351 |
if ( '' !== $mode ) {
|
1367 |
if (
|
1368 |
$event_stock->is_enabled()
|
1369 |
&& Tribe__Tickets__Global_Stock::OWN_STOCK_MODE !== $mode
|
1370 |
+
&& (
|
1371 |
+
'' === $data['capacity']
|
1372 |
+
|| $data['event_capacity'] < $data['capacity']
|
1373 |
+
)
|
1374 |
) {
|
1375 |
$data['capacity'] = $data['event_capacity'];
|
1376 |
}
|
src/Tribe/Data_API.php
CHANGED
@@ -188,7 +188,7 @@ class Tribe__Tickets__Data_API {
|
|
188 |
*
|
189 |
* @param $post_id
|
190 |
*
|
191 |
-
* @return bool
|
192 |
*/
|
193 |
public function get_ticket_provider( $post_id ) {
|
194 |
$services = $this->detect_by_id( $post_id );
|
188 |
*
|
189 |
* @param $post_id
|
190 |
*
|
191 |
+
* @return bool|object
|
192 |
*/
|
193 |
public function get_ticket_provider( $post_id ) {
|
194 |
$services = $this->detect_by_id( $post_id );
|
src/Tribe/Editor/Blocks/Tickets.php
CHANGED
@@ -175,9 +175,11 @@ extends Tribe__Editor__Blocks__Abstract {
|
|
175 |
continue;
|
176 |
}
|
177 |
|
178 |
-
$available
|
|
|
179 |
|
180 |
-
$response['tickets'][ $ticket_id ]['available']
|
|
|
181 |
|
182 |
// If there are no more available we will send the template part HTML to update the DOM
|
183 |
if ( 0 === $available ) {
|
175 |
continue;
|
176 |
}
|
177 |
|
178 |
+
$available = $ticket->available();
|
179 |
+
$max_at_a_time = $tickets_handler->get_ticket_max_purchase( $ticket->ID );
|
180 |
|
181 |
+
$response['tickets'][ $ticket_id ]['available'] = $available;
|
182 |
+
$response['tickets'][ $ticket_id ]['max_purchase'] = $max_at_a_time;
|
183 |
|
184 |
// If there are no more available we will send the template part HTML to update the DOM
|
185 |
if ( 0 === $available ) {
|
src/Tribe/Editor/Meta.php
CHANGED
@@ -209,13 +209,65 @@ class Tribe__Tickets__Editor__Meta extends Tribe__Editor__Meta {
|
|
209 |
* @return array
|
210 |
*/
|
211 |
public function register_meta_args( $args = array(), $defaults = '', $object_type = '', $meta_key = '' ) {
|
212 |
-
if (
|
213 |
$args['show_in_rest'] = false;
|
214 |
}
|
215 |
|
216 |
return $args;
|
217 |
}
|
218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
/**
|
220 |
* Make sure the value of the "virtual" meta is up to date with the correct ticket values
|
221 |
* as can be modified by removing or adding a plugin outside of the blocks editor the ticket
|
@@ -231,16 +283,22 @@ class Tribe__Tickets__Editor__Meta extends Tribe__Editor__Meta {
|
|
231 |
* @return array
|
232 |
*/
|
233 |
public function register_tickets_list_in_rest( $value, $post_id, $meta_key, $single ) {
|
234 |
-
if ( '_tribe_tickets_list' !== $meta_key
|
235 |
return $value;
|
236 |
}
|
237 |
|
238 |
$tickets = Tribe__Tickets__Tickets::get_event_tickets( $post_id );
|
239 |
-
|
|
|
|
|
240 |
foreach ( $tickets as $ticket ) {
|
241 |
-
if (
|
|
|
|
|
|
|
242 |
continue;
|
243 |
}
|
|
|
244 |
$list_of_tickets[] = $ticket->ID;
|
245 |
}
|
246 |
|
@@ -255,15 +313,13 @@ class Tribe__Tickets__Editor__Meta extends Tribe__Editor__Meta {
|
|
255 |
* @param null|bool $delete Whether to allow metadata deletion of the given type.
|
256 |
* @param int $unused_object_id Object ID.
|
257 |
* @param string $meta_key Meta key.
|
258 |
-
* @param mixed $unused_meta_value Meta value. Must be serializable if non-scalar.
|
259 |
-
* @param bool $unused_delete_all Whether to delete the matching metadata entries
|
260 |
-
* for all objects, ignoring the specified $object_id.
|
261 |
-
* Default false.
|
262 |
*
|
263 |
* @return bool
|
264 |
*/
|
265 |
-
public function delete_tickets_list_in_rest( $delete, $unused_object_id, $meta_key
|
266 |
-
|
|
|
|
|
267 |
return true;
|
268 |
}
|
269 |
|
@@ -278,15 +334,34 @@ class Tribe__Tickets__Editor__Meta extends Tribe__Editor__Meta {
|
|
278 |
* @param null|bool $check Whether to allow updating metadata for the given type.
|
279 |
* @param int $unused_object_id Object ID.
|
280 |
* @param string $meta_key Meta key.
|
281 |
-
* @param mixed $unused_meta_value Meta value. Must be serializable if non-scalar.
|
282 |
-
* @param mixed $unused_prev_value Optional. If specified, only update existing
|
283 |
-
* metadata entries with the specified value.
|
284 |
-
* Otherwise, update all entries.
|
285 |
*
|
286 |
* @return bool
|
287 |
*/
|
288 |
-
public function update_tickets_list_in_rest( $check, $unused_object_id, $meta_key
|
289 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
return true;
|
291 |
}
|
292 |
|
@@ -298,14 +373,30 @@ class Tribe__Tickets__Editor__Meta extends Tribe__Editor__Meta {
|
|
298 |
*
|
299 |
* @since 4.10.11.1
|
300 |
*
|
301 |
-
* @return array
|
302 |
*/
|
303 |
public function get_ghost_meta_fields() {
|
304 |
return [
|
305 |
-
'_tribe_tickets_list',
|
306 |
-
'_tribe_ticket_going_count',
|
307 |
-
'_tribe_ticket_not_going_count',
|
308 |
-
'_tribe_ticket_has_attendee_info_fields',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
];
|
310 |
}
|
311 |
}
|
209 |
* @return array
|
210 |
*/
|
211 |
public function register_meta_args( $args = array(), $defaults = '', $object_type = '', $meta_key = '' ) {
|
212 |
+
if ( '_edd_button_behavior' === $meta_key ) {
|
213 |
$args['show_in_rest'] = false;
|
214 |
}
|
215 |
|
216 |
return $args;
|
217 |
}
|
218 |
|
219 |
+
/**
|
220 |
+
* Hook into the REST API request dispatch process (before REST endpoint runs) for custom overrides.
|
221 |
+
*
|
222 |
+
* @since 4.11.5
|
223 |
+
*
|
224 |
+
* @param mixed $dispatch_result Dispatch result, will be used if not empty.
|
225 |
+
* @param WP_REST_Request $request Request used to generate the response.
|
226 |
+
* @param string $route Route matched for the request.
|
227 |
+
*
|
228 |
+
* @return mixed Unmodified dispatch result.
|
229 |
+
*/
|
230 |
+
public function filter_rest_dispatch_request( $dispatch_result, $request, $route ) {
|
231 |
+
// Only disable meta updates from the normal WP endpoints for post/meta.
|
232 |
+
if ( 0 !== strpos( $route, '/wp/' ) ) {
|
233 |
+
return $dispatch_result;
|
234 |
+
}
|
235 |
+
|
236 |
+
// Don't get virtual meta.
|
237 |
+
add_filter(
|
238 |
+
'get_post_metadata',
|
239 |
+
[ $this, 'register_tickets_list_in_rest' ],
|
240 |
+
15,
|
241 |
+
4
|
242 |
+
);
|
243 |
+
|
244 |
+
// Don't delete virtual meta.
|
245 |
+
add_filter(
|
246 |
+
'delete_post_metadata',
|
247 |
+
[ $this, 'delete_tickets_list_in_rest' ],
|
248 |
+
15,
|
249 |
+
3
|
250 |
+
);
|
251 |
+
|
252 |
+
// Don't update virtual meta.
|
253 |
+
add_filter(
|
254 |
+
'update_post_metadata',
|
255 |
+
[ $this, 'update_tickets_list_in_rest' ],
|
256 |
+
15,
|
257 |
+
3
|
258 |
+
);
|
259 |
+
|
260 |
+
// Don't update global stock meta.
|
261 |
+
add_filter(
|
262 |
+
'update_post_metadata',
|
263 |
+
[ $this, 'update_global_stock_meta_in_rest' ],
|
264 |
+
15,
|
265 |
+
3
|
266 |
+
);
|
267 |
+
|
268 |
+
return $dispatch_result;
|
269 |
+
}
|
270 |
+
|
271 |
/**
|
272 |
* Make sure the value of the "virtual" meta is up to date with the correct ticket values
|
273 |
* as can be modified by removing or adding a plugin outside of the blocks editor the ticket
|
283 |
* @return array
|
284 |
*/
|
285 |
public function register_tickets_list_in_rest( $value, $post_id, $meta_key, $single ) {
|
286 |
+
if ( '_tribe_tickets_list' !== $meta_key ) {
|
287 |
return $value;
|
288 |
}
|
289 |
|
290 |
$tickets = Tribe__Tickets__Tickets::get_event_tickets( $post_id );
|
291 |
+
|
292 |
+
$list_of_tickets = [];
|
293 |
+
|
294 |
foreach ( $tickets as $ticket ) {
|
295 |
+
if (
|
296 |
+
! $ticket instanceof Tribe__Tickets__Ticket_Object
|
297 |
+
|| 'Tribe__Tickets__RSVP' === $ticket->provider_class
|
298 |
+
) {
|
299 |
continue;
|
300 |
}
|
301 |
+
|
302 |
$list_of_tickets[] = $ticket->ID;
|
303 |
}
|
304 |
|
313 |
* @param null|bool $delete Whether to allow metadata deletion of the given type.
|
314 |
* @param int $unused_object_id Object ID.
|
315 |
* @param string $meta_key Meta key.
|
|
|
|
|
|
|
|
|
316 |
*
|
317 |
* @return bool
|
318 |
*/
|
319 |
+
public function delete_tickets_list_in_rest( $delete, $unused_object_id, $meta_key ) {
|
320 |
+
$ghost_meta_fields = $this->get_ghost_meta_fields();
|
321 |
+
|
322 |
+
if ( isset( $ghost_meta_fields[ $meta_key ] ) ) {
|
323 |
return true;
|
324 |
}
|
325 |
|
334 |
* @param null|bool $check Whether to allow updating metadata for the given type.
|
335 |
* @param int $unused_object_id Object ID.
|
336 |
* @param string $meta_key Meta key.
|
|
|
|
|
|
|
|
|
337 |
*
|
338 |
* @return bool
|
339 |
*/
|
340 |
+
public function update_tickets_list_in_rest( $check, $unused_object_id, $meta_key ) {
|
341 |
+
$ghost_meta_fields = $this->get_ghost_meta_fields();
|
342 |
+
|
343 |
+
if ( isset( $ghost_meta_fields[ $meta_key ] ) ) {
|
344 |
+
return true;
|
345 |
+
}
|
346 |
+
|
347 |
+
return $check;
|
348 |
+
}
|
349 |
+
|
350 |
+
/**
|
351 |
+
* Don't update global stock meta that's handled elsewhere.
|
352 |
+
*
|
353 |
+
* @since 4.11.5
|
354 |
+
*
|
355 |
+
* @param null|bool $check Whether to allow updating metadata for the given type.
|
356 |
+
* @param int $unused_object_id Object ID.
|
357 |
+
* @param string $meta_key Meta key.
|
358 |
+
*
|
359 |
+
* @return bool
|
360 |
+
*/
|
361 |
+
public function update_global_stock_meta_in_rest( $check, $unused_object_id, $meta_key ) {
|
362 |
+
$global_stock_meta_fields = $this->get_global_stock_meta_fields();
|
363 |
+
|
364 |
+
if ( isset( $global_stock_meta_fields[ $meta_key ] ) ) {
|
365 |
return true;
|
366 |
}
|
367 |
|
373 |
*
|
374 |
* @since 4.10.11.1
|
375 |
*
|
376 |
+
* @return array List of ghost meta fields.
|
377 |
*/
|
378 |
public function get_ghost_meta_fields() {
|
379 |
return [
|
380 |
+
'_tribe_tickets_list' => 1,
|
381 |
+
'_tribe_ticket_going_count' => 1,
|
382 |
+
'_tribe_ticket_not_going_count' => 1,
|
383 |
+
'_tribe_ticket_has_attendee_info_fields' => 1,
|
384 |
+
];
|
385 |
+
}
|
386 |
+
|
387 |
+
/**
|
388 |
+
* Get global stock meta fields that we don't actually want to update/delete from normal WP REST routes.
|
389 |
+
*
|
390 |
+
* @since 4.11.5
|
391 |
+
*
|
392 |
+
* @return array List of global stock meta fields.
|
393 |
+
*/
|
394 |
+
public function get_global_stock_meta_fields() {
|
395 |
+
return [
|
396 |
+
Tribe__Tickets__Global_Stock::GLOBAL_STOCK_ENABLED => 1,
|
397 |
+
Tribe__Tickets__Global_Stock::GLOBAL_STOCK_LEVEL => 1,
|
398 |
+
Tribe__Tickets__Global_Stock::TICKET_STOCK_MODE => 1,
|
399 |
+
Tribe__Tickets__Global_Stock::TICKET_STOCK_CAP => 1,
|
400 |
];
|
401 |
}
|
402 |
}
|
src/Tribe/Editor/Provider.php
CHANGED
@@ -12,7 +12,7 @@ class Tribe__Tickets__Editor__Provider extends tad_DI52_ServiceProvider {
|
|
12 |
*
|
13 |
*/
|
14 |
public function register() {
|
15 |
-
// Register these all the time - as we now use them in most of the
|
16 |
$this->container->singleton( 'tickets.editor.template', 'Tribe__Tickets__Editor__Template' );
|
17 |
$this->container->singleton( 'tickets.editor.blocks.tickets', 'Tribe__Tickets__Editor__Blocks__Tickets' );
|
18 |
$this->container->singleton( 'tickets.editor.configuration', 'Tribe__Tickets__Editor__Configuration', array( 'hook' ) );
|
@@ -76,27 +76,12 @@ class Tribe__Tickets__Editor__Provider extends tad_DI52_ServiceProvider {
|
|
76 |
4
|
77 |
);
|
78 |
|
|
|
79 |
add_filter(
|
80 |
-
'
|
81 |
-
tribe_callback( 'tickets.editor.meta', '
|
82 |
-
|
83 |
-
|
84 |
-
);
|
85 |
-
|
86 |
-
// Don't delete virtual meta.
|
87 |
-
add_filter(
|
88 |
-
'delete_post_metadata',
|
89 |
-
tribe_callback( 'tickets.editor.meta', 'delete_tickets_list_in_rest' ),
|
90 |
-
15,
|
91 |
-
5
|
92 |
-
);
|
93 |
-
|
94 |
-
// Don't update virtual meta.
|
95 |
-
add_filter(
|
96 |
-
'update_post_metadata',
|
97 |
-
tribe_callback( 'tickets.editor.meta', 'update_tickets_list_in_rest' ),
|
98 |
-
15,
|
99 |
-
5
|
100 |
);
|
101 |
|
102 |
// Setup the Rest compatibility layer for WP
|
12 |
*
|
13 |
*/
|
14 |
public function register() {
|
15 |
+
// Register these all the time - as we now use them in most of the templates, blocks or otherwise.
|
16 |
$this->container->singleton( 'tickets.editor.template', 'Tribe__Tickets__Editor__Template' );
|
17 |
$this->container->singleton( 'tickets.editor.blocks.tickets', 'Tribe__Tickets__Editor__Blocks__Tickets' );
|
18 |
$this->container->singleton( 'tickets.editor.configuration', 'Tribe__Tickets__Editor__Configuration', array( 'hook' ) );
|
76 |
4
|
77 |
);
|
78 |
|
79 |
+
// Handle REST specific meta filtering.
|
80 |
add_filter(
|
81 |
+
'rest_dispatch_request',
|
82 |
+
tribe_callback( 'tickets.editor.meta', 'filter_rest_dispatch_request' ),
|
83 |
+
10,
|
84 |
+
3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
);
|
86 |
|
87 |
// Setup the Rest compatibility layer for WP
|
src/Tribe/Integrations/Freemius.php
ADDED
@@ -0,0 +1,386 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Facilitates smoother integration with the Freemius.
|
5 |
+
*
|
6 |
+
* @since 4.11.5
|
7 |
+
*/
|
8 |
+
class Tribe__Tickets__Integrations__Freemius {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Stores the instance for the Freemius.
|
12 |
+
*
|
13 |
+
* @since 4.11.5
|
14 |
+
*
|
15 |
+
* @var Freemius
|
16 |
+
*/
|
17 |
+
private $instance;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* The object class used for assets.
|
21 |
+
*
|
22 |
+
* @since 4.11.5
|
23 |
+
*
|
24 |
+
* @var string
|
25 |
+
*/
|
26 |
+
private $object_class = 'Tribe__Tickets__Main';
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Stores the public key for Freemius.
|
30 |
+
*
|
31 |
+
* @since 4.11.5
|
32 |
+
*
|
33 |
+
* @var string
|
34 |
+
*/
|
35 |
+
private $public_key = 'pk_6dd9310b57c62871c59e58b8e739e';
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Stores the ID for the Freemius application.
|
39 |
+
*
|
40 |
+
* @since 4.11.5
|
41 |
+
*
|
42 |
+
* @var string
|
43 |
+
*/
|
44 |
+
private $freemius_id = '3841';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Stores the slug for the Freemius application.
|
48 |
+
*
|
49 |
+
* @since 4.11.5
|
50 |
+
*
|
51 |
+
* @var string
|
52 |
+
*/
|
53 |
+
private $slug = 'event-tickets';
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Stores the name for the Freemius application.
|
57 |
+
*
|
58 |
+
* @since 4.11.5
|
59 |
+
*
|
60 |
+
* @var string
|
61 |
+
*/
|
62 |
+
private $name = 'Event Tickets';
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Store the value from the 'page' in the request.
|
66 |
+
*
|
67 |
+
* @since 4.11.5
|
68 |
+
*
|
69 |
+
* @var string
|
70 |
+
*/
|
71 |
+
private $page = 'tribe-common';
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Tribe__Tickets__Integrations__Freemius constructor.
|
75 |
+
*
|
76 |
+
* @since 4.11.5
|
77 |
+
*/
|
78 |
+
public function __construct() {
|
79 |
+
$this->setup();
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Performs setup for the Freemius integration singleton.
|
84 |
+
*
|
85 |
+
* @since 4.11.5
|
86 |
+
*/
|
87 |
+
public function setup() {
|
88 |
+
if ( ! is_admin() ) {
|
89 |
+
return;
|
90 |
+
}
|
91 |
+
// Setup possible redirect.
|
92 |
+
add_action( 'wp_loaded', [ $this, 'action_redirect_incorrect_page' ] );
|
93 |
+
|
94 |
+
global $pagenow;
|
95 |
+
|
96 |
+
$page = tribe_get_request_var( 'page' );
|
97 |
+
|
98 |
+
$valid_page = [
|
99 |
+
Tribe__Settings::$parent_slug => true,
|
100 |
+
Tribe__App_Shop::MENU_SLUG => true,
|
101 |
+
'tribe-help' => true,
|
102 |
+
];
|
103 |
+
|
104 |
+
if ( class_exists( 'Tribe__Events__Aggregator__Page' ) ) {
|
105 |
+
$valid_page[ Tribe__Events__Aggregator__Page::$slug ] = true;
|
106 |
+
}
|
107 |
+
|
108 |
+
if ( isset( $valid_page[ $page ] ) ) {
|
109 |
+
$this->page = $page;
|
110 |
+
} elseif ( 'plugins.php' !== $pagenow && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
|
111 |
+
return;
|
112 |
+
}
|
113 |
+
|
114 |
+
// If the common that loaded doesn't include Freemius, let's bail.
|
115 |
+
if ( ! tribe()->offsetExists( 'freemius' ) ) {
|
116 |
+
return;
|
117 |
+
}
|
118 |
+
|
119 |
+
$should_load = true;
|
120 |
+
|
121 |
+
// Check if Freemius integration is disabled.
|
122 |
+
if ( ( defined( 'TRIBE_NO_FREEMIUS' ) && true === TRIBE_NO_FREEMIUS ) || true === (bool) getenv( 'TRIBE_NO_FREEMIUS' ) ) {
|
123 |
+
$should_load = false;
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Allows third-party disabling of the integration.
|
128 |
+
*
|
129 |
+
* @since 4.11.5
|
130 |
+
*
|
131 |
+
* @param bool $should_load Whether the Freemius integration should load.
|
132 |
+
*/
|
133 |
+
$should_load = apply_filters( 'tribe_tickets_integrations_should_load_freemius', $should_load );
|
134 |
+
|
135 |
+
if ( ! $should_load ) {
|
136 |
+
return;
|
137 |
+
}
|
138 |
+
|
139 |
+
/** @var Tribe__Freemius $freemius */
|
140 |
+
$freemius = tribe( 'freemius' );
|
141 |
+
|
142 |
+
$this->instance = $freemius->initialize( $this->slug, $this->freemius_id, $this->public_key, [
|
143 |
+
'menu' => [
|
144 |
+
'slug' => $this->page,
|
145 |
+
'first-path' => $this->get_settings_path(),
|
146 |
+
'account' => false,
|
147 |
+
'contact' => false,
|
148 |
+
'support' => false,
|
149 |
+
],
|
150 |
+
'is_premium' => false,
|
151 |
+
'has_addons' => false,
|
152 |
+
'has_paid_plans' => false,
|
153 |
+
] );
|
154 |
+
|
155 |
+
$this->instance->add_filter( 'connect_url', [ $this, 'get_connect_url' ], 10, 10 );
|
156 |
+
$this->instance->add_filter( 'after_skip_url', [ $this, 'get_settings_url' ] );
|
157 |
+
$this->instance->add_filter( 'after_connect_url', [ $this, 'get_settings_url' ] );
|
158 |
+
$this->instance->add_filter( 'after_pending_connect_url', [ $this, 'get_settings_url' ] );
|
159 |
+
$this->instance->add_filter( 'plugin_icon', [ $this, 'get_plugin_icon_url' ] );
|
160 |
+
|
161 |
+
/*
|
162 |
+
* Freemius typically hooks this action–which bootstraps the deactivation dialog–during plugins_loaded, but we
|
163 |
+
* initialize our plugins AFTER plugins_loaded, so we'll register it on admin_init instead.
|
164 |
+
*/
|
165 |
+
add_action( 'admin_init', [ $this->instance, '_hook_action_links_and_register_account_hooks' ] );
|
166 |
+
add_action( 'admin_init', [ $this, 'action_skip_activation' ] );
|
167 |
+
|
168 |
+
$this->instance->add_filter( 'connect_message', [
|
169 |
+
$this,
|
170 |
+
'filter_connect_message_on_update',
|
171 |
+
], 10, 6 );
|
172 |
+
$this->instance->add_filter( 'connect_message_on_update', [
|
173 |
+
$this,
|
174 |
+
'filter_connect_message_on_update',
|
175 |
+
], 10, 6 );
|
176 |
+
|
177 |
+
add_action( 'admin_init', [ $this, 'maybe_remove_activation_complete_notice' ] );
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* For some reason Freemius is redirecting some customers to a page that doesnt exist. So we catch that page and
|
182 |
+
* redirect them back to the actual page that we are using to setup the plugins integration.
|
183 |
+
*
|
184 |
+
* @since 4.11.5
|
185 |
+
*
|
186 |
+
* @link https://moderntribe.atlassian.net/browse/TEC-3218
|
187 |
+
*
|
188 |
+
* @return void Retuning a Redirect header, so nothing gets returned otherwise.
|
189 |
+
*/
|
190 |
+
public function action_redirect_incorrect_page() {
|
191 |
+
$action = tribe_get_request_var( 'fs_action', false );
|
192 |
+
|
193 |
+
if ( 'sync_user' !== $action ) {
|
194 |
+
return;
|
195 |
+
}
|
196 |
+
|
197 |
+
$page = tribe_get_request_var( 'page', false );
|
198 |
+
|
199 |
+
if ( 'tribe-common-account' !== $page ) {
|
200 |
+
return;
|
201 |
+
}
|
202 |
+
|
203 |
+
$url = admin_url( 'admin.php' );
|
204 |
+
$url = add_query_arg( [
|
205 |
+
'fs_action' => $action,
|
206 |
+
'page' => $this->page,
|
207 |
+
'_wpnonce' => tribe_get_request_var( '_wpnonce' ),
|
208 |
+
], $url );
|
209 |
+
|
210 |
+
wp_safe_redirect( $url );
|
211 |
+
tribe_exit();
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* Get the connect page URL.
|
216 |
+
*
|
217 |
+
* @since 4.11.5
|
218 |
+
*
|
219 |
+
* @param string $connect_url Current connect page URL.
|
220 |
+
*
|
221 |
+
* @return string The connect page URL.
|
222 |
+
*/
|
223 |
+
public function get_connect_url( $connect_url ) {
|
224 |
+
$settings_url = $this->get_settings_url();
|
225 |
+
|
226 |
+
if ( false !== strpos( $connect_url, 'fs_action' ) ) {
|
227 |
+
$action = $this->slug . '_reconnect';
|
228 |
+
|
229 |
+
$settings_url = add_query_arg( [
|
230 |
+
'nonce' => wp_create_nonce( $action ),
|
231 |
+
'fs_action' => $action,
|
232 |
+
], $settings_url );
|
233 |
+
}
|
234 |
+
|
235 |
+
return $settings_url;
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Get the Settings page URL.
|
240 |
+
*
|
241 |
+
* @since 4.11.5
|
242 |
+
*
|
243 |
+
* @return string The Settings page URL.
|
244 |
+
*/
|
245 |
+
public function get_settings_url() {
|
246 |
+
return admin_url( $this->get_settings_path() );
|
247 |
+
}
|
248 |
+
|
249 |
+
/**
|
250 |
+
* Get the plugin icon URL.
|
251 |
+
*
|
252 |
+
* @since 4.11.5
|
253 |
+
*
|
254 |
+
* @return string The plugin icon URL.
|
255 |
+
*/
|
256 |
+
public function get_plugin_icon_url() {
|
257 |
+
$class = $this->object_class;
|
258 |
+
|
259 |
+
return $class::instance()->plugin_url . '/src/resources/images/' . $this->slug . '.svg';
|
260 |
+
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Get the Settings page path.
|
264 |
+
*
|
265 |
+
* @since 4.11.5
|
266 |
+
*
|
267 |
+
* @return string The Settings page path.
|
268 |
+
*/
|
269 |
+
public function get_settings_path() {
|
270 |
+
if ( class_exists( 'Tribe__Events__Main' ) ) {
|
271 |
+
$url = sprintf( 'edit.php?post_type=%s&page=%s', Tribe__Events__Main::POSTTYPE, $this->page );
|
272 |
+
} else {
|
273 |
+
$url = sprintf( 'admin.php?page=%s', $this->page );
|
274 |
+
}
|
275 |
+
|
276 |
+
return $url;
|
277 |
+
}
|
278 |
+
|
279 |
+
/**
|
280 |
+
* Action to skip activation since Freemius code does not skip correctly here.
|
281 |
+
*
|
282 |
+
* @since 4.11.5
|
283 |
+
*
|
284 |
+
* @return bool Whether activation was skipped.
|
285 |
+
*/
|
286 |
+
public function action_skip_activation() {
|
287 |
+
$fs_action = tribe_get_request_var( 'fs_action' );
|
288 |
+
|
289 |
+
// Prevent fatal errors.
|
290 |
+
if ( ! function_exists( 'fs_redirect' ) || ! function_exists( 'fs_is_network_admin' ) ) {
|
291 |
+
return false;
|
292 |
+
}
|
293 |
+
|
294 |
+
// Actually do the skipping of connection, since Freemius code does not do this.
|
295 |
+
if ( $this->slug . '_skip_activation' !== $fs_action ) {
|
296 |
+
return false;
|
297 |
+
}
|
298 |
+
|
299 |
+
check_admin_referer( $this->slug . '_skip_activation' );
|
300 |
+
|
301 |
+
$this->instance->skip_connection( null, fs_is_network_admin() );
|
302 |
+
|
303 |
+
fs_redirect( $this->instance->get_after_activation_url( 'after_skip_url' ) );
|
304 |
+
|
305 |
+
return true;
|
306 |
+
}
|
307 |
+
|
308 |
+
/**
|
309 |
+
* Filter the content for the Freemius Popup.
|
310 |
+
*
|
311 |
+
* @since 4.11.5
|
312 |
+
*
|
313 |
+
* @param string $message The message content.
|
314 |
+
* @param string $user_first_name The first name of user.
|
315 |
+
* @param string $product_title The product title.
|
316 |
+
* @param string $user_login The user_login of user.
|
317 |
+
* @param string $site_link The site URL.
|
318 |
+
* @param string $freemius_link The Freemius URL.
|
319 |
+
*
|
320 |
+
* @return string
|
321 |
+
*/
|
322 |
+
public function filter_connect_message_on_update(
|
323 |
+
$message, $user_first_name, $product_title, $user_login, $site_link, $freemius_link
|
324 |
+
) {
|
325 |
+
$class = $this->object_class;
|
326 |
+
|
327 |
+
wp_enqueue_style( 'tribe-' . $this->slug . '-freemius', $class::instance()->plugin_url . '/src/resources/css/freemius.css' );
|
328 |
+
|
329 |
+
// Add the heading HTML.
|
330 |
+
$plugin_name = $this->name;
|
331 |
+
$title = '<h3>' . sprintf( esc_html__( 'We hope you love %1$s', 'event-tickets' ), $plugin_name ) . '</h3>';
|
332 |
+
$html = '';
|
333 |
+
|
334 |
+
// Add the introduction HTML.
|
335 |
+
$html .= '<p>';
|
336 |
+
$html .= sprintf( esc_html__( 'Hi, %1$s! This is an invitation to help our %2$s community. If you opt-in, some data about your usage of %2$s will be shared with our teams (so they can work their butts off to improve). We will also share some helpful info on events management, WordPress, and our products from time to time.', 'event-tickets' ), $user_first_name, $plugin_name );
|
337 |
+
$html .= '</p>';
|
338 |
+
|
339 |
+
$html .= '<p>';
|
340 |
+
$html .= sprintf( esc_html__( 'And if you skip this, that\'s okay! %1$s will still work just fine.', 'event-tickets' ), $plugin_name );
|
341 |
+
$html .= '</p>';
|
342 |
+
|
343 |
+
// Add the "Powered by" HTML.
|
344 |
+
$html .= '<div class="tribe-powered-by-freemius">' . esc_html__( 'Powered by', 'event-tickets' ) . '</div>';
|
345 |
+
|
346 |
+
return $title . $html;
|
347 |
+
}
|
348 |
+
|
349 |
+
/**
|
350 |
+
* Returns the instance of Freemius plugin.
|
351 |
+
*
|
352 |
+
* @since 4.11.5
|
353 |
+
*
|
354 |
+
* @return Freemius
|
355 |
+
*/
|
356 |
+
public function get() {
|
357 |
+
return $this->instance;
|
358 |
+
}
|
359 |
+
|
360 |
+
/**
|
361 |
+
* Method to remove the sticky message when the plugin is active for Freemius.
|
362 |
+
*
|
363 |
+
* @since 4.11.5
|
364 |
+
*/
|
365 |
+
public function maybe_remove_activation_complete_notice() {
|
366 |
+
// Bail if the is_pending_activation() method doesn't exist.
|
367 |
+
if ( ! method_exists( $this->instance, 'is_pending_activation' ) ) {
|
368 |
+
return;
|
369 |
+
}
|
370 |
+
|
371 |
+
// Bail if it's still pending activation.
|
372 |
+
if ( $this->instance->is_pending_activation() ) {
|
373 |
+
return;
|
374 |
+
}
|
375 |
+
|
376 |
+
$admin_notices = FS_Admin_Notices::instance( $this->slug, $this->name, $this->instance->get_unique_affix() );
|
377 |
+
|
378 |
+
// Bail if it doesn't have the activation complete notice.
|
379 |
+
if ( ! $admin_notices->has_sticky( 'activation_complete' ) ) {
|
380 |
+
return;
|
381 |
+
}
|
382 |
+
|
383 |
+
// Remove the sticky notice for activation complete.
|
384 |
+
$admin_notices->remove_sticky( 'activation_complete' );
|
385 |
+
}
|
386 |
+
}
|
src/Tribe/Integrations/Manager.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Tribe__Tickets__Integrations__Manager
|
5 |
+
*
|
6 |
+
* Loads and manages the third-party plugins integration implementations.
|
7 |
+
*
|
8 |
+
* @since 4.11.5
|
9 |
+
*/
|
10 |
+
class Tribe__Tickets__Integrations__Manager {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* The current instance of the object.
|
14 |
+
*
|
15 |
+
* @since 4.11.5
|
16 |
+
*
|
17 |
+
* @var Tribe__Tickets__Integrations__Manager
|
18 |
+
*/
|
19 |
+
protected static $instance;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* The class singleton constructor.
|
23 |
+
*
|
24 |
+
* @since 4.11.5
|
25 |
+
*
|
26 |
+
* @return Tribe__Tickets__Integrations__Manager
|
27 |
+
*/
|
28 |
+
public static function instance() {
|
29 |
+
if ( empty( self::$instance ) ) {
|
30 |
+
self::$instance = new self();
|
31 |
+
}
|
32 |
+
|
33 |
+
return self::$instance;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Conditionally loads the classes needed to integrate with third-party plugins.
|
38 |
+
*
|
39 |
+
* Third-party plugin integration classes and methods will be loaded only if
|
40 |
+
* supported plugins are activated.
|
41 |
+
*
|
42 |
+
* @since 4.11.5
|
43 |
+
*/
|
44 |
+
public function load_integrations() {
|
45 |
+
$this->load_freemius();
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Loads our Freemius integration
|
50 |
+
*
|
51 |
+
* @since 4.11.5
|
52 |
+
*/
|
53 |
+
private function load_freemius() {
|
54 |
+
tribe_singleton( 'tickets.integrations.freemius', new Tribe__Tickets__Integrations__Freemius );
|
55 |
+
}
|
56 |
+
}
|
src/Tribe/Main.php
CHANGED
@@ -4,7 +4,7 @@ class Tribe__Tickets__Main {
|
|
4 |
/**
|
5 |
* Current version of this plugin
|
6 |
*/
|
7 |
-
const VERSION = '4.11.
|
8 |
|
9 |
/**
|
10 |
* Min required The Events Calendar version
|
@@ -686,7 +686,10 @@ class Tribe__Tickets__Main {
|
|
686 |
* Hooked to the init action
|
687 |
*/
|
688 |
public function init() {
|
689 |
-
//
|
|
|
|
|
|
|
690 |
$this->legacy_provider_support = new Tribe__Tickets__Legacy_Provider_Support;
|
691 |
$this->settings_tab();
|
692 |
$this->tickets_view();
|
4 |
/**
|
5 |
* Current version of this plugin
|
6 |
*/
|
7 |
+
const VERSION = '4.11.5';
|
8 |
|
9 |
/**
|
10 |
* Min required The Events Calendar version
|
686 |
* Hooked to the init action
|
687 |
*/
|
688 |
public function init() {
|
689 |
+
// Start the integrations manager.
|
690 |
+
Tribe__Tickets__Integrations__Manager::instance()->load_integrations();
|
691 |
+
|
692 |
+
// Provide continued support for legacy ticketing modules.
|
693 |
$this->legacy_provider_support = new Tribe__Tickets__Legacy_Provider_Support;
|
694 |
$this->settings_tab();
|
695 |
$this->tickets_view();
|
src/Tribe/Promoter/Observer.php
CHANGED
@@ -41,21 +41,25 @@ class Tribe__Tickets__Promoter__Observer {
|
|
41 |
$this->registered_types();
|
42 |
|
43 |
// Listen for changes on RSVP as Gutenberg Uses the post_type API to update RSVP's
|
44 |
-
add_action( 'save_post_tribe_rsvp_tickets', [ $this, '
|
45 |
|
46 |
// RSVP
|
47 |
add_action( 'tickets_rsvp_ticket_deleted', [ $this, 'notify_event_id' ], 10, 2 );
|
48 |
add_action( 'event_tickets_rsvp_tickets_generated', [ $this, 'notify_event_id' ], 10, 2 );
|
49 |
|
|
|
|
|
|
|
|
|
50 |
// PayPal
|
|
|
51 |
add_action( 'tickets_tpp_ticket_deleted', [ $this, 'notify_event_id' ], 10, 2 );
|
52 |
add_action( 'event_tickets_tpp_tickets_generated', [ $this, 'notify_event_id' ], 10, 2 );
|
|
|
|
|
53 |
|
54 |
// All tickets
|
55 |
add_action( 'event_tickets_after_save_ticket', [ $this, 'notify' ], 10, 1 );
|
56 |
-
|
57 |
-
// Actions from REST
|
58 |
-
add_action( 'tribe_tickets_ticket_type_moved', [ $this, 'ticket_moved_type' ], 10, 4 );
|
59 |
}
|
60 |
|
61 |
/**
|
@@ -64,16 +68,32 @@ class Tribe__Tickets__Promoter__Observer {
|
|
64 |
* @since 4.10.1.2
|
65 |
*
|
66 |
* @param $attendee_id
|
|
|
|
|
|
|
67 |
*/
|
68 |
public function notify_rsvp_event( $attendee_id ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
/** @var Tribe__Tickets__RSVP $provider */
|
70 |
-
$provider = tribe_tickets_get_ticket_provider( $
|
71 |
|
72 |
-
if ( ! $provider instanceof
|
73 |
return;
|
74 |
}
|
75 |
|
76 |
-
$this->notify( $provider->get_event_for_ticket( $
|
77 |
}
|
78 |
|
79 |
/**
|
@@ -91,7 +111,7 @@ class Tribe__Tickets__Promoter__Observer {
|
|
91 |
}
|
92 |
|
93 |
add_action( 'save_post_' . $this->event_type, [ $this, 'notify' ], 10, 1 );
|
94 |
-
add_action( 'delete_post', [ $this, '
|
95 |
}
|
96 |
|
97 |
/**
|
@@ -124,10 +144,10 @@ class Tribe__Tickets__Promoter__Observer {
|
|
124 |
*
|
125 |
* @since 4.10.1.2
|
126 |
*
|
127 |
-
* @param int $ticket_type_id
|
128 |
-
* @param int $destination_id
|
129 |
-
* @param int $source_id
|
130 |
-
* @param int $instigator_id
|
131 |
*/
|
132 |
public function ticket_moved_type( $ticket_type_id, $destination_id, $source_id, $instigator_id ) {
|
133 |
$this->notify( $source_id );
|
@@ -137,14 +157,84 @@ class Tribe__Tickets__Promoter__Observer {
|
|
137 |
}
|
138 |
}
|
139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
/**
|
141 |
* Notify the connector of changes when the event was deleted
|
142 |
*
|
143 |
* @since 4.10.9
|
144 |
*
|
145 |
* @param $post_id
|
|
|
|
|
|
|
146 |
*/
|
147 |
public function delete_post( $post_id ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
if ( $this->event_type === get_post_type( $post_id ) ) {
|
149 |
$this->notify( $post_id );
|
150 |
}
|
@@ -158,6 +248,12 @@ class Tribe__Tickets__Promoter__Observer {
|
|
158 |
* @param $post_id int The ID of the post.
|
159 |
*/
|
160 |
public function notify( $post_id ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
try {
|
162 |
/** @var Tribe__Promoter__Connector $connector */
|
163 |
$connector = tribe( 'promoter.connector' );
|
@@ -167,4 +263,4 @@ class Tribe__Tickets__Promoter__Observer {
|
|
167 |
return;
|
168 |
}
|
169 |
}
|
170 |
-
}
|
41 |
$this->registered_types();
|
42 |
|
43 |
// Listen for changes on RSVP as Gutenberg Uses the post_type API to update RSVP's
|
44 |
+
add_action( 'save_post_tribe_rsvp_tickets', [ $this, 'notify_ticket_event' ], 10, 1 );
|
45 |
|
46 |
// RSVP
|
47 |
add_action( 'tickets_rsvp_ticket_deleted', [ $this, 'notify_event_id' ], 10, 2 );
|
48 |
add_action( 'event_tickets_rsvp_tickets_generated', [ $this, 'notify_event_id' ], 10, 2 );
|
49 |
|
50 |
+
// Moved tickets
|
51 |
+
add_action( 'tribe_tickets_ticket_type_moved', [ $this, 'ticket_moved_type' ], 10, 4 );
|
52 |
+
add_action( 'tribe_tickets_ticket_moved', [ $this, 'ticket_moved' ], 10, 6 );
|
53 |
+
|
54 |
// PayPal
|
55 |
+
add_action( 'save_post_tribe_tpp_attendees', [ $this, 'notify_ticket_event' ], 10, 1 );
|
56 |
add_action( 'tickets_tpp_ticket_deleted', [ $this, 'notify_event_id' ], 10, 2 );
|
57 |
add_action( 'event_tickets_tpp_tickets_generated', [ $this, 'notify_event_id' ], 10, 2 );
|
58 |
+
add_action( 'event_tickets_tpp_attendee_updated', [ $this, 'tpp_attendee_updated' ], 10, 5 );
|
59 |
+
add_action( 'event_tickets_tpp_tickets_generated_for_product', [ $this, 'tpp_tickets_generated_for_product' ], 10, 3 );
|
60 |
|
61 |
// All tickets
|
62 |
add_action( 'event_tickets_after_save_ticket', [ $this, 'notify' ], 10, 1 );
|
|
|
|
|
|
|
63 |
}
|
64 |
|
65 |
/**
|
68 |
* @since 4.10.1.2
|
69 |
*
|
70 |
* @param $attendee_id
|
71 |
+
*
|
72 |
+
* @deprecated 4.11.5
|
73 |
+
*
|
74 |
*/
|
75 |
public function notify_rsvp_event( $attendee_id ) {
|
76 |
+
_deprecated_function( __METHOD__, '4.11.5', __CLASS__ . '::notify_ticket_event' );
|
77 |
+
|
78 |
+
$this->notify_ticket_event( $attendee_id );
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Notify to the parent Event of the ticket
|
83 |
+
*
|
84 |
+
* @since 4.11.5
|
85 |
+
*
|
86 |
+
* @param $ticket_id int The Ticket ID where to look for the Event.
|
87 |
+
*/
|
88 |
+
public function notify_ticket_event( $ticket_id ) {
|
89 |
/** @var Tribe__Tickets__RSVP $provider */
|
90 |
+
$provider = tribe_tickets_get_ticket_provider( $ticket_id );
|
91 |
|
92 |
+
if ( ! $provider instanceof Tribe__Tickets__Tickets ) {
|
93 |
return;
|
94 |
}
|
95 |
|
96 |
+
$this->notify( $provider->get_event_for_ticket( $ticket_id ) );
|
97 |
}
|
98 |
|
99 |
/**
|
111 |
}
|
112 |
|
113 |
add_action( 'save_post_' . $this->event_type, [ $this, 'notify' ], 10, 1 );
|
114 |
+
add_action( 'delete_post', [ $this, 'on_event_deleted' ], 10, 1 );
|
115 |
}
|
116 |
|
117 |
/**
|
144 |
*
|
145 |
* @since 4.10.1.2
|
146 |
*
|
147 |
+
* @param int $ticket_type_id the ticket type which has been moved
|
148 |
+
* @param int $destination_id the post to which the ticket type has been moved
|
149 |
+
* @param int $source_id the post which previously hosted the ticket type
|
150 |
+
* @param int $instigator_id the user who initiated the change
|
151 |
*/
|
152 |
public function ticket_moved_type( $ticket_type_id, $destination_id, $source_id, $instigator_id ) {
|
153 |
$this->notify( $source_id );
|
157 |
}
|
158 |
}
|
159 |
|
160 |
+
/**
|
161 |
+
* Observer when an attendee is moved from a post to another and notify Promoter about changes on both events
|
162 |
+
*
|
163 |
+
* @since 4.11.5
|
164 |
+
*
|
165 |
+
* @param int $ticket_id the ticket which has been moved
|
166 |
+
* @param int $source_ticket_type_id the ticket type it belonged to originally
|
167 |
+
* @param int $target_ticket_type_id the ticket type it now belongs to
|
168 |
+
* @param int $source_event_id the event/post which the ticket originally belonged to
|
169 |
+
* @param int $target_event_id the event/post which the ticket now belongs to
|
170 |
+
* @param int $instigator_id the user who initiated the change
|
171 |
+
*
|
172 |
+
* @return void Action hook with no return.
|
173 |
+
*/
|
174 |
+
public function ticket_moved( $ticket_id, $source_ticket_type_id, $target_ticket_type_id, $source_event_id, $target_event_id, $instigator_id ) {
|
175 |
+
$this->notify( $source_event_id );
|
176 |
+
// Prevent to send the same response twice if the ID's are the same.
|
177 |
+
if ( $source_event_id !== $target_event_id ) {
|
178 |
+
$this->notify( $target_event_id );
|
179 |
+
}
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Action fired when an PayPal attendee ticket is updated.
|
184 |
+
*
|
185 |
+
* @since 4.11.5
|
186 |
+
*
|
187 |
+
* @param int $attendee_id Attendee post ID.
|
188 |
+
* @param string $order_id PayPal Order ID.
|
189 |
+
* @param int $product_id PayPal ticket post ID.
|
190 |
+
* @param int $order_attendee_id Attendee number in submitted order.
|
191 |
+
* @param string $attendee_order_status The order status for the attendee.
|
192 |
+
*
|
193 |
+
* @return void
|
194 |
+
*/
|
195 |
+
public function tpp_attendee_updated( $attendee_id, $order_id, $product_id, $order_attendee_id, $attendee_order_status ) {
|
196 |
+
$this->notify_ticket_event( $product_id );
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Action fired when a PayPal has had attendee tickets generated for it.
|
201 |
+
*
|
202 |
+
* @since 4.11.5
|
203 |
+
*
|
204 |
+
* @param int $product_id PayPal ticket post ID.
|
205 |
+
* @param string $order_id ID of the PayPal order.
|
206 |
+
* @param int $qty Quantity ordered.
|
207 |
+
*
|
208 |
+
* @return void
|
209 |
+
*/
|
210 |
+
public function tpp_tickets_generated_for_product( $product_id, $order_id, $qty ) {
|
211 |
+
$this->notify_ticket_event( $product_id );
|
212 |
+
}
|
213 |
+
|
214 |
/**
|
215 |
* Notify the connector of changes when the event was deleted
|
216 |
*
|
217 |
* @since 4.10.9
|
218 |
*
|
219 |
* @param $post_id
|
220 |
+
*
|
221 |
+
* @deprecated 4.11.5
|
222 |
+
*
|
223 |
*/
|
224 |
public function delete_post( $post_id ) {
|
225 |
+
_deprecated_function( __METHOD__, '4.11.5', __CLASS__ . "::on_event_deleted" );
|
226 |
+
|
227 |
+
$this->on_event_deleted( $post_id );
|
228 |
+
}
|
229 |
+
|
230 |
+
/**
|
231 |
+
* Notify the connector of changes when the event was deleted
|
232 |
+
*
|
233 |
+
* @since 4.11.5
|
234 |
+
*
|
235 |
+
* @param $post_id
|
236 |
+
*/
|
237 |
+
public function on_event_deleted( $post_id ) {
|
238 |
if ( $this->event_type === get_post_type( $post_id ) ) {
|
239 |
$this->notify( $post_id );
|
240 |
}
|
248 |
* @param $post_id int The ID of the post.
|
249 |
*/
|
250 |
public function notify( $post_id ) {
|
251 |
+
|
252 |
+
// The $post_id is a falsy value, avoid a non required call.
|
253 |
+
if ( ! $post_id ) {
|
254 |
+
return;
|
255 |
+
}
|
256 |
+
|
257 |
try {
|
258 |
/** @var Tribe__Promoter__Connector $connector */
|
259 |
$connector = tribe( 'promoter.connector' );
|
263 |
return;
|
264 |
}
|
265 |
}
|
266 |
+
}
|
src/Tribe/REST/V1/Post_Repository.php
CHANGED
@@ -401,8 +401,9 @@ class Tribe__Tickets__REST__V1__Post_Repository
|
|
401 |
protected function add_ticket_post_data( &$data ) {
|
402 |
$ticket_id = $data['id'];
|
403 |
$ticket_post = get_post( $ticket_id );
|
|
|
404 |
|
405 |
-
if ( ! $ticket_post instanceof WP_Post ) {
|
406 |
throw new Tribe__REST__Exceptions__Exception(
|
407 |
$this->messages->get_message( 'error-ticket-post' ),
|
408 |
'error-ticket-post',
|
@@ -419,8 +420,8 @@ class Tribe__Tickets__REST__V1__Post_Repository
|
|
419 |
$data['date_utc'] = $ticket_post->post_date_gmt;
|
420 |
$data['modified'] = $ticket_post->post_modified;
|
421 |
$data['modified_utc'] = $ticket_post->post_modified_gmt;
|
422 |
-
$data['title'] = $
|
423 |
-
$data['description'] = $
|
424 |
|
425 |
}
|
426 |
|
401 |
protected function add_ticket_post_data( &$data ) {
|
402 |
$ticket_id = $data['id'];
|
403 |
$ticket_post = get_post( $ticket_id );
|
404 |
+
$ticket = $this->get_ticket_object( $ticket_id );
|
405 |
|
406 |
+
if ( ! $ticket_post instanceof WP_Post || $ticket instanceof WP_Error ) {
|
407 |
throw new Tribe__REST__Exceptions__Exception(
|
408 |
$this->messages->get_message( 'error-ticket-post' ),
|
409 |
'error-ticket-post',
|
420 |
$data['date_utc'] = $ticket_post->post_date_gmt;
|
421 |
$data['modified'] = $ticket_post->post_modified;
|
422 |
$data['modified_utc'] = $ticket_post->post_modified_gmt;
|
423 |
+
$data['title'] = $ticket->name;
|
424 |
+
$data['description'] = $ticket->description;
|
425 |
|
426 |
}
|
427 |
|
src/Tribe/RSVP.php
CHANGED
@@ -1279,7 +1279,7 @@ class Tribe__Tickets__RSVP extends Tribe__Tickets__Tickets {
|
|
1279 |
$ticket_product = $ticket_product->ID;
|
1280 |
}
|
1281 |
|
1282 |
-
if ( null ===
|
1283 |
return false;
|
1284 |
}
|
1285 |
|
1279 |
$ticket_product = $ticket_product->ID;
|
1280 |
}
|
1281 |
|
1282 |
+
if ( null === get_post( $ticket_product ) ) {
|
1283 |
return false;
|
1284 |
}
|
1285 |
|
src/Tribe/Tickets.php
CHANGED
@@ -568,7 +568,7 @@ if ( ! class_exists( 'Tribe__Tickets__Tickets' ) ) {
|
|
568 |
* This stub method should be treated as if it were an abstract method - ie, the
|
569 |
* concrete class ought to provide the implementation.
|
570 |
*
|
571 |
-
* @param $
|
572 |
*
|
573 |
* @return bool|WP_Post
|
574 |
*/
|
@@ -577,7 +577,7 @@ if ( ! class_exists( 'Tribe__Tickets__Tickets' ) ) {
|
|
577 |
$ticket_product = $ticket_product->ID;
|
578 |
}
|
579 |
|
580 |
-
if ( null ===
|
581 |
return false;
|
582 |
}
|
583 |
|
@@ -613,9 +613,12 @@ if ( ! class_exists( 'Tribe__Tickets__Tickets' ) ) {
|
|
613 |
* @param int $post_id
|
614 |
* @param int $ticket
|
615 |
* @param array $raw_data
|
616 |
-
*
|
|
|
617 |
*/
|
618 |
-
public function save_ticket( $post_id, $ticket, $raw_data = [] ) {
|
|
|
|
|
619 |
|
620 |
/**
|
621 |
* Returns all the tickets for an event.
|
568 |
* This stub method should be treated as if it were an abstract method - ie, the
|
569 |
* concrete class ought to provide the implementation.
|
570 |
*
|
571 |
+
* @param $ticket_product
|
572 |
*
|
573 |
* @return bool|WP_Post
|
574 |
*/
|
577 |
$ticket_product = $ticket_product->ID;
|
578 |
}
|
579 |
|
580 |
+
if ( null === get_post( $ticket_product ) ) {
|
581 |
return false;
|
582 |
}
|
583 |
|
613 |
* @param int $post_id
|
614 |
* @param int $ticket
|
615 |
* @param array $raw_data
|
616 |
+
*
|
617 |
+
* @return int|false The updated/created ticket post ID or false if no ticket ID.
|
618 |
*/
|
619 |
+
public function save_ticket( $post_id, $ticket, $raw_data = [] ) {
|
620 |
+
return false;
|
621 |
+
}
|
622 |
|
623 |
/**
|
624 |
* Returns all the tickets for an event.
|
src/Tribe/Tickets_Handler.php
CHANGED
@@ -1154,13 +1154,21 @@ class Tribe__Tickets__Tickets_Handler {
|
|
1154 |
}
|
1155 |
|
1156 |
/**
|
1157 |
-
* Gets the
|
|
|
|
|
|
|
|
|
|
|
1158 |
*
|
1159 |
* @since 4.8.1
|
|
|
|
|
1160 |
*
|
1161 |
-
* @param
|
1162 |
*
|
1163 |
-
* @return int
|
|
|
1164 |
*/
|
1165 |
public function get_ticket_max_purchase( $ticket_id ) {
|
1166 |
$event = tribe_events_get_ticket_event( $ticket_id );
|
@@ -1170,14 +1178,28 @@ class Tribe__Tickets__Tickets_Handler {
|
|
1170 |
}
|
1171 |
|
1172 |
$provider = tribe_tickets_get_ticket_provider( $ticket_id );
|
1173 |
-
|
|
|
1174 |
return 0;
|
1175 |
}
|
1176 |
|
1177 |
-
/** @var Tribe__Tickets__Ticket_Object $ticket */
|
1178 |
$ticket = $provider->get_ticket( $event, $ticket_id );
|
1179 |
|
1180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1181 |
|
1182 |
/**
|
1183 |
* Allows filtering the quantity available displayed below the ticket
|
@@ -1187,12 +1209,62 @@ class Tribe__Tickets__Tickets_Handler {
|
|
1187 |
*
|
1188 |
* @since 4.8.1
|
1189 |
*
|
1190 |
-
* @param int $
|
1191 |
-
* @param Tribe__Tickets__Ticket_Object $ticket
|
1192 |
-
* @param WP_Post $event
|
1193 |
-
* @param int $ticket_id
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1194 |
*/
|
1195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1196 |
}
|
1197 |
|
1198 |
/**
|
1154 |
}
|
1155 |
|
1156 |
/**
|
1157 |
+
* Gets the maximum quantity able to be purchased in a single Add to Cart action for a given ticket.
|
1158 |
+
*
|
1159 |
+
* If a ticket's actual ticket stock available is Unlimited, this will return the maximum allowed to be purchased
|
1160 |
+
* in a single action (i.e. always zero or greater).
|
1161 |
+
*
|
1162 |
+
* @see \Tribe__Tickets__Ticket_Object::available() The actual ticket stock available, allowing -1 for Unlimited.
|
1163 |
*
|
1164 |
* @since 4.8.1
|
1165 |
+
* @since 4.11.5 Return a zero or positive integer and add a maximum able to be purchased in a single action,
|
1166 |
+
* for sanity and performance reasons.
|
1167 |
*
|
1168 |
+
* @param int|string $ticket_id Ticket from which to fetch purchase max.
|
1169 |
*
|
1170 |
+
* @return int A non-negative integer of how many tickets can be purchased in a single "add to cart" type of action
|
1171 |
+
* (allows zero but not `-1` for Unlimited). If oversold, will be corrected to zero.
|
1172 |
*/
|
1173 |
public function get_ticket_max_purchase( $ticket_id ) {
|
1174 |
$event = tribe_events_get_ticket_event( $ticket_id );
|
1178 |
}
|
1179 |
|
1180 |
$provider = tribe_tickets_get_ticket_provider( $ticket_id );
|
1181 |
+
|
1182 |
+
if ( ! $provider instanceof Tribe__Tickets__Tickets ) {
|
1183 |
return 0;
|
1184 |
}
|
1185 |
|
|
|
1186 |
$ticket = $provider->get_ticket( $event, $ticket_id );
|
1187 |
|
1188 |
+
if ( ! $ticket instanceof Tribe__Tickets__Ticket_Object ) {
|
1189 |
+
return 0;
|
1190 |
+
}
|
1191 |
+
|
1192 |
+
$max_at_a_time = $this->get_max_qty_limit_per_transaction( $ticket );
|
1193 |
+
|
1194 |
+
// The actual ticket stock, not limited by Max At A Time.
|
1195 |
+
$stock_available = $ticket->available();
|
1196 |
+
|
1197 |
+
// Change Unlimited to Max At A Time.
|
1198 |
+
if ( - 1 === $stock_available ) {
|
1199 |
+
$stock_available = $max_at_a_time;
|
1200 |
+
}
|
1201 |
+
|
1202 |
+
$available_at_a_time = min( $stock_available, $max_at_a_time );
|
1203 |
|
1204 |
/**
|
1205 |
* Allows filtering the quantity available displayed below the ticket
|
1209 |
*
|
1210 |
* @since 4.8.1
|
1211 |
*
|
1212 |
+
* @param int $available_at_a_time Max purchase quantity, as restricted by Max At A Time.
|
1213 |
+
* @param Tribe__Tickets__Ticket_Object $ticket Ticket object.
|
1214 |
+
* @param WP_Post $event Event post.
|
1215 |
+
* @param int $ticket_id Raw ticket ID.
|
1216 |
+
*/
|
1217 |
+
$available_at_a_time = apply_filters( 'tribe_tickets_get_ticket_max_purchase', $available_at_a_time, $ticket, $event, $ticket_id );
|
1218 |
+
|
1219 |
+
// Protect against filters passing `-1` as unlimited (from filters not yet updated for logic from version 4.11.5).
|
1220 |
+
if ( - 1 === $available_at_a_time ) {
|
1221 |
+
$available_at_a_time = $max_at_a_time;
|
1222 |
+
}
|
1223 |
+
|
1224 |
+
// If somehow oversold, set max allowed to zero.
|
1225 |
+
if ( 0 > $available_at_a_time ) {
|
1226 |
+
$available_at_a_time = 0;
|
1227 |
+
}
|
1228 |
+
|
1229 |
+
return $available_at_a_time;
|
1230 |
+
}
|
1231 |
+
|
1232 |
+
/**
|
1233 |
+
* Get the maximum quantity allowed to be added to cart in a single action, for performance and sanity reasons.
|
1234 |
+
*
|
1235 |
+
* @since 4.11.5
|
1236 |
+
*
|
1237 |
+
* @param Tribe__Tickets__Ticket_Object $ticket Ticket object.
|
1238 |
+
*
|
1239 |
+
* @return int
|
1240 |
+
*/
|
1241 |
+
private function get_max_qty_limit_per_transaction( Tribe__Tickets__Ticket_Object $ticket ) {
|
1242 |
+
$default_max = 100;
|
1243 |
+
|
1244 |
+
/**
|
1245 |
+
* Cap the amount of tickets able to be purchased at a single time (single "add to cart" action)
|
1246 |
+
* for sanity and performance reasons.
|
1247 |
+
*
|
1248 |
+
* Anything less than `1` will be ignored and reset to the default.
|
1249 |
+
*
|
1250 |
+
* @since 4.11.5
|
1251 |
+
*
|
1252 |
+
* @param int $default_max Maximum quantity allowed at one time (only applicable if
|
1253 |
+
* the ticket stock available is greater).
|
1254 |
+
* @param Tribe__Tickets__Ticket_Object $ticket Ticket object.
|
1255 |
+
*
|
1256 |
+
* @return int
|
1257 |
*/
|
1258 |
+
$max_at_a_time = absint(
|
1259 |
+
apply_filters( 'tribe_tickets_get_ticket_default_max_purchase', $default_max, $ticket )
|
1260 |
+
);
|
1261 |
+
|
1262 |
+
// Don't allow less than 1.
|
1263 |
+
if ( 1 > $max_at_a_time ) {
|
1264 |
+
$max_at_a_time = $default_max;
|
1265 |
+
}
|
1266 |
+
|
1267 |
+
return $max_at_a_time;
|
1268 |
}
|
1269 |
|
1270 |
/**
|
src/resources/css/freemius.css
ADDED
@@ -0,0 +1,265 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* This CSS file was auto-generated via PostCSS
|
3 |
+
*
|
4 |
+
* Contributors should avoid editing this file, but instead edit the associated
|
5 |
+
* src/resources/postcss/ file. For more information, check out our engineering
|
6 |
+
* docs on how we handle CSS in our engineering docs.
|
7 |
+
*
|
8 |
+
* @see: http://moderntribe.github.io/products-engineering/css/
|
9 |
+
*/
|
10 |
+
|
11 |
+
.events-cal #fs_connect, .toplevel_page_tribe-common #fs_connect, .toplevel_page_tribe-help #fs_connect, .toplevel_page_tribe-app-shop #fs_connect {
|
12 |
+
background-color: #ffffff;
|
13 |
+
margin: 20px 20px 0 2px;
|
14 |
+
max-width: 1200px;
|
15 |
+
position: relative;
|
16 |
+
width: auto;
|
17 |
+
}
|
18 |
+
|
19 |
+
.events-cal #fs_connect .fs-visual, .toplevel_page_tribe-common #fs_connect .fs-visual, .toplevel_page_tribe-help #fs_connect .fs-visual, .toplevel_page_tribe-app-shop #fs_connect .fs-visual {
|
20 |
+
-webkit-align-content: center;
|
21 |
+
align-content: center;
|
22 |
+
-webkit-align-items: center;
|
23 |
+
align-items: center;
|
24 |
+
background-color: transparent;
|
25 |
+
display: -webkit-flex;
|
26 |
+
display: flex;
|
27 |
+
margin: 0 35px;
|
28 |
+
padding: 20px 0 0;
|
29 |
+
}
|
30 |
+
|
31 |
+
.events-cal #fs_connect .fs-visual .fs-site-icon,
|
32 |
+
.events-cal #fs_connect .fs-visual .fs-plugin-icon,
|
33 |
+
.events-cal #fs_connect .fs-visual .fs-first.dashicons-plus,
|
34 |
+
.events-cal #fs_connect .fs-visual .fs-second.dashicons-plus,
|
35 |
+
.events-cal #fs_connect .fs-visual .fs-connect-logo,
|
36 |
+
.toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon,
|
37 |
+
.toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon,
|
38 |
+
.toplevel_page_tribe-common #fs_connect .fs-visual .fs-first.dashicons-plus,
|
39 |
+
.toplevel_page_tribe-common #fs_connect .fs-visual .fs-second.dashicons-plus,
|
40 |
+
.toplevel_page_tribe-common #fs_connect .fs-visual .fs-connect-logo,
|
41 |
+
.toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon,
|
42 |
+
.toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon,
|
43 |
+
.toplevel_page_tribe-help #fs_connect .fs-visual .fs-first.dashicons-plus,
|
44 |
+
.toplevel_page_tribe-help #fs_connect .fs-visual .fs-second.dashicons-plus,
|
45 |
+
.toplevel_page_tribe-help #fs_connect .fs-visual .fs-connect-logo,
|
46 |
+
.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon,
|
47 |
+
.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon,
|
48 |
+
.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-first.dashicons-plus,
|
49 |
+
.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-second.dashicons-plus,
|
50 |
+
.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-connect-logo {
|
51 |
+
border: 0;
|
52 |
+
bottom: auto;
|
53 |
+
left: auto;
|
54 |
+
margin: 0;
|
55 |
+
position: relative;
|
56 |
+
right: auto;
|
57 |
+
top: auto;
|
58 |
+
width: auto;
|
59 |
+
}
|
60 |
+
|
61 |
+
.events-cal #fs_connect .fs-visual .fs-site-icon,
|
62 |
+
.events-cal #fs_connect .fs-visual .fs-plugin-icon,
|
63 |
+
.toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon,
|
64 |
+
.toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon,
|
65 |
+
.toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon,
|
66 |
+
.toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon,
|
67 |
+
.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon,
|
68 |
+
.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon {
|
69 |
+
width: 60px;
|
70 |
+
}
|
71 |
+
|
72 |
+
.events-cal #fs_connect .fs-visual .dashicons-plus, .toplevel_page_tribe-common #fs_connect .fs-visual .dashicons-plus, .toplevel_page_tribe-help #fs_connect .fs-visual .dashicons-plus, .toplevel_page_tribe-app-shop #fs_connect .fs-visual .dashicons-plus {
|
73 |
+
color: #17a0d6;
|
74 |
+
padding-left: 4px;
|
75 |
+
padding-right: 4px;
|
76 |
+
width: auto;
|
77 |
+
}
|
78 |
+
|
79 |
+
.events-cal #fs_connect .fs-visual .fs-site-icon .dashicons, .toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon .dashicons, .toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon .dashicons, .toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon .dashicons {
|
80 |
+
visibility: hidden;
|
81 |
+
}
|
82 |
+
|
83 |
+
.events-cal #fs_connect .fs-visual .fs-site-icon::before, .toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon::before, .toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon::before, .toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon::before {
|
84 |
+
background-image: url( ../images/event-tickets.svg );
|
85 |
+
background-position: center center;
|
86 |
+
background-repeat: no-repeat;
|
87 |
+
background-size: 85%;
|
88 |
+
content: '';
|
89 |
+
display: block;
|
90 |
+
height: 100%;
|
91 |
+
position: absolute;
|
92 |
+
width: 100%;
|
93 |
+
}
|
94 |
+
|
95 |
+
.events-cal #fs_connect .fs-visual .fs-plugin-icon img, .toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon img, .toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon img, .toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon img {
|
96 |
+
visibility: hidden;
|
97 |
+
}
|
98 |
+
|
99 |
+
.events-cal #fs_connect .fs-visual .fs-plugin-icon::before, .toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon::before, .toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon::before, .toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon::before {
|
100 |
+
background-image: url( ../icons/stethoscope.svg );
|
101 |
+
background-position: center center;
|
102 |
+
background-repeat: no-repeat;
|
103 |
+
background-size: 75%;
|
104 |
+
content: '';
|
105 |
+
display: block;
|
106 |
+
height: 100%;
|
107 |
+
position: absolute;
|
108 |
+
width: 100%;
|
109 |
+
}
|
110 |
+
|
111 |
+
.events-cal #fs_connect .fs-visual .fs-connect-logo, .toplevel_page_tribe-common #fs_connect .fs-visual .fs-connect-logo, .toplevel_page_tribe-help #fs_connect .fs-visual .fs-connect-logo, .toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-connect-logo {
|
112 |
+
background-image: url( ../icons/mailplane.svg );
|
113 |
+
background-position: center center;
|
114 |
+
background-repeat: no-repeat;
|
115 |
+
background-size: 80%;
|
116 |
+
box-sizing: border-box;
|
117 |
+
-moz-box-sizing: border-box;
|
118 |
+
display: block;
|
119 |
+
height: 80px;
|
120 |
+
padding-left: 60px;
|
121 |
+
width: 60px;
|
122 |
+
}
|
123 |
+
|
124 |
+
.events-cal #fs_connect .fs-content, .toplevel_page_tribe-common #fs_connect .fs-content, .toplevel_page_tribe-help #fs_connect .fs-content, .toplevel_page_tribe-app-shop #fs_connect .fs-content {
|
125 |
+
padding: 20px 35px;
|
126 |
+
}
|
127 |
+
|
128 |
+
.events-cal #fs_connect .fs-content h3, .toplevel_page_tribe-common #fs_connect .fs-content h3, .toplevel_page_tribe-help #fs_connect .fs-content h3, .toplevel_page_tribe-app-shop #fs_connect .fs-content h3 {
|
129 |
+
font-size: 1.7em;
|
130 |
+
margin-top: 0;
|
131 |
+
}
|
132 |
+
|
133 |
+
.events-cal #fs_connect .fs-content p, .toplevel_page_tribe-common #fs_connect .fs-content p, .toplevel_page_tribe-help #fs_connect .fs-content p, .toplevel_page_tribe-app-shop #fs_connect .fs-content p {
|
134 |
+
margin-bottom: 20px;
|
135 |
+
}
|
136 |
+
|
137 |
+
.events-cal #fs_connect .fs-content p:first-child,
|
138 |
+
.events-cal #fs_connect .fs-content p:last-child,
|
139 |
+
.toplevel_page_tribe-common #fs_connect .fs-content p:first-child,
|
140 |
+
.toplevel_page_tribe-common #fs_connect .fs-content p:last-child,
|
141 |
+
.toplevel_page_tribe-help #fs_connect .fs-content p:first-child,
|
142 |
+
.toplevel_page_tribe-help #fs_connect .fs-content p:last-child,
|
143 |
+
.toplevel_page_tribe-app-shop #fs_connect .fs-content p:first-child,
|
144 |
+
.toplevel_page_tribe-app-shop #fs_connect .fs-content p:last-child {
|
145 |
+
margin-bottom: 0;
|
146 |
+
}
|
147 |
+
|
148 |
+
.events-cal #fs_connect .fs-content .tribe-powered-by-freemius, .toplevel_page_tribe-common #fs_connect .fs-content .tribe-powered-by-freemius, .toplevel_page_tribe-help #fs_connect .fs-content .tribe-powered-by-freemius, .toplevel_page_tribe-app-shop #fs_connect .fs-content .tribe-powered-by-freemius {
|
149 |
+
background-image: url( ../icons/freemius-logo.svg );
|
150 |
+
background-position: right center;
|
151 |
+
background-repeat: no-repeat;
|
152 |
+
background-size: 100px;
|
153 |
+
font-size: 1.1em;
|
154 |
+
font-style: italic;
|
155 |
+
height: 30px;
|
156 |
+
line-height: 30px;
|
157 |
+
position: absolute;
|
158 |
+
right: 45px;
|
159 |
+
top: 25px;
|
160 |
+
width: 184px;
|
161 |
+
}
|
162 |
+
|
163 |
+
.events-cal #fs_connect .fs-actions, .toplevel_page_tribe-common #fs_connect .fs-actions, .toplevel_page_tribe-help #fs_connect .fs-actions, .toplevel_page_tribe-app-shop #fs_connect .fs-actions {
|
164 |
+
background-color: #f3f3f3;
|
165 |
+
display: -webkit-flex;
|
166 |
+
display: flex;
|
167 |
+
-webkit-flex-flow: row wrap;
|
168 |
+
flex-flow: row wrap;
|
169 |
+
padding: 20px 35px;
|
170 |
+
}
|
171 |
+
|
172 |
+
.events-cal #fs_connect .fs-actions form, .toplevel_page_tribe-common #fs_connect .fs-actions form, .toplevel_page_tribe-help #fs_connect .fs-actions form, .toplevel_page_tribe-app-shop #fs_connect .fs-actions form {
|
173 |
+
float: none;
|
174 |
+
margin-right: 15px;
|
175 |
+
-webkit-order: 1;
|
176 |
+
order: 1;
|
177 |
+
}
|
178 |
+
|
179 |
+
.events-cal #fs_connect .fs-actions #skip_activation, .toplevel_page_tribe-common #fs_connect .fs-actions #skip_activation, .toplevel_page_tribe-help #fs_connect .fs-actions #skip_activation, .toplevel_page_tribe-app-shop #fs_connect .fs-actions #skip_activation {
|
180 |
+
float: none;
|
181 |
+
-webkit-order: 2;
|
182 |
+
order: 2;
|
183 |
+
}
|
184 |
+
|
185 |
+
.events-cal #fs_connect .fs-actions .button, .toplevel_page_tribe-common #fs_connect .fs-actions .button, .toplevel_page_tribe-help #fs_connect .fs-actions .button, .toplevel_page_tribe-app-shop #fs_connect .fs-actions .button {
|
186 |
+
height: auto;
|
187 |
+
padding: 7px 35px;
|
188 |
+
}
|
189 |
+
|
190 |
+
.events-cal #fs_connect .fs-actions .button.button-primary, .toplevel_page_tribe-common #fs_connect .fs-actions .button.button-primary, .toplevel_page_tribe-help #fs_connect .fs-actions .button.button-primary, .toplevel_page_tribe-app-shop #fs_connect .fs-actions .button.button-primary {
|
191 |
+
padding-left: 35px;
|
192 |
+
padding-right: 35px;
|
193 |
+
}
|
194 |
+
|
195 |
+
.events-cal #fs_connect .fs-permissions, .toplevel_page_tribe-common #fs_connect .fs-permissions, .toplevel_page_tribe-help #fs_connect .fs-permissions, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions {
|
196 |
+
padding: 0;
|
197 |
+
position: relative;
|
198 |
+
}
|
199 |
+
|
200 |
+
.events-cal #fs_connect .fs-permissions .fs-trigger, .toplevel_page_tribe-common #fs_connect .fs-permissions .fs-trigger, .toplevel_page_tribe-help #fs_connect .fs-permissions .fs-trigger, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions .fs-trigger {
|
201 |
+
left: 380px;
|
202 |
+
padding: 10px;
|
203 |
+
position: absolute;
|
204 |
+
top: -65px;
|
205 |
+
}
|
206 |
+
|
207 |
+
.events-cal #fs_connect .fs-permissions.fs-open, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open {
|
208 |
+
box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
|
209 |
+
-moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
|
210 |
+
-webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
|
211 |
+
padding: 20px 35px;
|
212 |
+
position: absolute;
|
213 |
+
}
|
214 |
+
|
215 |
+
.events-cal #fs_connect .fs-permissions.fs-open ul, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul {
|
216 |
+
display: -webkit-flex;
|
217 |
+
display: flex;
|
218 |
+
-webkit-flex-wrap: wrap;
|
219 |
+
flex-wrap: wrap;
|
220 |
+
margin: 0;
|
221 |
+
}
|
222 |
+
|
223 |
+
.events-cal #fs_connect .fs-permissions.fs-open ul li, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul li, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul li, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul li {
|
224 |
+
-webkit-flex: 0 50%;
|
225 |
+
flex: 0 50%;
|
226 |
+
padding-bottom: 10px;
|
227 |
+
}
|
228 |
+
|
229 |
+
.events-cal #fs_connect .fs-permissions.fs-open ul li .dashicons, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul li .dashicons, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul li .dashicons, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul li .dashicons {
|
230 |
+
padding-right: 15px;
|
231 |
+
}
|
232 |
+
|
233 |
+
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons {
|
234 |
+
background-position: left center;
|
235 |
+
background-repeat: no-repeat;
|
236 |
+
background-size: 65%;
|
237 |
+
}
|
238 |
+
|
239 |
+
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons::before, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons::before, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons::before, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons::before {
|
240 |
+
content: '';
|
241 |
+
}
|
242 |
+
|
243 |
+
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users {
|
244 |
+
background-image: url( ../icons/user.svg );
|
245 |
+
}
|
246 |
+
|
247 |
+
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings {
|
248 |
+
background-image: url( ../icons/settings.svg );
|
249 |
+
}
|
250 |
+
|
251 |
+
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial {
|
252 |
+
background-image: url( ../icons/megaphone.svg );
|
253 |
+
}
|
254 |
+
|
255 |
+
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins {
|
256 |
+
background-image: url( ../icons/plug.svg );
|
257 |
+
}
|
258 |
+
|
259 |
+
.events-cal #fs_connect .fs-terms, .toplevel_page_tribe-common #fs_connect .fs-terms, .toplevel_page_tribe-help #fs_connect .fs-terms, .toplevel_page_tribe-app-shop #fs_connect .fs-terms {
|
260 |
+
background-color: transparent;
|
261 |
+
bottom: 30px;
|
262 |
+
position: absolute;
|
263 |
+
right: 10px;
|
264 |
+
width: 240px;
|
265 |
+
}
|
src/resources/css/freemius.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.events-cal #fs_connect,.toplevel_page_tribe-app-shop #fs_connect,.toplevel_page_tribe-common #fs_connect,.toplevel_page_tribe-help #fs_connect{background-color:#fff;margin:20px 20px 0 2px;max-width:1200px;position:relative;width:auto}.events-cal #fs_connect .fs-visual,.toplevel_page_tribe-app-shop #fs_connect .fs-visual,.toplevel_page_tribe-common #fs_connect .fs-visual,.toplevel_page_tribe-help #fs_connect .fs-visual{align-content:center;align-items:center;background-color:transparent;display:flex;margin:0 35px;padding:20px 0 0}.events-cal #fs_connect .fs-visual .fs-connect-logo,.events-cal #fs_connect .fs-visual .fs-first.dashicons-plus,.events-cal #fs_connect .fs-visual .fs-plugin-icon,.events-cal #fs_connect .fs-visual .fs-second.dashicons-plus,.events-cal #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-first.dashicons-plus,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-second.dashicons-plus,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-first.dashicons-plus,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-second.dashicons-plus,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-first.dashicons-plus,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-second.dashicons-plus,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon{border:0;bottom:auto;left:auto;margin:0;position:relative;right:auto;top:auto;width:auto}.events-cal #fs_connect .fs-visual .fs-plugin-icon,.events-cal #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon{width:60px}.events-cal #fs_connect .fs-visual .dashicons-plus,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .dashicons-plus,.toplevel_page_tribe-common #fs_connect .fs-visual .dashicons-plus,.toplevel_page_tribe-help #fs_connect .fs-visual .dashicons-plus{color:#17a0d6;padding-left:4px;padding-right:4px;width:auto}.events-cal #fs_connect .fs-visual .fs-site-icon .dashicons,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon .dashicons,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon .dashicons,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon .dashicons{visibility:hidden}.events-cal #fs_connect .fs-visual .fs-site-icon:before,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon:before,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon:before,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon:before{background-image:url(../images/event-tickets.svg);background-position:50%;background-repeat:no-repeat;background-size:85%;content:"";display:block;height:100%;position:absolute;width:100%}.events-cal #fs_connect .fs-visual .fs-plugin-icon img,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon img,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon img,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon img{visibility:hidden}.events-cal #fs_connect .fs-visual .fs-plugin-icon:before,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon:before,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon:before,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon:before{background-image:url(../icons/stethoscope.svg);background-position:50%;background-repeat:no-repeat;background-size:75%;content:"";display:block;height:100%;position:absolute;width:100%}.events-cal #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-connect-logo{background-image:url(../icons/mailplane.svg);background-position:50%;background-repeat:no-repeat;background-size:80%;box-sizing:border-box;-moz-box-sizing:border-box;display:block;height:80px;padding-left:60px;width:60px}.events-cal #fs_connect .fs-content,.toplevel_page_tribe-app-shop #fs_connect .fs-content,.toplevel_page_tribe-common #fs_connect .fs-content,.toplevel_page_tribe-help #fs_connect .fs-content{padding:20px 35px}.events-cal #fs_connect .fs-content h3,.toplevel_page_tribe-app-shop #fs_connect .fs-content h3,.toplevel_page_tribe-common #fs_connect .fs-content h3,.toplevel_page_tribe-help #fs_connect .fs-content h3{font-size:1.7em;margin-top:0}.events-cal #fs_connect .fs-content p,.toplevel_page_tribe-app-shop #fs_connect .fs-content p,.toplevel_page_tribe-common #fs_connect .fs-content p,.toplevel_page_tribe-help #fs_connect .fs-content p{margin-bottom:20px}.events-cal #fs_connect .fs-content p:first-child,.events-cal #fs_connect .fs-content p:last-child,.toplevel_page_tribe-app-shop #fs_connect .fs-content p:first-child,.toplevel_page_tribe-app-shop #fs_connect .fs-content p:last-child,.toplevel_page_tribe-common #fs_connect .fs-content p:first-child,.toplevel_page_tribe-common #fs_connect .fs-content p:last-child,.toplevel_page_tribe-help #fs_connect .fs-content p:first-child,.toplevel_page_tribe-help #fs_connect .fs-content p:last-child{margin-bottom:0}.events-cal #fs_connect .fs-content .tribe-powered-by-freemius,.toplevel_page_tribe-app-shop #fs_connect .fs-content .tribe-powered-by-freemius,.toplevel_page_tribe-common #fs_connect .fs-content .tribe-powered-by-freemius,.toplevel_page_tribe-help #fs_connect .fs-content .tribe-powered-by-freemius{background-image:url(../icons/freemius-logo.svg);background-position:100%;background-repeat:no-repeat;background-size:100px;font-size:1.1em;font-style:italic;height:30px;line-height:30px;position:absolute;right:45px;top:25px;width:184px}.events-cal #fs_connect .fs-actions,.toplevel_page_tribe-app-shop #fs_connect .fs-actions,.toplevel_page_tribe-common #fs_connect .fs-actions,.toplevel_page_tribe-help #fs_connect .fs-actions{background-color:#f3f3f3;display:flex;flex-flow:row wrap;padding:20px 35px}.events-cal #fs_connect .fs-actions form,.toplevel_page_tribe-app-shop #fs_connect .fs-actions form,.toplevel_page_tribe-common #fs_connect .fs-actions form,.toplevel_page_tribe-help #fs_connect .fs-actions form{float:none;margin-right:15px;order:1}.events-cal #fs_connect .fs-actions #skip_activation,.toplevel_page_tribe-app-shop #fs_connect .fs-actions #skip_activation,.toplevel_page_tribe-common #fs_connect .fs-actions #skip_activation,.toplevel_page_tribe-help #fs_connect .fs-actions #skip_activation{float:none;order:2}.events-cal #fs_connect .fs-actions .button,.toplevel_page_tribe-app-shop #fs_connect .fs-actions .button,.toplevel_page_tribe-common #fs_connect .fs-actions .button,.toplevel_page_tribe-help #fs_connect .fs-actions .button{height:auto;padding:7px 35px}.events-cal #fs_connect .fs-actions .button.button-primary,.toplevel_page_tribe-app-shop #fs_connect .fs-actions .button.button-primary,.toplevel_page_tribe-common #fs_connect .fs-actions .button.button-primary,.toplevel_page_tribe-help #fs_connect .fs-actions .button.button-primary{padding-left:35px;padding-right:35px}.events-cal #fs_connect .fs-permissions,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions,.toplevel_page_tribe-common #fs_connect .fs-permissions,.toplevel_page_tribe-help #fs_connect .fs-permissions{padding:0;position:relative}.events-cal #fs_connect .fs-permissions .fs-trigger,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions .fs-trigger,.toplevel_page_tribe-common #fs_connect .fs-permissions .fs-trigger,.toplevel_page_tribe-help #fs_connect .fs-permissions .fs-trigger{left:380px;padding:10px;position:absolute;top:-65px}.events-cal #fs_connect .fs-permissions.fs-open,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open{box-shadow:0 1px 2px rgba(0,0,0,.3);-moz-box-shadow:0 1px 2px rgba(0,0,0,.3);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);padding:20px 35px;position:absolute}.events-cal #fs_connect .fs-permissions.fs-open ul,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul{display:flex;flex-wrap:wrap;margin:0}.events-cal #fs_connect .fs-permissions.fs-open ul li,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul li,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul li,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul li{flex:0 50%;padding-bottom:10px}.events-cal #fs_connect .fs-permissions.fs-open ul li .dashicons,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul li .dashicons,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul li .dashicons,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul li .dashicons{padding-right:15px}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons{background-position:0;background-repeat:no-repeat;background-size:65%}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons:before,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons:before,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons:before,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons:before{content:""}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users{background-image:url(../icons/user.svg)}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings{background-image:url(../icons/settings.svg)}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial{background-image:url(../icons/megaphone.svg)}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins{background-image:url(../icons/plug.svg)}.events-cal #fs_connect .fs-terms,.toplevel_page_tribe-app-shop #fs_connect .fs-terms,.toplevel_page_tribe-common #fs_connect .fs-terms,.toplevel_page_tribe-help #fs_connect .fs-terms{background-color:transparent;bottom:30px;position:absolute;right:10px;width:240px}
|
src/resources/icons/freemius-logo.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 330.2 78.9"><path fill="#72AF00" d="M299.3 13.2c-1.9 0-2.6-1-2.3-3l.9-5.2c.4-2 1.6-3 3.6-3h7.3c2 0 2.8 1 2.4 3l-.9 5.2c-.4 2-1.5 3-3.5 3h-7.5zM286.2 77c-1.9 0-2.6-1-2.3-3l.9-5.2c.4-2 1.6-3 3.6-3h7.3c2 0 2.8 1 2.4 3l-.9 5.2c-.4 2-1.5 3-3.5 3h-7.5z"/><path fill="#333" d="M228.1 16.9h-5.6c-1.9 0-3.5 1.3-3.8 3.2l-5.2 29.6H208l3.9-22c1.3-7.2-1.6-10.8-8.7-10.8h-40c-7.1 0-11.3 3.6-12.5 10.7l-3.9 22h-22.7c-1.6 0-2.2-.8-1.9-2.3l.6-3.4c.6.4 1.4.5 2.3.5h9.8c6.6 0 11.3-3.5 12.5-10.5l1.2-6.7c1.2-6.9-1.5-10.4-8.1-10.4h-15.8c-7 0-11.1 3.6-12.4 10.7l-3.9 22.1H87.2c-1.6 0-2.2-.8-1.9-2.3l.6-3.4c.6.4 1.4.5 2.3.5h9.1c6.6 0 10.6-3.5 11.8-10.5l1.2-6.7c1.2-6.9-1.5-10.4-8.1-10.4H39.6l.1-.5c.4-2.1 1.6-3.1 3.6-3.1h5.8c1.8 0 3.3-1.3 3.6-3l1.4-8H39.4c-3.3 0-6.1.9-8.3 2.8-2.2 1.8-3.6 4.5-4.2 8l-8.7 49.4h13.4l5.8-33.1h11.8l-5.8 33.1h13.4l5.5-30.8c.2-1.4 1-2.2 2.3-2.3h10.5l-4 22.4c-1 5.9 3 10.7 9 10.7H153.3c2.6 0 4.8-1.9 5.2-4.4l4.5-25.3c.3-1.6 1.2-2.3 2.7-2.3h8.4L169 59.9c-.2 1.3.8 2.5 2.2 2.5h8.8c1.1 0 2-.8 2.2-1.8l5.3-30.2h8.5c1.6 0 2.2.8 1.9 2.3l-4.4 24.8c-.4 2.1.9 4.1 2.9 4.7v.2h25.7v-.1c1.6-.3 2.8-1.5 3.1-3.1l6.7-37.8c.4-2.3-1.4-4.5-3.8-4.5zM124.5 34.1l.6-3.1c.2-1 .8-1.5 1.8-1.5h5.6c1 0 1.5.5 1.3 1.5l-.6 3.1c-.2 1-.8 1.5-1.8 1.5h-5.6c-1 0-1.4-.5-1.3-1.5zm-36.8 0l.6-3.1c.2-1 .8-1.5 1.8-1.5H95c1 0 1.5.5 1.3 1.5l-.6 3.1c-.2 1-.8 1.5-1.8 1.5H89c-1.1 0-1.5-.5-1.3-1.5zM278.1 16.9L272 51.8c-1.2 7.1-5.3 10.6-12.3 10.6h-19.2c-7.2 0-10.3-3.4-9-10.3l6.2-35.2h13.4l-5.2 29.6c-.3 1.7.3 2.5 1.9 2.5h9.1c1.6 0 2.5-.8 2.7-2.3l5.3-29.8h13.2z"/><path fill="#29ABE2" d="M220.6 10.2l.9-5.2c.4-2 1.6-3 3.6-3h7.3c2 0 2.8 1 2.4 3l-.9 5.2c-.4 2-1.5 3-3.5 3h-7.6c-1.8 0-2.6-1-2.2-3z"/><path fill="#D4145A" d="M8.3 25.9l.9-5.2c.4-2 1.6-3 3.6-3h7.3c2 0 2.8 1 2.4 3l-.9 5.2c-.4 2-1.5 3-3.5 3h-7.6c-1.8 0-2.5-1-2.2-3z"/><path fill="#333" d="M274.6 62.5l2.2-12.7h25.7c.9 0 1.4-.5 1.6-1.4l.5-2.7c.1-.8-.2-1.2-1.1-1.2h-17c-3.5 0-5.8-.8-6.8-2.4-1-1.6-1.3-4.1-.7-7.5l1.2-6.9c1.2-7.1 5.4-10.6 12.4-10.6H322l-2.2 12.6h-25.4c-.9 0-1.4.5-1.6 1.4l-.5 2.7c-.1.8.2 1.2 1.1 1.2h17.1c6.4 0 9 3.3 7.9 9.8l-1.2 7.1c-1.3 7.1-5.1 10.7-11.5 10.7h-31.1z"/></svg>
|
src/resources/icons/mailplane.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg width="47" height="47" xmlns="http://www.w3.org/2000/svg"><g stroke-width="3" fill="none" fill-rule="evenodd"><path d="M44.613 2.387L21.406 25.594" stroke="#16A0D6"/><path stroke="#111" stroke-linecap="square" d="M44.613 2.387L30.689 42.613l-9.283-17.019-17.019-9.283z"/></g></svg>
|
src/resources/icons/megaphone.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><g stroke-width="2" fill="none" fill-rule="evenodd"><path d="M12.449 19l3.358 8.336A2.668 2.668 0 0114.33 30.8a2.667 2.667 0 01-3.467-1.478L6.667 19" stroke="#16A0D6"/><path d="M14 7H7a6 6 0 100 12h7l11 5V2L14 7z" stroke="#111" stroke-linecap="square"/><path d="M28 10a3 3 0 010 6" stroke="#16A0D6"/></g></svg>
|
src/resources/icons/plug.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><g stroke-width="2" fill="none" fill-rule="evenodd" stroke-linecap="square"><path d="M9 18h14v6a7 7 0 01-14 0v-6zM12 18v-4M20 18v-4" stroke="#111"/><path d="M4 25C-.641 18.812.184 10.109 5.907 4.904c5.722-5.205 14.464-5.205 20.186 0C31.816 10.109 32.641 18.812 28 25M8 10a10 10 0 0116 0" stroke="#16A0D6"/></g></svg>
|
src/resources/icons/settings.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg width="34" height="34" xmlns="http://www.w3.org/2000/svg"><g stroke-width="2" fill="none" fill-rule="evenodd" stroke-linecap="square"><path stroke="#111" d="M1 1h32v32H1z"/><path d="M8.467 17V5.267M8.467 28.733v-3.2M5.267 21.267h6.4v4.267h-6.4zM17 7.4V5.267M17 28.733v-12.8M13.8 11.667h6.4v4.267h-6.4zM25.533 17V5.267M25.533 28.733v-3.2M22.333 21.267h6.4v4.267h-6.4z" stroke="#16A0D6"/></g></svg>
|
src/resources/icons/stethoscope.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg width="47" height="47" xmlns="http://www.w3.org/2000/svg"><g transform="translate(1 1)" stroke-width="3" fill="none" fill-rule="evenodd" stroke-linecap="square"><path d="M14.5 30.5v2c0 6.6 5.4 12 12 12h0c6.6 0 12-5.4 12-12h0" stroke="#16A0D6"/><circle stroke="#16A0D6" cx="38.5" cy="26.5" r="6"/><path d="M20.5 2.5h5.7c1.2 0 2.2 1.1 2 2.3L25 27.1c-.3 2-2 3.4-4 3.4H8c-2 0-3.7-1.5-4-3.4L.8 4.8c-.1-1.2.8-2.3 2-2.3h5.7M8.5.5v4M20.5.5v4" stroke="#111"/></g></svg>
|
src/resources/icons/user.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg width="34" height="34" xmlns="http://www.w3.org/2000/svg"><g transform="translate(1 1)" stroke-width="2" fill="none" fill-rule="evenodd"><path d="M26.514 28.343c-.202-3.639-2.232-4.794-5.202-5.805-2.123-.723-2.807-2.915-3.026-4.252M13.714 19.2c-.22 1.218-.898 3.214-3.018 3.872-2.963.92-5.008 1.958-5.21 5.27" stroke="#16A0D6"/><path d="M15.543 19.2c-3.03 0-5.486-2.388-5.486-5.333v-2.134c0-2.945 2.456-5.333 5.486-5.333s5.486 2.388 5.486 5.333v2.134c0 2.945-2.456 5.333-5.486 5.333z" stroke="#16A0D6" stroke-linecap="square"/><circle stroke="#111" stroke-linecap="square" cx="16" cy="16" r="16"/></g></svg>
|
src/resources/images/event-tickets.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg height="158" viewBox="0 0 158 158" width="158" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><rect id="a" height="157" rx="12" width="157" y=".34272"/><mask id="b" fill="#fff"><use fill="#fff" fill-rule="evenodd" xlink:href="#a"/></mask></defs><g fill="none" fill-rule="evenodd" transform="translate(.222738 .126094)"><use fill="#263ad0" fill-rule="nonzero" xlink:href="#a"/><circle cx="137.30056" cy="137.223513" fill="#3d54ff" fill-rule="nonzero" mask="url(#b)" r="47.815606"/><path d="m129.698458 123.248574c-1.190996.483168-2.293247.743807-3.094618.700633-1.038024-.05783-1.481216-.51568-1.482816-.687841-.000799-.12259.386162-.506619 1.580889-.593499.187351-.013325.385095-.021853.588702-.021853.816295 0 1.724799.134317 2.407843.60256m2.227955 10.526552c-4.367164 1.204587-8.982174.093542-11.758855-2.832914-1.964918-2.070718-2.62371-4.662181-1.807948-7.109732 1.641118-4.924419 9.506116-7.880189 14.532605-7.880189.0541 0 .107933.000266.161233.001066 1.872974.023985 3.170038.476771 3.385105 1.182201.120459.394689-.164431 1.085728-.762195 1.847923-1.054814 1.345034-2.657555 2.564013-4.287746 3.458126-1.033493-1.133965-2.691401-1.649912-4.811688-1.497206-2.360406.17136-3.192424 1.316785-3.183896 2.331623.009327 1.106515 1.082263 2.285785 3.114872 2.398782 1.230172.067158 2.700462-.311807 4.176881-.957807.216666.85014.149508 1.96545-.20494 3.295294-.122857.460781.151107.934621.612155 1.057478.460515.122858.934355-.151106 1.057479-.612421.481835-1.806881.517546-3.322476.108732-4.526531 1.927607-1.081731 3.709438-2.518708 4.777843-3.880798 1.002579-1.278409 1.35756-2.42863 1.055613-3.418951-.219331-.719021-.735811-1.289335-1.513996-1.693885.05943-6.493047 1.210451-10.978005 2.246609-10.984134h.006397c.152172 0 .358178.034112.610555.28489.841879.836816 1.844991 3.583915 1.844991 11.919822 0 8.225043-.704097 15.227908-9.359806 17.617363m-8.244497-19.18386c-.001066-.021586.001599-.042907-.001066-.06476-.003731-.03118-.007462-.064227-.01146-.096207-.12419-1.773036.088479-3.170304.629211-3.919707.268633-.372036.605492-.57138 1.06041-.627345.634274-.076486 1.150221.087146 1.583553.503422.839214.8067 1.329044 2.550954 1.282406 4.459106-1.438842.354981-2.912064.860534-4.311731 1.511332-.110332-.61935-.186551-1.209385-.231323-1.765841m7.443659-3.01067c.318203-.346185.724085-.514614 1.241898-.514614.822957 0 1.180603.269166 1.378347.471708.472774.484233.72755 1.423385.762461 2.791072-.442659-.061295-.919964-.097007-1.432713-.103403-.058364-.000799-.116461-.001066-.175358-.001066-.780051 0-1.630191.067692-2.517642.196679-.038376-1.253358.223595-2.274592.743007-2.840376m9.534099-8.568296c-.518346-.515414-1.151021-.787513-1.8306-.787513h-.015191c-2.276724.013592-3.062105 3.410423-3.455195 5.964309-.115129.749402-.20414 1.514262-.273431 2.254604-.033845-.037843-.067158-.077019-.102603-.113263-.642802-.658526-1.52279-.992452-2.615181-.992452-1.000181 0-1.869776.37097-2.51471 1.073468-.183886.20041-.341922.432533-.484767.681445-.28489-.749669-.68331-1.428449-1.227773-1.952125-.809099-.777385-1.84286-1.113977-2.992015-.972731-.926093.113796-1.704545.573778-2.25114 1.331176-.002132.003465-.003997.007196-.006396.010127-.946881-4.72241-2.7471-10.4247474-5.888089-10.0985493-.772855.081283-1.455899.4972922-1.974777 1.2024553-2.423034 3.293962-1.286138 13.088966-.232656 18.357171.082349.41068.442925.695037.846409.695037.056232 0 .113263-.005597.170561-.017056.467711-.093542.771256-.548727.677714-1.016704-1.764241-8.821207-1.370618-15.226309-.069823-16.994281.305677-.415477.582039-.489031.763527-.507953 1.73386-.180421 3.869871 5.877696 4.771447 13.523896.072222.946881.215599 1.833532.353914 2.522705.000533.003198.002132.00613.002665.009328-2.596526 1.496674-4.7392 3.54314-5.591473 6.100757-1.024432 3.072498-.224661 6.296903 2.193843 8.845725 2.361205 2.48806 5.844915 3.848551 9.501852 3.848551 1.315719 0 2.654357-.176424 3.970342-.539666 9.815525-2.709256 10.628355-10.667264 10.628355-19.282998 0-7.371437-.748337-11.548318-2.354809-13.145463" fill="#fff" mask="url(#b)"/><text style="font-family:ProximaNova-Bold, Proxima Nova;font-size:13.482003;font-weight:bold;letter-spacing:1.03923741;fill:#fff;mask:url(#b)"><tspan x="115.965907" y="149.223513">TEC</tspan></text><g mask="url(#b)"><g transform="translate(4.577888 5.192982)"><path d="m19.7971337 2.03541659 12.8910601 12.76660161c-3.6952948 5.7910828-3.2738141 10.7482937 1.264442 14.8716324 4.5382561 4.1233388 9.964107 4.1233388 16.2775527 0l55.1987815 50.2094222c-16.0142824 7.7928713-26.1740159 12.0285484-30.4792011 12.7070313-6.4577777 1.0177243-22.6218236-1.4128243-33.0974181-8.5839844-10.4755944-7.1711601-20.364713-16.4367874-29.9292406-25.6573186-4.141752-3.9927905-8.90436124-7.636253-9.90332027-11.0592002-2.95857531-10.1376002 2.96720594-25.2223283 17.77734377-45.25418431z" fill="#fff" fill-rule="nonzero"/><path d="m90.8308695 88.7616017c9.1079222-3.7594126 26.2269435-16.1367048 32.9851325-26.2656005 0 0-4.548167-4.0481543-13.644502-12.1444629-2.367329 3.008266-6.069241 4.9457707-10.2327083 4.9457707-7.1480067 0-12.9438341-5.7098383-12.9438341-12.7517943 0-3.5216448 3.7912453-9.0181309 3.7912453-9.0181309l-11.5781195-11.1209834c-3.1057507 4.5278771-9.5133728 11.9596849-17.6959565 17.9499738-3.7673934 2.7580256-7.9110486 5.2104737-12.2819384 6.9332267" fill="#3d54ff" fill-rule="evenodd"/><path d="m77.5358936 21.3296256c.6225879-.9358385 1.8924763-1.1393433 2.7721362-.4882885l.1704215.1416413 11.9581376 11.1229911c.8244929.766911.8269888 2.0717086.0054359 2.8417682l-.3098523.2989606c-2.0595087 2.0925005-3.2373629 4.9201011-3.2373629 7.9428933 0 6.2003155 4.9394345 11.2156145 11.0169731 11.2156145 3.4433113 0 6.6208943-1.6181691 8.6986883-4.3396343.65031-.8517666 1.853751-1.0070843 2.694837-.3881954l.174352.1444976 11.932389 11.0995974c.690664.6424609.820452 1.6880292.307828 2.4798557-9.655166 14.913879-34.7938789 29.8243089-48.5795331 31.1822907-12.3300115 1.214591-20.7576817-.521406-30.3337548-6.9600099l-.6874328-.4688085c-6.8340791-4.7226551-19.1468988-14.9802167-37.00733388-30.8194411-.80326918-.7123657-.87696104-1.9410305-.16459536-2.7442997.71236567-.8032692 1.94103048 1.2805767 2.74429966 1.9929424l4.46348578 1.7861834c15.6263677 13.7525639 26.4754617 22.6997742 32.4916971 26.8038967l.3292629.223024c8.7710406 5.8973292 16.300702 7.4483475 27.7832214 6.3172403 12.082957-1.1902544 34.6524201-14.320661 44.4585481-27.6371112l.32146-.446449-9.249984-8.6071682-.293914.2848766c-2.584622 2.4116248-5.953652 3.8499375-9.565891 3.9757105l-.5176303.0090021c-8.2381986 0-14.9049732-6.7691692-14.9049732-15.1036146 0-3.4992051 1.1820576-6.8140607 3.2887299-9.4659204l.0739983-.0904546-8.9078401-8.2857602-.0536624.0774718c-3.6524147 4.9288142-8.5860733 9.6405319-15.3145689 15.0391858l-1.7963121 1.4245216c-.8448079.6625752-2.0667833.5148464-2.7293585-.3299615-.6625751-.8448079-.5148463-2.0667833.3299616-2.7293585 8.2743753-6.4895176 13.8744726-11.8423656 17.6381363-17.49969z" fill="#0f1031" fill-rule="nonzero"/><path d="m18.9725896.71133425c.6735356-.74400843 1.7905-.84524947 2.5826542-.26915301l.1766893.14498481 12.9523662 11.94919105c.7879293.7269033.8386979 1.9544592.1134824 2.7439423-1.4853698 1.6170012-2.3239848 3.7304835-2.3239848 5.9803851 0 4.8710724 3.9190788 8.8152412 8.747308 8.8152412 2.4941267 0 4.8154113-1.0543263 6.4628509-2.8750794.7252632-.8015621 1.9651305-.8575246 2.7596559-.1245594l6.6448404 6.129995c.7891347.7279922.8387005 1.9578666.1107083 2.7470013-.7279921.7891347-1.9578665.8387005-2.7470012.1107083l-5.3151342-4.903543-.0303798.0273051c-2.0766865 1.6704238-4.6441745 2.6556902-7.372229 2.7658239l-.5133113.0103482c-6.9810861 0-12.6353081-5.6904202-12.6353081-12.7032412 0-2.5144384.7320154-4.9180318 2.0635904-6.9575316l.0827094-.1237607-10.1813762-9.39168019-.0484439.05831519c-10.1812013 11.7236397-15.99730826 24.0866963-16.52703881 34.8667218l-.02704332.700778c-.26113688 9.3022448 3.47678644 13.5426536 10.10889813 14.531529 14.5961597 2.1737534 29.5070869-3.8385235 45.8722867-16.1400217.8582181-.6451108 2.076907-.4723533 2.7220178.3858648.6451108.858218.4723533 2.0769069-.3858647 2.7220177-17.1178472 12.867253-32.9217889 19.2396048-48.7814837 16.8776775-8.53805883-1.27306-13.73987925-7.1741562-13.42232935-18.4859512.34772795-12.4367475 7.08801693-26.5334167 18.91087035-39.59330885z" fill="#0f1031" fill-rule="nonzero"/><g fill="#fff" fill-rule="evenodd"><path d="m92.6860405 70.7453016c-1.5553919 1.6849592-1.446977 4.308249.2414038 5.8606024 1.6898263 1.5523533 4.3221391 1.4428094 5.877531-.2421499 1.5568377-1.6849592 1.4484227-4.3082489-.2414038-5.8591609-1.6898263-1.550912-4.3206936-1.4442508-5.877531.2407084"/><path d="m80.208855 59.6867887c-1.5568551 1.6848438-1.4469935 4.3079541.2414065 5.8587599 1.6898455 1.5536883 4.3221883 1.4441519 5.8775978-.240692 1.5568551-1.6848439 1.4469935-4.3079541-.242852-5.8602012-1.6898455-1.5508058-4.3207428-1.4427106-5.8761523.2421333"/><path d="m67.7305051 48.6277869c-1.5553919 1.6850938-1.446977 4.3085932.2414038 5.859629 1.6898263 1.5524774 4.3221391 1.4429247 5.877531-.2421691 1.5568374-1.6836523 1.4484226-4.3085932-.2414037-5.859629-1.6898264-1.5510359-4.3206937-1.4429247-5.8775311.2421691"/></g></g></g></g></svg>
|
src/resources/js/rsvp-block.js
CHANGED
@@ -97,7 +97,7 @@ var tribe_tickets_rsvp_block = {
|
|
97 |
e.preventDefault();
|
98 |
var $input = $( this ).parent().find( 'input[type="number"]' );
|
99 |
var increase = $( this ).hasClass( 'tribe-block__rsvp__number-input-button--plus' );
|
100 |
-
var step = $input[ 0 ].step ? Number( $input [ 0 ].step ) : 1
|
101 |
var originalValue = Number( $input[ 0 ].value );
|
102 |
|
103 |
// stepUp or stepDown the input according to the button that was clicked
|
@@ -108,6 +108,10 @@ var tribe_tickets_rsvp_block = {
|
|
108 |
|
109 |
if ( typeof $input[ 0 ].stepUp === 'function' ) {
|
110 |
try {
|
|
|
|
|
|
|
|
|
111 |
$input[ 0 ].stepUp();
|
112 |
} catch ( ex ) {
|
113 |
$input[ 0 ].value = ( -1 === max || max >= originalValue + step ) ? originalValue + step : max;
|
@@ -135,6 +139,36 @@ var tribe_tickets_rsvp_block = {
|
|
135 |
}
|
136 |
};
|
137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
/**
|
139 |
* Handles the input focus event
|
140 |
*
|
@@ -279,6 +313,11 @@ var tribe_tickets_rsvp_block = {
|
|
279 |
'.tribe-block__rsvp__number-input-button--minus, .tribe-block__rsvp__number-input-button--plus',
|
280 |
my.events.handle_quantity_change
|
281 |
)
|
|
|
|
|
|
|
|
|
|
|
282 |
.on(
|
283 |
'focus',
|
284 |
'.tribe-tickets-full-name, .tribe-tickets-email',
|
97 |
e.preventDefault();
|
98 |
var $input = $( this ).parent().find( 'input[type="number"]' );
|
99 |
var increase = $( this ).hasClass( 'tribe-block__rsvp__number-input-button--plus' );
|
100 |
+
var step = $input[ 0 ].step ? Number( $input [ 0 ].step ) : 1;
|
101 |
var originalValue = Number( $input[ 0 ].value );
|
102 |
|
103 |
// stepUp or stepDown the input according to the button that was clicked
|
108 |
|
109 |
if ( typeof $input[ 0 ].stepUp === 'function' ) {
|
110 |
try {
|
111 |
+
// Bail if we're already in the max, safari has issues with stepUp() here.
|
112 |
+
if ( max < ( originalValue + step ) ) {
|
113 |
+
return;
|
114 |
+
}
|
115 |
$input[ 0 ].stepUp();
|
116 |
} catch ( ex ) {
|
117 |
$input[ 0 ].value = ( -1 === max || max >= originalValue + step ) ? originalValue + step : max;
|
139 |
}
|
140 |
};
|
141 |
|
142 |
+
/**
|
143 |
+
* Handle the number input + and - actions
|
144 |
+
*
|
145 |
+
* @since 4.9
|
146 |
+
*
|
147 |
+
* @param {event} e input event
|
148 |
+
*/
|
149 |
+
my.events.handle_quantity_change_value = function( e ) {
|
150 |
+
e.preventDefault();
|
151 |
+
|
152 |
+
const $this = $( e.target );
|
153 |
+
const $form = $this.closest( 'form' );
|
154 |
+
const max = $this.attr( 'max' );
|
155 |
+
let maxQty = 0;
|
156 |
+
let newQuantity = parseInt( $this.val(), 10 );
|
157 |
+
newQuantity = isNaN( newQuantity ) ? 0 : newQuantity;
|
158 |
+
|
159 |
+
if ( max < newQuantity ) {
|
160 |
+
newQuantity = max;
|
161 |
+
$this.val( max );
|
162 |
+
}
|
163 |
+
|
164 |
+
if ( 0 > maxQty ) {
|
165 |
+
newQuantity += maxQty;
|
166 |
+
$this.val( newQuantity );
|
167 |
+
}
|
168 |
+
|
169 |
+
e.preventDefault();
|
170 |
+
};
|
171 |
+
|
172 |
/**
|
173 |
* Handles the input focus event
|
174 |
*
|
313 |
'.tribe-block__rsvp__number-input-button--minus, .tribe-block__rsvp__number-input-button--plus',
|
314 |
my.events.handle_quantity_change
|
315 |
)
|
316 |
+
.on(
|
317 |
+
'change keyup',
|
318 |
+
'.tribe-tickets-quantity',
|
319 |
+
my.events.handle_quantity_change_value
|
320 |
+
)
|
321 |
.on(
|
322 |
'focus',
|
323 |
'.tribe-tickets-full-name, .tribe-tickets-email',
|
src/resources/js/rsvp-block.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var tribe_tickets_rsvp_block={events:{}};!function(t,e){"use strict";e.state={submitActive:!0},e.tribe_rsvp_toggle_actions=function(t){var e=t.hasClass("tribe-block__rsvp__status-button--going")?".tribe-block__rsvp__status-button--not-going":".tribe-block__rsvp__status-button--going",i=t.closest(".tribe-block__rsvp__status").find(e);t.addClass("tribe-active"),t.removeClass("tribe-inactive"),t.attr("disabled","disabled"),i.addClass("tribe-inactive"),i.removeClass("tribe-active"),i.removeAttr("disabled")},e.events.handle_rsvp_response=function(){var i=t(this),s=i.closest(".tribe-block__rsvp"),r=s.find(".tribe-block__rsvp__ticket"),
|
1 |
+
var tribe_tickets_rsvp_block={events:{}};!function(t,e){"use strict";e.state={submitActive:!0},e.tribe_rsvp_toggle_actions=function(t){var e=t.hasClass("tribe-block__rsvp__status-button--going")?".tribe-block__rsvp__status-button--not-going":".tribe-block__rsvp__status-button--going",i=t.closest(".tribe-block__rsvp__status").find(e);t.addClass("tribe-active"),t.removeClass("tribe-inactive"),t.attr("disabled","disabled"),i.addClass("tribe-inactive"),i.removeClass("tribe-active"),i.removeAttr("disabled")},e.events.handle_rsvp_response=function(){var i=t(this),s=i.closest(".tribe-block__rsvp"),r=s.find(".tribe-block__rsvp__ticket"),n=r.data("rsvp-id"),_=i.hasClass("tribe-block__rsvp__status-button--going");e.tribe_rsvp_toggle_actions(i);var a={action:"rsvp-form",ticket_id:n,going:_?"yes":"no"};e.tribe_rsvp_loader_start(),t.post(TribeRsvp.ajaxurl,a,function(t){s.find(".tribe-block__rsvp__message__success").remove();var i=r.find(".tribe-block__rsvp__form");if(i.html(t.data.html),window.tribe_event_tickets_plus){var n=i.find("input.tribe-tickets-quantity");window.tribe_event_tickets_plus.meta.block_set_quantity(n,_)}e.validate_submission(i)||(i.find(".tribe-block__rsvp__submit-button").attr("disabled",!0),e.state.submitActive=!1);e.tribe_rsvp_loader_end()})},e.events.handle_quantity_change=function(e){e.preventDefault();var i=t(this).parent().find('input[type="number"]'),s=t(this).hasClass("tribe-block__rsvp__number-input-button--plus"),r=i[0].step?Number(i[0].step):1,n=Number(i[0].value);if(s){var _=i[0].max?Number(i[0].max):-1;if("function"==typeof i[0].stepUp)try{if(_<n+r)return;i[0].stepUp()}catch(t){i[0].value=-1===_||_>=n+r?n+r:_}else i[0].value=-1===_||_>=n+r?n+r:_}else{var a=i[0].min?Number(i[0].min):0;if("function"==typeof i[0].stepDown)try{i[0].stepDown()}catch(t){i[0].value=a<=n-r?n-r:a}else i[0].value=a<=n-r?n-r:a}n!==i[0].value&&i.trigger("change")},e.events.handle_quantity_change_value=function(e){e.preventDefault();const i=t(e.target),s=(i.closest("form"),i.attr("max"));let r=parseInt(i.val(),10);s<(r=isNaN(r)?0:r)&&(r=s,i.val(s)),e.preventDefault()},e.events.handle_input_focus=function(i){e.state.submitActive||(t(i.target).siblings(".tribe-block__rsvp__submit-button").attr("disabled",!1),e.state.submitActive=!0)},e.tribe_rsvp_loader_start=function(e){t(".tribe-block__rsvp").find(".tribe-block__rsvp__loading").removeClass("tribe-common-a11y-hidden")},e.tribe_rsvp_loader_end=function(e){t(".tribe-block__rsvp").find(".tribe-block__rsvp__loading").addClass("tribe-common-a11y-hidden")},e.validate_submission=function(e){var i=e.find("input.tribe-tickets-quantity"),s=e.find("input.tribe-tickets-full-name"),r=e.find("input.tribe-tickets-email");return t.trim(s.val()).length&&t.trim(r.val()).length&&parseInt(i.val())>0},e.events.handle_submission=function(i){i.preventDefault();var s=t(this).closest(".tribe-block__rsvp__ticket"),r=s.data("rsvp-id"),n=s.find("form"),_=e.validate_submission(n),a=!0,o=!!window.tribe_event_tickets_plus;if(o&&(a=window.tribe_event_tickets_plus.meta.validate_meta(n)),_&&a){var b=n.serializeArray();b.push({name:"action",value:"rsvp-process"}),b.push({name:"ticket_id",value:r}),e.tribe_rsvp_loader_start(),t.post(TribeRsvp.ajaxurl,b,function(t){var i=t.data.remaining;s.find(".tribe-block__rsvp__details .tribe-block__rsvp__availability").replaceWith(t.data.remaining_html),s.find(".tribe-block__rsvp__form").empty(),s.closest(".tribe-block__rsvp").append(t.data.html),0===i&&s.find(".tribe-block__rsvp__status").replaceWith(t.data.status_html),e.tribe_rsvp_loader_end()})}else _?n.find(".tribe-block__rsvp__message__error").hide():n.find(".tribe-block__rsvp__message__error").show(),o&&a?n.find(".tribe-event-tickets-meta-required-message").hide():n.find(".tribe-event-tickets-meta-required-message").show(),t("html, body").animate({scrollTop:n.offset().top-100},300)},e.bind_events=function(){t(".tribe-block__rsvp__ticket").on("click",".tribe-block__rsvp__status-button--going, .tribe-block__rsvp__status-button--not-going",e.events.handle_rsvp_response).on("click",'button[type="submit"]',e.events.handle_submission).on("click",".tribe-block__rsvp__number-input-button--minus, .tribe-block__rsvp__number-input-button--plus",e.events.handle_quantity_change).on("change keyup",".tribe-tickets-quantity",e.events.handle_quantity_change_value).on("focus",".tribe-tickets-full-name, .tribe-tickets-email",e.events.handle_input_focus)},e.init=function(){t(".tribe-block__rsvp").length&&e.bind_events()},e.init()}(jQuery,tribe_tickets_rsvp_block);
|
src/resources/js/tickets-block.js
CHANGED
@@ -126,6 +126,7 @@ window.tribe.tickets.block = {
|
|
126 |
obj.updateAvailability = function( tickets ) {
|
127 |
Object.keys( tickets ).forEach( function( ticketId ) {
|
128 |
const available = tickets[ ticketId ].available;
|
|
|
129 |
const $ticketEl = $( obj.selector.item + '[data-ticket-id="' + ticketId + '"]' );
|
130 |
|
131 |
if ( 0 === available ) { // Ticket is out of stock.
|
@@ -143,7 +144,7 @@ window.tribe.tickets.block = {
|
|
143 |
}
|
144 |
|
145 |
if ( 1 < available ) { // Ticket in stock, we may want to update values.
|
146 |
-
$ticketEl.find( obj.selector.itemQuantityInput ).attr( { max:
|
147 |
$ticketEl.find( obj.selector.itemExtraAvailableQuantity ).html( available );
|
148 |
}
|
149 |
} );
|
@@ -480,6 +481,10 @@ window.tribe.tickets.block = {
|
|
480 |
|
481 |
if ( 'function' === typeof $input[ 0 ].stepUp ) {
|
482 |
try {
|
|
|
|
|
|
|
|
|
483 |
$input[ 0 ].stepUp();
|
484 |
} catch ( ex ) {
|
485 |
$input.val( newValue );
|
126 |
obj.updateAvailability = function( tickets ) {
|
127 |
Object.keys( tickets ).forEach( function( ticketId ) {
|
128 |
const available = tickets[ ticketId ].available;
|
129 |
+
const maxPurchase = tickets[ ticketId ].max_purchase;
|
130 |
const $ticketEl = $( obj.selector.item + '[data-ticket-id="' + ticketId + '"]' );
|
131 |
|
132 |
if ( 0 === available ) { // Ticket is out of stock.
|
144 |
}
|
145 |
|
146 |
if ( 1 < available ) { // Ticket in stock, we may want to update values.
|
147 |
+
$ticketEl.find( obj.selector.itemQuantityInput ).attr( { max: maxPurchase } );
|
148 |
$ticketEl.find( obj.selector.itemExtraAvailableQuantity ).html( available );
|
149 |
}
|
150 |
} );
|
481 |
|
482 |
if ( 'function' === typeof $input[ 0 ].stepUp ) {
|
483 |
try {
|
484 |
+
// Bail if we're already in the max, safari has issues with stepUp() here.
|
485 |
+
if ( max < ( originalValue + step ) ) {
|
486 |
+
return;
|
487 |
+
}
|
488 |
$input[ 0 ].stepUp();
|
489 |
} catch ( ex ) {
|
490 |
$input.val( newValue );
|
src/resources/js/tickets-block.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
void 0===window.tribe&&(window.tribe={}),window.tribe.tickets=window.tribe.tickets||{},window.tribe.dialogs=window.tribe.dialogs||{},window.tribe.dialogs.events=window.tribe.dialogs.events||{},window.tribe.tickets.block={num_attendees:0,event:{}},function(t,e,i){e.selector={blockFooter:".tribe-tickets__footer",blockFooterAmount:".tribe-amount",blockFooterQuantity:".tribe-tickets__footer__quantity__number",blockSubmit:"#tribe-tickets__submit",classicSubmit:"#tribe-tickets__buy",container:"#tribe-tickets",hidden:"tribe-common-a11y-hidden",item:".tribe-tickets__item",itemExtraAvailable:".tribe-tickets__item__extra__available",itemExtraAvailableQuantity:".tribe-tickets__item__extra__available__quantity",itemOptOut:".tribe-tickets-attendees-list-optout--wrapper",itemOptOutInput:"#tribe-tickets-attendees-list-optout-",itemPrice:".tribe-tickets__sale_price .tribe-amount",itemQuantity:".tribe-tickets__item__quantity",itemQuantityInput:".tribe-tickets-quantity",loader:".tribe-common-c-loader",submit:".tribe-tickets__buy",ticketLoader:".tribe-tickets-loader__tickets-block",validationNotice:".tribe-tickets__notice--error",ticketInCartNotice:"#tribe-tickets__notice__tickets-in-cart"};const o=t(e.selector.container);0!==o.length&&(e.document=t(document),e.modalSelector={cartForm:".tribe-modal__wrapper--ar #tribe-modal__cart",container:".tribe-modal__wrapper--ar",form:"#tribe-tickets__modal-form",itemRemove:".tribe-tickets__item__remove",itemTotal:".tribe-tickets__item__total .tribe-amount",loader:".tribe-tickets-loader__modal",metaField:".ticket-meta",metaForm:".tribe-modal__wrapper--ar #tribe-modal__attendee_registration",metaItem:".tribe-ticket",submit:".tribe-block__tickets__item__attendee__fields__footer_submit"},e.commerceSelector={edd:"Tribe__Tickets_Plus__Commerce__EDD__Main",rsvp:"Tribe__Tickets__RSVP",tpp:"Tribe__Tickets__Commerce__PayPal__Main",Tribe__Tickets__Commerce__PayPal__Main:"tribe-commerce",Tribe__Tickets__RSVP:"rsvp",Tribe__Tickets_Plus__Commerce__EDD__Main:"edd",Tribe__Tickets_Plus__Commerce__WooCommerce__Main:"woo",tribe_eddticket:"Tribe__Tickets_Plus__Commerce__EDD__Main",tribe_tpp_attendees:"Tribe__Tickets__Commerce__PayPal__Main",tribe_wooticket:"Tribe__Tickets_Plus__Commerce__WooCommerce__Main",woo:"Tribe__Tickets_Plus__Commerce__WooCommerce__Main"},e.tribe_ticket_provider=o.data("provider"),e.postId=TribeTicketOptions.post_id,e.init=function(){0<TribeTicketOptions.availability_check_interval&&e.checkAvailability(),TribeTicketOptions.ajax_preload_ticket_form&&(e.loaderShow(),e.initPrefill()),e.disable(t(e.selector.submit),!0)},e.updateAvailability=function(i){Object.keys(i).forEach(function(o){const r=i[o].available,a=t(e.selector.item+'[data-ticket-id="'+o+'"]');if(0===r){const t=i[o].unavailable_html;a.attr("available",!1),a.removeClass("instock"),a.removeClass("purchasable"),a.find(e.selector.itemQuantity).html(t),a.find(e.selector.itemExtraAvailable).html("")}1<r&&(a.find(e.selector.itemQuantityInput).attr({max:r}),a.find(e.selector.itemExtraAvailableQuantity).html(r))})},e.updateFooter=function(t){e.updateFooterCount(t),e.updateFooterAmount(t),t.find(".tribe-tickets__footer").addClass("tribe-tickets__footer--active")},e.updateFooterCount=function(i){const o=i.find(e.selector.blockFooter+" "+e.selector.blockFooterQuantity);let r=0;i.find(e.selector.item+" "+e.selector.itemQuantityInput).each(function(){let e=parseInt(t(this).val(),10);e=isNaN(e)?0:e,r+=e});const a=0>=r;e.disable(t(e.selector.submit),a),0>r||o.text(r)},e.updateFooterAmount=function(i){const o=i.find(e.selector.blockFooter+" "+e.selector.blockFooterAmount);let r=0;i.find(e.selector.item+" "+e.selector.itemQuantityInput).each(function(){const i=t(this).closest(e.selector.item).find(e.selector.itemPrice).first();let o=parseInt(t(this).val(),10);o=isNaN(o)?0:o;let a=i.text();a=e.cleanNumber(a),r+=a*o}),0>r||o.text(e.numberFormat(r))},e.updateFormTotals=function(t){e.updateFooter(t),e.appendARFields(t)},e.updateItem=function(i,o,r){const a={};if(a.id=i,r){a.qty=e.getQty(r),a.price=e.getPrice(o),o.find(e.selector.itemQuantityInput).val(a.qty).trigger("change");const i=e.selector.itemOptOutInput+r.data("ticket-id");a.$optOut=t(i);const n=t(i+"-modal");a.$optOut.length&&a.$optOut.is(":checked")?n.val("1"):n.val("0")}else a.qty=e.getQty(o),a.price=e.getPrice(o);return e.updateTotal(a.qty,a.price,o),a},e.updateTotal=function(t,i,o){const r=(t*i).toFixed(e.getCurrencyFormatting().number_of_decimals);return o.find(e.modalSelector.itemTotal).text(e.numberFormat(r)),r},e.maybeShowNonMetaNotice=function(i){let o=0,r=0;const a=i.find(e.selector.item).filter(function(){return t(this).find(e.selector.itemQuantityInput).val()>0});if(!a.length)return;a.each(function(){const i=t(this),a=i.closest(e.selector.item).data("ticket-id");t(e.modalSelector.metaForm).find('.tribe-tickets__item__attendee__fields__container[data-ticket-id="'+a+'"]').length?r+=e.getQty(i):o+=e.getQty(i)});const n=t(".tribe-tickets__notice--non-ar"),c=t(".tribe-tickets__item__attendee__fields__title");0<o&&0<r?(t("#tribe-tickets__non-ar-count").text(o),n.removeClass("tribe-common-a11y-hidden"),c.show()):(n.addClass("tribe-common-a11y-hidden"),c.hide())},e.getRestEndpoint=function(){return TribeCartEndpoint.url},e.getTickets=function(){return t(e.selector.item).map(function(){return t(this).data("ticket-id")}).get()},e.maybeShowOptOut=function(t,i){if(t.has(e.selector.itemOptOut).length){const o=t.closest(e.selector.item);0<i?o.addClass("show-optout"):o.removeClass("show-optout")}},e.appendARFields=function(i){i.find(e.selector.item).each(function(){const i=t(this);if(i.is(":visible")){const o=i.closest(e.selector.item).data("ticket-id"),r=t(e.modalSelector.metaForm).find('.tribe-tickets__item__attendee__fields__container[data-ticket-id="'+o+'"]');if(!r.length)return;const a=r.find(e.modalSelector.metaItem),n=e.getQty(i);if(0>=n)return r.removeClass("tribe-tickets--has-tickets"),void r.find(e.modalSelector.metaItem).remove();if(a.length>n){const t=a.length-n;r.find(".tribe-ticket:nth-last-child( -n+"+t+" )").remove()}else if(a.length<n){const t=window.wp.template("tribe-registration--"+o),i=0<a.length?a.length+1:1;r.addClass("tribe-tickets--has-tickets");for(let o=i;o<=n;o++){const i={attendee_id:o};r.append(t(i)),e.maybeHydrateAttendeeBlockFromLocal(a.length)}}}}),e.maybeShowNonMetaNotice(i),e.loaderHide(),e.document.trigger("tribe-ar-fields-appended")},e.stepUp=function(t,i){const o=t.attr("max")?Number(t.attr("max")):-1,r=t.attr("step")?Number(t.attr("step")):1;let a=-1===o||o>=i+r?i+r:o;const n=t.closest(e.selector.item);if("true"===n.attr("data-has-shared-cap")){const t=n.closest("form");a=e.checkSharedCapacity(t,a)}if(0!==a)if(0>a)t[0].value=i+a;else if("function"==typeof t[0].stepUp)try{t[0].stepUp()}catch(e){t.val(a)}else t.val(a)},e.stepDown=function(t,e){const i=t.attr("min")?Number(t.attr("min")):0,o=t.attr("step")?Number(t.attr("step")):1,r=i<=e-o&&0<e-o?e-o:i;if("function"==typeof t[0].stepDown)try{t[0].stepDown()}catch(e){t[0].value=r}else t[0].value=r},e.checkAvailability=function(){const i={action:"ticket_availability_check",tickets:e.getTickets()};t.post(TribeTicketOptions.ajaxurl,i,function(t){if(!t.success)return;const i=t.data.tickets;e.updateAvailability(i)}),0<TribeTicketOptions.availability_check_interval&&setTimeout(e.checkAvailability,TribeTicketOptions.availability_check_interval)},e.checkSharedCapacity=function(i,o){let r=[],a=[];const n=i.find(e.selector.item).filter('[data-has-shared-cap="true"]'),c=n.find(e.selector.itemQuantityInput);if(!n.length)return o;n.each(function(){r.push(parseInt(t(this).attr("data-shared-cap"),10))}),c.each(function(){a.push(parseInt(t(this).val(),10))}),r=Math.max.apply(this,r),a=a.reduce(function(t,e){return t+e},0);const s=r-a;return Math.min(s,o)},e.getQty=function(t){const i=parseInt(t.find(e.selector.itemQuantityInput).val(),10);return isNaN(i)?0:i},e.getPrice=function(t){const i=e.cleanNumber(t.find(e.selector.itemPrice).first().text());return isNaN(i)?0:i},e.getCurrencyFormatting=function(){return JSON.parse(TribeCurrency.formatting)[e.tribe_ticket_provider]},e.cleanNumber=function(t){let i=t;const o=e.getCurrencyFormatting();if(o.thousands_sep===o.decimal_point){const t=i.length-(o.number_of_decimals+1);i=(i=(i=i.substr(0,t)+"_"+i.substr(t+1)).split(o.thousands_sep).join("")).split("_").join(".")}else i=(i=i.split(o.thousands_sep).join("")).split(o.decimal_point).join(".");return i},e.numberFormat=function(t){const i=e.getCurrencyFormatting();if(!i)return!1;const o=i.number_of_decimals,r=i.decimal_point,a=i.thousands_sep,n=isFinite(+t)?+t:0,c=isFinite(+o)?Math.abs(o):0,s=void 0===a?",":a,l=void 0===r?".":r,d=function(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i};let m=(c?d(n,c):Math.round(n)).toString().split(l);return"."===i.thousands_sep&&(m=(c?d(n,c):Math.round(n)).toString().split(".")),m[0].length>3&&(m[0]=m[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(m[1]||"").length<c&&(m[1]=m[1]||"",m[1]+=new Array(c-m[1].length+1).join("0")),m.join(l)},e.focusTicketBlock=function(i){t(i).closest(e.modalSelector.metaItem).addClass("tribe-ticket-item__has-focus")},e.unfocusTicketBlock=function(i){t(i).closest(e.modalSelector.metaItem).removeClass("tribe-ticket-item__has-focus")},e.loaderShow=function(i){const o=i||e.selector.ticketLoader;t(e.selector.loader).filter(o).removeClass(e.selector.hidden)},e.loaderHide=function(i){const o=i||e.selector.ticketLoader;t(e.selector.loader).filter(o).addClass(e.selector.hidden)},e.disable=function(t,e){e?t.prop("disabled",!0).attr({disabled:"true","aria-disabled":"true"}):t.prop("disabled",!1).removeProp("disabled").removeAttr("disabled aria-disabled")},e.initPrefill=function(){e.prefillTicketsBlock()},e.initModalFormPrefills=function(){e.loaderShow(e.modalSelector.loader),t.when(e.getData()).then(function(i){e.prefillModalCartForm(t(e.modalSelector.cartForm)),i.meta&&t.each(i.meta,function(t){o.find('[data-ticket-id="'+t.ticket_id+'"]').length&&e.prefillModalMetaForm(i.meta)});const r=e.getLocal();r.meta&&e.prefillModalMetaForm(r.meta),window.setTimeout(e.loaderHide,500,e.modalSelector.loader)})},e.prefillModalMetaForm=function(i){if(void 0===i||0>=i.length)return;const o=t(e.modalSelector.metaForm).find(".tribe-tickets__item__attendee__fields__container");t.each(i,function(i,r){let a=0;const n=o.find(e.modalSelector.metaItem).filter('[data-ticket-id="'+r.ticket_id+'"]');n.length&&t.each(r.items,function(e,i){"object"==typeof i&&(t.each(i,function(e,i){const o=n.eq(a).find('[name*="'+e+'"]');o.is(":radio")||o.is(":checkbox")?o.each(function(){const e=t(this);i===e.val()&&e.prop("checked",!0)}):o.val(i)}),a++)})}),e.loaderHide(e.modalSelector.loader)},e.prefillModalCartForm=function(i){i.find(e.selector.item).hide();const r=o.find(e.selector.item);t.each(r,function(e,o){const r=t(o),a=i.find('[data-ticket-id="'+r.attr("data-ticket-id")+'"]');if(a){0<r.find(".tribe-tickets-quantity").val()&&a.fadeIn()}}),e.appendARFields(i),e.loaderHide(e.modalSelector.loader)},e.prefillTicketsBlock=function(){t.when(e.getData(!0)).then(function(i){const o=i.tickets;if(o.length){let i=0;o.forEach(function(o){const r=t('.tribe-tickets__item[data-ticket-id="'+o.ticket_id+'"]');if("true"===r.attr("data-available")){const t=r.find(e.selector.itemQuantityInput),a=r.find(e.selector.itemOptOutInput+o.ticket_id);t.length&&(t.val(o.quantity),t.trigger("change"),i+=o.quantity,1===parseInt(o.optout,10)&&a.prop("checked","true"))}}),0<i&&t(e.selector.ticketInCartNotice).fadeIn()}e.loaderHide()},function(){const i=t(e.selector.ticketInCartNotice);i.removeClass("tribe-tickets__notice--barred tribe-tickets__notice--barred-left").addClass("tribe-tickets__notice--error"),i.find(".tribe-tickets-notice__title").text(TribeMessages.api_error_title),i.find(".tribe-tickets-notice__content").text(TribeMessages.connection_error),i.fadeIn(),e.loaderHide()})},e.storeLocal=function(){const t=e.getMetaForSave();sessionStorage.setItem("tribe_tickets_attendees-"+e.postId,window.JSON.stringify(t));const i=e.getTicketsForCart();sessionStorage.setItem("tribe_tickets_cart-"+e.postId,window.JSON.stringify(i))},e.getLocal=function(t){const i=t||e.postId,o=window.JSON.parse(sessionStorage.getItem("tribe_tickets_attendees-"+i)),r=window.JSON.parse(sessionStorage.getItem("tribe_tickets_cart-"+i)),a={};return a.meta=o,a.tickets=r,a},e.clearLocal=function(t){const i=t||e.postId;sessionStorage.removeItem("tribe_tickets_attendees-"+i),sessionStorage.removeItem("tribe_tickets_cart-"+i)},e.maybeHydrateAttendeeBlockFromLocal=function(i){t.when(e.getData()).then(function(o){if(!o.meta)return;const r=o.meta.length;if(i<r)return void e.prefillModalMetaForm(o.meta);const a=t(e.modalSelector.metaForm).find(e.modalSelector.metaItem).slice(i-1);a&&a.find(e.modalSelector.metaField).each(function(){const e=t(this),i=e.attr("name"),r=o[i];r&&e.val(r)})})},e.getTicketsForCart=function(){const i=[];let o=t(e.modalSelector.cartForm);return o.length||(o=t(e.selector.container)),o.find(e.selector.item).each(function(){const o=t(this),r=o.data("ticketId"),a=o.find(e.selector.itemQuantityInput).val(),n=o.find('[name="attendee[optout]"]');let c=n.val();n.is(":checkbox")&&(c=n.prop("checked")?1:0);const s={};s.ticket_id=r,s.quantity=a,s.optout=c,i.push(s)}),i},e.getMetaForSave=function(){const i=t(e.modalSelector.metaForm).find(e.modalSelector.metaItem),o=[],r=[];return i.each(function(){const i={},o=t(this),a=o.data("ticketId"),n=o.find(e.modalSelector.metaField);n.length&&(r[a]||(r[a]={},r[a].ticket_id=a,r[a].items=[]),n.each(function(){const e=t(this);let o=e.val();const r=e.is(":radio");let a=e.attr("name");if(a=(a=a.split("[")).pop().replace("]",""),(r||e.is(":checkbox"))&&!e.prop("checked")){if(r&&""!==i[a])return;o=""}i[a]=o}),r[a].items.push(i))}),Object.keys(r).forEach(function(t){const e={ticket_id:t,items:r[t].items};o.push(e)}),o},e.getData=function(i){let r={meta:{},tickets:{}};const a=t.Deferred(),n=window.JSON.parse(sessionStorage.getItem("tribe_tickets_attendees-"+e.postId));if(null!==n&&(r.meta=n),!i){const t=window.JSON.parse(sessionStorage.getItem("tribe_tickets_cart-"+e.postId));null!==t&&t.length&&(r.tickets=t),a.resolve(r)}return r.tickets&&r.meta||t.ajax({type:"GET",data:{provider:o.data("providerId"),post_id:e.postId},dataType:"json",url:e.getRestEndpoint(),success:function(t){null===n&&sessionStorage.setItem("tribe_tickets_attendees-"+e.postId,window.JSON.stringify(t.meta)),sessionStorage.setItem("tribe_tickets_cart-"+e.postId,window.JSON.stringify(t.tickets)),r={meta:t.meta,tickets:t.tickets},a.resolve(r)},error:function(){a.reject(!1)}}),a.promise()},e.validateForm=function(i){const o=i.find(e.modalSelector.metaItem);let r=!0,a=0;return o.each(function(){const i=t(this);e.validateBlock(i)||(a++,r=!1)}),[r,a]},e.validateBlock=function(i){const o=i.find(e.modalSelector.metaField);let r=!0;return o.each(function(){const i=t(this);e.validateField(i[0])||(r=!1)}),r?i.removeClass("tribe-ticket-item__has-error"):i.addClass("tribe-ticket-item__has-error"),r},e.validateCheckboxRadioGroup=function(i){const o=i.find(e.modalSelector.metaField);let r=!1,a=!0;return o.each(function(){const e=t(this);e.is(":checked")&&(r=!0),e.prop("required")||(a=!1)}),!a||r},e.validateField=function(i){let o=t(i),r=i.checkValidity();if(!r)if((o=t(i)).is(":checkbox")||o.is(":radio")){const t=o.closest(".tribe-common-form-control-checkbox-radio-group");t.length&&(r=e.validateCheckboxRadioGroup(t))}else r=!1;return r?o.removeClass("ticket-meta__has-error"):o.addClass("ticket-meta__has-error"),r},e.document.on("click",".tribe-tickets__item__quantity__remove, .tribe-tickets__item__quantity__add",function(i){i.preventDefault();const o=t(this).parent().find('input[type="number"]');if(o.is(":disabled"))return!1;const r=Number(o[0].value),a=o.closest(e.modalSelector.cartForm);if(t(this).hasClass("tribe-tickets__item__quantity__add")?e.stepUp(o,r):e.stepDown(o,r),e.updateFooter(o.closest("form")),r!==o[0].value&&o.trigger("change"),a.length){const t=o.closest(e.selector.item);e.updateTotal(e.getQty(t),e.getPrice(t),t)}}),e.document.on("click",e.modalSelector.itemRemove,function(i){i.preventDefault();const o={},r=t(this).closest("form"),a=t(this).closest(e.selector.item);a.find(e.selector.itemQuantity).val(0),a.fadeOut(),o.id=a.data("ticketId"),o.qty=0,a.find(e.selector.itemQuantityInput).val(o.qty),o.price=e.getPrice(a),e.updateTotal(o.qty,o.price,a),e.updateFormTotals(r),t('.tribe-tickets__item__attendee__fields__container[data-ticket-id="'+o.id+'"]').removeClass("tribe-tickets--has-tickets").find(e.modalSelector.metaItem).remove(),window.setTimeout(e.maybeShowNonMetaNotice,500,r),window.setTimeout(function(){if(0>=r.find(e.selector.item).filter(":visible").length){const i=t(e.selector.blockSubmit).attr("data-content"),o="dialog_obj_"+i.substring(i.lastIndexOf("-")+1);window[o].hide(),e.disable(t(e.selector.submit),!1)}},500)}),e.document.on("focus",".tribe-ticket .ticket-meta",function(t){const i=t.target;e.focusTicketBlock(i)}),e.document.on("blur",".tribe-ticket .ticket-meta",function(t){const i=t.target;e.unfocusTicketBlock(i)}),e.document.on("change keyup",e.selector.itemQuantityInput,function(i){const o=t(i.target),r=o.closest(e.selector.item),a=o.closest("form"),n=o.attr("max");let c=0,s=parseInt(o.val(),10);n<(s=isNaN(s)?0:s)&&(s=n,o.val(n)),"true"===r.attr("data-has-shared-cap")&&(c=e.checkSharedCapacity(a,s)),0>c&&(s+=c,o.val(s)),i.preventDefault(),e.maybeShowOptOut(r,s),e.updateFooter(a),e.updateFormTotals(a)}),e.document.on("beforeunload",function(){window.tribe.tickets.modal_redirect?e.clearLocal():e.storeLocal()}),e.document.on("keypress",e.modalSelector.form,function(i){if(13===i.keyCode){const o=t(i.target).closest(e.modalSelector.form);if("undefined"===o)return;i.preventDefault(),i.stopPropagation(),o.find('[name="cart-button"]').click()}}),e.document.on("click",e.modalSelector.submit,function(i){i.preventDefault();const o=t(this),r=t(e.modalSelector.form),a=t(e.modalSelector.metaForm),n=e.validateForm(a),c=t(e.selector.validationNotice),s=o.attr("name"),l=r.data("provider");if(e.loaderShow(e.modalSelector.loader),!n[0])return c.find(".tribe-tickets-notice__title").text(TribeMessages.validation_error_title),c.find("p").html(TribeMessages.validation_error),t(e.selector.validationNotice+"__count").text(n[1]),c.show(),e.loaderHide(e.modalSelector.loader),document.getElementById("tribe-tickets__notice__attendee-modal").scrollIntoView({behavior:"smooth",block:"start"}),!1;c.hide(),e.loaderShow(e.modalSelector.loader);let d=TribeTicketsURLs.checkout[l];-1!==s.indexOf("cart")&&(d=TribeTicketsURLs.cart[l]),t(e.modalSelector.form).attr("action",d);const m={tribe_tickets_provider:e.commerceSelector[e.tribe_ticket_provider],tribe_tickets_tickets:e.getTicketsForCart(),tribe_tickets_meta:e.getMetaForSave(),tribe_tickets_post_id:e.postId};t("#tribe_tickets_ar_data").val(JSON.stringify(m)),window.tribe.tickets.modal_redirect=!0,e.clearLocal(),r.submit()}),e.document.on("click",e.selector.classicSubmit,function(i){i.preventDefault();const o=t(e.selector.container);e.loaderShow(e.selector.loader);const r={tribe_tickets_provider:e.commerceSelector[e.tribe_ticket_provider],tribe_tickets_tickets:e.getTicketsForCart(),tribe_tickets_meta:{},tribe_tickets_post_id:e.postId};t("#tribe_tickets_block_ar_data").val(JSON.stringify(r)),o.submit()}),e.document.on("keypress",e.selector.itemQuantityInput,function(t){if(13===t.keyCode)return t.preventDefault(),void t.stopPropagation()}),t(i).on("tribe_dialog_show_ar_modal",function(){e.loaderShow(),e.loaderShow(e.modalSelector.loader);const i=t(e.modalSelector.cartForm);o.find(e.selector.item).each(function(){const o=t(this),r=o.data("ticketId"),a=i.find('[data-ticket-id="'+r+'"]');a&&e.updateItem(r,a,o)}),e.initModalFormPrefills(),e.updateFormTotals(i),e.loaderHide(),e.loaderHide(e.modalSelector.loader)}),t(i).on("tribe_dialog_close_ar_modal",function(){e.storeLocal()}),e.init(),window.addEventListener("pageshow",function(t){(t.persisted||void 0!==window.performance&&2===window.performance.navigation.type)&&e.init()}))}(jQuery,window.tribe.tickets.block,window.tribe.dialogs.events);
|
1 |
+
void 0===window.tribe&&(window.tribe={}),window.tribe.tickets=window.tribe.tickets||{},window.tribe.dialogs=window.tribe.dialogs||{},window.tribe.dialogs.events=window.tribe.dialogs.events||{},window.tribe.tickets.block={num_attendees:0,event:{}},function(t,e,i){e.selector={blockFooter:".tribe-tickets__footer",blockFooterAmount:".tribe-amount",blockFooterQuantity:".tribe-tickets__footer__quantity__number",blockSubmit:"#tribe-tickets__submit",classicSubmit:"#tribe-tickets__buy",container:"#tribe-tickets",hidden:"tribe-common-a11y-hidden",item:".tribe-tickets__item",itemExtraAvailable:".tribe-tickets__item__extra__available",itemExtraAvailableQuantity:".tribe-tickets__item__extra__available__quantity",itemOptOut:".tribe-tickets-attendees-list-optout--wrapper",itemOptOutInput:"#tribe-tickets-attendees-list-optout-",itemPrice:".tribe-tickets__sale_price .tribe-amount",itemQuantity:".tribe-tickets__item__quantity",itemQuantityInput:".tribe-tickets-quantity",loader:".tribe-common-c-loader",submit:".tribe-tickets__buy",ticketLoader:".tribe-tickets-loader__tickets-block",validationNotice:".tribe-tickets__notice--error",ticketInCartNotice:"#tribe-tickets__notice__tickets-in-cart"};const o=t(e.selector.container);0!==o.length&&(e.document=t(document),e.modalSelector={cartForm:".tribe-modal__wrapper--ar #tribe-modal__cart",container:".tribe-modal__wrapper--ar",form:"#tribe-tickets__modal-form",itemRemove:".tribe-tickets__item__remove",itemTotal:".tribe-tickets__item__total .tribe-amount",loader:".tribe-tickets-loader__modal",metaField:".ticket-meta",metaForm:".tribe-modal__wrapper--ar #tribe-modal__attendee_registration",metaItem:".tribe-ticket",submit:".tribe-block__tickets__item__attendee__fields__footer_submit"},e.commerceSelector={edd:"Tribe__Tickets_Plus__Commerce__EDD__Main",rsvp:"Tribe__Tickets__RSVP",tpp:"Tribe__Tickets__Commerce__PayPal__Main",Tribe__Tickets__Commerce__PayPal__Main:"tribe-commerce",Tribe__Tickets__RSVP:"rsvp",Tribe__Tickets_Plus__Commerce__EDD__Main:"edd",Tribe__Tickets_Plus__Commerce__WooCommerce__Main:"woo",tribe_eddticket:"Tribe__Tickets_Plus__Commerce__EDD__Main",tribe_tpp_attendees:"Tribe__Tickets__Commerce__PayPal__Main",tribe_wooticket:"Tribe__Tickets_Plus__Commerce__WooCommerce__Main",woo:"Tribe__Tickets_Plus__Commerce__WooCommerce__Main"},e.tribe_ticket_provider=o.data("provider"),e.postId=TribeTicketOptions.post_id,e.init=function(){0<TribeTicketOptions.availability_check_interval&&e.checkAvailability(),TribeTicketOptions.ajax_preload_ticket_form&&(e.loaderShow(),e.initPrefill()),e.disable(t(e.selector.submit),!0)},e.updateAvailability=function(i){Object.keys(i).forEach(function(o){const r=i[o].available,a=i[o].max_purchase,n=t(e.selector.item+'[data-ticket-id="'+o+'"]');if(0===r){const t=i[o].unavailable_html;n.attr("available",!1),n.removeClass("instock"),n.removeClass("purchasable"),n.find(e.selector.itemQuantity).html(t),n.find(e.selector.itemExtraAvailable).html("")}1<r&&(n.find(e.selector.itemQuantityInput).attr({max:a}),n.find(e.selector.itemExtraAvailableQuantity).html(r))})},e.updateFooter=function(t){e.updateFooterCount(t),e.updateFooterAmount(t),t.find(".tribe-tickets__footer").addClass("tribe-tickets__footer--active")},e.updateFooterCount=function(i){const o=i.find(e.selector.blockFooter+" "+e.selector.blockFooterQuantity);let r=0;i.find(e.selector.item+" "+e.selector.itemQuantityInput).each(function(){let e=parseInt(t(this).val(),10);e=isNaN(e)?0:e,r+=e});const a=0>=r;e.disable(t(e.selector.submit),a),0>r||o.text(r)},e.updateFooterAmount=function(i){const o=i.find(e.selector.blockFooter+" "+e.selector.blockFooterAmount);let r=0;i.find(e.selector.item+" "+e.selector.itemQuantityInput).each(function(){const i=t(this).closest(e.selector.item).find(e.selector.itemPrice).first();let o=parseInt(t(this).val(),10);o=isNaN(o)?0:o;let a=i.text();a=e.cleanNumber(a),r+=a*o}),0>r||o.text(e.numberFormat(r))},e.updateFormTotals=function(t){e.updateFooter(t),e.appendARFields(t)},e.updateItem=function(i,o,r){const a={};if(a.id=i,r){a.qty=e.getQty(r),a.price=e.getPrice(o),o.find(e.selector.itemQuantityInput).val(a.qty).trigger("change");const i=e.selector.itemOptOutInput+r.data("ticket-id");a.$optOut=t(i);const n=t(i+"-modal");a.$optOut.length&&a.$optOut.is(":checked")?n.val("1"):n.val("0")}else a.qty=e.getQty(o),a.price=e.getPrice(o);return e.updateTotal(a.qty,a.price,o),a},e.updateTotal=function(t,i,o){const r=(t*i).toFixed(e.getCurrencyFormatting().number_of_decimals);return o.find(e.modalSelector.itemTotal).text(e.numberFormat(r)),r},e.maybeShowNonMetaNotice=function(i){let o=0,r=0;const a=i.find(e.selector.item).filter(function(){return t(this).find(e.selector.itemQuantityInput).val()>0});if(!a.length)return;a.each(function(){const i=t(this),a=i.closest(e.selector.item).data("ticket-id");t(e.modalSelector.metaForm).find('.tribe-tickets__item__attendee__fields__container[data-ticket-id="'+a+'"]').length?r+=e.getQty(i):o+=e.getQty(i)});const n=t(".tribe-tickets__notice--non-ar"),c=t(".tribe-tickets__item__attendee__fields__title");0<o&&0<r?(t("#tribe-tickets__non-ar-count").text(o),n.removeClass("tribe-common-a11y-hidden"),c.show()):(n.addClass("tribe-common-a11y-hidden"),c.hide())},e.getRestEndpoint=function(){return TribeCartEndpoint.url},e.getTickets=function(){return t(e.selector.item).map(function(){return t(this).data("ticket-id")}).get()},e.maybeShowOptOut=function(t,i){if(t.has(e.selector.itemOptOut).length){const o=t.closest(e.selector.item);0<i?o.addClass("show-optout"):o.removeClass("show-optout")}},e.appendARFields=function(i){i.find(e.selector.item).each(function(){const i=t(this);if(i.is(":visible")){const o=i.closest(e.selector.item).data("ticket-id"),r=t(e.modalSelector.metaForm).find('.tribe-tickets__item__attendee__fields__container[data-ticket-id="'+o+'"]');if(!r.length)return;const a=r.find(e.modalSelector.metaItem),n=e.getQty(i);if(0>=n)return r.removeClass("tribe-tickets--has-tickets"),void r.find(e.modalSelector.metaItem).remove();if(a.length>n){const t=a.length-n;r.find(".tribe-ticket:nth-last-child( -n+"+t+" )").remove()}else if(a.length<n){const t=window.wp.template("tribe-registration--"+o),i=0<a.length?a.length+1:1;r.addClass("tribe-tickets--has-tickets");for(let o=i;o<=n;o++){const i={attendee_id:o};r.append(t(i)),e.maybeHydrateAttendeeBlockFromLocal(a.length)}}}}),e.maybeShowNonMetaNotice(i),e.loaderHide(),e.document.trigger("tribe-ar-fields-appended")},e.stepUp=function(t,i){const o=t.attr("max")?Number(t.attr("max")):-1,r=t.attr("step")?Number(t.attr("step")):1;let a=-1===o||o>=i+r?i+r:o;const n=t.closest(e.selector.item);if("true"===n.attr("data-has-shared-cap")){const t=n.closest("form");a=e.checkSharedCapacity(t,a)}if(0!==a)if(0>a)t[0].value=i+a;else if("function"==typeof t[0].stepUp)try{if(o<i+r)return;t[0].stepUp()}catch(e){t.val(a)}else t.val(a)},e.stepDown=function(t,e){const i=t.attr("min")?Number(t.attr("min")):0,o=t.attr("step")?Number(t.attr("step")):1,r=i<=e-o&&0<e-o?e-o:i;if("function"==typeof t[0].stepDown)try{t[0].stepDown()}catch(e){t[0].value=r}else t[0].value=r},e.checkAvailability=function(){const i={action:"ticket_availability_check",tickets:e.getTickets()};t.post(TribeTicketOptions.ajaxurl,i,function(t){if(!t.success)return;const i=t.data.tickets;e.updateAvailability(i)}),0<TribeTicketOptions.availability_check_interval&&setTimeout(e.checkAvailability,TribeTicketOptions.availability_check_interval)},e.checkSharedCapacity=function(i,o){let r=[],a=[];const n=i.find(e.selector.item).filter('[data-has-shared-cap="true"]'),c=n.find(e.selector.itemQuantityInput);if(!n.length)return o;n.each(function(){r.push(parseInt(t(this).attr("data-shared-cap"),10))}),c.each(function(){a.push(parseInt(t(this).val(),10))}),r=Math.max.apply(this,r),a=a.reduce(function(t,e){return t+e},0);const s=r-a;return Math.min(s,o)},e.getQty=function(t){const i=parseInt(t.find(e.selector.itemQuantityInput).val(),10);return isNaN(i)?0:i},e.getPrice=function(t){const i=e.cleanNumber(t.find(e.selector.itemPrice).first().text());return isNaN(i)?0:i},e.getCurrencyFormatting=function(){return JSON.parse(TribeCurrency.formatting)[e.tribe_ticket_provider]},e.cleanNumber=function(t){let i=t;const o=e.getCurrencyFormatting();if(o.thousands_sep===o.decimal_point){const t=i.length-(o.number_of_decimals+1);i=(i=(i=i.substr(0,t)+"_"+i.substr(t+1)).split(o.thousands_sep).join("")).split("_").join(".")}else i=(i=i.split(o.thousands_sep).join("")).split(o.decimal_point).join(".");return i},e.numberFormat=function(t){const i=e.getCurrencyFormatting();if(!i)return!1;const o=i.number_of_decimals,r=i.decimal_point,a=i.thousands_sep,n=isFinite(+t)?+t:0,c=isFinite(+o)?Math.abs(o):0,s=void 0===a?",":a,l=void 0===r?".":r,d=function(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i};let m=(c?d(n,c):Math.round(n)).toString().split(l);return"."===i.thousands_sep&&(m=(c?d(n,c):Math.round(n)).toString().split(".")),m[0].length>3&&(m[0]=m[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(m[1]||"").length<c&&(m[1]=m[1]||"",m[1]+=new Array(c-m[1].length+1).join("0")),m.join(l)},e.focusTicketBlock=function(i){t(i).closest(e.modalSelector.metaItem).addClass("tribe-ticket-item__has-focus")},e.unfocusTicketBlock=function(i){t(i).closest(e.modalSelector.metaItem).removeClass("tribe-ticket-item__has-focus")},e.loaderShow=function(i){const o=i||e.selector.ticketLoader;t(e.selector.loader).filter(o).removeClass(e.selector.hidden)},e.loaderHide=function(i){const o=i||e.selector.ticketLoader;t(e.selector.loader).filter(o).addClass(e.selector.hidden)},e.disable=function(t,e){e?t.prop("disabled",!0).attr({disabled:"true","aria-disabled":"true"}):t.prop("disabled",!1).removeProp("disabled").removeAttr("disabled aria-disabled")},e.initPrefill=function(){e.prefillTicketsBlock()},e.initModalFormPrefills=function(){e.loaderShow(e.modalSelector.loader),t.when(e.getData()).then(function(i){e.prefillModalCartForm(t(e.modalSelector.cartForm)),i.meta&&t.each(i.meta,function(t){o.find('[data-ticket-id="'+t.ticket_id+'"]').length&&e.prefillModalMetaForm(i.meta)});const r=e.getLocal();r.meta&&e.prefillModalMetaForm(r.meta),window.setTimeout(e.loaderHide,500,e.modalSelector.loader)})},e.prefillModalMetaForm=function(i){if(void 0===i||0>=i.length)return;const o=t(e.modalSelector.metaForm).find(".tribe-tickets__item__attendee__fields__container");t.each(i,function(i,r){let a=0;const n=o.find(e.modalSelector.metaItem).filter('[data-ticket-id="'+r.ticket_id+'"]');n.length&&t.each(r.items,function(e,i){"object"==typeof i&&(t.each(i,function(e,i){const o=n.eq(a).find('[name*="'+e+'"]');o.is(":radio")||o.is(":checkbox")?o.each(function(){const e=t(this);i===e.val()&&e.prop("checked",!0)}):o.val(i)}),a++)})}),e.loaderHide(e.modalSelector.loader)},e.prefillModalCartForm=function(i){i.find(e.selector.item).hide();const r=o.find(e.selector.item);t.each(r,function(e,o){const r=t(o),a=i.find('[data-ticket-id="'+r.attr("data-ticket-id")+'"]');if(a){0<r.find(".tribe-tickets-quantity").val()&&a.fadeIn()}}),e.appendARFields(i),e.loaderHide(e.modalSelector.loader)},e.prefillTicketsBlock=function(){t.when(e.getData(!0)).then(function(i){const o=i.tickets;if(o.length){let i=0;o.forEach(function(o){const r=t('.tribe-tickets__item[data-ticket-id="'+o.ticket_id+'"]');if("true"===r.attr("data-available")){const t=r.find(e.selector.itemQuantityInput),a=r.find(e.selector.itemOptOutInput+o.ticket_id);t.length&&(t.val(o.quantity),t.trigger("change"),i+=o.quantity,1===parseInt(o.optout,10)&&a.prop("checked","true"))}}),0<i&&t(e.selector.ticketInCartNotice).fadeIn()}e.loaderHide()},function(){const i=t(e.selector.ticketInCartNotice);i.removeClass("tribe-tickets__notice--barred tribe-tickets__notice--barred-left").addClass("tribe-tickets__notice--error"),i.find(".tribe-tickets-notice__title").text(TribeMessages.api_error_title),i.find(".tribe-tickets-notice__content").text(TribeMessages.connection_error),i.fadeIn(),e.loaderHide()})},e.storeLocal=function(){const t=e.getMetaForSave();sessionStorage.setItem("tribe_tickets_attendees-"+e.postId,window.JSON.stringify(t));const i=e.getTicketsForCart();sessionStorage.setItem("tribe_tickets_cart-"+e.postId,window.JSON.stringify(i))},e.getLocal=function(t){const i=t||e.postId,o=window.JSON.parse(sessionStorage.getItem("tribe_tickets_attendees-"+i)),r=window.JSON.parse(sessionStorage.getItem("tribe_tickets_cart-"+i)),a={};return a.meta=o,a.tickets=r,a},e.clearLocal=function(t){const i=t||e.postId;sessionStorage.removeItem("tribe_tickets_attendees-"+i),sessionStorage.removeItem("tribe_tickets_cart-"+i)},e.maybeHydrateAttendeeBlockFromLocal=function(i){t.when(e.getData()).then(function(o){if(!o.meta)return;const r=o.meta.length;if(i<r)return void e.prefillModalMetaForm(o.meta);const a=t(e.modalSelector.metaForm).find(e.modalSelector.metaItem).slice(i-1);a&&a.find(e.modalSelector.metaField).each(function(){const e=t(this),i=e.attr("name"),r=o[i];r&&e.val(r)})})},e.getTicketsForCart=function(){const i=[];let o=t(e.modalSelector.cartForm);return o.length||(o=t(e.selector.container)),o.find(e.selector.item).each(function(){const o=t(this),r=o.data("ticketId"),a=o.find(e.selector.itemQuantityInput).val(),n=o.find('[name="attendee[optout]"]');let c=n.val();n.is(":checkbox")&&(c=n.prop("checked")?1:0);const s={};s.ticket_id=r,s.quantity=a,s.optout=c,i.push(s)}),i},e.getMetaForSave=function(){const i=t(e.modalSelector.metaForm).find(e.modalSelector.metaItem),o=[],r=[];return i.each(function(){const i={},o=t(this),a=o.data("ticketId"),n=o.find(e.modalSelector.metaField);n.length&&(r[a]||(r[a]={},r[a].ticket_id=a,r[a].items=[]),n.each(function(){const e=t(this);let o=e.val();const r=e.is(":radio");let a=e.attr("name");if(a=(a=a.split("[")).pop().replace("]",""),(r||e.is(":checkbox"))&&!e.prop("checked")){if(r&&""!==i[a])return;o=""}i[a]=o}),r[a].items.push(i))}),Object.keys(r).forEach(function(t){const e={ticket_id:t,items:r[t].items};o.push(e)}),o},e.getData=function(i){let r={meta:{},tickets:{}};const a=t.Deferred(),n=window.JSON.parse(sessionStorage.getItem("tribe_tickets_attendees-"+e.postId));if(null!==n&&(r.meta=n),!i){const t=window.JSON.parse(sessionStorage.getItem("tribe_tickets_cart-"+e.postId));null!==t&&t.length&&(r.tickets=t),a.resolve(r)}return r.tickets&&r.meta||t.ajax({type:"GET",data:{provider:o.data("providerId"),post_id:e.postId},dataType:"json",url:e.getRestEndpoint(),success:function(t){null===n&&sessionStorage.setItem("tribe_tickets_attendees-"+e.postId,window.JSON.stringify(t.meta)),sessionStorage.setItem("tribe_tickets_cart-"+e.postId,window.JSON.stringify(t.tickets)),r={meta:t.meta,tickets:t.tickets},a.resolve(r)},error:function(){a.reject(!1)}}),a.promise()},e.validateForm=function(i){const o=i.find(e.modalSelector.metaItem);let r=!0,a=0;return o.each(function(){const i=t(this);e.validateBlock(i)||(a++,r=!1)}),[r,a]},e.validateBlock=function(i){const o=i.find(e.modalSelector.metaField);let r=!0;return o.each(function(){const i=t(this);e.validateField(i[0])||(r=!1)}),r?i.removeClass("tribe-ticket-item__has-error"):i.addClass("tribe-ticket-item__has-error"),r},e.validateCheckboxRadioGroup=function(i){const o=i.find(e.modalSelector.metaField);let r=!1,a=!0;return o.each(function(){const e=t(this);e.is(":checked")&&(r=!0),e.prop("required")||(a=!1)}),!a||r},e.validateField=function(i){let o=t(i),r=i.checkValidity();if(!r)if((o=t(i)).is(":checkbox")||o.is(":radio")){const t=o.closest(".tribe-common-form-control-checkbox-radio-group");t.length&&(r=e.validateCheckboxRadioGroup(t))}else r=!1;return r?o.removeClass("ticket-meta__has-error"):o.addClass("ticket-meta__has-error"),r},e.document.on("click",".tribe-tickets__item__quantity__remove, .tribe-tickets__item__quantity__add",function(i){i.preventDefault();const o=t(this).parent().find('input[type="number"]');if(o.is(":disabled"))return!1;const r=Number(o[0].value),a=o.closest(e.modalSelector.cartForm);if(t(this).hasClass("tribe-tickets__item__quantity__add")?e.stepUp(o,r):e.stepDown(o,r),e.updateFooter(o.closest("form")),r!==o[0].value&&o.trigger("change"),a.length){const t=o.closest(e.selector.item);e.updateTotal(e.getQty(t),e.getPrice(t),t)}}),e.document.on("click",e.modalSelector.itemRemove,function(i){i.preventDefault();const o={},r=t(this).closest("form"),a=t(this).closest(e.selector.item);a.find(e.selector.itemQuantity).val(0),a.fadeOut(),o.id=a.data("ticketId"),o.qty=0,a.find(e.selector.itemQuantityInput).val(o.qty),o.price=e.getPrice(a),e.updateTotal(o.qty,o.price,a),e.updateFormTotals(r),t('.tribe-tickets__item__attendee__fields__container[data-ticket-id="'+o.id+'"]').removeClass("tribe-tickets--has-tickets").find(e.modalSelector.metaItem).remove(),window.setTimeout(e.maybeShowNonMetaNotice,500,r),window.setTimeout(function(){if(0>=r.find(e.selector.item).filter(":visible").length){const i=t(e.selector.blockSubmit).attr("data-content"),o="dialog_obj_"+i.substring(i.lastIndexOf("-")+1);window[o].hide(),e.disable(t(e.selector.submit),!1)}},500)}),e.document.on("focus",".tribe-ticket .ticket-meta",function(t){const i=t.target;e.focusTicketBlock(i)}),e.document.on("blur",".tribe-ticket .ticket-meta",function(t){const i=t.target;e.unfocusTicketBlock(i)}),e.document.on("change keyup",e.selector.itemQuantityInput,function(i){const o=t(i.target),r=o.closest(e.selector.item),a=o.closest("form"),n=o.attr("max");let c=0,s=parseInt(o.val(),10);n<(s=isNaN(s)?0:s)&&(s=n,o.val(n)),"true"===r.attr("data-has-shared-cap")&&(c=e.checkSharedCapacity(a,s)),0>c&&(s+=c,o.val(s)),i.preventDefault(),e.maybeShowOptOut(r,s),e.updateFooter(a),e.updateFormTotals(a)}),e.document.on("beforeunload",function(){window.tribe.tickets.modal_redirect?e.clearLocal():e.storeLocal()}),e.document.on("keypress",e.modalSelector.form,function(i){if(13===i.keyCode){const o=t(i.target).closest(e.modalSelector.form);if("undefined"===o)return;i.preventDefault(),i.stopPropagation(),o.find('[name="cart-button"]').click()}}),e.document.on("click",e.modalSelector.submit,function(i){i.preventDefault();const o=t(this),r=t(e.modalSelector.form),a=t(e.modalSelector.metaForm),n=e.validateForm(a),c=t(e.selector.validationNotice),s=o.attr("name"),l=r.data("provider");if(e.loaderShow(e.modalSelector.loader),!n[0])return c.find(".tribe-tickets-notice__title").text(TribeMessages.validation_error_title),c.find("p").html(TribeMessages.validation_error),t(e.selector.validationNotice+"__count").text(n[1]),c.show(),e.loaderHide(e.modalSelector.loader),document.getElementById("tribe-tickets__notice__attendee-modal").scrollIntoView({behavior:"smooth",block:"start"}),!1;c.hide(),e.loaderShow(e.modalSelector.loader);let d=TribeTicketsURLs.checkout[l];-1!==s.indexOf("cart")&&(d=TribeTicketsURLs.cart[l]),t(e.modalSelector.form).attr("action",d);const m={tribe_tickets_provider:e.commerceSelector[e.tribe_ticket_provider],tribe_tickets_tickets:e.getTicketsForCart(),tribe_tickets_meta:e.getMetaForSave(),tribe_tickets_post_id:e.postId};t("#tribe_tickets_ar_data").val(JSON.stringify(m)),window.tribe.tickets.modal_redirect=!0,e.clearLocal(),r.submit()}),e.document.on("click",e.selector.classicSubmit,function(i){i.preventDefault();const o=t(e.selector.container);e.loaderShow(e.selector.loader);const r={tribe_tickets_provider:e.commerceSelector[e.tribe_ticket_provider],tribe_tickets_tickets:e.getTicketsForCart(),tribe_tickets_meta:{},tribe_tickets_post_id:e.postId};t("#tribe_tickets_block_ar_data").val(JSON.stringify(r)),o.submit()}),e.document.on("keypress",e.selector.itemQuantityInput,function(t){if(13===t.keyCode)return t.preventDefault(),void t.stopPropagation()}),t(i).on("tribe_dialog_show_ar_modal",function(){e.loaderShow(),e.loaderShow(e.modalSelector.loader);const i=t(e.modalSelector.cartForm);o.find(e.selector.item).each(function(){const o=t(this),r=o.data("ticketId"),a=i.find('[data-ticket-id="'+r+'"]');a&&e.updateItem(r,a,o)}),e.initModalFormPrefills(),e.updateFormTotals(i),e.loaderHide(),e.loaderHide(e.modalSelector.loader)}),t(i).on("tribe_dialog_close_ar_modal",function(){e.storeLocal()}),e.init(),window.addEventListener("pageshow",function(t){(t.persisted||void 0!==window.performance&&2===window.performance.navigation.type)&&e.init()}))}(jQuery,window.tribe.tickets.block,window.tribe.dialogs.events);
|
src/resources/postcss/freemius.pcss
ADDED
@@ -0,0 +1,227 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.events-cal,
|
2 |
+
.toplevel_page_tribe-common,
|
3 |
+
.toplevel_page_tribe-help,
|
4 |
+
.toplevel_page_tribe-app-shop {
|
5 |
+
#fs_connect {
|
6 |
+
background-color: #ffffff;
|
7 |
+
margin: 20px 20px 0 2px;
|
8 |
+
max-width: 1200px;
|
9 |
+
position: relative;
|
10 |
+
width: auto;
|
11 |
+
|
12 |
+
.fs-visual {
|
13 |
+
align-content: center;
|
14 |
+
align-items: center;
|
15 |
+
background-color: transparent;
|
16 |
+
display: flex;
|
17 |
+
margin: 0 35px;
|
18 |
+
padding: 20px 0 0;
|
19 |
+
|
20 |
+
.fs-site-icon,
|
21 |
+
.fs-plugin-icon,
|
22 |
+
.fs-first.dashicons-plus,
|
23 |
+
.fs-second.dashicons-plus,
|
24 |
+
.fs-connect-logo {
|
25 |
+
border: 0;
|
26 |
+
bottom: auto;
|
27 |
+
left: auto;
|
28 |
+
margin: 0;
|
29 |
+
position: relative;
|
30 |
+
right: auto;
|
31 |
+
top: auto;
|
32 |
+
width: auto;
|
33 |
+
}
|
34 |
+
|
35 |
+
.fs-site-icon,
|
36 |
+
.fs-plugin-icon {
|
37 |
+
width: 60px;
|
38 |
+
}
|
39 |
+
|
40 |
+
.dashicons-plus {
|
41 |
+
color: #17a0d6;
|
42 |
+
padding-left: 4px;
|
43 |
+
padding-right: 4px;
|
44 |
+
width: auto;
|
45 |
+
}
|
46 |
+
|
47 |
+
.fs-site-icon {
|
48 |
+
.dashicons {
|
49 |
+
visibility: hidden;
|
50 |
+
}
|
51 |
+
|
52 |
+
&::before {
|
53 |
+
background-image: url( ../images/event-tickets.svg );
|
54 |
+
background-position: center center;
|
55 |
+
background-repeat: no-repeat;
|
56 |
+
background-size: 85%;
|
57 |
+
content: '';
|
58 |
+
display: block;
|
59 |
+
height: 100%;
|
60 |
+
position: absolute;
|
61 |
+
width: 100%;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
.fs-plugin-icon {
|
66 |
+
img {
|
67 |
+
visibility: hidden;
|
68 |
+
}
|
69 |
+
|
70 |
+
&::before {
|
71 |
+
background-image: url( ../icons/stethoscope.svg );
|
72 |
+
background-position: center center;
|
73 |
+
background-repeat: no-repeat;
|
74 |
+
background-size: 75%;
|
75 |
+
content: '';
|
76 |
+
display: block;
|
77 |
+
height: 100%;
|
78 |
+
position: absolute;
|
79 |
+
width: 100%;
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
.fs-connect-logo {
|
84 |
+
background-image: url( ../icons/mailplane.svg );
|
85 |
+
background-position: center center;
|
86 |
+
background-repeat: no-repeat;
|
87 |
+
background-size: 80%;
|
88 |
+
box-sizing: border-box;
|
89 |
+
-moz-box-sizing: border-box;
|
90 |
+
display: block;
|
91 |
+
height: 80px;
|
92 |
+
padding-left: 60px;
|
93 |
+
width: 60px;
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
.fs-content {
|
98 |
+
padding: 20px 35px;
|
99 |
+
|
100 |
+
h3 {
|
101 |
+
font-size: 1.7em;
|
102 |
+
margin-top: 0;
|
103 |
+
}
|
104 |
+
|
105 |
+
p {
|
106 |
+
margin-bottom: 20px;
|
107 |
+
|
108 |
+
&:first-child,
|
109 |
+
&:last-child {
|
110 |
+
margin-bottom: 0;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
|
114 |
+
.tribe-powered-by-freemius {
|
115 |
+
background-image: url( ../icons/freemius-logo.svg );
|
116 |
+
background-position: right center;
|
117 |
+
background-repeat: no-repeat;
|
118 |
+
background-size: 100px;
|
119 |
+
font-size: 1.1em;
|
120 |
+
font-style: italic;
|
121 |
+
height: 30px;
|
122 |
+
line-height: 30px;
|
123 |
+
position: absolute;
|
124 |
+
right: 45px;
|
125 |
+
top: 25px;
|
126 |
+
width: 184px;
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
.fs-actions {
|
131 |
+
background-color: #f3f3f3;
|
132 |
+
display: flex;
|
133 |
+
flex-flow: row wrap;
|
134 |
+
padding: 20px 35px;
|
135 |
+
|
136 |
+
form {
|
137 |
+
float: none;
|
138 |
+
margin-right: 15px;
|
139 |
+
order: 1;
|
140 |
+
}
|
141 |
+
|
142 |
+
#skip_activation {
|
143 |
+
float: none;
|
144 |
+
order: 2;
|
145 |
+
}
|
146 |
+
|
147 |
+
.button {
|
148 |
+
height: auto;
|
149 |
+
padding: 7px 35px;
|
150 |
+
|
151 |
+
&.button-primary {
|
152 |
+
padding-left: 35px;
|
153 |
+
padding-right: 35px;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
}
|
157 |
+
|
158 |
+
.fs-permissions {
|
159 |
+
padding: 0;
|
160 |
+
position: relative;
|
161 |
+
|
162 |
+
.fs-trigger {
|
163 |
+
left: 380px;
|
164 |
+
padding: 10px;
|
165 |
+
position: absolute;
|
166 |
+
top: -65px;
|
167 |
+
}
|
168 |
+
|
169 |
+
&.fs-open {
|
170 |
+
box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
|
171 |
+
-moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
|
172 |
+
-webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
|
173 |
+
padding: 20px 35px;
|
174 |
+
position: absolute;
|
175 |
+
|
176 |
+
ul {
|
177 |
+
display: flex;
|
178 |
+
flex-wrap: wrap;
|
179 |
+
margin: 0;
|
180 |
+
|
181 |
+
li {
|
182 |
+
flex: 0 50%;
|
183 |
+
padding-bottom: 10px;
|
184 |
+
|
185 |
+
.dashicons {
|
186 |
+
padding-right: 15px;
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
.dashicons {
|
191 |
+
background-position: left center;
|
192 |
+
background-repeat: no-repeat;
|
193 |
+
background-size: 65%;
|
194 |
+
|
195 |
+
&::before {
|
196 |
+
content: '';
|
197 |
+
}
|
198 |
+
}
|
199 |
+
|
200 |
+
.dashicons-admin-users {
|
201 |
+
background-image: url( ../icons/user.svg );
|
202 |
+
}
|
203 |
+
|
204 |
+
.dashicons-admin-settings {
|
205 |
+
background-image: url( ../icons/settings.svg );
|
206 |
+
}
|
207 |
+
|
208 |
+
.dashicons-testimonial {
|
209 |
+
background-image: url( ../icons/megaphone.svg );
|
210 |
+
}
|
211 |
+
|
212 |
+
.dashicons-admin-plugins {
|
213 |
+
background-image: url( ../icons/plug.svg );
|
214 |
+
}
|
215 |
+
}
|
216 |
+
}
|
217 |
+
}
|
218 |
+
|
219 |
+
.fs-terms {
|
220 |
+
background-color: transparent;
|
221 |
+
bottom: 30px;
|
222 |
+
position: absolute;
|
223 |
+
right: 10px;
|
224 |
+
width: 240px;
|
225 |
+
}
|
226 |
+
}
|
227 |
+
}
|
src/template-tags/tickets.php
CHANGED
@@ -473,9 +473,10 @@ if ( ! function_exists( 'tribe_tickets_get_ticket_stock_message' ) ) {
|
|
473 |
/**
|
474 |
* Gets the "tickets sold" message for a given ticket
|
475 |
*
|
476 |
-
* @param Tribe__Tickets__Ticket_Object $ticket Ticket to analyze
|
477 |
-
*
|
478 |
* @since 4.10.9 Use customizable ticket name functions.
|
|
|
|
|
|
|
479 |
*
|
480 |
* @return string
|
481 |
*/
|
@@ -517,19 +518,43 @@ if ( ! function_exists( 'tribe_tickets_get_ticket_stock_message' ) ) {
|
|
517 |
$sold_label = sprintf( _x( "%s'd going", 'RSVPs going', 'event-tickets' ), tribe_get_rsvp_label_singular() );
|
518 |
}
|
519 |
|
520 |
-
// Message for how many remain available
|
521 |
-
if ( -1 === $available ) {
|
522 |
-
$status_counts[] = sprintf(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
523 |
} elseif ( $is_global ) {
|
524 |
-
$status_counts[] = sprintf(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
525 |
} else {
|
526 |
-
// It's "own stock". We use the $stock value
|
527 |
-
$status_counts[] = sprintf(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
528 |
}
|
529 |
|
530 |
if ( ! empty( $status_counts ) ) {
|
531 |
//remove empty values and prepare to display if values
|
532 |
-
$status_counts = array_diff( $status_counts,
|
533 |
if ( array_filter( $status_counts ) ) {
|
534 |
$status = sprintf( ' (%1$s)', implode( ', ', $status_counts ) );
|
535 |
}
|
@@ -942,10 +967,7 @@ if ( ! function_exists( 'tribe_tickets_get_capacity' ) ) {
|
|
942 |
// This is really "post types that allow tickets"
|
943 |
$event_types = Tribe__Tickets__Main::instance()->post_types();
|
944 |
|
945 |
-
|
946 |
-
if ( in_array( $post->post_type, $event_types, true ) ) {
|
947 |
-
return tribe_get_event_capacity( $post );
|
948 |
-
}
|
949 |
|
950 |
/**
|
951 |
* @var Tribe__Tickets__Tickets_Handler $tickets_handler
|
@@ -958,7 +980,8 @@ if ( ! function_exists( 'tribe_tickets_get_capacity' ) ) {
|
|
958 |
|
959 |
// When we have a legacy ticket we migrate it
|
960 |
if (
|
961 |
-
|
|
|
962 |
) {
|
963 |
$legacy_capacity = $tickets_handler->filter_capacity_support( null, $post->ID, $key );
|
964 |
|
@@ -977,7 +1000,10 @@ if ( ! function_exists( 'tribe_tickets_get_capacity' ) ) {
|
|
977 |
];
|
978 |
|
979 |
// When we are in a Ticket Post Type update where we get the value from Event
|
980 |
-
if (
|
|
|
|
|
|
|
981 |
$event_id = tribe_tickets_get_event_ids( $post->ID );
|
982 |
|
983 |
// It will return an array of Events
|
@@ -1093,7 +1119,7 @@ if ( ! function_exists( 'tribe_get_event_capacity' ) ) {
|
|
1093 |
}
|
1094 |
|
1095 |
// If either is unlimited, it's all unlimited.
|
1096 |
-
if ( -1 === $tickets_cap || -1 === $rsvp_cap) {
|
1097 |
return -1;
|
1098 |
}
|
1099 |
|
473 |
/**
|
474 |
* Gets the "tickets sold" message for a given ticket
|
475 |
*
|
|
|
|
|
476 |
* @since 4.10.9 Use customizable ticket name functions.
|
477 |
+
* @since 4.11.5 Correct the sprintf placeholders that were forcing the readable amount to an integer.
|
478 |
+
*
|
479 |
+
* @param Tribe__Tickets__Ticket_Object $ticket Ticket to analyze.
|
480 |
*
|
481 |
* @return string
|
482 |
*/
|
518 |
$sold_label = sprintf( _x( "%s'd going", 'RSVPs going', 'event-tickets' ), tribe_get_rsvp_label_singular() );
|
519 |
}
|
520 |
|
521 |
+
// Message for how many remain available.
|
522 |
+
if ( - 1 === $available ) {
|
523 |
+
$status_counts[] = sprintf(
|
524 |
+
/* translators: %1$s: formatted quantity remaining */
|
525 |
+
_x(
|
526 |
+
'%1$s available',
|
527 |
+
'unlimited remaining stock message',
|
528 |
+
'event-tickets'
|
529 |
+
),
|
530 |
+
tribe_tickets_get_readable_amount( $available, $global_stock )
|
531 |
+
);
|
532 |
} elseif ( $is_global ) {
|
533 |
+
$status_counts[] = sprintf(
|
534 |
+
/* translators: %1$s: formatted quantity remaining */
|
535 |
+
_x(
|
536 |
+
'%1$s available of shared capacity',
|
537 |
+
'ticket shared capacity message (remaining stock)',
|
538 |
+
'event-tickets'
|
539 |
+
),
|
540 |
+
tribe_tickets_get_readable_amount( $available )
|
541 |
+
);
|
542 |
} else {
|
543 |
+
// It's "own stock". We use the $stock value.
|
544 |
+
$status_counts[] = sprintf(
|
545 |
+
/* translators: %1$s: formatted quantity remaining */
|
546 |
+
_x(
|
547 |
+
'%1$s available',
|
548 |
+
'ticket stock message (remaining stock)',
|
549 |
+
'event-tickets'
|
550 |
+
),
|
551 |
+
tribe_tickets_get_readable_amount( $available )
|
552 |
+
);
|
553 |
}
|
554 |
|
555 |
if ( ! empty( $status_counts ) ) {
|
556 |
//remove empty values and prepare to display if values
|
557 |
+
$status_counts = array_diff( $status_counts, [ '' ] );
|
558 |
if ( array_filter( $status_counts ) ) {
|
559 |
$status = sprintf( ' (%1$s)', implode( ', ', $status_counts ) );
|
560 |
}
|
967 |
// This is really "post types that allow tickets"
|
968 |
$event_types = Tribe__Tickets__Main::instance()->post_types();
|
969 |
|
970 |
+
$is_event_type = in_array( $post->post_type, $event_types, true );
|
|
|
|
|
|
|
971 |
|
972 |
/**
|
973 |
* @var Tribe__Tickets__Tickets_Handler $tickets_handler
|
980 |
|
981 |
// When we have a legacy ticket we migrate it
|
982 |
if (
|
983 |
+
! $is_event_type
|
984 |
+
&& $version->is_legacy( $post->ID )
|
985 |
) {
|
986 |
$legacy_capacity = $tickets_handler->filter_capacity_support( null, $post->ID, $key );
|
987 |
|
1000 |
];
|
1001 |
|
1002 |
// When we are in a Ticket Post Type update where we get the value from Event
|
1003 |
+
if (
|
1004 |
+
! $is_event_type
|
1005 |
+
&& in_array( $mode, $shared_modes, true )
|
1006 |
+
) {
|
1007 |
$event_id = tribe_tickets_get_event_ids( $post->ID );
|
1008 |
|
1009 |
// It will return an array of Events
|
1119 |
}
|
1120 |
|
1121 |
// If either is unlimited, it's all unlimited.
|
1122 |
+
if ( -1 === $tickets_cap || -1 === $rsvp_cap ) {
|
1123 |
return -1;
|
1124 |
}
|
1125 |
|
src/views/blocks/rsvp/form/attendee-meta.php
CHANGED
@@ -4,15 +4,16 @@
|
|
4 |
* Attendee Meta
|
5 |
*
|
6 |
* Override this template in your own theme by creating a file at:
|
7 |
-
* [your-theme]/tribe/tickets/blocks/rsvp/form/
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
* @link {INSERT_ARTICLE_LINK_HERE}
|
12 |
*
|
13 |
* @since 4.9.3
|
14 |
-
* @
|
15 |
*
|
|
|
16 |
*/
|
17 |
|
18 |
$ticket = $this->get( 'ticket' );
|
@@ -26,10 +27,10 @@ $has_meta = get_post_meta( $ticket_id, '_tribe_tickets_meta_enabled', true );
|
|
26 |
/**
|
27 |
* Allows injection of HTML after an RSVP ticket table row
|
28 |
*
|
29 |
-
* @var
|
30 |
* @var Tribe__Tickets__Ticket_Object
|
31 |
*/
|
32 |
do_action( 'event_tickets_rsvp_after_ticket_row', tribe_events_get_ticket_event( $ticket_id ), $ticket );
|
33 |
?>
|
34 |
</table>
|
35 |
-
<?php endif;
|
4 |
* Attendee Meta
|
5 |
*
|
6 |
* Override this template in your own theme by creating a file at:
|
7 |
+
* [your-theme]/tribe/tickets/blocks/rsvp/form/attendee-meta.php
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
* @link {INSERT_ARTICLE_LINK_HERE}
|
12 |
*
|
13 |
* @since 4.9.3
|
14 |
+
* @since 4.11.5 Corrected the template override instructions in template comments.
|
15 |
*
|
16 |
+
* @version 4.11.5
|
17 |
*/
|
18 |
|
19 |
$ticket = $this->get( 'ticket' );
|
27 |
/**
|
28 |
* Allows injection of HTML after an RSVP ticket table row
|
29 |
*
|
30 |
+
* @var bool|WP_Post
|
31 |
* @var Tribe__Tickets__Ticket_Object
|
32 |
*/
|
33 |
do_action( 'event_tickets_rsvp_after_ticket_row', tribe_events_get_ticket_event( $ticket_id ), $ticket );
|
34 |
?>
|
35 |
</table>
|
36 |
+
<?php endif;
|
src/views/blocks/rsvp/form/details.php
CHANGED
@@ -4,17 +4,18 @@
|
|
4 |
* Form Details
|
5 |
*
|
6 |
* Override this template in your own theme by creating a file at:
|
7 |
-
* [your-theme]/tribe/tickets/blocks/rsvp/form/
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
-
* @link
|
12 |
*
|
13 |
-
* @since
|
14 |
-
* @
|
15 |
*
|
|
|
16 |
*/
|
17 |
|
18 |
-
$this->template( 'blocks/rsvp/form/name',
|
19 |
-
$this->template( 'blocks/rsvp/form/email',
|
20 |
-
$this->template( 'blocks/rsvp/form/opt-out',
|
4 |
* Form Details
|
5 |
*
|
6 |
* Override this template in your own theme by creating a file at:
|
7 |
+
* [your-theme]/tribe/tickets/blocks/rsvp/form/details.php
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
+
* @link {INSERT_ARTICLE_LINK_HERE}
|
12 |
*
|
13 |
+
* @since 4.9
|
14 |
+
* @since 4.11.5 Corrected the template override instructions in template comments.
|
15 |
*
|
16 |
+
* @version 4.11.5
|
17 |
*/
|
18 |
|
19 |
+
$this->template( 'blocks/rsvp/form/name', [ 'ticket' => $ticket ] );
|
20 |
+
$this->template( 'blocks/rsvp/form/email', [ 'ticket' => $ticket ] );
|
21 |
+
$this->template( 'blocks/rsvp/form/opt-out', [ 'ticket' => $ticket ] );
|
src/views/blocks/rsvp/form/quantity-input.php
CHANGED
@@ -8,14 +8,20 @@
|
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
-
* @link
|
12 |
*
|
13 |
-
* @since
|
14 |
-
* @since
|
|
|
|
|
15 |
*
|
16 |
-
* @version 4.11.
|
17 |
*/
|
18 |
-
|
|
|
|
|
|
|
|
|
19 |
|
20 |
/** @var Tribe__Tickets__Ticket_Object $ticket */
|
21 |
if ( empty( $ticket->ID ) ) {
|
@@ -25,7 +31,7 @@ if ( empty( $ticket->ID ) ) {
|
|
25 |
/** @var Tribe__Tickets__Tickets_Handler $tickets_handler */
|
26 |
$tickets_handler = tribe( 'tickets.handler' );
|
27 |
|
28 |
-
$
|
29 |
?>
|
30 |
<input
|
31 |
type="number"
|
@@ -35,9 +41,6 @@ $available = $tickets_handler->get_ticket_max_purchase( $ticket->ID );
|
|
35 |
min="1"
|
36 |
value="1"
|
37 |
required
|
38 |
-
|
39 |
-
<?php if ( -1 !== $available ) : ?>
|
40 |
-
max="<?php echo esc_attr( $available ); ?>"
|
41 |
-
<?php endif; ?>
|
42 |
<?php disabled( $must_login ); ?>
|
43 |
/>
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
+
* @link {INSERT_ARTICLE_LINK_HERE}
|
12 |
*
|
13 |
+
* @since 4.9
|
14 |
+
* @since 4.11.1 Corrected amount of available/remaining tickets. Removed unused `data-remaining` attribute.
|
15 |
+
* @since 4.11.5 The input's "max" is now always set. The unused `data-remaining` attribute actually didn't get removed
|
16 |
+
* in the previous change, above, so it got removed in this version.
|
17 |
*
|
18 |
+
* @version 4.11.5
|
19 |
*/
|
20 |
+
|
21 |
+
/** @var Tribe__Tickets__RSVP $rsvp */
|
22 |
+
$rsvp = tribe( 'tickets.rsvp' );
|
23 |
+
|
24 |
+
$must_login = ! is_user_logged_in() && $rsvp->login_required();
|
25 |
|
26 |
/** @var Tribe__Tickets__Ticket_Object $ticket */
|
27 |
if ( empty( $ticket->ID ) ) {
|
31 |
/** @var Tribe__Tickets__Tickets_Handler $tickets_handler */
|
32 |
$tickets_handler = tribe( 'tickets.handler' );
|
33 |
|
34 |
+
$max_at_a_time = $tickets_handler->get_ticket_max_purchase( $ticket->ID );
|
35 |
?>
|
36 |
<input
|
37 |
type="number"
|
41 |
min="1"
|
42 |
value="1"
|
43 |
required
|
44 |
+
max="<?php echo esc_attr( $max_at_a_time ); ?>"
|
|
|
|
|
|
|
45 |
<?php disabled( $must_login ); ?>
|
46 |
/>
|
src/views/blocks/rsvp/form/quantity.php
CHANGED
@@ -1,22 +1,26 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* This template renders the RSVP ticket form quantity input
|
|
|
|
|
|
|
4 |
*
|
5 |
* @since 4.9
|
6 |
* @since 4.10.9 Uses new functions to get singular and plural texts.
|
|
|
7 |
*
|
8 |
-
* @version 4.
|
9 |
*/
|
10 |
?>
|
11 |
<div class="tribe-block__rsvp__number-input">
|
12 |
<div class="tribe-block__rsvp__number-input-inner">
|
13 |
<?php $this->template( 'blocks/rsvp/form/quantity-minus' ); ?>
|
14 |
|
15 |
-
<?php $this->template( 'blocks/rsvp/form/quantity-input',
|
16 |
|
17 |
<?php $this->template( 'blocks/rsvp/form/quantity-plus' ); ?>
|
18 |
</div>
|
19 |
<span class="tribe-block__rsvp__number-input-label">
|
20 |
<?php echo esc_html( tribe_get_rsvp_label_plural( 'number_input_label' ) ); ?>
|
21 |
</span>
|
22 |
-
</div>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* This template renders the RSVP ticket form quantity input.
|
4 |
+
*
|
5 |
+
* Override this template in your own theme by creating a file at:
|
6 |
+
* [your-theme]/tribe/tickets/blocks/rsvp/form/quantity.php
|
7 |
*
|
8 |
* @since 4.9
|
9 |
* @since 4.10.9 Uses new functions to get singular and plural texts.
|
10 |
+
* @since 4.11.5 Added template override instructions in template comments.
|
11 |
*
|
12 |
+
* @version 4.11.5
|
13 |
*/
|
14 |
?>
|
15 |
<div class="tribe-block__rsvp__number-input">
|
16 |
<div class="tribe-block__rsvp__number-input-inner">
|
17 |
<?php $this->template( 'blocks/rsvp/form/quantity-minus' ); ?>
|
18 |
|
19 |
+
<?php $this->template( 'blocks/rsvp/form/quantity-input', [ 'ticket' => $ticket ] ); ?>
|
20 |
|
21 |
<?php $this->template( 'blocks/rsvp/form/quantity-plus' ); ?>
|
22 |
</div>
|
23 |
<span class="tribe-block__rsvp__number-input-label">
|
24 |
<?php echo esc_html( tribe_get_rsvp_label_plural( 'number_input_label' ) ); ?>
|
25 |
</span>
|
26 |
+
</div>
|
src/views/blocks/tickets/extra-available.php
CHANGED
@@ -8,12 +8,13 @@
|
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
|
|
|
|
11 |
* @since 4.9.3
|
12 |
* @since 4.11.1 Corrected amount of available/remaining tickets.
|
|
|
13 |
*
|
14 |
-
* @
|
15 |
-
*
|
16 |
-
* @version 4.11.3
|
17 |
*
|
18 |
* @var Tribe__Tickets__Editor__Template $this
|
19 |
*/
|
@@ -25,15 +26,7 @@ if ( empty( $ticket->ID ) ) {
|
|
25 |
return;
|
26 |
}
|
27 |
|
28 |
-
|
29 |
-
$tickets_handler = tribe( 'tickets.handler' );
|
30 |
-
|
31 |
-
$available = $tickets_handler->get_ticket_max_purchase( $ticket->ID );
|
32 |
-
|
33 |
-
if ( -1 === $available ) {
|
34 |
-
return;
|
35 |
-
}
|
36 |
-
|
37 |
$post_id = $this->get( 'post_id' );
|
38 |
|
39 |
/** @var Tribe__Settings_Manager $settings_manager */
|
@@ -44,30 +37,44 @@ $threshold = $settings_manager::get_option( 'ticket-display-tickets-left-thresho
|
|
44 |
/**
|
45 |
* Overwrites the threshold to display "# tickets left".
|
46 |
*
|
|
|
|
|
47 |
* @param int $threshold Stock threshold to trigger display of "# tickets left"
|
48 |
-
* @param array $data Ticket data.
|
49 |
* @param int $post_id WP_Post/Event ID.
|
50 |
-
*
|
51 |
-
* @since 4.11.1
|
52 |
*/
|
53 |
$threshold = absint( apply_filters( 'tribe_display_tickets_block_tickets_left_threshold', $threshold, $post_id ) );
|
54 |
-
$available = $ticket->available();
|
55 |
|
56 |
/**
|
57 |
* Allows hiding of "unlimited" to be toggled on/off conditionally.
|
58 |
*
|
59 |
-
* @param int $show_unlimited allow showing of "unlimited".
|
60 |
-
*
|
61 |
* @since 4.11.1
|
|
|
|
|
62 |
*/
|
63 |
$show_unlimited = apply_filters( 'tribe_tickets_block_show_unlimited_availability', true, $available );
|
64 |
?>
|
65 |
<div
|
66 |
class="tribe-common-b3 tribe-tickets__item__extra__available"
|
67 |
>
|
68 |
-
<?php if ( $show_unlimited && -1 === $available ) : ?>
|
69 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
<?php elseif ( 0 === $threshold || $available <= $threshold ) : ?>
|
71 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
<?php endif; ?>
|
73 |
</div>
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
+
* @link {INSERT_ARTICLE_LINK_HERE}
|
12 |
+
*
|
13 |
* @since 4.9.3
|
14 |
* @since 4.11.1 Corrected amount of available/remaining tickets.
|
15 |
+
* @since 4.11.5 Corrected the way to get the actual stock available.
|
16 |
*
|
17 |
+
* @version 4.11.5
|
|
|
|
|
18 |
*
|
19 |
* @var Tribe__Tickets__Editor__Template $this
|
20 |
*/
|
26 |
return;
|
27 |
}
|
28 |
|
29 |
+
$available = $ticket->available();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
$post_id = $this->get( 'post_id' );
|
31 |
|
32 |
/** @var Tribe__Settings_Manager $settings_manager */
|
37 |
/**
|
38 |
* Overwrites the threshold to display "# tickets left".
|
39 |
*
|
40 |
+
* @since 4.11.1
|
41 |
+
*
|
42 |
* @param int $threshold Stock threshold to trigger display of "# tickets left"
|
|
|
43 |
* @param int $post_id WP_Post/Event ID.
|
|
|
|
|
44 |
*/
|
45 |
$threshold = absint( apply_filters( 'tribe_display_tickets_block_tickets_left_threshold', $threshold, $post_id ) );
|
|
|
46 |
|
47 |
/**
|
48 |
* Allows hiding of "unlimited" to be toggled on/off conditionally.
|
49 |
*
|
|
|
|
|
50 |
* @since 4.11.1
|
51 |
+
*
|
52 |
+
* @param int $show_unlimited allow showing of "unlimited".
|
53 |
*/
|
54 |
$show_unlimited = apply_filters( 'tribe_tickets_block_show_unlimited_availability', true, $available );
|
55 |
?>
|
56 |
<div
|
57 |
class="tribe-common-b3 tribe-tickets__item__extra__available"
|
58 |
>
|
59 |
+
<?php if ( $show_unlimited && - 1 === $available ) : ?>
|
60 |
+
<?php
|
61 |
+
$this->template(
|
62 |
+
'blocks/tickets/extra-available-unlimited',
|
63 |
+
[
|
64 |
+
'ticket' => $ticket,
|
65 |
+
'key' => $key,
|
66 |
+
]
|
67 |
+
);
|
68 |
+
?>
|
69 |
<?php elseif ( 0 === $threshold || $available <= $threshold ) : ?>
|
70 |
+
<?php
|
71 |
+
$this->template(
|
72 |
+
'blocks/tickets/extra-available-quantity',
|
73 |
+
[
|
74 |
+
'ticket' => $ticket,
|
75 |
+
'available' => $available,
|
76 |
+
]
|
77 |
+
);
|
78 |
+
?>
|
79 |
<?php endif; ?>
|
80 |
</div>
|
src/views/blocks/tickets/quantity-number.php
CHANGED
@@ -8,40 +8,45 @@
|
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
-
* @link
|
12 |
*
|
13 |
-
* @since
|
14 |
-
* @since
|
|
|
15 |
*
|
16 |
-
* @version 4.11.
|
17 |
*
|
18 |
-
* @var Tribe__Tickets__Ticket_Object
|
19 |
* @var Tribe__Tickets__Editor__Template $this
|
20 |
*/
|
21 |
|
22 |
$must_login = ! is_user_logged_in() && $ticket->get_provider()->login_required();
|
23 |
-
$ticket = $this->get( 'ticket' );
|
24 |
|
|
|
|
|
|
|
|
|
|
|
25 |
/** @var Tribe__Tickets__Tickets_Handler $handler */
|
26 |
-
$handler
|
27 |
-
|
|
|
28 |
|
29 |
$classes = [ 'tribe-tickets__item__quantity__number' ];
|
|
|
30 |
if ( $must_login ) {
|
31 |
$classes[] = 'tribe-tickets__disabled';
|
32 |
}
|
33 |
?>
|
34 |
<div
|
35 |
-
<?php tribe_classes( $classes ); ?>
|
36 |
>
|
37 |
<input
|
38 |
type="number"
|
39 |
class="tribe-common-h3 tribe-common-h4--min-medium tribe-tickets-quantity"
|
40 |
step="1"
|
41 |
min="0"
|
42 |
-
<?php
|
43 |
-
max="<?php echo esc_attr( $max_quantity ); ?>"
|
44 |
-
<?php endif; ?>
|
45 |
value="0"
|
46 |
autocomplete="off"
|
47 |
<?php disabled( $must_login ); ?>
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
+
* @link {INSERT_ARTICLE_LINK_HERE}
|
12 |
*
|
13 |
+
* @since 4.9
|
14 |
+
* @since 4.10.8 Tweaked logic for unlimited maximum quantity allowed.
|
15 |
+
* @since 4.11.5 The input's "max" is now always set.
|
16 |
*
|
17 |
+
* @version 4.11.5
|
18 |
*
|
19 |
+
* @var Tribe__Tickets__Ticket_Object $ticket
|
20 |
* @var Tribe__Tickets__Editor__Template $this
|
21 |
*/
|
22 |
|
23 |
$must_login = ! is_user_logged_in() && $ticket->get_provider()->login_required();
|
|
|
24 |
|
25 |
+
$ticket = $this->get( 'ticket' );
|
26 |
+
|
27 |
+
if ( empty( $ticket->ID ) ) {
|
28 |
+
return;
|
29 |
+
}
|
30 |
/** @var Tribe__Tickets__Tickets_Handler $handler */
|
31 |
+
$handler = tribe( 'tickets.handler' );
|
32 |
+
|
33 |
+
$max_at_a_time = $handler->get_ticket_max_purchase( $ticket->ID );
|
34 |
|
35 |
$classes = [ 'tribe-tickets__item__quantity__number' ];
|
36 |
+
|
37 |
if ( $must_login ) {
|
38 |
$classes[] = 'tribe-tickets__disabled';
|
39 |
}
|
40 |
?>
|
41 |
<div
|
42 |
+
<?php tribe_classes( $classes ); ?>
|
43 |
>
|
44 |
<input
|
45 |
type="number"
|
46 |
class="tribe-common-h3 tribe-common-h4--min-medium tribe-tickets-quantity"
|
47 |
step="1"
|
48 |
min="0"
|
49 |
+
max="<?php echo esc_attr( $max_at_a_time ); ?>"
|
|
|
|
|
50 |
value="0"
|
51 |
autocomplete="off"
|
52 |
<?php disabled( $must_login ); ?>
|
src/views/tickets/rsvp.php
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* This template renders the RSVP ticket form
|
4 |
*
|
5 |
* Override this template in your own theme by creating a file at:
|
|
|
6 |
*
|
7 |
-
*
|
|
|
|
|
|
|
|
|
|
|
8 |
*
|
9 |
-
* @
|
10 |
-
* @since 4.10.8 More similar display format to that of other ticket types, including better checking of max quantity available.
|
11 |
-
* @since 4.10.9 Use customizable ticket name functions.
|
12 |
-
* @since 4.11.0 Added RSVP/ticket view link to template.
|
13 |
-
* @since 4.11.1 Corrected amount of available/remaining tickets when threshold is empty.
|
14 |
-
*
|
15 |
-
* @version 4.11.3
|
16 |
*
|
17 |
* @var Tribe__Tickets__RSVP $this
|
18 |
* @var bool $must_login
|
@@ -94,6 +94,9 @@ if ( ! $already_rendered ) {
|
|
94 |
|
95 |
<table class="tribe-events-tickets tribe-events-tickets-rsvp">
|
96 |
<?php
|
|
|
|
|
|
|
97 |
foreach ( $tickets as $ticket ) {
|
98 |
if ( ! $ticket instanceof Tribe__Tickets__Ticket_Object ) {
|
99 |
continue;
|
@@ -112,25 +115,27 @@ if ( ! $already_rendered ) {
|
|
112 |
}
|
113 |
|
114 |
$ticket_id = $ticket->ID;
|
|
|
115 |
$is_there_any_rsvp_stock = false;
|
116 |
|
117 |
-
|
118 |
-
$handler = tribe( 'tickets.handler' );
|
119 |
|
120 |
-
$available = $handler->get_ticket_max_purchase( $ticket_id );
|
121 |
$readable_amount = tribe_tickets_get_readable_amount( $available, null, false );
|
122 |
|
123 |
/**
|
124 |
* Allows hiding of "unlimited" to be toggled on/off conditionally.
|
125 |
*
|
126 |
-
* @param int $show_unlimited allow showing of "unlimited".
|
127 |
-
*
|
128 |
* @since 4.11.1
|
|
|
|
|
|
|
129 |
*/
|
130 |
$show_unlimited = apply_filters( 'tribe_rsvp_block_show_unlimited_availability', false, $available );
|
131 |
|
132 |
$is_there_any_rsvp_stock = 0 !== $available;
|
133 |
$is_there_any_product_to_sell = $is_there_any_rsvp_stock || $is_there_any_product_to_sell;
|
|
|
|
|
134 |
?>
|
135 |
<tr>
|
136 |
<td class="tribe-ticket quantity" data-product-id="<?php echo esc_attr( $ticket_id ); ?>">
|
@@ -141,14 +146,12 @@ if ( ! $already_rendered ) {
|
|
141 |
class="tribe-tickets-quantity"
|
142 |
step="1"
|
143 |
min="0"
|
144 |
-
<?php
|
145 |
-
max="<?php echo esc_attr( $available ); ?>"
|
146 |
-
<?php endif; ?>
|
147 |
name="quantity_<?php echo absint( $ticket_id ); ?>"
|
148 |
value="0"
|
149 |
<?php disabled( $must_login ); ?>
|
150 |
>
|
151 |
-
<?php if ( -1 !== $available && ( 0 === $threshold || $available <= $threshold ) ) : ?>
|
152 |
<span class="tribe-tickets-remaining">
|
153 |
<span class="available-stock" data-product-id="<?php echo esc_attr( $ticket_id ); ?>">
|
154 |
<?php echo sprintf( esc_html__( '%1$s available', 'event-tickets' ), esc_html( $readable_amount ) ); ?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* This template renders the RSVP ticket form.
|
4 |
*
|
5 |
* Override this template in your own theme by creating a file at:
|
6 |
+
* [your-theme]/tribe-events/tickets/rsvp.php
|
7 |
*
|
8 |
+
* @since 4.0
|
9 |
+
* @since 4.10.8 More similar display format to that of other ticket types, including better checking of max quantity available.
|
10 |
+
* @since 4.10.9 Use customizable ticket name functions.
|
11 |
+
* @since 4.11.0 Added RSVP/ticket view link to template.
|
12 |
+
* @since 4.11.1 Corrected amount of available/remaining tickets when threshold is empty.
|
13 |
+
* @since 4.11.5 Display total available separately from setting max allowed to purchase at once.
|
14 |
*
|
15 |
+
* @version 4.11.5
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
*
|
17 |
* @var Tribe__Tickets__RSVP $this
|
18 |
* @var bool $must_login
|
94 |
|
95 |
<table class="tribe-events-tickets tribe-events-tickets-rsvp">
|
96 |
<?php
|
97 |
+
/** @var Tribe__Tickets__Tickets_Handler $handler */
|
98 |
+
$handler = tribe( 'tickets.handler' );
|
99 |
+
|
100 |
foreach ( $tickets as $ticket ) {
|
101 |
if ( ! $ticket instanceof Tribe__Tickets__Ticket_Object ) {
|
102 |
continue;
|
115 |
}
|
116 |
|
117 |
$ticket_id = $ticket->ID;
|
118 |
+
|
119 |
$is_there_any_rsvp_stock = false;
|
120 |
|
121 |
+
$available = $ticket->available();
|
|
|
122 |
|
|
|
123 |
$readable_amount = tribe_tickets_get_readable_amount( $available, null, false );
|
124 |
|
125 |
/**
|
126 |
* Allows hiding of "unlimited" to be toggled on/off conditionally.
|
127 |
*
|
|
|
|
|
128 |
* @since 4.11.1
|
129 |
+
*
|
130 |
+
* @param int $show_unlimited allow showing of "unlimited".
|
131 |
+
*
|
132 |
*/
|
133 |
$show_unlimited = apply_filters( 'tribe_rsvp_block_show_unlimited_availability', false, $available );
|
134 |
|
135 |
$is_there_any_rsvp_stock = 0 !== $available;
|
136 |
$is_there_any_product_to_sell = $is_there_any_rsvp_stock || $is_there_any_product_to_sell;
|
137 |
+
|
138 |
+
$max_at_a_time = $handler->get_ticket_max_purchase( $ticket_id );
|
139 |
?>
|
140 |
<tr>
|
141 |
<td class="tribe-ticket quantity" data-product-id="<?php echo esc_attr( $ticket_id ); ?>">
|
146 |
class="tribe-tickets-quantity"
|
147 |
step="1"
|
148 |
min="0"
|
149 |
+
max="<?php echo esc_attr( $max_at_a_time ); ?>"
|
|
|
|
|
150 |
name="quantity_<?php echo absint( $ticket_id ); ?>"
|
151 |
value="0"
|
152 |
<?php disabled( $must_login ); ?>
|
153 |
>
|
154 |
+
<?php if ( - 1 !== $available && ( 0 === $threshold || $available <= $threshold ) ) : ?>
|
155 |
<span class="tribe-tickets-remaining">
|
156 |
<span class="available-stock" data-product-id="<?php echo esc_attr( $ticket_id ); ?>">
|
157 |
<?php echo sprintf( esc_html__( '%1$s available', 'event-tickets' ), esc_html( $readable_amount ) ); ?>
|
src/views/tickets/tpp.php
CHANGED
@@ -3,22 +3,24 @@
|
|
3 |
* This template renders the Tribe Commerce ticket form
|
4 |
*
|
5 |
* Override this template in your own theme by creating a file at:
|
|
|
6 |
*
|
7 |
-
*
|
8 |
*
|
9 |
-
* @since
|
10 |
-
* @since
|
11 |
-
* @since
|
12 |
-
* @since
|
13 |
-
* @since
|
14 |
-
* @since
|
15 |
-
* @since
|
16 |
-
* @since
|
17 |
-
* @since
|
18 |
-
* @since
|
|
|
|
|
19 |
*
|
20 |
-
* @version
|
21 |
-
* @deprecated 4.11.0
|
22 |
*
|
23 |
* @var bool $must_login
|
24 |
* @var bool $display_login_link
|
@@ -42,11 +44,11 @@ $threshold = $settings_manager::get_option( 'ticket-display-tickets-left-thresho
|
|
42 |
/**
|
43 |
* Overwrites the threshold to display "# tickets left".
|
44 |
*
|
45 |
-
* @
|
|
|
46 |
* @param array $data Ticket data.
|
47 |
* @param int $post_id WP_Post/Event ID.
|
48 |
-
*
|
49 |
-
* @since 4.11.1
|
50 |
*/
|
51 |
$threshold = absint( apply_filters( 'tribe_display_tickets_block_tickets_left_threshold', $threshold, tribe_events_get_ticket_event( $ticket ) ) );
|
52 |
?>
|
@@ -84,7 +86,11 @@ $threshold = absint( apply_filters( 'tribe_display_tickets_block_tickets_left_th
|
|
84 |
|
85 |
<table class="tribe-events-tickets tribe-events-tickets-tpp">
|
86 |
<?php
|
|
|
|
|
|
|
87 |
$item_counter = 1;
|
|
|
88 |
foreach ( $tickets as $ticket ) {
|
89 |
if ( ! $ticket instanceof Tribe__Tickets__Ticket_Object ) {
|
90 |
continue;
|
@@ -98,21 +104,20 @@ $threshold = absint( apply_filters( 'tribe_display_tickets_block_tickets_left_th
|
|
98 |
continue;
|
99 |
}
|
100 |
|
101 |
-
|
102 |
-
$handler = tribe( 'tickets.handler' );
|
103 |
-
|
104 |
-
$available = $handler->get_ticket_max_purchase( $ticket->ID );
|
105 |
|
106 |
/**
|
107 |
* Allows hiding of "unlimited" to be toggled on/off conditionally.
|
108 |
*
|
109 |
-
* @param int $show_unlimited allow showing of "unlimited".
|
110 |
-
*
|
111 |
* @since 4.11.1
|
|
|
|
|
112 |
*/
|
113 |
$show_unlimited = apply_filters( 'tribe_tickets_block_show_unlimited_availability', false, $available );
|
114 |
|
115 |
$is_there_any_product_to_sell = 0 !== $available;
|
|
|
|
|
116 |
?>
|
117 |
<tr>
|
118 |
<td class="tribe-ticket quantity" data-product-id="<?php echo esc_attr( $ticket->ID ); ?>">
|
@@ -121,18 +126,20 @@ $threshold = absint( apply_filters( 'tribe_display_tickets_block_tickets_left_th
|
|
121 |
<input
|
122 |
type="number"
|
123 |
class="tribe-tickets-quantity qty"
|
|
|
124 |
min="0"
|
125 |
-
<?php
|
126 |
-
max="<?php echo esc_attr( $available ); ?>"
|
127 |
-
<?php endif; ?>
|
128 |
name="quantity_<?php echo absint( $ticket->ID ); ?>"
|
129 |
value="0"
|
130 |
<?php disabled( $must_login ); ?>
|
131 |
>
|
132 |
-
<?php
|
|
|
|
|
|
|
|
|
133 |
<span class="tribe-tickets-remaining">
|
134 |
<?php
|
135 |
-
$readable_amount = tribe_tickets_get_readable_amount( $available, null, false );
|
136 |
echo sprintf( esc_html__( '%1$s available', 'event-tickets' ), '<span class="available-stock" data-product-id="' . esc_attr( $ticket->ID ) . '">' . esc_html( $readable_amount ) . '</span>' );
|
137 |
?>
|
138 |
</span>
|
@@ -158,7 +165,7 @@ $threshold = absint( apply_filters( 'tribe_display_tickets_block_tickets_left_th
|
|
158 |
type="submit"
|
159 |
class="tpp-submit tribe-button"
|
160 |
>
|
161 |
-
<?php esc_html_e( 'Buy now', 'event-tickets' )
|
162 |
</button>
|
163 |
<?php endif; ?>
|
164 |
</td>
|
@@ -168,7 +175,7 @@ $threshold = absint( apply_filters( 'tribe_display_tickets_block_tickets_left_th
|
|
168 |
/**
|
169 |
* Allows injection of HTML after an Tribe Commerce ticket table row
|
170 |
*
|
171 |
-
* @var WP_Post
|
172 |
* @var Tribe__Tickets__Ticket_Object $ticket
|
173 |
*/
|
174 |
do_action( 'event_tickets_tpp_after_ticket_row', tribe_events_get_ticket_event( $ticket->id ), $ticket );
|
3 |
* This template renders the Tribe Commerce ticket form
|
4 |
*
|
5 |
* Override this template in your own theme by creating a file at:
|
6 |
+
* [your-theme]/tribe-events/tickets/tpp.php
|
7 |
*
|
8 |
+
* @deprecated 4.11.0
|
9 |
*
|
10 |
+
* @since 4.5
|
11 |
+
* @since 4.7 Make the ticket form more readable.
|
12 |
+
* @since 4.7.6 Add support for showing description option.
|
13 |
+
* @since 4.8.2 Add date_in_range() logic so past tickets do not show.
|
14 |
+
* @since 4.9.3 Display login link if visitor is logged out and logging in is required to purchase.
|
15 |
+
* @since 4.10.8 Removed the date_in_range() check per ticket, since it now happens upstream. Better checking of max quantity available.
|
16 |
+
* @since 4.10.10 Use customizable ticket name functions.
|
17 |
+
* @since 4.11.1 Corrected amount of available/remaining tickets when threshold is empty.
|
18 |
+
* @since 4.11.3 Updated the button to include a type - helps avoid submitting forms unintentionally.
|
19 |
+
* @since 4.11.3 Changed button ID to match the format of the non-tpp buttons. (`tribe-tickets` instead of `buy-tickets`)
|
20 |
+
* @since 4.11.5 Display total available separately from setting max allowed to purchase at once and avoid the
|
21 |
+
* potential of `$readable_amount` being a undefined variable.
|
22 |
*
|
23 |
+
* @version 4.11.3
|
|
|
24 |
*
|
25 |
* @var bool $must_login
|
26 |
* @var bool $display_login_link
|
44 |
/**
|
45 |
* Overwrites the threshold to display "# tickets left".
|
46 |
*
|
47 |
+
* @since 4.11.1
|
48 |
+
*
|
49 |
* @param array $data Ticket data.
|
50 |
* @param int $post_id WP_Post/Event ID.
|
51 |
+
* @param int $threshold Stock threshold to trigger display of "# tickets left"
|
|
|
52 |
*/
|
53 |
$threshold = absint( apply_filters( 'tribe_display_tickets_block_tickets_left_threshold', $threshold, tribe_events_get_ticket_event( $ticket ) ) );
|
54 |
?>
|
86 |
|
87 |
<table class="tribe-events-tickets tribe-events-tickets-tpp">
|
88 |
<?php
|
89 |
+
/** @var Tribe__Tickets__Tickets_Handler $handler */
|
90 |
+
$handler = tribe( 'tickets.handler' );
|
91 |
+
|
92 |
$item_counter = 1;
|
93 |
+
|
94 |
foreach ( $tickets as $ticket ) {
|
95 |
if ( ! $ticket instanceof Tribe__Tickets__Ticket_Object ) {
|
96 |
continue;
|
104 |
continue;
|
105 |
}
|
106 |
|
107 |
+
$available = $ticket->available();
|
|
|
|
|
|
|
108 |
|
109 |
/**
|
110 |
* Allows hiding of "unlimited" to be toggled on/off conditionally.
|
111 |
*
|
|
|
|
|
112 |
* @since 4.11.1
|
113 |
+
*
|
114 |
+
* @param int $show_unlimited allow showing of "unlimited".
|
115 |
*/
|
116 |
$show_unlimited = apply_filters( 'tribe_tickets_block_show_unlimited_availability', false, $available );
|
117 |
|
118 |
$is_there_any_product_to_sell = 0 !== $available;
|
119 |
+
|
120 |
+
$max_at_a_time = $handler->get_ticket_max_purchase( $ticket->ID );
|
121 |
?>
|
122 |
<tr>
|
123 |
<td class="tribe-ticket quantity" data-product-id="<?php echo esc_attr( $ticket->ID ); ?>">
|
126 |
<input
|
127 |
type="number"
|
128 |
class="tribe-tickets-quantity qty"
|
129 |
+
step="1"
|
130 |
min="0"
|
131 |
+
max="<?php echo esc_attr( $max_at_a_time ); ?>"
|
|
|
|
|
132 |
name="quantity_<?php echo absint( $ticket->ID ); ?>"
|
133 |
value="0"
|
134 |
<?php disabled( $must_login ); ?>
|
135 |
>
|
136 |
+
<?php
|
137 |
+
$readable_amount = tribe_tickets_get_readable_amount( $available, null, false );
|
138 |
+
|
139 |
+
if ( - 1 !== $available && ( 0 === $threshold || $available <= $threshold ) ) :
|
140 |
+
?>
|
141 |
<span class="tribe-tickets-remaining">
|
142 |
<?php
|
|
|
143 |
echo sprintf( esc_html__( '%1$s available', 'event-tickets' ), '<span class="available-stock" data-product-id="' . esc_attr( $ticket->ID ) . '">' . esc_html( $readable_amount ) . '</span>' );
|
144 |
?>
|
145 |
</span>
|
165 |
type="submit"
|
166 |
class="tpp-submit tribe-button"
|
167 |
>
|
168 |
+
<?php esc_html_e( 'Buy now', 'event-tickets' ); ?>
|
169 |
</button>
|
170 |
<?php endif; ?>
|
171 |
</td>
|
175 |
/**
|
176 |
* Allows injection of HTML after an Tribe Commerce ticket table row
|
177 |
*
|
178 |
+
* @var WP_Post $post The post object the ticket is attached to.
|
179 |
* @var Tribe__Tickets__Ticket_Object $ticket
|
180 |
*/
|
181 |
do_action( 'event_tickets_tpp_after_ticket_row', tribe_events_get_ticket_event( $ticket->id ), $ticket );
|
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 ComposerAutoloaderInite10bb73df48f181007bb03671ce1611c::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 ComposerAutoloaderInitb3fdc7e08c7d13160aadd5ced793c1bc
|
|
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 ComposerAutoloaderInite10bb73df48f181007bb03671ce1611c
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInite10bb73df48f181007bb03671ce1611c', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInite10bb73df48f181007bb03671ce1611c', '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\ComposerStaticInite10bb73df48f181007bb03671ce1611c::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' =>
|
@@ -48,9 +48,9 @@ class ComposerStaticInitb3fdc7e08c7d13160aadd5ced793c1bc
|
|
48 |
public static function getInitializer(ClassLoader $loader)
|
49 |
{
|
50 |
return \Closure::bind(function () use ($loader) {
|
51 |
-
$loader->prefixLengthsPsr4 =
|
52 |
-
$loader->prefixDirsPsr4 =
|
53 |
-
$loader->classMap =
|
54 |
|
55 |
}, null, ClassLoader::class);
|
56 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInite10bb73df48f181007bb03671ce1611c
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
48 |
public static function getInitializer(ClassLoader $loader)
|
49 |
{
|
50 |
return \Closure::bind(function () use ($loader) {
|
51 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInite10bb73df48f181007bb03671ce1611c::$prefixLengthsPsr4;
|
52 |
+
$loader->prefixDirsPsr4 = ComposerStaticInite10bb73df48f181007bb03671ce1611c::$prefixDirsPsr4;
|
53 |
+
$loader->classMap = ComposerStaticInite10bb73df48f181007bb03671ce1611c::$classMap;
|
54 |
|
55 |
}, null, ClassLoader::class);
|
56 |
}
|