Version Description
Download this release
Release Info
Developer | bordoni |
Plugin | Event Tickets |
Version | 5.0.1 |
Comparing to | |
See all releases |
Code changes from version 5.0.0.1 to 5.0.1
- common/lang/tribe-common-de_DE.mo +0 -0
- common/lang/tribe-common-pt_BR.mo +0 -0
- common/src/Tribe/Main.php +1 -1
- common/src/Tribe/Service_Providers/Shortcodes.php +42 -1
- common/src/Tribe/Shortcode/Manager.php +75 -0
- common/src/functions/template-tags/general.php +26 -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-de_DE.mo +0 -0
- lang/event-tickets-es_ES.mo +0 -0
- lang/event-tickets-fi.mo +0 -0
- lang/event-tickets-fr_CA.mo +0 -0
- lang/event-tickets-fr_FR.mo +0 -0
- lang/event-tickets-nl_NL.mo +0 -0
- lang/event-tickets-pt_BR.mo +0 -0
- lang/event-tickets.pot +74 -64
- readme.txt +19 -2
- src/Tribe/Admin/Move_Tickets.php +2 -1
- src/Tribe/Assets.php +15 -7
- src/Tribe/Attendee_Registration/Modal.php +17 -14
- src/Tribe/Commerce/Orders_Tabbed_View.php +16 -2
- src/Tribe/Commerce/PayPal/Gateway.php +2 -2
- src/Tribe/Commerce/PayPal/Main.php +3 -4
- src/Tribe/Main.php +1 -1
- src/Tribe/Tickets.php +7 -1
- src/Tribe/Tickets_View.php +9 -0
- src/admin-views/attendees.php +8 -7
- src/resources/js/tickets-block.js +6 -19
- src/resources/js/tickets-block.min.js +1 -1
- src/template-tags/tickets.php +9 -6
- src/views/blocks/rsvp/status/going.php +2 -2
- src/views/blocks/rsvp/status/not-going.php +2 -2
- src/views/blocks/tickets/submit-button-modal.php +3 -4
- src/views/registration-js/attendees/fields/checkbox.php +6 -8
- src/views/tickets/view-link.php +25 -4
- src/views/v2/rsvp.php +9 -5
- src/views/v2/rsvp/actions/rsvp/going.php +2 -2
- src/views/v2/rsvp/actions/rsvp/not-going.php +2 -2
- src/views/v2/rsvp/details/attendance.php +2 -2
- 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/lang/tribe-common-pt_BR.mo
CHANGED
Binary file
|
common/src/Tribe/Main.php
CHANGED
@@ -19,7 +19,7 @@ class Tribe__Main {
|
|
19 |
const OPTIONNAME = 'tribe_events_calendar_options';
|
20 |
const OPTIONNAMENETWORK = 'tribe_events_calendar_network_options';
|
21 |
|
22 |
-
const VERSION = '4.12.
|
23 |
|
24 |
const FEED_URL = 'https://theeventscalendar.com/feed/';
|
25 |
|
19 |
const OPTIONNAME = 'tribe_events_calendar_options';
|
20 |
const OPTIONNAMENETWORK = 'tribe_events_calendar_network_options';
|
21 |
|
22 |
+
const VERSION = '4.12.9';
|
23 |
|
24 |
const FEED_URL = 'https://theeventscalendar.com/feed/';
|
25 |
|
common/src/Tribe/Service_Providers/Shortcodes.php
CHANGED
@@ -23,11 +23,18 @@ class Shortcodes extends \tad_DI52_ServiceProvider {
|
|
23 |
}
|
24 |
|
25 |
$this->container->singleton( Manager::class, Manager::class );
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
$this->register_hooks();
|
28 |
$this->register_assets();
|
29 |
|
30 |
$this->container->singleton( static::class, $this );
|
|
|
31 |
}
|
32 |
|
33 |
/**
|
@@ -64,6 +71,8 @@ class Shortcodes extends \tad_DI52_ServiceProvider {
|
|
64 |
*/
|
65 |
protected function register_hooks() {
|
66 |
add_action( 'init', [ $this, 'action_add_shortcodes' ], 20 );
|
|
|
|
|
67 |
}
|
68 |
|
69 |
/**
|
@@ -77,4 +86,36 @@ class Shortcodes extends \tad_DI52_ServiceProvider {
|
|
77 |
public function action_add_shortcodes() {
|
78 |
$this->container->make( Manager::class )->add_shortcodes();
|
79 |
}
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
$this->container->singleton( Manager::class, Manager::class );
|
26 |
+
$this->container->singleton(
|
27 |
+
'shortcode.manager',
|
28 |
+
function() {
|
29 |
+
return $this->container->make( Manager::class );
|
30 |
+
}
|
31 |
+
);
|
32 |
|
33 |
$this->register_hooks();
|
34 |
$this->register_assets();
|
35 |
|
36 |
$this->container->singleton( static::class, $this );
|
37 |
+
|
38 |
}
|
39 |
|
40 |
/**
|
71 |
*/
|
72 |
protected function register_hooks() {
|
73 |
add_action( 'init', [ $this, 'action_add_shortcodes' ], 20 );
|
74 |
+
add_filter( 'pre_do_shortcode_tag', [ $this, 'filter_pre_do_shortcode_tag' ], 10, 4 );
|
75 |
+
add_filter( 'do_shortcode_tag', [ $this, 'filter_do_shortcode_tag' ], 10, 4 );
|
76 |
}
|
77 |
|
78 |
/**
|
86 |
public function action_add_shortcodes() {
|
87 |
$this->container->make( Manager::class )->add_shortcodes();
|
88 |
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Filters `pre_do_shortcode_tag` to mark that a tribe shortcode is currently being done.
|
92 |
+
*
|
93 |
+
* @since 4.12.9
|
94 |
+
*
|
95 |
+
* @param bool|string $return Short-circuit return value. Either false or the value to replace the shortcode with.
|
96 |
+
* @param string $tag Shortcode name.
|
97 |
+
* @param array $attr Shortcode attributes array,
|
98 |
+
* @param array $m Regular expression match array.
|
99 |
+
*
|
100 |
+
* @return bool|string Short-circuit return value.
|
101 |
+
*/
|
102 |
+
public function filter_pre_do_shortcode_tag( $false, $tag, $attr, $m ) {
|
103 |
+
return $this->container->make( Manager::class )->filter_pre_do_shortcode_tag( $false, $tag, $attr, $m );
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* * Filters `do_shortcode_tag` to mark that a tribe shortcode is complete, and remove it from the current list.
|
108 |
+
*
|
109 |
+
* @since 4.12.9
|
110 |
+
*
|
111 |
+
* @param string $output Shortcode output.
|
112 |
+
* @param string $tag Shortcode name.
|
113 |
+
* @param array|string $attr Shortcode attributes array or empty string.
|
114 |
+
* @param array $m Regular expression match array.
|
115 |
+
*
|
116 |
+
* @return string Shortcode output.
|
117 |
+
*/
|
118 |
+
public function filter_do_shortcode_tag( $output, $tag, $attr, $m ) {
|
119 |
+
return $this->container->make( Manager::class )->filter_do_shortcode_tag( $output, $tag, $attr, $m );
|
120 |
+
}
|
121 |
+
}
|
common/src/Tribe/Shortcode/Manager.php
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
* @package Tribe\Shortcode
|
6 |
* @since 4.12.0
|
7 |
*/
|
|
|
8 |
namespace Tribe\Shortcode;
|
9 |
|
10 |
/**
|
@@ -15,6 +16,16 @@ namespace Tribe\Shortcode;
|
|
15 |
* @package Tribe\Shortcode
|
16 |
*/
|
17 |
class Manager {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
/**
|
19 |
* Get the list of shortcodes available for handling.
|
20 |
*
|
@@ -104,4 +115,68 @@ class Manager {
|
|
104 |
|
105 |
return $instance->get_html();
|
106 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
}
|
5 |
* @package Tribe\Shortcode
|
6 |
* @since 4.12.0
|
7 |
*/
|
8 |
+
|
9 |
namespace Tribe\Shortcode;
|
10 |
|
11 |
/**
|
16 |
* @package Tribe\Shortcode
|
17 |
*/
|
18 |
class Manager {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Current shortcodes.
|
22 |
+
*
|
23 |
+
* @since 4.12.9
|
24 |
+
*
|
25 |
+
* @var array $current_shortcode An array containing the current shortcodes being executed.
|
26 |
+
*/
|
27 |
+
public $current_shortcode = [];
|
28 |
+
|
29 |
/**
|
30 |
* Get the list of shortcodes available for handling.
|
31 |
*
|
115 |
|
116 |
return $instance->get_html();
|
117 |
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Filter `pre_do_shortcode_tag` to add the current shortcode.
|
121 |
+
*
|
122 |
+
* @since 4.12.9
|
123 |
+
*
|
124 |
+
* @param bool|string $return Short-circuit return value. Either false or the value to replace the shortcode with.
|
125 |
+
* @param string $tag Shortcode name.
|
126 |
+
* @param array $attr Shortcode attributes array,
|
127 |
+
* @param array $m Regular expression match array.
|
128 |
+
*
|
129 |
+
* @return bool|string Short-circuit return value.
|
130 |
+
*/
|
131 |
+
public function filter_pre_do_shortcode_tag( $return, $tag, $attr, $m ) {
|
132 |
+
if ( ! $this->is_shortcode_registered( $tag ) ) {
|
133 |
+
return $return;
|
134 |
+
}
|
135 |
+
|
136 |
+
// Add to the doing shortcode.
|
137 |
+
$this->current_shortcode[] = $tag;
|
138 |
+
|
139 |
+
return $return;
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Filter `do_shortcode_tag` to remove the shortcode from the `$tribe_current_shortcode` list.
|
144 |
+
*
|
145 |
+
* @since 4.12.9
|
146 |
+
*
|
147 |
+
* @param string $output Shortcode output.
|
148 |
+
* @param string $tag Shortcode name.
|
149 |
+
* @param array|string $attr Shortcode attributes array or empty string.
|
150 |
+
* @param array $m Regular expression match array.
|
151 |
+
*
|
152 |
+
* @return string Shortcode output.
|
153 |
+
*/
|
154 |
+
public function filter_do_shortcode_tag( $output, $tag, $attr, $m ) {
|
155 |
+
if ( ! $this->is_shortcode_registered( $tag ) ) {
|
156 |
+
return $output;
|
157 |
+
}
|
158 |
+
|
159 |
+
if ( isset( $this->current_shortcode[ $tag ] ) ) {
|
160 |
+
unset( $this->current_shortcode[ $tag ] );
|
161 |
+
}
|
162 |
+
|
163 |
+
return $output;
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Check if a shortcode is being done.
|
168 |
+
*
|
169 |
+
* @since 4.12.9
|
170 |
+
*
|
171 |
+
* @param null|string $tag The shortcode tag name, or null to check if doing any shortcode.
|
172 |
+
*
|
173 |
+
* @return bool If the shortcode is being done or not.
|
174 |
+
*/
|
175 |
+
public function is_doing_shortcode( $tag = null ) {
|
176 |
+
if ( null === $tag ) {
|
177 |
+
return ! empty( $this->current_shortcode );
|
178 |
+
}
|
179 |
+
|
180 |
+
return in_array( $tag, $this->current_shortcode, true );
|
181 |
+
}
|
182 |
}
|
common/src/functions/template-tags/general.php
CHANGED
@@ -645,6 +645,7 @@ function tribe_asset_enqueue_group( $group ) {
|
|
645 |
* Function to include more the one asset, based on `tribe_asset`
|
646 |
*
|
647 |
* @since 4.3
|
|
|
648 |
*
|
649 |
* @param object $origin The main Object for the plugin you are enqueueing the script/style for
|
650 |
* @param array $assets {
|
@@ -676,7 +677,14 @@ function tribe_assets( $origin, $assets, $action = null, $arguments = array() )
|
|
676 |
$file = $asset[1];
|
677 |
$deps = ! empty( $asset[2] ) ? $asset[2] : array();
|
678 |
|
679 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
680 |
}
|
681 |
|
682 |
return $registered;
|
@@ -799,3 +807,20 @@ if ( ! function_exists( 'tribe_asset_print_group' ) ) {
|
|
799 |
return $assets->print_group($group, $echo);
|
800 |
}
|
801 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
645 |
* Function to include more the one asset, based on `tribe_asset`
|
646 |
*
|
647 |
* @since 4.3
|
648 |
+
* @since TBD Added support for overriding arguments for individual assets.
|
649 |
*
|
650 |
* @param object $origin The main Object for the plugin you are enqueueing the script/style for
|
651 |
* @param array $assets {
|
677 |
$file = $asset[1];
|
678 |
$deps = ! empty( $asset[2] ) ? $asset[2] : array();
|
679 |
|
680 |
+
// Support the asset having a custom action.
|
681 |
+
$asset_action = ! empty( $asset[3] ) ? $asset[3] : $action;
|
682 |
+
|
683 |
+
// Support the asset having custom arguments and merge them with the original ones.
|
684 |
+
$asset_arguments = ! empty( $asset[4] ) ? array_merge( $arguments, $asset[4] ) : $arguments;
|
685 |
+
|
686 |
+
$registered[] = tribe_asset( $origin, $slug, $file, $deps, $asset_action, $asset_arguments );
|
687 |
+
|
688 |
}
|
689 |
|
690 |
return $registered;
|
807 |
return $assets->print_group($group, $echo);
|
808 |
}
|
809 |
}
|
810 |
+
|
811 |
+
if ( ! function_exists( 'tribe_doing_shortcode' ) ) {
|
812 |
+
/**
|
813 |
+
* Check whether a specific shortcode is being run.
|
814 |
+
*
|
815 |
+
* This is limited to only shortcodes registered with Tribe\Shortcode\Manager.
|
816 |
+
*
|
817 |
+
* @since TBD
|
818 |
+
*
|
819 |
+
* @param null|string $tag The shortcode tag name, or null to check if doing any shortcode.
|
820 |
+
*
|
821 |
+
* @return bool Whether the shortcode is currently being run.
|
822 |
+
*/
|
823 |
+
function tribe_doing_shortcode( $tag = null ) {
|
824 |
+
return tribe( 'shortcode.manager' )->is_doing_shortcode( $tag );
|
825 |
+
}
|
826 |
+
}
|
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 ComposerAutoloaderInita893047ce8580cc1ae0182d7b0dd0989::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 ComposerAutoloaderInit069bb8ec099962d4491c176ad9f44feb::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 ComposerAutoloaderInit47084eab52b4183d574b68d50137748f
|
|
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 ComposerAutoloaderInita893047ce8580cc1ae0182d7b0dd0989
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInita893047ce8580cc1ae0182d7b0dd0989', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInita893047ce8580cc1ae0182d7b0dd0989', '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\ComposerStaticInita893047ce8580cc1ae0182d7b0dd0989::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 ComposerAutoloaderInitbeab9af58b3a7cca5437d5ecbaeec725 {
|
|
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 ComposerAutoloaderInit069bb8ec099962d4491c176ad9f44feb {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit069bb8ec099962d4491c176ad9f44feb', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit069bb8ec099962d4491c176ad9f44feb', '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' =>
|
@@ -220,10 +220,10 @@ class ComposerStaticInit47084eab52b4183d574b68d50137748f
|
|
220 |
public static function getInitializer(ClassLoader $loader)
|
221 |
{
|
222 |
return \Closure::bind(function () use ($loader) {
|
223 |
-
$loader->prefixLengthsPsr4 =
|
224 |
-
$loader->prefixDirsPsr4 =
|
225 |
-
$loader->prefixesPsr0 =
|
226 |
-
$loader->classMap =
|
227 |
|
228 |
}, null, ClassLoader::class);
|
229 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInita893047ce8580cc1ae0182d7b0dd0989
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
220 |
public static function getInitializer(ClassLoader $loader)
|
221 |
{
|
222 |
return \Closure::bind(function () use ($loader) {
|
223 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInita893047ce8580cc1ae0182d7b0dd0989::$prefixLengthsPsr4;
|
224 |
+
$loader->prefixDirsPsr4 = ComposerStaticInita893047ce8580cc1ae0182d7b0dd0989::$prefixDirsPsr4;
|
225 |
+
$loader->prefixesPsr0 = ComposerStaticInita893047ce8580cc1ae0182d7b0dd0989::$prefixesPsr0;
|
226 |
+
$loader->classMap = ComposerStaticInita893047ce8580cc1ae0182d7b0dd0989::$classMap;
|
227 |
|
228 |
}, null, ClassLoader::class);
|
229 |
}
|
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: 5.0.
|
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: 5.0.1
|
7 |
Author: Modern Tribe, Inc.
|
8 |
Author URI: http://m.tri.be/28
|
9 |
License: GPLv2 or later
|
lang/event-tickets-de_DE.mo
CHANGED
Binary file
|
lang/event-tickets-es_ES.mo
CHANGED
Binary file
|
lang/event-tickets-fi.mo
CHANGED
Binary file
|
lang/event-tickets-fr_CA.mo
CHANGED
Binary file
|
lang/event-tickets-fr_FR.mo
CHANGED
Binary file
|
lang/event-tickets-nl_NL.mo
CHANGED
Binary file
|
lang/event-tickets-pt_BR.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 5.0.
|
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 5.0.
|
16 |
#. Plugin Name of the plugin/theme
|
17 |
#: event-tickets.php:62 src/Tribe/Admin/Notices.php:90 src/Tribe/Main.php:675
|
18 |
#: src/Tribe/Privacy.php:59
|
@@ -68,7 +68,7 @@ msgid ""
|
|
68 |
msgstr ""
|
69 |
|
70 |
#: src/Tribe/Admin/Move_Ticket_Types.php:320
|
71 |
-
#: src/Tribe/Admin/Move_Tickets.php:
|
72 |
msgid "Changes to your tickets from %s"
|
73 |
msgstr ""
|
74 |
|
@@ -103,28 +103,28 @@ msgctxt "attendee screen bulk actions"
|
|
103 |
msgid "Move"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: src/Tribe/Admin/Move_Tickets.php:
|
107 |
msgid ""
|
108 |
"%1$s could not be moved: valid %2$s IDs or a destination ID were not "
|
109 |
"provided."
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: src/Tribe/Admin/Move_Tickets.php:
|
113 |
msgid ""
|
114 |
"%s could not be moved: there was an unexpected failure during reassignment."
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: src/Tribe/Admin/Move_Tickets.php:
|
118 |
msgctxt "moved tickets success message fragment"
|
119 |
msgid "assigned to %s"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: src/Tribe/Admin/Move_Tickets.php:
|
123 |
msgctxt "moved tickets success message fragment"
|
124 |
msgid "moved to %s and"
|
125 |
msgstr ""
|
126 |
|
127 |
-
#: src/Tribe/Admin/Move_Tickets.php:
|
128 |
msgid ""
|
129 |
"%1$d attendee for %2$s was successfully %3$s. By default, we adjust capacity "
|
130 |
"and stock, however, we recommend reviewing each as needed to ensure numbers "
|
@@ -138,11 +138,11 @@ msgid_plural ""
|
|
138 |
msgstr[0] ""
|
139 |
msgstr[1] ""
|
140 |
|
141 |
-
#: src/Tribe/Admin/Move_Tickets.php:
|
142 |
msgid "This ticket was moved to %1$s %2$s from %3$s %4$s"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: src/Tribe/Admin/Move_Tickets.php:
|
146 |
msgid "This ticket was moved to %1$s from %2$s"
|
147 |
msgstr ""
|
148 |
|
@@ -198,21 +198,21 @@ msgstr ""
|
|
198 |
msgid "Set as %s header"
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: src/Tribe/Assets.php:
|
202 |
msgid "Are you sure you want to delete this ticket? This cannot be undone."
|
203 |
msgstr ""
|
204 |
|
205 |
-
#: src/Tribe/Assets.php:
|
206 |
msgid ""
|
207 |
"It looks like you have modified your shared capacity setting but have not "
|
208 |
"saved or updated the post."
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: src/Tribe/Assets.php:
|
212 |
msgid "Please enter in without thousand separators and currency symbols."
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: src/Tribe/Assets.php:
|
216 |
msgid ""
|
217 |
"There is unsaved attendee information. Are you sure you want to continue?"
|
218 |
msgstr ""
|
@@ -628,10 +628,11 @@ msgstr ""
|
|
628 |
msgid "U.S. Dollar (USD)"
|
629 |
msgstr ""
|
630 |
|
631 |
-
#. Translators: 1: the post title, 2: the post ID.
|
632 |
#: src/Tribe/Commerce/Orders_Tabbed_View.php:36
|
|
|
633 |
msgctxt "attendees report screen heading"
|
634 |
-
msgid "Attendees for: %s [#%d]"
|
635 |
msgstr ""
|
636 |
|
637 |
#: src/Tribe/Commerce/PayPal/Attendance_Totals.php:77
|
@@ -777,7 +778,7 @@ msgstr ""
|
|
777 |
msgid "Post draft updated."
|
778 |
msgstr ""
|
779 |
|
780 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
781 |
msgid "(deleted)"
|
782 |
msgstr ""
|
783 |
|
@@ -940,27 +941,27 @@ msgstr ""
|
|
940 |
msgid "Are you sure you want to cancel?"
|
941 |
msgstr ""
|
942 |
|
943 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:
|
944 |
msgctxt "Error message title, will be followed by the error code."
|
945 |
msgid "API Error"
|
946 |
msgstr ""
|
947 |
|
948 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:
|
949 |
msgid ""
|
950 |
"Refresh this page or wait a few minutes before trying again. If this happens "
|
951 |
"repeatedly, please contact the Site Admin."
|
952 |
msgstr ""
|
953 |
|
954 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:
|
955 |
msgid ""
|
956 |
"The ticket for this event has sold out and has been removed from your cart."
|
957 |
msgstr ""
|
958 |
|
959 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:
|
960 |
msgid "Whoops!"
|
961 |
msgstr ""
|
962 |
|
963 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:
|
964 |
msgctxt "The %s will change based on the error produced."
|
965 |
msgid "You have %s ticket(s) with a field that requires information."
|
966 |
msgstr ""
|
@@ -2159,7 +2160,7 @@ msgid "Unlimited"
|
|
2159 |
msgstr ""
|
2160 |
|
2161 |
#: src/Tribe/Tickets_View.php:852 src/views/blocks/attendees/view-link.php:67
|
2162 |
-
#: src/views/tickets/view-link.php:
|
2163 |
msgctxt "separator if there are both RSVPs and Tickets"
|
2164 |
msgid " and "
|
2165 |
msgstr ""
|
@@ -2318,23 +2319,17 @@ msgstr ""
|
|
2318 |
msgid "Send Email"
|
2319 |
msgstr ""
|
2320 |
|
2321 |
-
|
2322 |
-
#: src/admin-views/attendees.php:32
|
2323 |
-
msgctxt "attendees report screen heading"
|
2324 |
-
msgid "Attendees for: %1$s [#%2$d]"
|
2325 |
-
msgstr ""
|
2326 |
-
|
2327 |
-
#: src/admin-views/attendees.php:58
|
2328 |
msgctxt "attendee screen summary"
|
2329 |
msgid "%s Details"
|
2330 |
msgstr ""
|
2331 |
|
2332 |
-
#: src/admin-views/attendees.php:
|
2333 |
msgctxt "attendee screen summary"
|
2334 |
msgid "Overview"
|
2335 |
msgstr ""
|
2336 |
|
2337 |
-
#: src/admin-views/attendees.php:
|
2338 |
msgid "Search attendees"
|
2339 |
msgstr ""
|
2340 |
|
@@ -3286,111 +3281,114 @@ msgctxt "list view stock sold out"
|
|
3286 |
msgid "Sold out"
|
3287 |
msgstr ""
|
3288 |
|
3289 |
-
|
|
|
3290 |
msgid "%s spot left"
|
3291 |
msgid_plural "%s spots left"
|
3292 |
msgstr[0] ""
|
3293 |
msgstr[1] ""
|
3294 |
|
3295 |
-
|
|
|
3296 |
msgid "%s ticket left"
|
3297 |
msgid_plural "%s tickets left"
|
3298 |
msgstr[0] ""
|
3299 |
msgstr[1] ""
|
3300 |
|
3301 |
-
|
|
|
3302 |
msgctxt "list view rsvp now ticket button"
|
3303 |
msgid "%s Now!"
|
3304 |
msgstr ""
|
3305 |
|
3306 |
-
#: src/template-tags/tickets.php:
|
3307 |
msgctxt "list view buy now ticket button"
|
3308 |
msgid "Buy Now!"
|
3309 |
msgstr ""
|
3310 |
|
3311 |
-
#: src/template-tags/tickets.php:
|
3312 |
msgid "issued"
|
3313 |
msgstr ""
|
3314 |
|
3315 |
-
#: src/template-tags/tickets.php:
|
3316 |
msgctxt "RSVPs going"
|
3317 |
msgid "%s'd going"
|
3318 |
msgstr ""
|
3319 |
|
3320 |
#. translators: %1$s: formatted quantity remaining
|
3321 |
-
#: src/template-tags/tickets.php:
|
3322 |
msgctxt "unlimited remaining stock message"
|
3323 |
msgid "%1$s available"
|
3324 |
msgstr ""
|
3325 |
|
3326 |
#. translators: %1$s: formatted quantity remaining
|
3327 |
-
#: src/template-tags/tickets.php:
|
3328 |
msgctxt "ticket shared capacity message (remaining stock)"
|
3329 |
msgid "%1$s available of shared capacity"
|
3330 |
msgstr ""
|
3331 |
|
3332 |
#. translators: %1$s: formatted quantity remaining
|
3333 |
-
#: src/template-tags/tickets.php:
|
3334 |
msgctxt "ticket stock message (remaining stock)"
|
3335 |
msgid "%1$s available"
|
3336 |
msgstr ""
|
3337 |
|
3338 |
-
#: src/template-tags/tickets.php:
|
3339 |
msgctxt "singular label for RSVP"
|
3340 |
msgid "RSVP"
|
3341 |
msgstr ""
|
3342 |
|
3343 |
-
#: src/template-tags/tickets.php:
|
3344 |
msgctxt "lowercase singular label for RSVP"
|
3345 |
msgid "rsvp"
|
3346 |
msgstr ""
|
3347 |
|
3348 |
-
#: src/template-tags/tickets.php:
|
3349 |
msgctxt "plural label for RSVPs"
|
3350 |
msgid "RSVPs"
|
3351 |
msgstr ""
|
3352 |
|
3353 |
-
#: src/template-tags/tickets.php:
|
3354 |
msgctxt "lowercase plural label for RSVPs"
|
3355 |
msgid "rsvps"
|
3356 |
msgstr ""
|
3357 |
|
3358 |
-
#: src/template-tags/tickets.php:
|
3359 |
msgctxt "singular label for Ticket"
|
3360 |
msgid "Ticket"
|
3361 |
msgstr ""
|
3362 |
|
3363 |
-
#: src/template-tags/tickets.php:
|
3364 |
msgctxt "lowercase singular label for Ticket"
|
3365 |
msgid "ticket"
|
3366 |
msgstr ""
|
3367 |
|
3368 |
-
#: src/template-tags/tickets.php:
|
3369 |
msgctxt "plural label for Tickets"
|
3370 |
msgid "Tickets"
|
3371 |
msgstr ""
|
3372 |
|
3373 |
-
#: src/template-tags/tickets.php:
|
3374 |
msgctxt "lowercase plural label for Tickets"
|
3375 |
msgid "tickets"
|
3376 |
msgstr ""
|
3377 |
|
3378 |
-
#: src/template-tags/tickets.php:
|
3379 |
msgctxt "singular label for Guest"
|
3380 |
msgid "Guest"
|
3381 |
msgstr ""
|
3382 |
|
3383 |
-
#: src/template-tags/tickets.php:
|
3384 |
msgctxt "lowercase singular label for Guest"
|
3385 |
msgid "guest"
|
3386 |
msgstr ""
|
3387 |
|
3388 |
-
#: src/template-tags/tickets.php:
|
3389 |
msgctxt "plural label for Guest"
|
3390 |
msgid "Guests"
|
3391 |
msgstr ""
|
3392 |
|
3393 |
-
#: src/template-tags/tickets.php:
|
3394 |
msgctxt "lowercase plural label for Guest"
|
3395 |
msgid "guests"
|
3396 |
msgstr ""
|
@@ -3404,35 +3402,35 @@ msgstr[1] ""
|
|
3404 |
#: src/views/blocks/attendees/view-link.php:39
|
3405 |
#: src/views/tickets/orders-pp-tickets.php:32
|
3406 |
#: src/views/tickets/orders-rsvp.php:30 src/views/tickets/orders.php:76
|
3407 |
-
#: src/views/tickets/view-link.php:
|
3408 |
msgctxt "fallback post type singular name"
|
3409 |
msgid "Post"
|
3410 |
msgstr ""
|
3411 |
|
3412 |
#. Translators: 1: the number one, 2: singular RSVP label.
|
3413 |
#: src/views/blocks/attendees/view-link.php:46
|
3414 |
-
#: src/views/tickets/view-link.php:
|
3415 |
msgctxt "RSVP count singular"
|
3416 |
msgid "%1$d %2$s"
|
3417 |
msgstr ""
|
3418 |
|
3419 |
#. Translators: 1: the plural number of RSVPs, 2: plural RSVP label.
|
3420 |
#: src/views/blocks/attendees/view-link.php:49
|
3421 |
-
#: src/views/tickets/view-link.php:
|
3422 |
msgctxt "RSVP count plural"
|
3423 |
msgid "%1$d %2$s"
|
3424 |
msgstr ""
|
3425 |
|
3426 |
#. Translators: 1: the number one, 2: singular Ticket label.
|
3427 |
#: src/views/blocks/attendees/view-link.php:54
|
3428 |
-
#: src/views/tickets/view-link.php:
|
3429 |
msgctxt "Ticket count singular"
|
3430 |
msgid "%1$d %2$s"
|
3431 |
msgstr ""
|
3432 |
|
3433 |
#. Translators: 1: the plural number of Tickets, 2: plural Ticket label.
|
3434 |
#: src/views/blocks/attendees/view-link.php:57
|
3435 |
-
#: src/views/tickets/view-link.php:
|
3436 |
msgctxt "Ticket count plural"
|
3437 |
msgid "%1$d %2$s"
|
3438 |
msgstr ""
|
@@ -3442,12 +3440,14 @@ msgstr ""
|
|
3442 |
#. Translators: 1: number of RSVPs and/or Tickets with accompanying ticket type
|
3443 |
#. text, 2: post type label.
|
3444 |
#: src/views/blocks/attendees/view-link.php:67
|
3445 |
-
#: src/views/tickets/view-link.php:
|
3446 |
msgid "You have %1s for this %2s."
|
3447 |
msgstr ""
|
3448 |
|
|
|
|
|
3449 |
#: src/views/blocks/attendees/view-link.php:72
|
3450 |
-
#: src/views/tickets/view-link.php:
|
3451 |
msgid "View your %s"
|
3452 |
msgstr ""
|
3453 |
|
@@ -3496,11 +3496,12 @@ msgstr ""
|
|
3496 |
|
3497 |
#: src/views/blocks/rsvp/status/going.php:25
|
3498 |
#: src/views/v2/rsvp/actions/rsvp/going.php:28
|
3499 |
-
|
3500 |
msgid "Going"
|
3501 |
msgstr ""
|
3502 |
|
3503 |
#: src/views/blocks/rsvp/status/not-going.php:44
|
|
|
3504 |
msgid "Not going"
|
3505 |
msgstr ""
|
3506 |
|
@@ -3989,7 +3990,7 @@ msgid "RSVP Closed"
|
|
3989 |
msgstr ""
|
3990 |
|
3991 |
#: src/views/v2/rsvp/actions/rsvp/not-going.php:43
|
3992 |
-
|
3993 |
msgid "Can't go"
|
3994 |
msgstr ""
|
3995 |
|
@@ -4001,6 +4002,10 @@ msgstr ""
|
|
4001 |
msgid "You are going"
|
4002 |
msgstr ""
|
4003 |
|
|
|
|
|
|
|
|
|
4004 |
#. Translators: 1: opening span. 2: Closing span.
|
4005 |
#: src/views/v2/rsvp/actions/success/toggle.php:55
|
4006 |
msgctxt "Toggle for RSVP attendee list."
|
@@ -4081,6 +4086,11 @@ msgstr ""
|
|
4081 |
msgid "Total %s"
|
4082 |
msgstr ""
|
4083 |
|
|
|
|
|
|
|
|
|
|
|
4084 |
#. Translators: 1: opening span. 2: the number of remaining days to RSVP. 3:
|
4085 |
#. Closing span. 4: The RSVP label.
|
4086 |
#: src/views/v2/rsvp/details/availability/days-to-rsvp.php:23
|
2 |
# This file is distributed under the same license as the Event Tickets package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Event Tickets 5.0.1\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/event-tickets\n"
|
7 |
+
"POT-Creation-Date: 2020-09-17 04:58:58+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-09-17 04:58\n"
|
12 |
"Last-Translator: \n"
|
13 |
"Language-Team: \n"
|
14 |
|
15 |
+
#. #-#-#-#-# event-tickets.pot (Event Tickets 5.0.1) #-#-#-#-#
|
16 |
#. Plugin Name of the plugin/theme
|
17 |
#: event-tickets.php:62 src/Tribe/Admin/Notices.php:90 src/Tribe/Main.php:675
|
18 |
#: src/Tribe/Privacy.php:59
|
68 |
msgstr ""
|
69 |
|
70 |
#: src/Tribe/Admin/Move_Ticket_Types.php:320
|
71 |
+
#: src/Tribe/Admin/Move_Tickets.php:753
|
72 |
msgid "Changes to your tickets from %s"
|
73 |
msgstr ""
|
74 |
|
103 |
msgid "Move"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: src/Tribe/Admin/Move_Tickets.php:445
|
107 |
msgid ""
|
108 |
"%1$s could not be moved: valid %2$s IDs or a destination ID were not "
|
109 |
"provided."
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: src/Tribe/Admin/Move_Tickets.php:457
|
113 |
msgid ""
|
114 |
"%s could not be moved: there was an unexpected failure during reassignment."
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: src/Tribe/Admin/Move_Tickets.php:466
|
118 |
msgctxt "moved tickets success message fragment"
|
119 |
msgid "assigned to %s"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: src/Tribe/Admin/Move_Tickets.php:473
|
123 |
msgctxt "moved tickets success message fragment"
|
124 |
msgid "moved to %s and"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: src/Tribe/Admin/Move_Tickets.php:480
|
128 |
msgid ""
|
129 |
"%1$d attendee for %2$s was successfully %3$s. By default, we adjust capacity "
|
130 |
"and stock, however, we recommend reviewing each as needed to ensure numbers "
|
138 |
msgstr[0] ""
|
139 |
msgstr[1] ""
|
140 |
|
141 |
+
#: src/Tribe/Admin/Move_Tickets.php:628
|
142 |
msgid "This ticket was moved to %1$s %2$s from %3$s %4$s"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: src/Tribe/Admin/Move_Tickets.php:815
|
146 |
msgid "This ticket was moved to %1$s from %2$s"
|
147 |
msgstr ""
|
148 |
|
198 |
msgid "Set as %s header"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: src/Tribe/Assets.php:136
|
202 |
msgid "Are you sure you want to delete this ticket? This cannot be undone."
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: src/Tribe/Assets.php:142
|
206 |
msgid ""
|
207 |
"It looks like you have modified your shared capacity setting but have not "
|
208 |
"saved or updated the post."
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: src/Tribe/Assets.php:149 src/Tribe/Metabox.php:575
|
212 |
msgid "Please enter in without thousand separators and currency symbols."
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: src/Tribe/Assets.php:236
|
216 |
msgid ""
|
217 |
"There is unsaved attendee information. Are you sure you want to continue?"
|
218 |
msgstr ""
|
628 |
msgid "U.S. Dollar (USD)"
|
629 |
msgstr ""
|
630 |
|
631 |
+
#. Translators: %1$s: the post/event title, %2$d: the post/event ID.
|
632 |
#: src/Tribe/Commerce/Orders_Tabbed_View.php:36
|
633 |
+
#: src/admin-views/attendees.php:33
|
634 |
msgctxt "attendees report screen heading"
|
635 |
+
msgid "Attendees for: %1$s [#%2$d]"
|
636 |
msgstr ""
|
637 |
|
638 |
#: src/Tribe/Commerce/PayPal/Attendance_Totals.php:77
|
778 |
msgid "Post draft updated."
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: src/Tribe/Commerce/PayPal/Main.php:2954 src/Tribe/RSVP.php:2025
|
782 |
msgid "(deleted)"
|
783 |
msgstr ""
|
784 |
|
941 |
msgid "Are you sure you want to cancel?"
|
942 |
msgstr ""
|
943 |
|
944 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:326 src/Tribe/Tickets.php:3274
|
945 |
msgctxt "Error message title, will be followed by the error code."
|
946 |
msgid "API Error"
|
947 |
msgstr ""
|
948 |
|
949 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:327 src/Tribe/Tickets.php:3275
|
950 |
msgid ""
|
951 |
"Refresh this page or wait a few minutes before trying again. If this happens "
|
952 |
"repeatedly, please contact the Site Admin."
|
953 |
msgstr ""
|
954 |
|
955 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:328 src/Tribe/Tickets.php:3276
|
956 |
msgid ""
|
957 |
"The ticket for this event has sold out and has been removed from your cart."
|
958 |
msgstr ""
|
959 |
|
960 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:329 src/Tribe/Tickets.php:3277
|
961 |
msgid "Whoops!"
|
962 |
msgstr ""
|
963 |
|
964 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:330 src/Tribe/Tickets.php:3278
|
965 |
msgctxt "The %s will change based on the error produced."
|
966 |
msgid "You have %s ticket(s) with a field that requires information."
|
967 |
msgstr ""
|
2160 |
msgstr ""
|
2161 |
|
2162 |
#: src/Tribe/Tickets_View.php:852 src/views/blocks/attendees/view-link.php:67
|
2163 |
+
#: src/views/tickets/view-link.php:77
|
2164 |
msgctxt "separator if there are both RSVPs and Tickets"
|
2165 |
msgid " and "
|
2166 |
msgstr ""
|
2319 |
msgid "Send Email"
|
2320 |
msgstr ""
|
2321 |
|
2322 |
+
#: src/admin-views/attendees.php:59
|
|
|
|
|
|
|
|
|
|
|
|
|
2323 |
msgctxt "attendee screen summary"
|
2324 |
msgid "%s Details"
|
2325 |
msgstr ""
|
2326 |
|
2327 |
+
#: src/admin-views/attendees.php:101
|
2328 |
msgctxt "attendee screen summary"
|
2329 |
msgid "Overview"
|
2330 |
msgstr ""
|
2331 |
|
2332 |
+
#: src/admin-views/attendees.php:152
|
2333 |
msgid "Search attendees"
|
2334 |
msgstr ""
|
2335 |
|
3281 |
msgid "Sold out"
|
3282 |
msgstr ""
|
3283 |
|
3284 |
+
#. Translators: %s number of RSVP spots left.
|
3285 |
+
#: src/template-tags/tickets.php:266
|
3286 |
msgid "%s spot left"
|
3287 |
msgid_plural "%s spots left"
|
3288 |
msgstr[0] ""
|
3289 |
msgstr[1] ""
|
3290 |
|
3291 |
+
#. Translators: %s number of tickets left.
|
3292 |
+
#: src/template-tags/tickets.php:269
|
3293 |
msgid "%s ticket left"
|
3294 |
msgid_plural "%s tickets left"
|
3295 |
msgstr[0] ""
|
3296 |
msgstr[1] ""
|
3297 |
|
3298 |
+
#. Translators: %s RSVP singular or plural.
|
3299 |
+
#: src/template-tags/tickets.php:282
|
3300 |
msgctxt "list view rsvp now ticket button"
|
3301 |
msgid "%s Now!"
|
3302 |
msgstr ""
|
3303 |
|
3304 |
+
#: src/template-tags/tickets.php:285
|
3305 |
msgctxt "list view buy now ticket button"
|
3306 |
msgid "Buy Now!"
|
3307 |
msgstr ""
|
3308 |
|
3309 |
+
#: src/template-tags/tickets.php:526
|
3310 |
msgid "issued"
|
3311 |
msgstr ""
|
3312 |
|
3313 |
+
#: src/template-tags/tickets.php:528
|
3314 |
msgctxt "RSVPs going"
|
3315 |
msgid "%s'd going"
|
3316 |
msgstr ""
|
3317 |
|
3318 |
#. translators: %1$s: formatted quantity remaining
|
3319 |
+
#: src/template-tags/tickets.php:535
|
3320 |
msgctxt "unlimited remaining stock message"
|
3321 |
msgid "%1$s available"
|
3322 |
msgstr ""
|
3323 |
|
3324 |
#. translators: %1$s: formatted quantity remaining
|
3325 |
+
#: src/template-tags/tickets.php:545
|
3326 |
msgctxt "ticket shared capacity message (remaining stock)"
|
3327 |
msgid "%1$s available of shared capacity"
|
3328 |
msgstr ""
|
3329 |
|
3330 |
#. translators: %1$s: formatted quantity remaining
|
3331 |
+
#: src/template-tags/tickets.php:556
|
3332 |
msgctxt "ticket stock message (remaining stock)"
|
3333 |
msgid "%1$s available"
|
3334 |
msgstr ""
|
3335 |
|
3336 |
+
#: src/template-tags/tickets.php:1312
|
3337 |
msgctxt "singular label for RSVP"
|
3338 |
msgid "RSVP"
|
3339 |
msgstr ""
|
3340 |
|
3341 |
+
#: src/template-tags/tickets.php:1336
|
3342 |
msgctxt "lowercase singular label for RSVP"
|
3343 |
msgid "rsvp"
|
3344 |
msgstr ""
|
3345 |
|
3346 |
+
#: src/template-tags/tickets.php:1360
|
3347 |
msgctxt "plural label for RSVPs"
|
3348 |
msgid "RSVPs"
|
3349 |
msgstr ""
|
3350 |
|
3351 |
+
#: src/template-tags/tickets.php:1384
|
3352 |
msgctxt "lowercase plural label for RSVPs"
|
3353 |
msgid "rsvps"
|
3354 |
msgstr ""
|
3355 |
|
3356 |
+
#: src/template-tags/tickets.php:1408
|
3357 |
msgctxt "singular label for Ticket"
|
3358 |
msgid "Ticket"
|
3359 |
msgstr ""
|
3360 |
|
3361 |
+
#: src/template-tags/tickets.php:1432
|
3362 |
msgctxt "lowercase singular label for Ticket"
|
3363 |
msgid "ticket"
|
3364 |
msgstr ""
|
3365 |
|
3366 |
+
#: src/template-tags/tickets.php:1456
|
3367 |
msgctxt "plural label for Tickets"
|
3368 |
msgid "Tickets"
|
3369 |
msgstr ""
|
3370 |
|
3371 |
+
#: src/template-tags/tickets.php:1480
|
3372 |
msgctxt "lowercase plural label for Tickets"
|
3373 |
msgid "tickets"
|
3374 |
msgstr ""
|
3375 |
|
3376 |
+
#: src/template-tags/tickets.php:1623
|
3377 |
msgctxt "singular label for Guest"
|
3378 |
msgid "Guest"
|
3379 |
msgstr ""
|
3380 |
|
3381 |
+
#: src/template-tags/tickets.php:1647
|
3382 |
msgctxt "lowercase singular label for Guest"
|
3383 |
msgid "guest"
|
3384 |
msgstr ""
|
3385 |
|
3386 |
+
#: src/template-tags/tickets.php:1671
|
3387 |
msgctxt "plural label for Guest"
|
3388 |
msgid "Guests"
|
3389 |
msgstr ""
|
3390 |
|
3391 |
+
#: src/template-tags/tickets.php:1695
|
3392 |
msgctxt "lowercase plural label for Guest"
|
3393 |
msgid "guests"
|
3394 |
msgstr ""
|
3402 |
#: src/views/blocks/attendees/view-link.php:39
|
3403 |
#: src/views/tickets/orders-pp-tickets.php:32
|
3404 |
#: src/views/tickets/orders-rsvp.php:30 src/views/tickets/orders.php:76
|
3405 |
+
#: src/views/tickets/view-link.php:49
|
3406 |
msgctxt "fallback post type singular name"
|
3407 |
msgid "Post"
|
3408 |
msgstr ""
|
3409 |
|
3410 |
#. Translators: 1: the number one, 2: singular RSVP label.
|
3411 |
#: src/views/blocks/attendees/view-link.php:46
|
3412 |
+
#: src/views/tickets/view-link.php:56
|
3413 |
msgctxt "RSVP count singular"
|
3414 |
msgid "%1$d %2$s"
|
3415 |
msgstr ""
|
3416 |
|
3417 |
#. Translators: 1: the plural number of RSVPs, 2: plural RSVP label.
|
3418 |
#: src/views/blocks/attendees/view-link.php:49
|
3419 |
+
#: src/views/tickets/view-link.php:59
|
3420 |
msgctxt "RSVP count plural"
|
3421 |
msgid "%1$d %2$s"
|
3422 |
msgstr ""
|
3423 |
|
3424 |
#. Translators: 1: the number one, 2: singular Ticket label.
|
3425 |
#: src/views/blocks/attendees/view-link.php:54
|
3426 |
+
#: src/views/tickets/view-link.php:64
|
3427 |
msgctxt "Ticket count singular"
|
3428 |
msgid "%1$d %2$s"
|
3429 |
msgstr ""
|
3430 |
|
3431 |
#. Translators: 1: the plural number of Tickets, 2: plural Ticket label.
|
3432 |
#: src/views/blocks/attendees/view-link.php:57
|
3433 |
+
#: src/views/tickets/view-link.php:67
|
3434 |
msgctxt "Ticket count plural"
|
3435 |
msgid "%1$d %2$s"
|
3436 |
msgstr ""
|
3440 |
#. Translators: 1: number of RSVPs and/or Tickets with accompanying ticket type
|
3441 |
#. text, 2: post type label.
|
3442 |
#: src/views/blocks/attendees/view-link.php:67
|
3443 |
+
#: src/views/tickets/view-link.php:77
|
3444 |
msgid "You have %1s for this %2s."
|
3445 |
msgstr ""
|
3446 |
|
3447 |
+
#. Translators: %s: The name(s) of the type(s) of ticket(s) the specified user
|
3448 |
+
#. (optional) has for the specified event.
|
3449 |
#: src/views/blocks/attendees/view-link.php:72
|
3450 |
+
#: src/views/tickets/view-link.php:85
|
3451 |
msgid "View your %s"
|
3452 |
msgstr ""
|
3453 |
|
3496 |
|
3497 |
#: src/views/blocks/rsvp/status/going.php:25
|
3498 |
#: src/views/v2/rsvp/actions/rsvp/going.php:28
|
3499 |
+
msgctxt "Label for the RSVP going button"
|
3500 |
msgid "Going"
|
3501 |
msgstr ""
|
3502 |
|
3503 |
#: src/views/blocks/rsvp/status/not-going.php:44
|
3504 |
+
msgctxt "Label for the RSVP not going button"
|
3505 |
msgid "Not going"
|
3506 |
msgstr ""
|
3507 |
|
3990 |
msgstr ""
|
3991 |
|
3992 |
#: src/views/v2/rsvp/actions/rsvp/not-going.php:43
|
3993 |
+
msgctxt "Label for the RSVP \"can't go\" version of the not going button"
|
3994 |
msgid "Can't go"
|
3995 |
msgstr ""
|
3996 |
|
4002 |
msgid "You are going"
|
4003 |
msgstr ""
|
4004 |
|
4005 |
+
#: src/views/v2/rsvp/actions/success/title.php:17
|
4006 |
+
msgid "Can't go"
|
4007 |
+
msgstr ""
|
4008 |
+
|
4009 |
#. Translators: 1: opening span. 2: Closing span.
|
4010 |
#: src/views/v2/rsvp/actions/success/toggle.php:55
|
4011 |
msgctxt "Toggle for RSVP attendee list."
|
4086 |
msgid "Total %s"
|
4087 |
msgstr ""
|
4088 |
|
4089 |
+
#: src/views/v2/rsvp/details/attendance.php:29
|
4090 |
+
msgctxt "Label below the attendance number"
|
4091 |
+
msgid "Going"
|
4092 |
+
msgstr ""
|
4093 |
+
|
4094 |
#. Translators: 1: opening span. 2: the number of remaining days to RSVP. 3:
|
4095 |
#. Closing span. 4: The RSVP label.
|
4096 |
#: src/views/v2/rsvp/details/availability/days-to-rsvp.php:23
|
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, juanfra
|
4 |
Tags: tickets, registration, The Events Calendar, RSVP, ticket sales, attendee management
|
5 |
Requires at least: 4.9.14
|
6 |
-
Tested up to: 5.5
|
7 |
-
Stable tag: 5.0.
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -118,6 +118,23 @@ Currently, the following add-ons are available for Event Tickets:
|
|
118 |
|
119 |
== Changelog ==
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
= [5.0.0.1] 2020-08-31 =
|
122 |
|
123 |
* Fix - Prevent the Attendee Registration modal from incorrectly setting RSVP as the provider class. [ET-901]
|
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, juanfra
|
4 |
Tags: tickets, registration, The Events Calendar, RSVP, ticket sales, attendee management
|
5 |
Requires at least: 4.9.14
|
6 |
+
Tested up to: 5.5.1
|
7 |
+
Stable tag: 5.0.1
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= [5.0.1] 2020-09-21 =
|
122 |
+
|
123 |
+
* Fix - Ensure the Attendees List title for the Attendees report is clean and not replicated on the page for the admin area as well as frontend. [ET-912]
|
124 |
+
* Fix - Use `the_title` filter when getting list of post titles for the Move Ticket workflow. [ET-909]
|
125 |
+
* Fix - Use the correct default date for initial Ticket start sale and end sale dates for Classic Editor. [ET-900]
|
126 |
+
* Fix - We have added the missing ID to the new RSVP block to allow linking to it directly. [ET-904]
|
127 |
+
* Fix - Prevent 301 redirects to the homepage while handling Tribe Commerce checkout process. [ET-845]
|
128 |
+
* Fix - Use the correct file path for the modal overrides. It's now correctly using the `your-theme/tribe/tickets/` path. [ETP-432]
|
129 |
+
* Fix - More thorough validity checking for post IDs, such as to account for a BuddyPress page having a Post ID of zero. [ET-899]
|
130 |
+
* Fix - Remove duplicate `button_id` from the `$args` in `src/blocks/tickets/submit-button-modal.php`. Props @justlevine for the fix! [ET-907]
|
131 |
+
* Fix - Ensure we print the required label for the ARI checkboxes. [ETP-361]
|
132 |
+
* Fix - Prevent PHP errors in the `tickets/view-link.php` template in automated testing suite. [ET-910]
|
133 |
+
* Tweak - We have added context to some of the strings and labels of the new RSVP block to allow more granular translation. [ET-903]
|
134 |
+
* Tweak - Added filters: `tribe_tickets_attendees_show_view_title`
|
135 |
+
* Tweak - Changed views: `blocks/rsvp/status/going`, `blocks/rsvp/status/not-going`, `blocks/tickets/submit-button-modal`, `registration-js/attendees/fields/checkbox`, `tickets/view-link`, `v2/rsvp`, `v2/rsvp/actions/rsvp/going`, `v2/rsvp/actions/rsvp/not-going`, `v2/rsvp/details/attendance`
|
136 |
+
* Language - 4 new strings added, 53 updated, 0 fuzzied, and 3 obsoleted
|
137 |
+
|
138 |
= [5.0.0.1] 2020-08-31 =
|
139 |
|
140 |
* Fix - Prevent the Attendee Registration modal from incorrectly setting RSVP as the provider class. [ET-901]
|
src/Tribe/Admin/Move_Tickets.php
CHANGED
@@ -352,7 +352,8 @@ class Tribe__Tickets__Admin__Move_Tickets {
|
|
352 |
$posts = array();
|
353 |
|
354 |
foreach ( $query_results as $wp_post ) {
|
355 |
-
|
|
|
356 |
|
357 |
// Append the event start date if there is one, ie for events
|
358 |
if ( $wp_post->_EventStartDate ) {
|
352 |
$posts = array();
|
353 |
|
354 |
foreach ( $query_results as $wp_post ) {
|
355 |
+
/** This filter is documented in wp-includes/post-template.php */
|
356 |
+
$title = apply_filters( 'the_title', $wp_post->post_title, $wp_post->ID );
|
357 |
|
358 |
// Append the event start date if there is one, ie for events
|
359 |
if ( $wp_post->_EventStartDate ) {
|
src/Tribe/Assets.php
CHANGED
@@ -92,14 +92,22 @@ class Tribe__Tickets__Assets {
|
|
92 |
/** @var Tribe__Tickets__Tickets_Handler $tickets_handler */
|
93 |
$tickets_handler = tribe( 'tickets.handler' );
|
94 |
$global_stock_mode = $tickets_handler->get_default_capacity_mode();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
$assets = [
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
];
|
104 |
|
105 |
tribe_assets(
|
92 |
/** @var Tribe__Tickets__Tickets_Handler $tickets_handler */
|
93 |
$tickets_handler = tribe( 'tickets.handler' );
|
94 |
$global_stock_mode = $tickets_handler->get_default_capacity_mode();
|
95 |
+
|
96 |
+
$ticket_js_deps = [ 'jquery-ui-datepicker', 'tribe-bumpdown', 'tribe-attrchange', 'tribe-moment', 'underscore', 'tribe-validation', 'event-tickets-admin-accordion-js', 'tribe-timepicker' ];
|
97 |
+
|
98 |
+
// While TEC is active, make sure we are loading TEC admin JS as dependency.
|
99 |
+
if ( class_exists( 'Tribe__Events__Main' ) ) {
|
100 |
+
$ticket_js_deps[] = 'tribe-events-admin';
|
101 |
+
}
|
102 |
+
|
103 |
$assets = [
|
104 |
+
[ 'event-tickets-admin-css', 'tickets-admin.css', [ 'tribe-validation-style', 'tribe-jquery-timepicker-css', 'tribe-common-admin' ] ],
|
105 |
+
[ 'event-tickets-admin-refresh-css', 'tickets-refresh.css', [ 'event-tickets-admin-css', 'tribe-common-admin' ] ],
|
106 |
+
[ 'event-tickets-admin-tables-css', 'tickets-tables.css', [ 'event-tickets-admin-css' ] ],
|
107 |
+
[ 'event-tickets-attendees-list-js', 'attendees-list.js', [ 'jquery' ] ],
|
108 |
+
[ 'event-tickets-admin-accordion-js', 'accordion.js', [] ],
|
109 |
+
[ 'event-tickets-admin-accordion-css', 'accordion.css', [] ],
|
110 |
+
[ 'event-tickets-admin-js', 'tickets.js', $ticket_js_deps ],
|
111 |
];
|
112 |
|
113 |
tribe_assets(
|
src/Tribe/Attendee_Registration/Modal.php
CHANGED
@@ -20,14 +20,14 @@ class Tribe__Tickets__Attendee_Registration__Modal {
|
|
20 |
*
|
21 |
* @since 4.11.0
|
22 |
*
|
23 |
-
* @param string
|
24 |
-
* @param Tribe__Tickets__Editor__Template $template_obj the Template object
|
25 |
*
|
26 |
* @return string
|
27 |
*/
|
28 |
function modal_cart_template( $content, $template_obj ) {
|
29 |
$template = 'modal/cart.php';
|
30 |
-
$file
|
31 |
|
32 |
$post_id = $template_obj->get( 'post_id' );
|
33 |
$tickets = $template_obj->get( 'tickets', [] );
|
@@ -64,18 +64,16 @@ class Tribe__Tickets__Attendee_Registration__Modal {
|
|
64 |
*
|
65 |
* @since 4.11.0
|
66 |
*
|
67 |
-
* @param string
|
68 |
-
* @param Tribe__Tickets__Editor__Template $template_obj the Template object
|
69 |
-
*
|
70 |
-
* @return string The content with AR fields appended.
|
71 |
*/
|
72 |
function append_modal_ar_template( $unused_content, $template_obj ) {
|
73 |
$template = 'modal/registration-js.php';
|
74 |
-
$file
|
75 |
|
76 |
$obj_tickets = $template_obj->get( 'tickets', [] );
|
77 |
$tickets = [];
|
78 |
-
foreach( $obj_tickets as $ticket ) {
|
79 |
$ticket_data = array(
|
80 |
'id' => $ticket->ID,
|
81 |
'qty' => 1,
|
@@ -99,17 +97,18 @@ class Tribe__Tickets__Attendee_Registration__Modal {
|
|
99 |
*
|
100 |
* @since 4.11.0
|
101 |
*
|
102 |
-
* @param string
|
103 |
-
* @param Tribe__Tickets__Editor__Template $template_obj the Template object
|
104 |
*
|
105 |
* @return string The content with AR fields appended.
|
106 |
*/
|
107 |
function modal_footer_template( $content, $template_obj ) {
|
108 |
$template = 'modal/footer.php';
|
109 |
-
$file
|
110 |
|
111 |
$obj_tickets = $template_obj->get( 'tickets', [] );
|
112 |
-
|
|
|
113 |
$ticket_data = array(
|
114 |
'id' => $ticket->ID,
|
115 |
'qty' => 1,
|
@@ -147,7 +146,9 @@ class Tribe__Tickets__Attendee_Registration__Modal {
|
|
147 |
function locate_template( $template ) {
|
148 |
$main = Tribe__Tickets__Main::instance();
|
149 |
|
150 |
-
|
|
|
|
|
151 |
$file = $theme_file;
|
152 |
} else {
|
153 |
$file = $main->plugin_path . 'src/views/' . $template;
|
@@ -160,6 +161,8 @@ class Tribe__Tickets__Attendee_Registration__Modal {
|
|
160 |
*
|
161 |
* @param string $template Relative path to template file.
|
162 |
* @param string $file The template location.
|
|
|
|
|
163 |
*/
|
164 |
$file = apply_filters( 'tribe_events_tickets_template_' . $template, $file );
|
165 |
|
20 |
*
|
21 |
* @since 4.11.0
|
22 |
*
|
23 |
+
* @param string $content a string of default content.
|
24 |
+
* @param Tribe__Tickets__Editor__Template $template_obj the Template object.
|
25 |
*
|
26 |
* @return string
|
27 |
*/
|
28 |
function modal_cart_template( $content, $template_obj ) {
|
29 |
$template = 'modal/cart.php';
|
30 |
+
$file = $this->locate_template( $template );
|
31 |
|
32 |
$post_id = $template_obj->get( 'post_id' );
|
33 |
$tickets = $template_obj->get( 'tickets', [] );
|
64 |
*
|
65 |
* @since 4.11.0
|
66 |
*
|
67 |
+
* @param string $unused_content The content string.
|
68 |
+
* @param Tribe__Tickets__Editor__Template $template_obj the Template object.
|
|
|
|
|
69 |
*/
|
70 |
function append_modal_ar_template( $unused_content, $template_obj ) {
|
71 |
$template = 'modal/registration-js.php';
|
72 |
+
$file = $this->locate_template( $template );
|
73 |
|
74 |
$obj_tickets = $template_obj->get( 'tickets', [] );
|
75 |
$tickets = [];
|
76 |
+
foreach ( $obj_tickets as $ticket ) {
|
77 |
$ticket_data = array(
|
78 |
'id' => $ticket->ID,
|
79 |
'qty' => 1,
|
97 |
*
|
98 |
* @since 4.11.0
|
99 |
*
|
100 |
+
* @param string $content The content string.
|
101 |
+
* @param Tribe__Tickets__Editor__Template $template_obj the Template object.
|
102 |
*
|
103 |
* @return string The content with AR fields appended.
|
104 |
*/
|
105 |
function modal_footer_template( $content, $template_obj ) {
|
106 |
$template = 'modal/footer.php';
|
107 |
+
$file = $this->locate_template( $template );
|
108 |
|
109 |
$obj_tickets = $template_obj->get( 'tickets', [] );
|
110 |
+
|
111 |
+
foreach ( $obj_tickets as $ticket ) {
|
112 |
$ticket_data = array(
|
113 |
'id' => $ticket->ID,
|
114 |
'qty' => 1,
|
146 |
function locate_template( $template ) {
|
147 |
$main = Tribe__Tickets__Main::instance();
|
148 |
|
149 |
+
$theme_file = locate_template( [ 'tribe-events/' . $template, 'tribe/tickets/' . $template ] );
|
150 |
+
|
151 |
+
if ( $theme_file ) {
|
152 |
$file = $theme_file;
|
153 |
} else {
|
154 |
$file = $main->plugin_path . 'src/views/' . $template;
|
161 |
*
|
162 |
* @param string $template Relative path to template file.
|
163 |
* @param string $file The template location.
|
164 |
+
*
|
165 |
+
* @return string
|
166 |
*/
|
167 |
$file = apply_filters( 'tribe_events_tickets_template_' . $template, $file );
|
168 |
|
src/Tribe/Commerce/Orders_Tabbed_View.php
CHANGED
@@ -32,12 +32,26 @@ class Tribe__Tickets__Commerce__Orders_Tabbed_View {
|
|
32 |
}
|
33 |
|
34 |
$view_title = sprintf(
|
35 |
-
|
36 |
-
|
37 |
get_the_title( $post_id ),
|
38 |
$post_id
|
39 |
);
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
$tabbed_view = new Tribe__Tabbed_View();
|
42 |
$tabbed_view->set_label( $view_title );
|
43 |
$query_string = empty( $_SERVER['QUERY_STRING'] ) ? '' : '?' . $_SERVER['QUERY_STRING'];
|
32 |
}
|
33 |
|
34 |
$view_title = sprintf(
|
35 |
+
// Translators: %1$s: the post/event title, %2$d: the post/event ID.
|
36 |
+
_x( 'Attendees for: %1$s [#%2$d]', 'attendees report screen heading', 'event-tickets' ),
|
37 |
get_the_title( $post_id ),
|
38 |
$post_id
|
39 |
);
|
40 |
|
41 |
+
/**
|
42 |
+
* Whether we should display the "Attendees for: %s [#%d]" view title.
|
43 |
+
*
|
44 |
+
* @since 5.0.1
|
45 |
+
*
|
46 |
+
* @param boolean $show_title Whether to show the view title.
|
47 |
+
* @param int $post_id The post ID.
|
48 |
+
*/
|
49 |
+
$show_title = apply_filters( 'tribe_tickets_attendees_show_view_title', true, $post_id );
|
50 |
+
|
51 |
+
if ( ! $show_title ) {
|
52 |
+
$view_title = '';
|
53 |
+
}
|
54 |
+
|
55 |
$tabbed_view = new Tribe__Tabbed_View();
|
56 |
$tabbed_view->set_label( $view_title );
|
57 |
$query_string = empty( $_SERVER['QUERY_STRING'] ) ? '' : '?' . $_SERVER['QUERY_STRING'];
|
src/Tribe/Commerce/PayPal/Gateway.php
CHANGED
@@ -481,7 +481,7 @@ class Tribe__Tickets__Commerce__PayPal__Gateway {
|
|
481 |
*/
|
482 |
public function get_paypal_cart_api_url( $post_id ) {
|
483 |
if ( empty( $post_id ) || headers_sent() ) {
|
484 |
-
return home_url();
|
485 |
}
|
486 |
|
487 |
$cart_url = $this->get_cart_url( '_cart' );
|
@@ -679,7 +679,7 @@ class Tribe__Tickets__Commerce__PayPal__Gateway {
|
|
679 |
'tribe_tickets_redirect_to' => rawurlencode( $cart_url ),
|
680 |
];
|
681 |
|
682 |
-
$url = add_query_arg( $url_args, home_url() );
|
683 |
|
684 |
/**
|
685 |
* Filters the add to cart redirect.
|
481 |
*/
|
482 |
public function get_paypal_cart_api_url( $post_id ) {
|
483 |
if ( empty( $post_id ) || headers_sent() ) {
|
484 |
+
return home_url( '/' );
|
485 |
}
|
486 |
|
487 |
$cart_url = $this->get_cart_url( '_cart' );
|
679 |
'tribe_tickets_redirect_to' => rawurlencode( $cart_url ),
|
680 |
];
|
681 |
|
682 |
+
$url = add_query_arg( $url_args, home_url( '/' ) );
|
683 |
|
684 |
/**
|
685 |
* Filters the add to cart redirect.
|
src/Tribe/Commerce/PayPal/Main.php
CHANGED
@@ -2111,8 +2111,7 @@ class Tribe__Tickets__Commerce__PayPal__Main extends Tribe__Tickets__Tickets {
|
|
2111 |
* @return array
|
2112 |
*/
|
2113 |
public function add_cart_url( $urls = [] ) {
|
2114 |
-
$
|
2115 |
-
$urls[ __CLASS__ ] = $cart_url;
|
2116 |
|
2117 |
return $urls;
|
2118 |
}
|
@@ -2123,11 +2122,11 @@ class Tribe__Tickets__Commerce__PayPal__Main extends Tribe__Tickets__Tickets {
|
|
2123 |
* @since 4.11.0
|
2124 |
*
|
2125 |
* @param array $urls The original array.
|
|
|
2126 |
* @return array
|
2127 |
*/
|
2128 |
public function add_checkout_url( $urls = [] ) {
|
2129 |
-
$
|
2130 |
-
$urls[ __CLASS__ ] = $checkout_url;
|
2131 |
|
2132 |
return $urls;
|
2133 |
}
|
2111 |
* @return array
|
2112 |
*/
|
2113 |
public function add_cart_url( $urls = [] ) {
|
2114 |
+
$urls[ __CLASS__ ] = site_url( '/' );
|
|
|
2115 |
|
2116 |
return $urls;
|
2117 |
}
|
2122 |
* @since 4.11.0
|
2123 |
*
|
2124 |
* @param array $urls The original array.
|
2125 |
+
*
|
2126 |
* @return array
|
2127 |
*/
|
2128 |
public function add_checkout_url( $urls = [] ) {
|
2129 |
+
$urls[ __CLASS__ ] = site_url( '/' );
|
|
|
2130 |
|
2131 |
return $urls;
|
2132 |
}
|
src/Tribe/Main.php
CHANGED
@@ -8,7 +8,7 @@ class Tribe__Tickets__Main {
|
|
8 |
/**
|
9 |
* Current version of this plugin
|
10 |
*/
|
11 |
-
const VERSION = '5.0.
|
12 |
|
13 |
/**
|
14 |
* Used to store the version history.
|
8 |
/**
|
9 |
* Current version of this plugin
|
10 |
*/
|
11 |
+
const VERSION = '5.0.1';
|
12 |
|
13 |
/**
|
14 |
* Used to store the version history.
|
src/Tribe/Tickets.php
CHANGED
@@ -2659,6 +2659,8 @@ if ( ! class_exists( 'Tribe__Tickets__Tickets' ) ) {
|
|
2659 |
* Determines if this is a suitable opportunity to inject ticket form content into a post.
|
2660 |
* Expects to run within "the_content".
|
2661 |
*
|
|
|
|
|
2662 |
* @return bool
|
2663 |
*/
|
2664 |
protected function should_inject_ticket_form_into_post_content() {
|
@@ -2679,7 +2681,11 @@ if ( ! class_exists( 'Tribe__Tickets__Tickets' ) ) {
|
|
2679 |
}
|
2680 |
|
2681 |
// Bail if this isn't a post for some reason.
|
2682 |
-
|
|
|
|
|
|
|
|
|
2683 |
return false;
|
2684 |
}
|
2685 |
|
2659 |
* Determines if this is a suitable opportunity to inject ticket form content into a post.
|
2660 |
* Expects to run within "the_content".
|
2661 |
*
|
2662 |
+
* @since 5.0.1 Bail if $post->ID is zero, such as from BuddyPress' "Activity" page.
|
2663 |
+
*
|
2664 |
* @return bool
|
2665 |
*/
|
2666 |
protected function should_inject_ticket_form_into_post_content() {
|
2681 |
}
|
2682 |
|
2683 |
// Bail if this isn't a post for some reason.
|
2684 |
+
// Empty check is for BuddyPress having a WP Post with ID of zero.
|
2685 |
+
if (
|
2686 |
+
! $post instanceof WP_Post
|
2687 |
+
|| empty( $post->ID )
|
2688 |
+
) {
|
2689 |
return false;
|
2690 |
}
|
2691 |
|
src/Tribe/Tickets_View.php
CHANGED
@@ -1080,6 +1080,13 @@ class Tribe__Tickets__Tickets_View {
|
|
1080 |
/** @var Tribe__Tickets__RSVP $rsvp */
|
1081 |
$rsvp = tribe( 'tickets.rsvp' );
|
1082 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1083 |
// Load assets manually.
|
1084 |
$blocks_rsvp->assets();
|
1085 |
|
@@ -1101,6 +1108,8 @@ class Tribe__Tickets__Tickets_View {
|
|
1101 |
'opt_in_checked' => false,
|
1102 |
'opt_in_attendee_ids' => '',
|
1103 |
'opt_in_nonce' => '',
|
|
|
|
|
1104 |
];
|
1105 |
|
1106 |
// Add the rendering attributes into global context.
|
1080 |
/** @var Tribe__Tickets__RSVP $rsvp */
|
1081 |
$rsvp = tribe( 'tickets.rsvp' );
|
1082 |
|
1083 |
+
// Check if the call is coming from a shortcode.
|
1084 |
+
$doing_shortcode = tribe_doing_shortcode( 'tribe_tickets_rsvp' );
|
1085 |
+
|
1086 |
+
// Get the RSVP block HTML ID.
|
1087 |
+
$block_html_id = 'rsvp-now';
|
1088 |
+
$block_html_id .= $doing_shortcode ? '-' . uniqid() : '';
|
1089 |
+
|
1090 |
// Load assets manually.
|
1091 |
$blocks_rsvp->assets();
|
1092 |
|
1108 |
'opt_in_checked' => false,
|
1109 |
'opt_in_attendee_ids' => '',
|
1110 |
'opt_in_nonce' => '',
|
1111 |
+
'doing_shortcode' => $doing_shortcode,
|
1112 |
+
'block_html_id' => $block_html_id,
|
1113 |
];
|
1114 |
|
1115 |
// Add the rendering attributes into global context.
|
src/admin-views/attendees.php
CHANGED
@@ -11,15 +11,16 @@ $pto = get_post_type_object( $event->post_type );
|
|
11 |
$singular = $pto->labels->singular_name;
|
12 |
|
13 |
/**
|
14 |
-
* Whether we should display the "Attendees" title.
|
15 |
*
|
16 |
* @since 4.6.2
|
17 |
* @since 4.12.1 Append the post ID to the Attendees page title and each Ticket's name.
|
|
|
18 |
*
|
19 |
-
* @param boolean
|
20 |
-
* @param
|
21 |
*/
|
22 |
-
$show_title = apply_filters( 'tribe_tickets_attendees_show_title',
|
23 |
?>
|
24 |
|
25 |
<div class="wrap tribe-report-page">
|
@@ -28,9 +29,9 @@ $show_title = apply_filters( 'tribe_tickets_attendees_show_title', true, $attend
|
|
28 |
<?php
|
29 |
echo esc_html(
|
30 |
sprintf(
|
31 |
-
|
32 |
_x( 'Attendees for: %1$s [#%2$d]', 'attendees report screen heading', 'event-tickets' ),
|
33 |
-
get_the_title( $
|
34 |
$event_id
|
35 |
)
|
36 |
);
|
@@ -151,4 +152,4 @@ $show_title = apply_filters( 'tribe_tickets_attendees_show_title', true, $attend
|
|
151 |
<?php $attendees->attendees_table->search_box( __( 'Search attendees', 'event-tickets' ), 'attendees-search' ); ?>
|
152 |
<?php $attendees->attendees_table->display(); ?>
|
153 |
</form>
|
154 |
-
</div>
|
11 |
$singular = $pto->labels->singular_name;
|
12 |
|
13 |
/**
|
14 |
+
* Whether we should display the "Attendees for: %s" title.
|
15 |
*
|
16 |
* @since 4.6.2
|
17 |
* @since 4.12.1 Append the post ID to the Attendees page title and each Ticket's name.
|
18 |
+
* @since 5.0.1 Change default to the result of `is_admin()`.
|
19 |
*
|
20 |
+
* @param boolean $show_title Whether to show the title.
|
21 |
+
* @param Tribe__Tickets__Attendees $attendees The attendees object.
|
22 |
*/
|
23 |
+
$show_title = apply_filters( 'tribe_tickets_attendees_show_title', is_admin(), $attendees );
|
24 |
?>
|
25 |
|
26 |
<div class="wrap tribe-report-page">
|
29 |
<?php
|
30 |
echo esc_html(
|
31 |
sprintf(
|
32 |
+
// Translators: %1$s: the post/event title, %2$d: the post/event ID.
|
33 |
_x( 'Attendees for: %1$s [#%2$d]', 'attendees report screen heading', 'event-tickets' ),
|
34 |
+
get_the_title( $event ),
|
35 |
$event_id
|
36 |
)
|
37 |
);
|
152 |
<?php $attendees->attendees_table->search_box( __( 'Search attendees', 'event-tickets' ), 'attendees-search' ); ?>
|
153 |
<?php $attendees->attendees_table->display(); ?>
|
154 |
</form>
|
155 |
+
</div>
|
src/resources/js/tickets-block.js
CHANGED
@@ -1375,27 +1375,14 @@ window.tribe.tickets.block = {
|
|
1375 |
* @returns {boolean} - Is checkbox valid?
|
1376 |
*/
|
1377 |
obj.validateCheckboxRadioGroup = function( $group ) {
|
1378 |
-
const
|
1379 |
-
|
1380 |
-
let required = true;
|
1381 |
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
if ( $this.is( ':checked' ) ) {
|
1387 |
-
checkboxValid = true;
|
1388 |
-
}
|
1389 |
-
|
1390 |
-
if ( ! $this.prop( 'required' ) ) {
|
1391 |
-
required = false;
|
1392 |
-
}
|
1393 |
-
}
|
1394 |
-
);
|
1395 |
-
|
1396 |
-
const valid = ! required || checkboxValid;
|
1397 |
|
1398 |
-
return
|
1399 |
};
|
1400 |
|
1401 |
/**
|
1375 |
* @returns {boolean} - Is checkbox valid?
|
1376 |
*/
|
1377 |
obj.validateCheckboxRadioGroup = function( $group ) {
|
1378 |
+
const checked = $group.find( 'input:checked' ).length;
|
1379 |
+
const required = $group.find( 'input:required' ).length;
|
|
|
1380 |
|
1381 |
+
// the group is valid if there are no required.
|
1382 |
+
// or if it is required and there's at least one checked.
|
1383 |
+
const isValid = ! required || ( required && checked );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1384 |
|
1385 |
+
return !! isValid;
|
1386 |
};
|
1387 |
|
1388 |
/**
|
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",horizontal_datepicker:{container:".tribe_horizontal_datepicker__container",select:".tribe_horizontal_datepicker__container select",day:".tribe_horizontal_datepicker__day",month:".tribe_horizontal_datepicker__month",year:".tribe_horizontal_datepicker__year",value:".tribe_horizontal_datepicker__value"}};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(0===parseInt(o.number_of_decimals))return i;if(o.thousands_sep===o.decimal_point){const t=i.length-(o.number_of_decimals+1);i=i.substr(0,t)+"_"+i.substr(t+1),""!==o.thousands_sep&&(i=i.split(o.thousands_sep).join("")),i=i.split("_").join(".")}else""!==o.thousands_sep&&(i=i.split(o.thousands_sep).join("")),""!==o.decimal_point&&(i=i.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 _=(c?d(n,c):Math.round(n)).toString().split(l);return"."===i.thousands_sep&&(_=(c?d(n,c):Math.round(n)).toString().split(".")),_[0].length>3&&(_[0]=_[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(_[1]||"").length<c&&(_[1]=_[1]||"",_[1]+=new Array(c-_[1].length+1).join("0")),_.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.validateHorizontalDatePickerValue=function(t){if(""===t.val()||"null-null-null"===t.val())return!0;const i=t.closest(e.selector.horizontal_datepicker.container),o=i.find(e.selector.horizontal_datepicker.day),r=i.find(e.selector.horizontal_datepicker.month),a=i.find(e.selector.horizontal_datepicker.year);let n=!0;return[o,r,a].forEach(function(t){isNaN(parseInt(t.val()))||parseInt(t.val())<=0?(t.addClass("ticket-meta__has-error"),n=!1):t.removeClass("ticket-meta__has-error")},n),n},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 o.is(e.selector.horizontal_datepicker.value)&&(r=e.validateHorizontalDatePickerValue(o)),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 _={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(_)),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",horizontal_datepicker:{container:".tribe_horizontal_datepicker__container",select:".tribe_horizontal_datepicker__container select",day:".tribe_horizontal_datepicker__day",month:".tribe_horizontal_datepicker__month",year:".tribe_horizontal_datepicker__year",value:".tribe_horizontal_datepicker__value"}};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(0===parseInt(o.number_of_decimals))return i;if(o.thousands_sep===o.decimal_point){const t=i.length-(o.number_of_decimals+1);i=i.substr(0,t)+"_"+i.substr(t+1),""!==o.thousands_sep&&(i=i.split(o.thousands_sep).join("")),i=i.split("_").join(".")}else""!==o.thousands_sep&&(i=i.split(o.thousands_sep).join("")),""!==o.decimal_point&&(i=i.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 _=(c?d(n,c):Math.round(n)).toString().split(l);return"."===i.thousands_sep&&(_=(c?d(n,c):Math.round(n)).toString().split(".")),_[0].length>3&&(_[0]=_[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(_[1]||"").length<c&&(_[1]=_[1]||"",_[1]+=new Array(c-_[1].length+1).join("0")),_.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(t){const e=t.find("input:checked").length,i=t.find("input:required").length;return!!(!i||i&&e)},e.validateHorizontalDatePickerValue=function(t){if(""===t.val()||"null-null-null"===t.val())return!0;const i=t.closest(e.selector.horizontal_datepicker.container),o=i.find(e.selector.horizontal_datepicker.day),r=i.find(e.selector.horizontal_datepicker.month),a=i.find(e.selector.horizontal_datepicker.year);let n=!0;return[o,r,a].forEach(function(t){isNaN(parseInt(t.val()))||parseInt(t.val())<=0?(t.addClass("ticket-meta__has-error"),n=!1):t.removeClass("ticket-meta__has-error")},n),n},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 o.is(e.selector.horizontal_datepicker.value)&&(r=e.validateHorizontalDatePickerValue(o)),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 _={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(_)),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/template-tags/tickets.php
CHANGED
@@ -186,7 +186,7 @@ if ( ! function_exists( 'tribe_tickets_buy_button' ) ) {
|
|
186 |
* @since 4.5
|
187 |
* @since 4.11.3 Now also displays for posts having only RSVPs. Also changed from <form> to <button>.
|
188 |
*
|
189 |
-
* @param bool $echo Whether or not we should print
|
190 |
*
|
191 |
* @return string
|
192 |
*/
|
@@ -202,10 +202,10 @@ if ( ! function_exists( 'tribe_tickets_buy_button' ) ) {
|
|
202 |
return '';
|
203 |
}
|
204 |
|
205 |
-
//
|
206 |
$types = Tribe__Tickets__Tickets::get_ticket_counts( $event_id );
|
207 |
|
208 |
-
//
|
209 |
if ( ! $types ) {
|
210 |
return '';
|
211 |
}
|
@@ -213,7 +213,7 @@ if ( ! function_exists( 'tribe_tickets_buy_button' ) ) {
|
|
213 |
$html = [];
|
214 |
$parts = [];
|
215 |
|
216 |
-
// If we have tickets or RSVP, but everything is Sold Out then display the Sold Out message
|
217 |
foreach ( $types as $type => $data ) {
|
218 |
if ( ! $data['count'] ) {
|
219 |
continue;
|
@@ -222,14 +222,14 @@ if ( ! function_exists( 'tribe_tickets_buy_button' ) ) {
|
|
222 |
if ( ! $data['available'] ) {
|
223 |
$parts[ $type . '-stock' ] = '<span class="tribe-out-of-stock">' . esc_html_x( 'Sold out', 'list view stock sold out', 'event-tickets' ) . '</span>';
|
224 |
|
225 |
-
// Only re-apply if we don't have a stock yet
|
226 |
if ( empty( $html['stock'] ) ) {
|
227 |
$html['stock'] = $parts[ $type . '-stock' ];
|
228 |
}
|
229 |
} else {
|
230 |
$stock = $data['stock'];
|
231 |
if ( $data['unlimited'] || ! $data['stock'] ) {
|
232 |
-
// if unlimited tickets, tickets with no stock and rsvp, or no tickets and rsvp unlimited - hide the remaining count
|
233 |
$stock = false;
|
234 |
}
|
235 |
|
@@ -262,8 +262,10 @@ if ( ! function_exists( 'tribe_tickets_buy_button' ) ) {
|
|
262 |
}
|
263 |
|
264 |
if ( 'rsvp' === $type ) {
|
|
|
265 |
$text = _n( '%s spot left', '%s spots left', $stock, 'event-tickets' );
|
266 |
} else {
|
|
|
267 |
$text = _n( '%s ticket left', '%s tickets left', $stock, 'event-tickets' );
|
268 |
}
|
269 |
|
@@ -276,6 +278,7 @@ if ( ! function_exists( 'tribe_tickets_buy_button' ) ) {
|
|
276 |
$parts[ $type . '-stock' ] = $html['stock'] = $stock_html;
|
277 |
|
278 |
if ( 'rsvp' === $type ) {
|
|
|
279 |
$button_label = sprintf( _x( '%s Now!', 'list view rsvp now ticket button', 'event-tickets' ), tribe_get_rsvp_label_singular( 'list_view_rsvp_now_button' ) );
|
280 |
$button_anchor = '#rsvp-now';
|
281 |
} else {
|
186 |
* @since 4.5
|
187 |
* @since 4.11.3 Now also displays for posts having only RSVPs. Also changed from <form> to <button>.
|
188 |
*
|
189 |
+
* @param bool $echo Whether or not we should print.
|
190 |
*
|
191 |
* @return string
|
192 |
*/
|
202 |
return '';
|
203 |
}
|
204 |
|
205 |
+
// Get an array for ticket and rsvp counts.
|
206 |
$types = Tribe__Tickets__Tickets::get_ticket_counts( $event_id );
|
207 |
|
208 |
+
// If no rsvp or tickets return.
|
209 |
if ( ! $types ) {
|
210 |
return '';
|
211 |
}
|
213 |
$html = [];
|
214 |
$parts = [];
|
215 |
|
216 |
+
// If we have tickets or RSVP, but everything is Sold Out then display the Sold Out message.
|
217 |
foreach ( $types as $type => $data ) {
|
218 |
if ( ! $data['count'] ) {
|
219 |
continue;
|
222 |
if ( ! $data['available'] ) {
|
223 |
$parts[ $type . '-stock' ] = '<span class="tribe-out-of-stock">' . esc_html_x( 'Sold out', 'list view stock sold out', 'event-tickets' ) . '</span>';
|
224 |
|
225 |
+
// Only re-apply if we don't have a stock yet.
|
226 |
if ( empty( $html['stock'] ) ) {
|
227 |
$html['stock'] = $parts[ $type . '-stock' ];
|
228 |
}
|
229 |
} else {
|
230 |
$stock = $data['stock'];
|
231 |
if ( $data['unlimited'] || ! $data['stock'] ) {
|
232 |
+
// if unlimited tickets, tickets with no stock and rsvp, or no tickets and rsvp unlimited - hide the remaining count.
|
233 |
$stock = false;
|
234 |
}
|
235 |
|
262 |
}
|
263 |
|
264 |
if ( 'rsvp' === $type ) {
|
265 |
+
// Translators: %s number of RSVP spots left.
|
266 |
$text = _n( '%s spot left', '%s spots left', $stock, 'event-tickets' );
|
267 |
} else {
|
268 |
+
// Translators: %s number of tickets left.
|
269 |
$text = _n( '%s ticket left', '%s tickets left', $stock, 'event-tickets' );
|
270 |
}
|
271 |
|
278 |
$parts[ $type . '-stock' ] = $html['stock'] = $stock_html;
|
279 |
|
280 |
if ( 'rsvp' === $type ) {
|
281 |
+
// Translators: %s RSVP singular or plural.
|
282 |
$button_label = sprintf( _x( '%s Now!', 'list view rsvp now ticket button', 'event-tickets' ), tribe_get_rsvp_label_singular( 'list_view_rsvp_now_button' ) );
|
283 |
$button_anchor = '#rsvp-now';
|
284 |
} else {
|
src/views/blocks/rsvp/status/going.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
-
* @link
|
12 |
*
|
13 |
* @since 4.9.3
|
14 |
* @version 4.10.4
|
@@ -22,7 +22,7 @@ $going = $must_login ? false : $this->get( 'going' );
|
|
22 |
class="tribe-block__rsvp__status-button tribe-block__rsvp__status-button--going<?php if ( 'yes' === $going ) { echo ' tribe-active'; }?>"
|
23 |
<?php echo disabled( 'yes', $going, false ); ?>
|
24 |
>
|
25 |
-
<span><?php
|
26 |
<?php $this->template( 'blocks/rsvp/status/going-icon' ); ?>
|
27 |
</button>
|
28 |
</span>
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
+
* @link http://m.tri.be/1amo
|
12 |
*
|
13 |
* @since 4.9.3
|
14 |
* @version 4.10.4
|
22 |
class="tribe-block__rsvp__status-button tribe-block__rsvp__status-button--going<?php if ( 'yes' === $going ) { echo ' tribe-active'; }?>"
|
23 |
<?php echo disabled( 'yes', $going, false ); ?>
|
24 |
>
|
25 |
+
<span><?php echo esc_html_x( 'Going', 'Label for the RSVP going button', 'event-tickets' ); ?></span>
|
26 |
<?php $this->template( 'blocks/rsvp/status/going-icon' ); ?>
|
27 |
</button>
|
28 |
</span>
|
src/views/blocks/rsvp/status/not-going.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
-
* @link
|
12 |
*
|
13 |
* @since 4.9.3
|
14 |
* @version 4.10.4
|
@@ -41,7 +41,7 @@ $going = $must_login ? false : $this->get( 'going' );
|
|
41 |
class="tribe-block__rsvp__status-button tribe-block__rsvp__status-button--not-going<?php if ( 'no' === $going ) { echo ' tribe-active'; }?>"
|
42 |
<?php echo disabled( 'no', $going, false ); ?>
|
43 |
>
|
44 |
-
<span><?php
|
45 |
<?php $this->template( 'blocks/rsvp/status/not-going-icon' ); ?>
|
46 |
</button>
|
47 |
</span>
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
+
* @link http://m.tri.be/1amo
|
12 |
*
|
13 |
* @since 4.9.3
|
14 |
* @version 4.10.4
|
41 |
class="tribe-block__rsvp__status-button tribe-block__rsvp__status-button--not-going<?php if ( 'no' === $going ) { echo ' tribe-active'; }?>"
|
42 |
<?php echo disabled( 'no', $going, false ); ?>
|
43 |
>
|
44 |
+
<span><?php echo esc_html_x( 'Not going', 'Label for the RSVP not going button', 'event-tickets' ); ?></span>
|
45 |
<?php $this->template( 'blocks/rsvp/status/not-going-icon' ); ?>
|
46 |
</button>
|
47 |
</span>
|
src/views/blocks/tickets/submit-button-modal.php
CHANGED
@@ -15,9 +15,9 @@
|
|
15 |
* @since 4.11.3 Allow filtering of the button classes.
|
16 |
* @since 4.11.3 Added button ID for better JS targeting.
|
17 |
* @since 4.12.1 Add support for custom label for "Tickets" plural.
|
|
|
18 |
*
|
19 |
-
* @version
|
20 |
-
*
|
21 |
*/
|
22 |
|
23 |
/* translators: %1$s: Event name, %2$s: Tickets label */
|
@@ -50,7 +50,7 @@ $button_classes = apply_filters(
|
|
50 |
* @param string $content a string of default content.
|
51 |
* @param Tribe__Tickets__Editor__Template $template_obj the Template object.
|
52 |
*/
|
53 |
-
$content
|
54 |
|
55 |
$args = [
|
56 |
'append_target' => '#tribe-tickets__modal_target',
|
@@ -58,7 +58,6 @@ $args = [
|
|
58 |
'button_disabled' => true,
|
59 |
'button_id' => 'tribe-tickets__submit',
|
60 |
'button_name' => $provider_id . '_get_tickets',
|
61 |
-
'button_id' => 'tribe-tickets__submit',
|
62 |
'button_text' => $button_text,
|
63 |
'button_type' => 'submit',
|
64 |
'close_event' => 'tribe_dialog_close_ar_modal',
|
15 |
* @since 4.11.3 Allow filtering of the button classes.
|
16 |
* @since 4.11.3 Added button ID for better JS targeting.
|
17 |
* @since 4.12.1 Add support for custom label for "Tickets" plural.
|
18 |
+
* @since 5.0.1 Removed duplicate button ID from `$args`.
|
19 |
*
|
20 |
+
* @version 5.0.1
|
|
|
21 |
*/
|
22 |
|
23 |
/* translators: %1$s: Event name, %2$s: Tickets label */
|
50 |
* @param string $content a string of default content.
|
51 |
* @param Tribe__Tickets__Editor__Template $template_obj the Template object.
|
52 |
*/
|
53 |
+
$content = apply_filters( 'tribe_events_tickets_attendee_registration_modal_content', '<p>Ticket Modal</p>', $this );
|
54 |
|
55 |
$args = [
|
56 |
'append_target' => '#tribe-tickets__modal_target',
|
58 |
'button_disabled' => true,
|
59 |
'button_id' => 'tribe-tickets__submit',
|
60 |
'button_name' => $provider_id . '_get_tickets',
|
|
|
61 |
'button_text' => $button_text,
|
62 |
'button_type' => 'submit',
|
63 |
'close_event' => 'tribe_dialog_close_ar_modal',
|
src/views/registration-js/attendees/fields/checkbox.php
CHANGED
@@ -7,18 +7,13 @@
|
|
7 |
*
|
8 |
* @since 4.11.0
|
9 |
* @since 4.12.1 Make sure label/input IDs don't conflict with other ticket fields.
|
|
|
10 |
*
|
11 |
-
* @version
|
12 |
*
|
13 |
* @see Tribe__Tickets_Plus__Meta__Field__Checkbox
|
14 |
*/
|
15 |
|
16 |
-
$required = isset( $field->required ) && 'on' === $field->required ? true : false;
|
17 |
-
$field = (array) $field;
|
18 |
-
$options = Tribe__Utils__Array::get( $field, [ 'extra', 'options' ], null );
|
19 |
-
$field_name = 'tribe-tickets-meta[' . $ticket->ID . '][{{data.attendee_id}}]';
|
20 |
-
$disabled = false;
|
21 |
-
|
22 |
$required = isset( $field->required ) && 'on' === $field->required ? true : false;
|
23 |
$field = (array) $field;
|
24 |
$options = Tribe__Utils__Array::get( $field, [ 'extra', 'options' ], null );
|
@@ -31,7 +26,10 @@ if ( ! $options ) {
|
|
31 |
?>
|
32 |
<div class="tribe-field tribe-tickets-meta-fieldset tribe-tickets-meta-fieldset__checkbox-radio <?php echo $required ? 'tribe-tickets-meta-required' : ''; ?>">
|
33 |
<header class="tribe-tickets-meta-label">
|
34 |
-
<h3 class="tribe-common-b1 tribe-common-b2--min-medium"
|
|
|
|
|
|
|
35 |
</header>
|
36 |
|
37 |
<div class="tribe-common-form-control-checkbox-radio-group">
|
7 |
*
|
8 |
* @since 4.11.0
|
9 |
* @since 4.12.1 Make sure label/input IDs don't conflict with other ticket fields.
|
10 |
+
* @since 5.0.1 Make sure we have the required label.
|
11 |
*
|
12 |
+
* @version 5.0.1
|
13 |
*
|
14 |
* @see Tribe__Tickets_Plus__Meta__Field__Checkbox
|
15 |
*/
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
$required = isset( $field->required ) && 'on' === $field->required ? true : false;
|
18 |
$field = (array) $field;
|
19 |
$options = Tribe__Utils__Array::get( $field, [ 'extra', 'options' ], null );
|
26 |
?>
|
27 |
<div class="tribe-field tribe-tickets-meta-fieldset tribe-tickets-meta-fieldset__checkbox-radio <?php echo $required ? 'tribe-tickets-meta-required' : ''; ?>">
|
28 |
<header class="tribe-tickets-meta-label">
|
29 |
+
<h3 class="tribe-common-b1 tribe-common-b2--min-medium">
|
30 |
+
<?php echo wp_kses_post( $field['label'] ); ?>
|
31 |
+
<?php tribe_required_label( $required ); ?>
|
32 |
+
</h3>
|
33 |
</header>
|
34 |
|
35 |
<div class="tribe-common-form-control-checkbox-radio-group">
|
src/views/tickets/view-link.php
CHANGED
@@ -12,8 +12,9 @@
|
|
12 |
* @since 4.10.9 Use customizable ticket name functions.
|
13 |
* @since 4.11.0 Made template more like new blocks-based template in terms of logic.
|
14 |
* @since 4.12.1 Account for empty post type object, such as if post type got disabled. Fix typo in sprintf placeholders.
|
|
|
15 |
*
|
16 |
-
* @version
|
17 |
*
|
18 |
* @var Tribe__Tickets__Tickets_View $this
|
19 |
*/
|
@@ -23,11 +24,26 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
23 |
}
|
24 |
|
25 |
$view = Tribe__Tickets__Tickets_View::instance();
|
|
|
26 |
$event_id = get_the_ID();
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
$post_type = get_post_type_object( $event->post_type );
|
29 |
$user_id = get_current_user_id();
|
30 |
|
|
|
|
|
|
|
|
|
31 |
$is_event_page = class_exists( 'Tribe__Events__Main' ) && Tribe__Events__Main::POSTTYPE === $event->post_type;
|
32 |
|
33 |
$post_type_singular = $post_type ? $post_type->labels->singular_name : _x( 'Post', 'fallback post type singular name', 'event-tickets' );
|
@@ -63,5 +79,10 @@ $message = esc_html( sprintf( __( 'You have %1s for this %2s.', 'event-tickets'
|
|
63 |
|
64 |
<div class="tribe-link-view-attendee">
|
65 |
<?php echo $message ?>
|
66 |
-
<a href="<?php echo esc_url( $link ) ?>"
|
67 |
-
|
|
|
|
|
|
|
|
|
|
12 |
* @since 4.10.9 Use customizable ticket name functions.
|
13 |
* @since 4.11.0 Made template more like new blocks-based template in terms of logic.
|
14 |
* @since 4.12.1 Account for empty post type object, such as if post type got disabled. Fix typo in sprintf placeholders.
|
15 |
+
* @since 5.0.1 Add additional checks to prevent PHP errors when called from automated testing.
|
16 |
*
|
17 |
+
* @version 5.0.1
|
18 |
*
|
19 |
* @var Tribe__Tickets__Tickets_View $this
|
20 |
*/
|
24 |
}
|
25 |
|
26 |
$view = Tribe__Tickets__Tickets_View::instance();
|
27 |
+
|
28 |
$event_id = get_the_ID();
|
29 |
+
|
30 |
+
if ( empty( $event_id ) ) {
|
31 |
+
return;
|
32 |
+
}
|
33 |
+
|
34 |
+
$event = get_post( $event_id );
|
35 |
+
|
36 |
+
if ( empty( $event ) ) {
|
37 |
+
return;
|
38 |
+
}
|
39 |
+
|
40 |
$post_type = get_post_type_object( $event->post_type );
|
41 |
$user_id = get_current_user_id();
|
42 |
|
43 |
+
if ( empty( $post_type ) || ! is_user_logged_in() ) {
|
44 |
+
return;
|
45 |
+
}
|
46 |
+
|
47 |
$is_event_page = class_exists( 'Tribe__Events__Main' ) && Tribe__Events__Main::POSTTYPE === $event->post_type;
|
48 |
|
49 |
$post_type_singular = $post_type ? $post_type->labels->singular_name : _x( 'Post', 'fallback post type singular name', 'event-tickets' );
|
79 |
|
80 |
<div class="tribe-link-view-attendee">
|
81 |
<?php echo $message ?>
|
82 |
+
<a href="<?php echo esc_url( $link ); ?>">
|
83 |
+
<?php
|
84 |
+
// Translators: %s: The name(s) of the type(s) of ticket(s) the specified user (optional) has for the specified event.
|
85 |
+
echo sprintf( esc_html__( 'View your %s', 'event-tickets' ), $view->get_description_rsvp_ticket( $event_id, $user_id ) );
|
86 |
+
?>
|
87 |
+
</a>
|
88 |
+
</div>
|
src/views/v2/rsvp.php
CHANGED
@@ -7,16 +7,17 @@
|
|
7 |
*
|
8 |
* See more documentation about our Blocks Editor templating system.
|
9 |
*
|
10 |
-
* @link
|
11 |
*
|
12 |
* @since 4.12.3
|
13 |
*
|
14 |
* @version5.0.0
|
15 |
*
|
16 |
* @var Tribe__Tickets__Editor__Template $this
|
17 |
-
* @var WP_Post|int $post_id
|
18 |
-
* @var boolean $has_rsvps
|
19 |
-
* @var array $active_rsvps
|
|
|
20 |
*/
|
21 |
|
22 |
// We don't display anything if there is no RSVP.
|
@@ -31,7 +32,10 @@ if ( empty( $active_rsvps ) ) {
|
|
31 |
|
32 |
?>
|
33 |
|
34 |
-
<div
|
|
|
|
|
|
|
35 |
<?php foreach ( $active_rsvps as $rsvp ) : ?>
|
36 |
<div
|
37 |
class="tribe-tickets__rsvp-wrapper"
|
7 |
*
|
8 |
* See more documentation about our Blocks Editor templating system.
|
9 |
*
|
10 |
+
* @link http://m.tri.be/1amp
|
11 |
*
|
12 |
* @since 4.12.3
|
13 |
*
|
14 |
* @version5.0.0
|
15 |
*
|
16 |
* @var Tribe__Tickets__Editor__Template $this
|
17 |
+
* @var WP_Post|int $post_id The post object or ID.
|
18 |
+
* @var boolean $has_rsvps True if there are RSVPs.
|
19 |
+
* @var array $active_rsvps An array containing the active RSVPs.
|
20 |
+
* @var string $block_html_id The unique HTML id for the block.
|
21 |
*/
|
22 |
|
23 |
// We don't display anything if there is no RSVP.
|
32 |
|
33 |
?>
|
34 |
|
35 |
+
<div
|
36 |
+
id="<?php echo esc_attr( $block_html_id ); ?>"
|
37 |
+
class="tribe-common event-tickets"
|
38 |
+
>
|
39 |
<?php foreach ( $active_rsvps as $rsvp ) : ?>
|
40 |
<div
|
41 |
class="tribe-tickets__rsvp-wrapper"
|
src/views/v2/rsvp/actions/rsvp/going.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
-
* @link
|
12 |
*
|
13 |
* @var bool $must_login Whether the user has to login to RSVP or not.
|
14 |
* @var Tribe__Tickets__Ticket_Object $rsvp The rsvp ticket object.
|
@@ -25,6 +25,6 @@
|
|
25 |
type="submit"
|
26 |
<?php tribe_disabled( $must_login ); ?>
|
27 |
>
|
28 |
-
<?php
|
29 |
</button>
|
30 |
</div>
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
+
* @link http://m.tri.be/1amp
|
12 |
*
|
13 |
* @var bool $must_login Whether the user has to login to RSVP or not.
|
14 |
* @var Tribe__Tickets__Ticket_Object $rsvp The rsvp ticket object.
|
25 |
type="submit"
|
26 |
<?php tribe_disabled( $must_login ); ?>
|
27 |
>
|
28 |
+
<?php echo esc_html_x( 'Going', 'Label for the RSVP going button', 'event-tickets' ); ?>
|
29 |
</button>
|
30 |
</div>
|
src/views/v2/rsvp/actions/rsvp/not-going.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
-
* @link
|
12 |
*
|
13 |
* @var bool $must_login Whether the user has to login to RSVP or not.
|
14 |
* @var Tribe__Tickets__Ticket_Object $rsvp The rsvp ticket object.
|
@@ -40,6 +40,6 @@ if ( ! $show_not_going ) {
|
|
40 |
class="tribe-common-cta tribe-common-cta--alt tribe-tickets__rsvp-actions-button-not-going"
|
41 |
<?php tribe_disabled( $must_login ); ?>
|
42 |
>
|
43 |
-
<?php
|
44 |
</button>
|
45 |
</div>
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
+
* @link http://m.tri.be/1amp
|
12 |
*
|
13 |
* @var bool $must_login Whether the user has to login to RSVP or not.
|
14 |
* @var Tribe__Tickets__Ticket_Object $rsvp The rsvp ticket object.
|
40 |
class="tribe-common-cta tribe-common-cta--alt tribe-tickets__rsvp-actions-button-not-going"
|
41 |
<?php tribe_disabled( $must_login ); ?>
|
42 |
>
|
43 |
+
<?php echo esc_html_x( "Can't go", 'Label for the RSVP "can\'t go" version of the not going button', 'event-tickets' ); ?>
|
44 |
</button>
|
45 |
</div>
|
src/views/v2/rsvp/details/attendance.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
-
* @link
|
12 |
*
|
13 |
* @var Tribe__Tickets__Ticket_Object $rsvp The rsvp ticket object.
|
14 |
*
|
@@ -26,6 +26,6 @@ if ( ! $rsvp->show_description() || empty( $rsvp->description ) ) {
|
|
26 |
<?php echo esc_html( $rsvp->qty_sold ); ?>
|
27 |
</span>
|
28 |
<span class="tribe-tickets__rsvp-attendance-going tribe-common-h7 tribe-common-h--alt tribe-common-b3--min-medium">
|
29 |
-
<?php
|
30 |
</span>
|
31 |
</div>
|
8 |
*
|
9 |
* See more documentation about our Blocks Editor templating system.
|
10 |
*
|
11 |
+
* @link http://m.tri.be/1amp
|
12 |
*
|
13 |
* @var Tribe__Tickets__Ticket_Object $rsvp The rsvp ticket object.
|
14 |
*
|
26 |
<?php echo esc_html( $rsvp->qty_sold ); ?>
|
27 |
</span>
|
28 |
<span class="tribe-tickets__rsvp-attendance-going tribe-common-h7 tribe-common-h--alt tribe-common-b3--min-medium">
|
29 |
+
<?php echo esc_html_x( 'Going', 'Label below the attendance number', 'event-tickets' ); ?>
|
30 |
</span>
|
31 |
</div>
|
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 ComposerAutoloaderInit68981bfd40be6d52f005abf1c0446c89::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 ComposerAutoloaderInit6a95792be62f07d5f3d52d24c0c9705a
|
|
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 ComposerAutoloaderInit68981bfd40be6d52f005abf1c0446c89
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit68981bfd40be6d52f005abf1c0446c89', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit68981bfd40be6d52f005abf1c0446c89', '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\ComposerStaticInit68981bfd40be6d52f005abf1c0446c89::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' =>
|
@@ -49,9 +49,9 @@ class ComposerStaticInit6a95792be62f07d5f3d52d24c0c9705a
|
|
49 |
public static function getInitializer(ClassLoader $loader)
|
50 |
{
|
51 |
return \Closure::bind(function () use ($loader) {
|
52 |
-
$loader->prefixLengthsPsr4 =
|
53 |
-
$loader->prefixDirsPsr4 =
|
54 |
-
$loader->classMap =
|
55 |
|
56 |
}, null, ClassLoader::class);
|
57 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit68981bfd40be6d52f005abf1c0446c89
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
49 |
public static function getInitializer(ClassLoader $loader)
|
50 |
{
|
51 |
return \Closure::bind(function () use ($loader) {
|
52 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit68981bfd40be6d52f005abf1c0446c89::$prefixLengthsPsr4;
|
53 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit68981bfd40be6d52f005abf1c0446c89::$prefixDirsPsr4;
|
54 |
+
$loader->classMap = ComposerStaticInit68981bfd40be6d52f005abf1c0446c89::$classMap;
|
55 |
|
56 |
}, null, ClassLoader::class);
|
57 |
}
|