Completed
Branch master (16095c)
by
unknown
09:17 queued 04:49
created
caffeinated/core/domain/services/pue/RegisterAddonPUE.php 2 patches
Indentation   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -12,98 +12,98 @@
 block discarded – undo
12 12
 
13 13
 class RegisterAddonPUE
14 14
 {
15
-    /**
16
-     * @var array
17
-     */
18
-    private static $addon_api_settings;
15
+	/**
16
+	 * @var array
17
+	 */
18
+	private static $addon_api_settings;
19 19
 
20 20
 
21
-    public static function registerPUE(
22
-        array $addon_api_settings,
23
-        string $addon_name,
24
-        string $class_name,
25
-        array $addon_args
26
-    ): array {
27
-        if (! empty($addon_args['pue_options'])) {
28
-            $addon_api_settings[ $addon_name ]['pue_options'] = [
29
-                'pue_plugin_slug' => isset($addon_args['pue_options']['pue_plugin_slug'])
30
-                    ? (string) $addon_args['pue_options']['pue_plugin_slug']
31
-                    : 'espresso_' . strtolower($class_name),
32
-                'plugin_basename' => isset($addon_args['pue_options']['plugin_basename'])
33
-                    ? (string) $addon_args['pue_options']['plugin_basename']
34
-                    : plugin_basename($addon_args['main_file_path']),
35
-                'checkPeriod'     => isset($addon_args['pue_options']['checkPeriod'])
36
-                    ? (string) $addon_args['pue_options']['checkPeriod']
37
-                    : '24',
38
-                'use_wp_update'   => isset($addon_args['pue_options']['use_wp_update'])
39
-                    ? (string) $addon_args['pue_options']['use_wp_update']
40
-                    : false,
41
-            ];
42
-            add_action(
43
-                'AHEE__EE_System__brew_espresso__after_pue_init',
44
-                [RegisterAddonPUE::class, 'loadPueUpdate']
45
-            );
46
-        }
47
-        RegisterAddonPUE::$addon_api_settings = $addon_api_settings;
48
-        return $addon_api_settings;
49
-    }
21
+	public static function registerPUE(
22
+		array $addon_api_settings,
23
+		string $addon_name,
24
+		string $class_name,
25
+		array $addon_args
26
+	): array {
27
+		if (! empty($addon_args['pue_options'])) {
28
+			$addon_api_settings[ $addon_name ]['pue_options'] = [
29
+				'pue_plugin_slug' => isset($addon_args['pue_options']['pue_plugin_slug'])
30
+					? (string) $addon_args['pue_options']['pue_plugin_slug']
31
+					: 'espresso_' . strtolower($class_name),
32
+				'plugin_basename' => isset($addon_args['pue_options']['plugin_basename'])
33
+					? (string) $addon_args['pue_options']['plugin_basename']
34
+					: plugin_basename($addon_args['main_file_path']),
35
+				'checkPeriod'     => isset($addon_args['pue_options']['checkPeriod'])
36
+					? (string) $addon_args['pue_options']['checkPeriod']
37
+					: '24',
38
+				'use_wp_update'   => isset($addon_args['pue_options']['use_wp_update'])
39
+					? (string) $addon_args['pue_options']['use_wp_update']
40
+					: false,
41
+			];
42
+			add_action(
43
+				'AHEE__EE_System__brew_espresso__after_pue_init',
44
+				[RegisterAddonPUE::class, 'loadPueUpdate']
45
+			);
46
+		}
47
+		RegisterAddonPUE::$addon_api_settings = $addon_api_settings;
48
+		return $addon_api_settings;
49
+	}
50 50
 
51 51
 
52
-    public static function setAddonPueSlug(EE_Addon $addon, string $addon_name)
53
-    {
54
-        // setup the add-on's pue_slug if we have one.
55
-        if (! empty(RegisterAddonPUE::$addon_api_settings[ $addon_name ]['pue_options']['pue_plugin_slug'])) {
56
-            $addon->setPueSlug(RegisterAddonPUE::$addon_api_settings[ $addon_name ]['pue_options']['pue_plugin_slug']);
57
-        }
58
-    }
52
+	public static function setAddonPueSlug(EE_Addon $addon, string $addon_name)
53
+	{
54
+		// setup the add-on's pue_slug if we have one.
55
+		if (! empty(RegisterAddonPUE::$addon_api_settings[ $addon_name ]['pue_options']['pue_plugin_slug'])) {
56
+			$addon->setPueSlug(RegisterAddonPUE::$addon_api_settings[ $addon_name ]['pue_options']['pue_plugin_slug']);
57
+		}
58
+	}
59 59
 
60 60
 
61
-    /**
62
-     *    load_pue_update - Update notifications
63
-     *
64
-     * @return void
65
-     * @throws InvalidArgumentException
66
-     * @throws InvalidDataTypeException
67
-     * @throws InvalidInterfaceException
68
-     */
69
-    public static function loadPueUpdate()
70
-    {
71
-        // PUE client existence
72
-        if (! is_readable(EE_THIRD_PARTY . 'pue/pue-client.php')) {
73
-            return;
74
-        }
61
+	/**
62
+	 *    load_pue_update - Update notifications
63
+	 *
64
+	 * @return void
65
+	 * @throws InvalidArgumentException
66
+	 * @throws InvalidDataTypeException
67
+	 * @throws InvalidInterfaceException
68
+	 */
69
+	public static function loadPueUpdate()
70
+	{
71
+		// PUE client existence
72
+		if (! is_readable(EE_THIRD_PARTY . 'pue/pue-client.php')) {
73
+			return;
74
+		}
75 75
 
76
-        /** @var EE_Network_Config $network_config */
77
-        $network_config = LoaderFactory::getLoader()->getShared('EE_Network_Config');
78
-        // load PUE client
79
-        require_once EE_THIRD_PARTY . 'pue/pue-client.php';
80
-        $license_server = defined('PUE_UPDATES_ENDPOINT') ? PUE_UPDATES_ENDPOINT : 'https://eventespresso.com';
81
-        // cycle thru settings
82
-        foreach (RegisterAddonPUE::$addon_api_settings as $settings) {
83
-            if (empty($settings['pue_options'])) {
84
-                continue;
85
-            }
86
-            // initiate the class and start the plugin update engine!
87
-            new PluginUpdateEngineChecker(
88
-            // host file URL
89
-                $license_server,
90
-                // plugin slug(s)
91
-                [
92
-                    'premium'    => ['p' => $settings['pue_options']['pue_plugin_slug']],
93
-                    'prerelease' => ['beta' => $settings['pue_options']['pue_plugin_slug'] . '-pr'],
94
-                ],
95
-                // options
96
-                [
97
-                    'apikey'            => $network_config->core->site_license_key,
98
-                    'lang_domain'       => 'event_espresso',
99
-                    'checkPeriod'       => $settings['pue_options']['checkPeriod'],
100
-                    'option_key'        => 'ee_site_license_key',
101
-                    'options_page_slug' => 'event_espresso',
102
-                    'plugin_basename'   => $settings['pue_options']['plugin_basename'],
103
-                    // if use_wp_update is TRUE it means you want FREE versions of the plugin to be updated from WP
104
-                    'use_wp_update'     => $settings['pue_options']['use_wp_update'],
105
-                ]
106
-            );
107
-        }
108
-    }
76
+		/** @var EE_Network_Config $network_config */
77
+		$network_config = LoaderFactory::getLoader()->getShared('EE_Network_Config');
78
+		// load PUE client
79
+		require_once EE_THIRD_PARTY . 'pue/pue-client.php';
80
+		$license_server = defined('PUE_UPDATES_ENDPOINT') ? PUE_UPDATES_ENDPOINT : 'https://eventespresso.com';
81
+		// cycle thru settings
82
+		foreach (RegisterAddonPUE::$addon_api_settings as $settings) {
83
+			if (empty($settings['pue_options'])) {
84
+				continue;
85
+			}
86
+			// initiate the class and start the plugin update engine!
87
+			new PluginUpdateEngineChecker(
88
+			// host file URL
89
+				$license_server,
90
+				// plugin slug(s)
91
+				[
92
+					'premium'    => ['p' => $settings['pue_options']['pue_plugin_slug']],
93
+					'prerelease' => ['beta' => $settings['pue_options']['pue_plugin_slug'] . '-pr'],
94
+				],
95
+				// options
96
+				[
97
+					'apikey'            => $network_config->core->site_license_key,
98
+					'lang_domain'       => 'event_espresso',
99
+					'checkPeriod'       => $settings['pue_options']['checkPeriod'],
100
+					'option_key'        => 'ee_site_license_key',
101
+					'options_page_slug' => 'event_espresso',
102
+					'plugin_basename'   => $settings['pue_options']['plugin_basename'],
103
+					// if use_wp_update is TRUE it means you want FREE versions of the plugin to be updated from WP
104
+					'use_wp_update'     => $settings['pue_options']['use_wp_update'],
105
+				]
106
+			);
107
+		}
108
+	}
109 109
 }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
         string $class_name,
25 25
         array $addon_args
26 26
     ): array {
27
-        if (! empty($addon_args['pue_options'])) {
28
-            $addon_api_settings[ $addon_name ]['pue_options'] = [
27
+        if ( ! empty($addon_args['pue_options'])) {
28
+            $addon_api_settings[$addon_name]['pue_options'] = [
29 29
                 'pue_plugin_slug' => isset($addon_args['pue_options']['pue_plugin_slug'])
30 30
                     ? (string) $addon_args['pue_options']['pue_plugin_slug']
31
-                    : 'espresso_' . strtolower($class_name),
31
+                    : 'espresso_'.strtolower($class_name),
32 32
                 'plugin_basename' => isset($addon_args['pue_options']['plugin_basename'])
33 33
                     ? (string) $addon_args['pue_options']['plugin_basename']
34 34
                     : plugin_basename($addon_args['main_file_path']),
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     public static function setAddonPueSlug(EE_Addon $addon, string $addon_name)
53 53
     {
54 54
         // setup the add-on's pue_slug if we have one.
55
-        if (! empty(RegisterAddonPUE::$addon_api_settings[ $addon_name ]['pue_options']['pue_plugin_slug'])) {
56
-            $addon->setPueSlug(RegisterAddonPUE::$addon_api_settings[ $addon_name ]['pue_options']['pue_plugin_slug']);
55
+        if ( ! empty(RegisterAddonPUE::$addon_api_settings[$addon_name]['pue_options']['pue_plugin_slug'])) {
56
+            $addon->setPueSlug(RegisterAddonPUE::$addon_api_settings[$addon_name]['pue_options']['pue_plugin_slug']);
57 57
         }
58 58
     }
59 59
 
@@ -69,14 +69,14 @@  discard block
 block discarded – undo
69 69
     public static function loadPueUpdate()
70 70
     {
71 71
         // PUE client existence
72
-        if (! is_readable(EE_THIRD_PARTY . 'pue/pue-client.php')) {
72
+        if ( ! is_readable(EE_THIRD_PARTY.'pue/pue-client.php')) {
73 73
             return;
74 74
         }
75 75
 
76 76
         /** @var EE_Network_Config $network_config */
77 77
         $network_config = LoaderFactory::getLoader()->getShared('EE_Network_Config');
78 78
         // load PUE client
79
-        require_once EE_THIRD_PARTY . 'pue/pue-client.php';
79
+        require_once EE_THIRD_PARTY.'pue/pue-client.php';
80 80
         $license_server = defined('PUE_UPDATES_ENDPOINT') ? PUE_UPDATES_ENDPOINT : 'https://eventespresso.com';
81 81
         // cycle thru settings
82 82
         foreach (RegisterAddonPUE::$addon_api_settings as $settings) {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 // plugin slug(s)
91 91
                 [
92 92
                     'premium'    => ['p' => $settings['pue_options']['pue_plugin_slug']],
93
-                    'prerelease' => ['beta' => $settings['pue_options']['pue_plugin_slug'] . '-pr'],
93
+                    'prerelease' => ['beta' => $settings['pue_options']['pue_plugin_slug'].'-pr'],
94 94
                 ],
95 95
                 // options
96 96
                 [
Please login to merge, or discard this patch.
core/domain/entities/routing/handlers/admin/EspressoEventsAdmin.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -14,36 +14,36 @@
 block discarded – undo
14 14
  */
15 15
 class EspressoEventsAdmin extends AdminRoute
16 16
 {
17
-    /**
18
-     * returns true if the current request matches this route
19
-     *
20
-     * @return bool
21
-     * @since   5.0.0.p
22
-     */
23
-    public function matchesCurrentRequest(): bool
24
-    {
25
-        global $pagenow;
26
-        return parent::matchesCurrentRequest()
27
-               && $pagenow
28
-               && $pagenow === 'admin.php'
29
-               && $this->request->getRequestParam('page') === 'espresso_events';
30
-    }
17
+	/**
18
+	 * returns true if the current request matches this route
19
+	 *
20
+	 * @return bool
21
+	 * @since   5.0.0.p
22
+	 */
23
+	public function matchesCurrentRequest(): bool
24
+	{
25
+		global $pagenow;
26
+		return parent::matchesCurrentRequest()
27
+			   && $pagenow
28
+			   && $pagenow === 'admin.php'
29
+			   && $this->request->getRequestParam('page') === 'espresso_events';
30
+	}
31 31
 
32 32
 
33
-    /**
34
-     * @since 5.0.0.p
35
-     */
36
-    protected function registerDependencies()
37
-    {
38
-        $this->dependency_map->registerDependencies(
39
-            'EventEspresso\core\domain\services\admin\events\default_settings\AdvancedEditorAdminFormSection',
40
-            AdminRoute::getDefaultDependencies()
41
-        );
42
-        $this->dependency_map->registerDependencies(
43
-            'EventEspresso\core\services\admin\AdminListTableFilters',
44
-            [
45
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
46
-            ]
47
-        );
48
-    }
33
+	/**
34
+	 * @since 5.0.0.p
35
+	 */
36
+	protected function registerDependencies()
37
+	{
38
+		$this->dependency_map->registerDependencies(
39
+			'EventEspresso\core\domain\services\admin\events\default_settings\AdvancedEditorAdminFormSection',
40
+			AdminRoute::getDefaultDependencies()
41
+		);
42
+		$this->dependency_map->registerDependencies(
43
+			'EventEspresso\core\services\admin\AdminListTableFilters',
44
+			[
45
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
46
+			]
47
+		);
48
+	}
49 49
 }
Please login to merge, or discard this patch.
vendor/appsero/client/src/Insights.php 2 patches
Indentation   +832 added lines, -832 removed lines patch added patch discarded remove patch
@@ -10,807 +10,807 @@  discard block
 block discarded – undo
10 10
  */
11 11
 class Insights {
12 12
 
13
-    /**
14
-     * The notice text
15
-     *
16
-     * @var string
17
-     */
18
-    public $notice;
19
-
20
-    /**
21
-     * Wheather to the notice or not
22
-     *
23
-     * @var boolean
24
-     */
25
-    protected $show_notice = true;
26
-
27
-    /**
28
-     * If extra data needs to be sent
29
-     *
30
-     * @var array
31
-     */
32
-    protected $extra_data = array();
33
-
34
-    /**
35
-     * AppSero\Client
36
-     *
37
-     * @var object
38
-     */
39
-    protected $client;
40
-
41
-    /**
42
-     * @var boolean
43
-     */
44
-    private $plugin_data = false;
45
-
46
-
47
-    /**
48
-     * Initialize the class
49
-     *
50
-     * @param      $client
51
-     * @param null $name
52
-     * @param null $file
53
-     */
54
-    public function __construct( $client, $name = null, $file = null ) {
55
-
56
-        if ( is_string( $client ) && ! empty( $name ) && ! empty( $file ) ) {
57
-            $client = new Client( $client, $name, $file );
58
-        }
59
-
60
-        if ( is_object( $client ) && is_a( $client, 'Appsero\Client' ) ) {
61
-            $this->client = $client;
62
-        }
63
-    }
64
-
65
-    /**
66
-     * Don't show the notice
67
-     *
68
-     * @return \self
69
-     */
70
-    public function hide_notice() {
71
-        $this->show_notice = false;
72
-
73
-        return $this;
74
-    }
75
-
76
-    /**
77
-     * Add plugin data if needed
78
-     *
79
-     * @return \self
80
-     */
81
-    public function add_plugin_data() {
82
-        $this->plugin_data = true;
83
-
84
-        return $this;
85
-    }
86
-
87
-    /**
88
-     * Add extra data if needed
89
-     *
90
-     * @param array $data
91
-     *
92
-     * @return \self
93
-     */
94
-    public function add_extra( $data = array() ) {
95
-        $this->extra_data = $data;
96
-
97
-        return $this;
98
-    }
99
-
100
-    /**
101
-     * Set custom notice text
102
-     *
103
-     * @param  string $text
104
-     *
105
-     * @return \self
106
-     */
107
-    public function notice($text='' ) {
108
-        $this->notice = $text;
109
-
110
-        return $this;
111
-    }
112
-
113
-    /**
114
-     * Initialize insights
115
-     *
116
-     * @return void
117
-     */
118
-    public function init() {
119
-        if ( $this->client->type == 'plugin' ) {
120
-            $this->init_plugin();
121
-        } else if ( $this->client->type == 'theme' ) {
122
-            $this->init_theme();
123
-        }
124
-    }
125
-
126
-    /**
127
-     * Initialize theme hooks
128
-     *
129
-     * @return void
130
-     */
131
-    public function init_theme() {
132
-        $this->init_common();
133
-
134
-        add_action( 'switch_theme', array( $this, 'deactivation_cleanup' ) );
135
-        add_action( 'switch_theme', array( $this, 'theme_deactivated' ), 12, 3 );
136
-    }
137
-
138
-    /**
139
-     * Initialize plugin hooks
140
-     *
141
-     * @return void
142
-     */
143
-    public function init_plugin() {
144
-        // plugin deactivate popup
145
-        if ( ! $this->is_local_server() ) {
146
-            add_filter( 'plugin_action_links_' . $this->client->basename, array( $this, 'plugin_action_links' ) );
147
-            add_action( 'admin_footer', array( $this, 'deactivate_scripts' ) );
148
-        }
149
-
150
-        $this->init_common();
151
-
152
-        register_activation_hook( $this->client->file, array( $this, 'activate_plugin' ) );
153
-        register_deactivation_hook( $this->client->file, array( $this, 'deactivation_cleanup' ) );
154
-    }
155
-
156
-    /**
157
-     * Initialize common hooks
158
-     *
159
-     * @return void
160
-     */
161
-    protected function init_common() {
162
-
163
-        if ( $this->show_notice ) {
164
-            // tracking notice
165
-            add_action( 'admin_notices', array( $this, 'admin_notice' ) );
166
-        }
167
-
168
-        add_action( 'admin_init', array( $this, 'handle_optin_optout' ) );
169
-
170
-        // uninstall reason
171
-        add_action( 'wp_ajax_' . $this->client->slug . '_submit-uninstall-reason', array( $this, 'uninstall_reason_submission' ) );
172
-
173
-        // cron events
174
-        add_filter( 'cron_schedules', array( $this, 'add_weekly_schedule' ) );
175
-        add_action( $this->client->slug . '_tracker_send_event', array( $this, 'send_tracking_data' ) );
176
-        // add_action( 'admin_init', array( $this, 'send_tracking_data' ) ); // test
177
-    }
178
-
179
-    /**
180
-     * Send tracking data to AppSero server
181
-     *
182
-     * @param  boolean  $override
183
-     *
184
-     * @return void
185
-     */
186
-    public function send_tracking_data( $override = false ) {
187
-        if ( ! $this->tracking_allowed() && ! $override ) {
188
-            return;
189
-        }
190
-
191
-        // Send a maximum of once per week
192
-        $last_send = $this->get_last_send();
193
-
194
-        if ( $last_send && $last_send > strtotime( '-1 week' ) ) {
195
-            return;
196
-        }
197
-
198
-        $tracking_data = $this->get_tracking_data();
199
-
200
-        $response = $this->client->send_request( $tracking_data, 'track' );
201
-
202
-        update_option( $this->client->slug . '_tracking_last_send', time() );
203
-    }
204
-
205
-    /**
206
-     * Get the tracking data points
207
-     *
208
-     * @return array
209
-     */
210
-    protected function get_tracking_data() {
211
-        $all_plugins = $this->get_all_plugins();
212
-
213
-        $users = get_users( array(
214
-            'role'    => 'administrator',
215
-            'orderby' => 'ID',
216
-            'order'   => 'ASC',
217
-            'number'  => 1,
218
-            'paged'   => 1,
219
-        ) );
220
-
221
-        $admin_user =  ( is_array( $users ) && ! empty( $users ) ) ? $users[0] : false;
222
-        $first_name = $last_name = '';
223
-
224
-        if ( $admin_user ) {
225
-            $first_name = $admin_user->first_name ? $admin_user->first_name : $admin_user->display_name;
226
-            $last_name  = $admin_user->last_name;
227
-        }
228
-
229
-        $data = array(
230
-            'url'              => esc_url( home_url() ),
231
-            'site'             => $this->get_site_name(),
232
-            'admin_email'      => get_option( 'admin_email' ),
233
-            'first_name'       => $first_name,
234
-            'last_name'        => $last_name,
235
-            'hash'             => $this->client->hash,
236
-            'server'           => $this->get_server_info(),
237
-            'wp'               => $this->get_wp_info(),
238
-            'users'            => $this->get_user_counts(),
239
-            'active_plugins'   => count( $all_plugins['active_plugins'] ),
240
-            'inactive_plugins' => count( $all_plugins['inactive_plugins'] ),
241
-            'ip_address'       => $this->get_user_ip_address(),
242
-            'project_version'  => $this->client->project_version,
243
-            'tracking_skipped' => false,
244
-            'is_local'         => $this->is_local_server(),
245
-        );
246
-
247
-        // Add Plugins
248
-        if ($this->plugin_data) {
249
-            
250
-            $plugins_data = array();
251
-
252
-            foreach ($all_plugins['active_plugins'] as $slug => $plugin) {
253
-                $slug = strstr($slug, '/', true);
254
-                if (! $slug) {
255
-                    continue;
256
-                }
257
-
258
-                $plugins_data[ $slug ] = array(
259
-                    'name' => isset($plugin['name']) ? $plugin['name'] : '',
260
-                    'version' => isset($plugin['version']) ? $plugin['version'] : '',
261
-                );
262
-            }
13
+	/**
14
+	 * The notice text
15
+	 *
16
+	 * @var string
17
+	 */
18
+	public $notice;
19
+
20
+	/**
21
+	 * Wheather to the notice or not
22
+	 *
23
+	 * @var boolean
24
+	 */
25
+	protected $show_notice = true;
26
+
27
+	/**
28
+	 * If extra data needs to be sent
29
+	 *
30
+	 * @var array
31
+	 */
32
+	protected $extra_data = array();
33
+
34
+	/**
35
+	 * AppSero\Client
36
+	 *
37
+	 * @var object
38
+	 */
39
+	protected $client;
40
+
41
+	/**
42
+	 * @var boolean
43
+	 */
44
+	private $plugin_data = false;
45
+
46
+
47
+	/**
48
+	 * Initialize the class
49
+	 *
50
+	 * @param      $client
51
+	 * @param null $name
52
+	 * @param null $file
53
+	 */
54
+	public function __construct( $client, $name = null, $file = null ) {
55
+
56
+		if ( is_string( $client ) && ! empty( $name ) && ! empty( $file ) ) {
57
+			$client = new Client( $client, $name, $file );
58
+		}
59
+
60
+		if ( is_object( $client ) && is_a( $client, 'Appsero\Client' ) ) {
61
+			$this->client = $client;
62
+		}
63
+	}
64
+
65
+	/**
66
+	 * Don't show the notice
67
+	 *
68
+	 * @return \self
69
+	 */
70
+	public function hide_notice() {
71
+		$this->show_notice = false;
72
+
73
+		return $this;
74
+	}
75
+
76
+	/**
77
+	 * Add plugin data if needed
78
+	 *
79
+	 * @return \self
80
+	 */
81
+	public function add_plugin_data() {
82
+		$this->plugin_data = true;
83
+
84
+		return $this;
85
+	}
86
+
87
+	/**
88
+	 * Add extra data if needed
89
+	 *
90
+	 * @param array $data
91
+	 *
92
+	 * @return \self
93
+	 */
94
+	public function add_extra( $data = array() ) {
95
+		$this->extra_data = $data;
96
+
97
+		return $this;
98
+	}
99
+
100
+	/**
101
+	 * Set custom notice text
102
+	 *
103
+	 * @param  string $text
104
+	 *
105
+	 * @return \self
106
+	 */
107
+	public function notice($text='' ) {
108
+		$this->notice = $text;
109
+
110
+		return $this;
111
+	}
112
+
113
+	/**
114
+	 * Initialize insights
115
+	 *
116
+	 * @return void
117
+	 */
118
+	public function init() {
119
+		if ( $this->client->type == 'plugin' ) {
120
+			$this->init_plugin();
121
+		} else if ( $this->client->type == 'theme' ) {
122
+			$this->init_theme();
123
+		}
124
+	}
125
+
126
+	/**
127
+	 * Initialize theme hooks
128
+	 *
129
+	 * @return void
130
+	 */
131
+	public function init_theme() {
132
+		$this->init_common();
133
+
134
+		add_action( 'switch_theme', array( $this, 'deactivation_cleanup' ) );
135
+		add_action( 'switch_theme', array( $this, 'theme_deactivated' ), 12, 3 );
136
+	}
137
+
138
+	/**
139
+	 * Initialize plugin hooks
140
+	 *
141
+	 * @return void
142
+	 */
143
+	public function init_plugin() {
144
+		// plugin deactivate popup
145
+		if ( ! $this->is_local_server() ) {
146
+			add_filter( 'plugin_action_links_' . $this->client->basename, array( $this, 'plugin_action_links' ) );
147
+			add_action( 'admin_footer', array( $this, 'deactivate_scripts' ) );
148
+		}
149
+
150
+		$this->init_common();
151
+
152
+		register_activation_hook( $this->client->file, array( $this, 'activate_plugin' ) );
153
+		register_deactivation_hook( $this->client->file, array( $this, 'deactivation_cleanup' ) );
154
+	}
155
+
156
+	/**
157
+	 * Initialize common hooks
158
+	 *
159
+	 * @return void
160
+	 */
161
+	protected function init_common() {
162
+
163
+		if ( $this->show_notice ) {
164
+			// tracking notice
165
+			add_action( 'admin_notices', array( $this, 'admin_notice' ) );
166
+		}
167
+
168
+		add_action( 'admin_init', array( $this, 'handle_optin_optout' ) );
169
+
170
+		// uninstall reason
171
+		add_action( 'wp_ajax_' . $this->client->slug . '_submit-uninstall-reason', array( $this, 'uninstall_reason_submission' ) );
172
+
173
+		// cron events
174
+		add_filter( 'cron_schedules', array( $this, 'add_weekly_schedule' ) );
175
+		add_action( $this->client->slug . '_tracker_send_event', array( $this, 'send_tracking_data' ) );
176
+		// add_action( 'admin_init', array( $this, 'send_tracking_data' ) ); // test
177
+	}
178
+
179
+	/**
180
+	 * Send tracking data to AppSero server
181
+	 *
182
+	 * @param  boolean  $override
183
+	 *
184
+	 * @return void
185
+	 */
186
+	public function send_tracking_data( $override = false ) {
187
+		if ( ! $this->tracking_allowed() && ! $override ) {
188
+			return;
189
+		}
190
+
191
+		// Send a maximum of once per week
192
+		$last_send = $this->get_last_send();
193
+
194
+		if ( $last_send && $last_send > strtotime( '-1 week' ) ) {
195
+			return;
196
+		}
197
+
198
+		$tracking_data = $this->get_tracking_data();
199
+
200
+		$response = $this->client->send_request( $tracking_data, 'track' );
201
+
202
+		update_option( $this->client->slug . '_tracking_last_send', time() );
203
+	}
204
+
205
+	/**
206
+	 * Get the tracking data points
207
+	 *
208
+	 * @return array
209
+	 */
210
+	protected function get_tracking_data() {
211
+		$all_plugins = $this->get_all_plugins();
212
+
213
+		$users = get_users( array(
214
+			'role'    => 'administrator',
215
+			'orderby' => 'ID',
216
+			'order'   => 'ASC',
217
+			'number'  => 1,
218
+			'paged'   => 1,
219
+		) );
220
+
221
+		$admin_user =  ( is_array( $users ) && ! empty( $users ) ) ? $users[0] : false;
222
+		$first_name = $last_name = '';
223
+
224
+		if ( $admin_user ) {
225
+			$first_name = $admin_user->first_name ? $admin_user->first_name : $admin_user->display_name;
226
+			$last_name  = $admin_user->last_name;
227
+		}
228
+
229
+		$data = array(
230
+			'url'              => esc_url( home_url() ),
231
+			'site'             => $this->get_site_name(),
232
+			'admin_email'      => get_option( 'admin_email' ),
233
+			'first_name'       => $first_name,
234
+			'last_name'        => $last_name,
235
+			'hash'             => $this->client->hash,
236
+			'server'           => $this->get_server_info(),
237
+			'wp'               => $this->get_wp_info(),
238
+			'users'            => $this->get_user_counts(),
239
+			'active_plugins'   => count( $all_plugins['active_plugins'] ),
240
+			'inactive_plugins' => count( $all_plugins['inactive_plugins'] ),
241
+			'ip_address'       => $this->get_user_ip_address(),
242
+			'project_version'  => $this->client->project_version,
243
+			'tracking_skipped' => false,
244
+			'is_local'         => $this->is_local_server(),
245
+		);
263 246
 
264
-            if (array_key_exists($this->client->slug, $plugins_data)) {
265
-                unset($plugins_data[$this->client->slug]);
266
-            }
247
+		// Add Plugins
248
+		if ($this->plugin_data) {
249
+            
250
+			$plugins_data = array();
251
+
252
+			foreach ($all_plugins['active_plugins'] as $slug => $plugin) {
253
+				$slug = strstr($slug, '/', true);
254
+				if (! $slug) {
255
+					continue;
256
+				}
257
+
258
+				$plugins_data[ $slug ] = array(
259
+					'name' => isset($plugin['name']) ? $plugin['name'] : '',
260
+					'version' => isset($plugin['version']) ? $plugin['version'] : '',
261
+				);
262
+			}
263
+
264
+			if (array_key_exists($this->client->slug, $plugins_data)) {
265
+				unset($plugins_data[$this->client->slug]);
266
+			}
267 267
             
268
-            $data['plugins'] = $plugins_data;
269
-        }
270
-
271
-        // Add metadata
272
-        if ( $extra = $this->get_extra_data() ) {
273
-            $data['extra'] = $extra;
274
-        }
275
-
276
-        // Check this has previously skipped tracking
277
-        $skipped = get_option( $this->client->slug . '_tracking_skipped' );
278
-
279
-        if ( $skipped === 'yes' ) {
280
-            delete_option( $this->client->slug . '_tracking_skipped' );
281
-
282
-            $data['tracking_skipped'] = true;
283
-        }
284
-
285
-        return apply_filters( $this->client->slug . '_tracker_data', $data );
286
-    }
287
-
288
-    /**
289
-     * If a child class wants to send extra data
290
-     *
291
-     * @return mixed
292
-     */
293
-    protected function get_extra_data() {
294
-        if ( is_callable( $this->extra_data ) ) {
295
-            return call_user_func( $this->extra_data );
296
-        }
297
-
298
-        if ( is_array( $this->extra_data ) ) {
299
-            return $this->extra_data;
300
-        }
301
-
302
-        return array();
303
-    }
304
-
305
-    /**
306
-     * Explain the user which data we collect
307
-     *
308
-     * @return array
309
-     */
310
-    protected function data_we_collect() {
311
-        $data = array(
312
-            'Server environment details (php, mysql, server, WordPress versions)',
313
-            'Number of users in your site',
314
-            'Site language',
315
-            'Number of active and inactive plugins',
316
-            'Site name and URL',
317
-            'Your name and email address',
318
-        );
319
-
320
-        if ($this->plugin_data) { 
321
-            array_splice($data, 4, 0, ["active plugins' name"]);
322
-        }
323
-
324
-        return $data;
325
-    }
326
-
327
-    /**
328
-     * Check if the user has opted into tracking
329
-     *
330
-     * @return bool
331
-     */
332
-    public function tracking_allowed() {
333
-        $allow_tracking = get_option( $this->client->slug . '_allow_tracking', 'no' );
334
-
335
-        return $allow_tracking == 'yes';
336
-    }
337
-
338
-    /**
339
-     * Get the last time a tracking was sent
340
-     *
341
-     * @return false|string
342
-     */
343
-    private function get_last_send() {
344
-        return get_option( $this->client->slug . '_tracking_last_send', false );
345
-    }
346
-
347
-    /**
348
-     * Check if the notice has been dismissed or enabled
349
-     *
350
-     * @return boolean
351
-     */
352
-    public function notice_dismissed() {
353
-        $hide_notice = get_option( $this->client->slug . '_tracking_notice', null );
354
-
355
-        if ( 'hide' == $hide_notice ) {
356
-            return true;
357
-        }
358
-
359
-        return false;
360
-    }
361
-
362
-    /**
363
-     * Check if the current server is localhost
364
-     *
365
-     * @return boolean
366
-     */
367
-    private function is_local_server() {
368
-
369
-        $host       = isset( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : 'localhost';
370
-        $ip         = isset( $_SERVER['SERVER_ADDR'] ) ? $_SERVER['SERVER_ADDR'] : '127.0.0.1';
371
-        $is_local   = false;
372
-
373
-        if( in_array( $ip,array( '127.0.0.1', '::1' ) )
374
-            || ! strpos( $host, '.' )
375
-            || in_array( strrchr( $host, '.' ), array( '.test', '.testing', '.local', '.localhost', '.localdomain' ) )
376
-        ) {
377
-            $is_local = true;
378
-        }
379
-
380
-        return apply_filters( 'appsero_is_local', $is_local );
381
-    }
382
-
383
-    /**
384
-     * Schedule the event weekly
385
-     *
386
-     * @return void
387
-     */
388
-    private function schedule_event() {
389
-        $hook_name = $this->client->slug . '_tracker_send_event';
390
-
391
-        if ( ! wp_next_scheduled( $hook_name ) ) {
392
-            wp_schedule_event( time(), 'weekly', $hook_name );
393
-        }
394
-    }
395
-
396
-    /**
397
-     * Clear any scheduled hook
398
-     *
399
-     * @return void
400
-     */
401
-    private function clear_schedule_event() {
402
-        wp_clear_scheduled_hook( $this->client->slug . '_tracker_send_event' );
403
-    }
404
-
405
-    /**
406
-     * Display the admin notice to users that have not opted-in or out
407
-     *
408
-     * @return void
409
-     */
410
-    public function admin_notice() {
411
-
412
-        if ( $this->notice_dismissed() ) {
413
-            return;
414
-        }
415
-
416
-        if ( $this->tracking_allowed() ) {
417
-            return;
418
-        }
419
-
420
-        if ( ! current_user_can( 'manage_options' ) ) {
421
-            return;
422
-        }
423
-
424
-        // don't show tracking if a local server
425
-        if ( $this->is_local_server() ) {
426
-            return;
427
-        }
428
-
429
-        $optin_url  = add_query_arg( $this->client->slug . '_tracker_optin', 'true' );
430
-        $optout_url = add_query_arg( $this->client->slug . '_tracker_optout', 'true' );
431
-
432
-        if ( empty( $this->notice ) ) {
433
-            $notice = sprintf( $this->client->__trans( 'Want to help make <strong>%1$s</strong> even more awesome? Allow %1$s to collect non-sensitive diagnostic data and usage information.' ), $this->client->name );
434
-        } else {
435
-            $notice = $this->notice;
436
-        }
437
-
438
-        $policy_url = 'https://' . 'appsero.com/privacy-policy/';
439
-
440
-        $notice .= ' (<a class="' . $this->client->slug . '-insights-data-we-collect" href="#">' . $this->client->__trans( 'what we collect' ) . '</a>)';
441
-        $notice .= '<p class="description" style="display:none;">' . implode( ', ', $this->data_we_collect() ) . '. No sensitive data is tracked. ';
442
-        $notice .= 'We are using Appsero to collect your data. <a href="' . $policy_url . '" target="_blank">Learn more</a> about how Appsero collects and handle your data.</p>';
443
-
444
-        echo '<div class="updated"><p>';
445
-            echo $notice;
446
-            echo '</p><p class="submit">';
447
-            echo '&nbsp;<a href="' . esc_url( $optin_url ) . '" class="button button--primary button--big">' . $this->client->__trans( 'Allow' ) . '</a>';
448
-            echo '&nbsp;<a href="' . esc_url( $optout_url ) . '" class="button button--secondary button--big">' .
449
-                 $this->client->__trans( 'No thanks' ) . '</a>';
450
-        echo '</p></div>';
451
-
452
-        echo "<script type='text/javascript'>jQuery('." . $this->client->slug . "-insights-data-we-collect').on('click', function(e) {
268
+			$data['plugins'] = $plugins_data;
269
+		}
270
+
271
+		// Add metadata
272
+		if ( $extra = $this->get_extra_data() ) {
273
+			$data['extra'] = $extra;
274
+		}
275
+
276
+		// Check this has previously skipped tracking
277
+		$skipped = get_option( $this->client->slug . '_tracking_skipped' );
278
+
279
+		if ( $skipped === 'yes' ) {
280
+			delete_option( $this->client->slug . '_tracking_skipped' );
281
+
282
+			$data['tracking_skipped'] = true;
283
+		}
284
+
285
+		return apply_filters( $this->client->slug . '_tracker_data', $data );
286
+	}
287
+
288
+	/**
289
+	 * If a child class wants to send extra data
290
+	 *
291
+	 * @return mixed
292
+	 */
293
+	protected function get_extra_data() {
294
+		if ( is_callable( $this->extra_data ) ) {
295
+			return call_user_func( $this->extra_data );
296
+		}
297
+
298
+		if ( is_array( $this->extra_data ) ) {
299
+			return $this->extra_data;
300
+		}
301
+
302
+		return array();
303
+	}
304
+
305
+	/**
306
+	 * Explain the user which data we collect
307
+	 *
308
+	 * @return array
309
+	 */
310
+	protected function data_we_collect() {
311
+		$data = array(
312
+			'Server environment details (php, mysql, server, WordPress versions)',
313
+			'Number of users in your site',
314
+			'Site language',
315
+			'Number of active and inactive plugins',
316
+			'Site name and URL',
317
+			'Your name and email address',
318
+		);
319
+
320
+		if ($this->plugin_data) { 
321
+			array_splice($data, 4, 0, ["active plugins' name"]);
322
+		}
323
+
324
+		return $data;
325
+	}
326
+
327
+	/**
328
+	 * Check if the user has opted into tracking
329
+	 *
330
+	 * @return bool
331
+	 */
332
+	public function tracking_allowed() {
333
+		$allow_tracking = get_option( $this->client->slug . '_allow_tracking', 'no' );
334
+
335
+		return $allow_tracking == 'yes';
336
+	}
337
+
338
+	/**
339
+	 * Get the last time a tracking was sent
340
+	 *
341
+	 * @return false|string
342
+	 */
343
+	private function get_last_send() {
344
+		return get_option( $this->client->slug . '_tracking_last_send', false );
345
+	}
346
+
347
+	/**
348
+	 * Check if the notice has been dismissed or enabled
349
+	 *
350
+	 * @return boolean
351
+	 */
352
+	public function notice_dismissed() {
353
+		$hide_notice = get_option( $this->client->slug . '_tracking_notice', null );
354
+
355
+		if ( 'hide' == $hide_notice ) {
356
+			return true;
357
+		}
358
+
359
+		return false;
360
+	}
361
+
362
+	/**
363
+	 * Check if the current server is localhost
364
+	 *
365
+	 * @return boolean
366
+	 */
367
+	private function is_local_server() {
368
+
369
+		$host       = isset( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : 'localhost';
370
+		$ip         = isset( $_SERVER['SERVER_ADDR'] ) ? $_SERVER['SERVER_ADDR'] : '127.0.0.1';
371
+		$is_local   = false;
372
+
373
+		if( in_array( $ip,array( '127.0.0.1', '::1' ) )
374
+			|| ! strpos( $host, '.' )
375
+			|| in_array( strrchr( $host, '.' ), array( '.test', '.testing', '.local', '.localhost', '.localdomain' ) )
376
+		) {
377
+			$is_local = true;
378
+		}
379
+
380
+		return apply_filters( 'appsero_is_local', $is_local );
381
+	}
382
+
383
+	/**
384
+	 * Schedule the event weekly
385
+	 *
386
+	 * @return void
387
+	 */
388
+	private function schedule_event() {
389
+		$hook_name = $this->client->slug . '_tracker_send_event';
390
+
391
+		if ( ! wp_next_scheduled( $hook_name ) ) {
392
+			wp_schedule_event( time(), 'weekly', $hook_name );
393
+		}
394
+	}
395
+
396
+	/**
397
+	 * Clear any scheduled hook
398
+	 *
399
+	 * @return void
400
+	 */
401
+	private function clear_schedule_event() {
402
+		wp_clear_scheduled_hook( $this->client->slug . '_tracker_send_event' );
403
+	}
404
+
405
+	/**
406
+	 * Display the admin notice to users that have not opted-in or out
407
+	 *
408
+	 * @return void
409
+	 */
410
+	public function admin_notice() {
411
+
412
+		if ( $this->notice_dismissed() ) {
413
+			return;
414
+		}
415
+
416
+		if ( $this->tracking_allowed() ) {
417
+			return;
418
+		}
419
+
420
+		if ( ! current_user_can( 'manage_options' ) ) {
421
+			return;
422
+		}
423
+
424
+		// don't show tracking if a local server
425
+		if ( $this->is_local_server() ) {
426
+			return;
427
+		}
428
+
429
+		$optin_url  = add_query_arg( $this->client->slug . '_tracker_optin', 'true' );
430
+		$optout_url = add_query_arg( $this->client->slug . '_tracker_optout', 'true' );
431
+
432
+		if ( empty( $this->notice ) ) {
433
+			$notice = sprintf( $this->client->__trans( 'Want to help make <strong>%1$s</strong> even more awesome? Allow %1$s to collect non-sensitive diagnostic data and usage information.' ), $this->client->name );
434
+		} else {
435
+			$notice = $this->notice;
436
+		}
437
+
438
+		$policy_url = 'https://' . 'appsero.com/privacy-policy/';
439
+
440
+		$notice .= ' (<a class="' . $this->client->slug . '-insights-data-we-collect" href="#">' . $this->client->__trans( 'what we collect' ) . '</a>)';
441
+		$notice .= '<p class="description" style="display:none;">' . implode( ', ', $this->data_we_collect() ) . '. No sensitive data is tracked. ';
442
+		$notice .= 'We are using Appsero to collect your data. <a href="' . $policy_url . '" target="_blank">Learn more</a> about how Appsero collects and handle your data.</p>';
443
+
444
+		echo '<div class="updated"><p>';
445
+			echo $notice;
446
+			echo '</p><p class="submit">';
447
+			echo '&nbsp;<a href="' . esc_url( $optin_url ) . '" class="button button--primary button--big">' . $this->client->__trans( 'Allow' ) . '</a>';
448
+			echo '&nbsp;<a href="' . esc_url( $optout_url ) . '" class="button button--secondary button--big">' .
449
+				 $this->client->__trans( 'No thanks' ) . '</a>';
450
+		echo '</p></div>';
451
+
452
+		echo "<script type='text/javascript'>jQuery('." . $this->client->slug . "-insights-data-we-collect').on('click', function(e) {
453 453
                 e.preventDefault();
454 454
                 jQuery(this).parents('.updated').find('p.description').slideToggle('fast');
455 455
             });
456 456
             </script>
457 457
         ";
458
-    }
459
-
460
-    /**
461
-     * handle the optin/optout
462
-     *
463
-     * @return void
464
-     */
465
-    public function handle_optin_optout() {
466
-
467
-        if ( isset( $_GET[ $this->client->slug . '_tracker_optin' ] ) && $_GET[ $this->client->slug . '_tracker_optin' ] == 'true' ) {
468
-            $this->optin();
469
-
470
-            wp_redirect( remove_query_arg( $this->client->slug . '_tracker_optin' ) );
471
-            exit;
472
-        }
473
-
474
-        if ( isset( $_GET[ $this->client->slug . '_tracker_optout' ] ) && $_GET[ $this->client->slug . '_tracker_optout' ] == 'true' ) {
475
-            $this->optout();
476
-
477
-            wp_redirect( remove_query_arg( $this->client->slug . '_tracker_optout' ) );
478
-            exit;
479
-        }
480
-    }
481
-
482
-    /**
483
-     * Tracking optin
484
-     *
485
-     * @return void
486
-     */
487
-    public function optin() {
488
-        update_option( $this->client->slug . '_allow_tracking', 'yes' );
489
-        update_option( $this->client->slug . '_tracking_notice', 'hide' );
490
-
491
-        $this->clear_schedule_event();
492
-        $this->schedule_event();
493
-        $this->send_tracking_data();
494
-    }
495
-
496
-    /**
497
-     * Optout from tracking
498
-     *
499
-     * @return void
500
-     */
501
-    public function optout() {
502
-        update_option( $this->client->slug . '_allow_tracking', 'no' );
503
-        update_option( $this->client->slug . '_tracking_notice', 'hide' );
504
-
505
-        $this->send_tracking_skipped_request();
506
-
507
-        $this->clear_schedule_event();
508
-    }
509
-
510
-    /**
511
-     * Get the number of post counts
512
-     *
513
-     * @param  string  $post_type
514
-     *
515
-     * @return integer
516
-     */
517
-    public function get_post_count( $post_type ) {
518
-        global $wpdb;
519
-
520
-        return (int) $wpdb->get_var( "SELECT count(ID) FROM $wpdb->posts WHERE post_type = '$post_type' and post_status = 'publish'");
521
-    }
522
-
523
-    /**
524
-     * Get server related info.
525
-     *
526
-     * @return array
527
-     */
528
-    private static function get_server_info() {
529
-        global $wpdb;
530
-
531
-        $server_data = array();
532
-
533
-        if ( isset( $_SERVER['SERVER_SOFTWARE'] ) && ! empty( $_SERVER['SERVER_SOFTWARE'] ) ) {
534
-            $server_data['software'] = $_SERVER['SERVER_SOFTWARE'];
535
-        }
536
-
537
-        if ( function_exists( 'phpversion' ) ) {
538
-            $server_data['php_version'] = phpversion();
539
-        }
540
-
541
-        $server_data['mysql_version']        = $wpdb->db_version();
542
-
543
-        $server_data['php_max_upload_size']  = size_format( wp_max_upload_size() );
544
-        $server_data['php_default_timezone'] = date_default_timezone_get();
545
-        $server_data['php_soap']             = class_exists( 'SoapClient' ) ? 'Yes' : 'No';
546
-        $server_data['php_fsockopen']        = function_exists( 'fsockopen' ) ? 'Yes' : 'No';
547
-        $server_data['php_curl']             = function_exists( 'curl_init' ) ? 'Yes' : 'No';
548
-
549
-        return $server_data;
550
-    }
551
-
552
-    /**
553
-     * Get WordPress related data.
554
-     *
555
-     * @return array
556
-     */
557
-    private function get_wp_info() {
558
-        $wp_data = array();
559
-
560
-        $wp_data['memory_limit'] = WP_MEMORY_LIMIT;
561
-        $wp_data['debug_mode']   = ( defined('WP_DEBUG') && WP_DEBUG ) ? 'Yes' : 'No';
562
-        $wp_data['locale']       = get_locale();
563
-        $wp_data['version']      = get_bloginfo( 'version' );
564
-        $wp_data['multisite']    = is_multisite() ? 'Yes' : 'No';
565
-        $wp_data['theme_slug']   = get_stylesheet();
566
-
567
-        $theme = wp_get_theme( $wp_data['theme_slug'] );
568
-
569
-        $wp_data['theme_name']    = $theme->get( 'Name' );
570
-        $wp_data['theme_version'] = $theme->get( 'Version' );
571
-        $wp_data['theme_uri']     = $theme->get( 'ThemeURI' );
572
-        $wp_data['theme_author']  = $theme->get( 'Author' );
573
-
574
-        return $wp_data;
575
-    }
576
-
577
-    /**
578
-     * Get the list of active and inactive plugins
579
-     *
580
-     * @return array
581
-     */
582
-    private function get_all_plugins() {
583
-        // Ensure get_plugins function is loaded
584
-        if ( ! function_exists( 'get_plugins' ) ) {
585
-            include ABSPATH . '/wp-admin/includes/plugin.php';
586
-        }
587
-
588
-        $plugins             = get_plugins();
589
-        $active_plugins_keys = get_option( 'active_plugins', array() );
590
-        $active_plugins      = array();
591
-
592
-        foreach ( $plugins as $k => $v ) {
593
-            // Take care of formatting the data how we want it.
594
-            $formatted = array();
595
-            $formatted['name'] = strip_tags( $v['Name'] );
596
-
597
-            if ( isset( $v['Version'] ) ) {
598
-                $formatted['version'] = strip_tags( $v['Version'] );
599
-            }
600
-
601
-            if ( isset( $v['Author'] ) ) {
602
-                $formatted['author'] = strip_tags( $v['Author'] );
603
-            }
604
-
605
-            if ( isset( $v['Network'] ) ) {
606
-                $formatted['network'] = strip_tags( $v['Network'] );
607
-            }
608
-
609
-            if ( isset( $v['PluginURI'] ) ) {
610
-                $formatted['plugin_uri'] = strip_tags( $v['PluginURI'] );
611
-            }
612
-
613
-            if ( in_array( $k, $active_plugins_keys ) ) {
614
-                // Remove active plugins from list so we can show active and inactive separately
615
-                unset( $plugins[$k] );
616
-                $active_plugins[$k] = $formatted;
617
-            } else {
618
-                $plugins[$k] = $formatted;
619
-            }
620
-        }
621
-
622
-        return array( 'active_plugins' => $active_plugins, 'inactive_plugins' => $plugins );
623
-    }
624
-
625
-    /**
626
-     * Get user totals based on user role.
627
-     *
628
-     * @return array
629
-     */
630
-    public function get_user_counts() {
631
-        $user_count          = array();
632
-        $user_count_data     = count_users();
633
-        $user_count['total'] = $user_count_data['total_users'];
634
-
635
-        // Get user count based on user role
636
-        foreach ( $user_count_data['avail_roles'] as $role => $count ) {
637
-            if ( ! $count ) {
638
-                continue;
639
-            }
458
+	}
459
+
460
+	/**
461
+	 * handle the optin/optout
462
+	 *
463
+	 * @return void
464
+	 */
465
+	public function handle_optin_optout() {
466
+
467
+		if ( isset( $_GET[ $this->client->slug . '_tracker_optin' ] ) && $_GET[ $this->client->slug . '_tracker_optin' ] == 'true' ) {
468
+			$this->optin();
469
+
470
+			wp_redirect( remove_query_arg( $this->client->slug . '_tracker_optin' ) );
471
+			exit;
472
+		}
473
+
474
+		if ( isset( $_GET[ $this->client->slug . '_tracker_optout' ] ) && $_GET[ $this->client->slug . '_tracker_optout' ] == 'true' ) {
475
+			$this->optout();
476
+
477
+			wp_redirect( remove_query_arg( $this->client->slug . '_tracker_optout' ) );
478
+			exit;
479
+		}
480
+	}
481
+
482
+	/**
483
+	 * Tracking optin
484
+	 *
485
+	 * @return void
486
+	 */
487
+	public function optin() {
488
+		update_option( $this->client->slug . '_allow_tracking', 'yes' );
489
+		update_option( $this->client->slug . '_tracking_notice', 'hide' );
490
+
491
+		$this->clear_schedule_event();
492
+		$this->schedule_event();
493
+		$this->send_tracking_data();
494
+	}
495
+
496
+	/**
497
+	 * Optout from tracking
498
+	 *
499
+	 * @return void
500
+	 */
501
+	public function optout() {
502
+		update_option( $this->client->slug . '_allow_tracking', 'no' );
503
+		update_option( $this->client->slug . '_tracking_notice', 'hide' );
504
+
505
+		$this->send_tracking_skipped_request();
506
+
507
+		$this->clear_schedule_event();
508
+	}
509
+
510
+	/**
511
+	 * Get the number of post counts
512
+	 *
513
+	 * @param  string  $post_type
514
+	 *
515
+	 * @return integer
516
+	 */
517
+	public function get_post_count( $post_type ) {
518
+		global $wpdb;
519
+
520
+		return (int) $wpdb->get_var( "SELECT count(ID) FROM $wpdb->posts WHERE post_type = '$post_type' and post_status = 'publish'");
521
+	}
522
+
523
+	/**
524
+	 * Get server related info.
525
+	 *
526
+	 * @return array
527
+	 */
528
+	private static function get_server_info() {
529
+		global $wpdb;
530
+
531
+		$server_data = array();
532
+
533
+		if ( isset( $_SERVER['SERVER_SOFTWARE'] ) && ! empty( $_SERVER['SERVER_SOFTWARE'] ) ) {
534
+			$server_data['software'] = $_SERVER['SERVER_SOFTWARE'];
535
+		}
536
+
537
+		if ( function_exists( 'phpversion' ) ) {
538
+			$server_data['php_version'] = phpversion();
539
+		}
540
+
541
+		$server_data['mysql_version']        = $wpdb->db_version();
542
+
543
+		$server_data['php_max_upload_size']  = size_format( wp_max_upload_size() );
544
+		$server_data['php_default_timezone'] = date_default_timezone_get();
545
+		$server_data['php_soap']             = class_exists( 'SoapClient' ) ? 'Yes' : 'No';
546
+		$server_data['php_fsockopen']        = function_exists( 'fsockopen' ) ? 'Yes' : 'No';
547
+		$server_data['php_curl']             = function_exists( 'curl_init' ) ? 'Yes' : 'No';
548
+
549
+		return $server_data;
550
+	}
551
+
552
+	/**
553
+	 * Get WordPress related data.
554
+	 *
555
+	 * @return array
556
+	 */
557
+	private function get_wp_info() {
558
+		$wp_data = array();
559
+
560
+		$wp_data['memory_limit'] = WP_MEMORY_LIMIT;
561
+		$wp_data['debug_mode']   = ( defined('WP_DEBUG') && WP_DEBUG ) ? 'Yes' : 'No';
562
+		$wp_data['locale']       = get_locale();
563
+		$wp_data['version']      = get_bloginfo( 'version' );
564
+		$wp_data['multisite']    = is_multisite() ? 'Yes' : 'No';
565
+		$wp_data['theme_slug']   = get_stylesheet();
566
+
567
+		$theme = wp_get_theme( $wp_data['theme_slug'] );
568
+
569
+		$wp_data['theme_name']    = $theme->get( 'Name' );
570
+		$wp_data['theme_version'] = $theme->get( 'Version' );
571
+		$wp_data['theme_uri']     = $theme->get( 'ThemeURI' );
572
+		$wp_data['theme_author']  = $theme->get( 'Author' );
573
+
574
+		return $wp_data;
575
+	}
576
+
577
+	/**
578
+	 * Get the list of active and inactive plugins
579
+	 *
580
+	 * @return array
581
+	 */
582
+	private function get_all_plugins() {
583
+		// Ensure get_plugins function is loaded
584
+		if ( ! function_exists( 'get_plugins' ) ) {
585
+			include ABSPATH . '/wp-admin/includes/plugin.php';
586
+		}
587
+
588
+		$plugins             = get_plugins();
589
+		$active_plugins_keys = get_option( 'active_plugins', array() );
590
+		$active_plugins      = array();
591
+
592
+		foreach ( $plugins as $k => $v ) {
593
+			// Take care of formatting the data how we want it.
594
+			$formatted = array();
595
+			$formatted['name'] = strip_tags( $v['Name'] );
596
+
597
+			if ( isset( $v['Version'] ) ) {
598
+				$formatted['version'] = strip_tags( $v['Version'] );
599
+			}
600
+
601
+			if ( isset( $v['Author'] ) ) {
602
+				$formatted['author'] = strip_tags( $v['Author'] );
603
+			}
604
+
605
+			if ( isset( $v['Network'] ) ) {
606
+				$formatted['network'] = strip_tags( $v['Network'] );
607
+			}
608
+
609
+			if ( isset( $v['PluginURI'] ) ) {
610
+				$formatted['plugin_uri'] = strip_tags( $v['PluginURI'] );
611
+			}
612
+
613
+			if ( in_array( $k, $active_plugins_keys ) ) {
614
+				// Remove active plugins from list so we can show active and inactive separately
615
+				unset( $plugins[$k] );
616
+				$active_plugins[$k] = $formatted;
617
+			} else {
618
+				$plugins[$k] = $formatted;
619
+			}
620
+		}
621
+
622
+		return array( 'active_plugins' => $active_plugins, 'inactive_plugins' => $plugins );
623
+	}
624
+
625
+	/**
626
+	 * Get user totals based on user role.
627
+	 *
628
+	 * @return array
629
+	 */
630
+	public function get_user_counts() {
631
+		$user_count          = array();
632
+		$user_count_data     = count_users();
633
+		$user_count['total'] = $user_count_data['total_users'];
634
+
635
+		// Get user count based on user role
636
+		foreach ( $user_count_data['avail_roles'] as $role => $count ) {
637
+			if ( ! $count ) {
638
+				continue;
639
+			}
640
+
641
+			$user_count[ $role ] = $count;
642
+		}
643
+
644
+		return $user_count;
645
+	}
646
+
647
+	/**
648
+	 * Add weekly cron schedule
649
+	 *
650
+	 * @param array  $schedules
651
+	 *
652
+	 * @return array
653
+	 */
654
+	public function add_weekly_schedule( $schedules ) {
655
+
656
+		$schedules['weekly'] = array(
657
+			'interval' => DAY_IN_SECONDS * 7,
658
+			'display'  => 'Once Weekly',
659
+		);
640 660
 
641
-            $user_count[ $role ] = $count;
642
-        }
643
-
644
-        return $user_count;
645
-    }
646
-
647
-    /**
648
-     * Add weekly cron schedule
649
-     *
650
-     * @param array  $schedules
651
-     *
652
-     * @return array
653
-     */
654
-    public function add_weekly_schedule( $schedules ) {
655
-
656
-        $schedules['weekly'] = array(
657
-            'interval' => DAY_IN_SECONDS * 7,
658
-            'display'  => 'Once Weekly',
659
-        );
660
-
661
-        return $schedules;
662
-    }
663
-
664
-    /**
665
-     * Plugin activation hook
666
-     *
667
-     * @return void
668
-     */
669
-    public function activate_plugin() {
670
-        $allowed = get_option( $this->client->slug . '_allow_tracking', 'no' );
671
-
672
-        // if it wasn't allowed before, do nothing
673
-        if ( 'yes' !== $allowed ) {
674
-            return;
675
-        }
676
-
677
-        // re-schedule and delete the last sent time so we could force send again
678
-        $hook_name = $this->client->slug . '_tracker_send_event';
679
-        if ( ! wp_next_scheduled( $hook_name ) ) {
680
-            wp_schedule_event( time(), 'weekly', $hook_name );
681
-        }
682
-
683
-        delete_option( $this->client->slug . '_tracking_last_send' );
684
-
685
-        $this->send_tracking_data( true );
686
-    }
687
-
688
-    /**
689
-     * Clear our options upon deactivation
690
-     *
691
-     * @return void
692
-     */
693
-    public function deactivation_cleanup() {
694
-        $this->clear_schedule_event();
695
-
696
-        if ( 'theme' == $this->client->type ) {
697
-            delete_option( $this->client->slug . '_tracking_last_send' );
698
-            delete_option( $this->client->slug . '_allow_tracking' );
699
-        }
700
-
701
-        delete_option( $this->client->slug . '_tracking_notice' );
702
-    }
703
-
704
-    /**
705
-     * Hook into action links and modify the deactivate link
706
-     *
707
-     * @param  array  $links
708
-     *
709
-     * @return array
710
-     */
711
-    public function plugin_action_links( $links ) {
712
-
713
-        if ( array_key_exists( 'deactivate', $links ) ) {
714
-            $links['deactivate'] = str_replace( '<a', '<a class="' . $this->client->slug . '-deactivate-link"', $links['deactivate'] );
715
-        }
716
-
717
-        return $links;
718
-    }
719
-
720
-    /**
721
-     * Plugin uninstall reasons
722
-     *
723
-     * @return array
724
-     */
725
-    private function get_uninstall_reasons() {
726
-        $reasons = array(
661
+		return $schedules;
662
+	}
663
+
664
+	/**
665
+	 * Plugin activation hook
666
+	 *
667
+	 * @return void
668
+	 */
669
+	public function activate_plugin() {
670
+		$allowed = get_option( $this->client->slug . '_allow_tracking', 'no' );
671
+
672
+		// if it wasn't allowed before, do nothing
673
+		if ( 'yes' !== $allowed ) {
674
+			return;
675
+		}
676
+
677
+		// re-schedule and delete the last sent time so we could force send again
678
+		$hook_name = $this->client->slug . '_tracker_send_event';
679
+		if ( ! wp_next_scheduled( $hook_name ) ) {
680
+			wp_schedule_event( time(), 'weekly', $hook_name );
681
+		}
682
+
683
+		delete_option( $this->client->slug . '_tracking_last_send' );
684
+
685
+		$this->send_tracking_data( true );
686
+	}
687
+
688
+	/**
689
+	 * Clear our options upon deactivation
690
+	 *
691
+	 * @return void
692
+	 */
693
+	public function deactivation_cleanup() {
694
+		$this->clear_schedule_event();
695
+
696
+		if ( 'theme' == $this->client->type ) {
697
+			delete_option( $this->client->slug . '_tracking_last_send' );
698
+			delete_option( $this->client->slug . '_allow_tracking' );
699
+		}
700
+
701
+		delete_option( $this->client->slug . '_tracking_notice' );
702
+	}
703
+
704
+	/**
705
+	 * Hook into action links and modify the deactivate link
706
+	 *
707
+	 * @param  array  $links
708
+	 *
709
+	 * @return array
710
+	 */
711
+	public function plugin_action_links( $links ) {
712
+
713
+		if ( array_key_exists( 'deactivate', $links ) ) {
714
+			$links['deactivate'] = str_replace( '<a', '<a class="' . $this->client->slug . '-deactivate-link"', $links['deactivate'] );
715
+		}
716
+
717
+		return $links;
718
+	}
719
+
720
+	/**
721
+	 * Plugin uninstall reasons
722
+	 *
723
+	 * @return array
724
+	 */
725
+	private function get_uninstall_reasons() {
726
+		$reasons = array(
727 727
 			array(
728 728
 				'id'          => 'could-not-understand',
729 729
 				'text'        => $this->client->__trans( "Couldn't understand" ),
730 730
 				'placeholder' => $this->client->__trans( 'Would you like us to assist you?' ),
731
-                'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 10.6 23 9.6 22.9 8.8 22.7L8.8 22.6C9.3 22.5 9.7 22.3 10 21.9 10.3 21.6 10.4 21.3 10.4 20.9 10.8 21 11.1 21 11.5 21 16.7 21 21 16.7 21 11.5 21 6.3 16.7 2 11.5 2 6.3 2 2 6.3 2 11.5 2 13 2.3 14.3 2.9 15.6 2.7 16 2.4 16.3 2.2 16.8L2.1 17.1 2.1 17.3C2 17.5 2 17.7 2 18 0.7 16.1 0 13.9 0 11.5 0 5.1 5.1 0 11.5 0ZM6 13.6C6 13.7 6.1 13.8 6.1 13.9 6.3 14.5 6.2 15.7 6.1 16.4 6.1 16.6 6 16.9 6 17.1 6 17.1 6.1 17.1 6.1 17.1 7.1 16.9 8.2 16 9.3 15.5 9.8 15.2 10.4 15 10.9 15 11.2 15 11.4 15 11.6 15.2 11.9 15.4 12.1 16 11.6 16.4 11.5 16.5 11.3 16.6 11.1 16.7 10.5 17 9.9 17.4 9.3 17.7 9 17.9 9 18.1 9.1 18.5 9.2 18.9 9.3 19.4 9.3 19.8 9.4 20.3 9.3 20.8 9 21.2 8.8 21.5 8.5 21.6 8.1 21.7 7.9 21.8 7.6 21.9 7.3 21.9L6.5 22C6.3 22 6 21.9 5.8 21.9 5 21.8 4.4 21.5 3.9 20.9 3.3 20.4 3.1 19.6 3 18.8L3 18.5C3 18.2 3 17.9 3.1 17.7L3.1 17.6C3.2 17.1 3.5 16.7 3.7 16.3 4 15.9 4.2 15.4 4.3 15 4.4 14.6 4.4 14.5 4.6 14.2 4.6 13.9 4.7 13.7 4.9 13.6 5.2 13.2 5.7 13.2 6 13.6ZM11.7 11.2C13.1 11.2 14.3 11.7 15.2 12.9 15.3 13 15.4 13.1 15.4 13.2 15.4 13.4 15.3 13.8 15.2 13.8 15 13.9 14.9 13.8 14.8 13.7 14.6 13.5 14.4 13.2 14.1 13.1 13.5 12.6 12.8 12.3 12 12.2 10.7 12.1 9.5 12.3 8.4 12.8 8.3 12.8 8.2 12.8 8.1 12.8 7.9 12.8 7.8 12.4 7.8 12.2 7.7 12.1 7.8 11.9 8 11.8 8.4 11.7 8.8 11.5 9.2 11.4 10 11.2 10.9 11.1 11.7 11.2ZM16.3 5.9C17.3 5.9 18 6.6 18 7.6 18 8.5 17.3 9.3 16.3 9.3 15.4 9.3 14.7 8.5 14.7 7.6 14.7 6.6 15.4 5.9 16.3 5.9ZM8.3 5C9.2 5 9.9 5.8 9.9 6.7 9.9 7.7 9.2 8.4 8.2 8.4 7.3 8.4 6.6 7.7 6.6 6.7 6.6 5.8 7.3 5 8.3 5Z"/></g></g></svg>'
731
+				'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 10.6 23 9.6 22.9 8.8 22.7L8.8 22.6C9.3 22.5 9.7 22.3 10 21.9 10.3 21.6 10.4 21.3 10.4 20.9 10.8 21 11.1 21 11.5 21 16.7 21 21 16.7 21 11.5 21 6.3 16.7 2 11.5 2 6.3 2 2 6.3 2 11.5 2 13 2.3 14.3 2.9 15.6 2.7 16 2.4 16.3 2.2 16.8L2.1 17.1 2.1 17.3C2 17.5 2 17.7 2 18 0.7 16.1 0 13.9 0 11.5 0 5.1 5.1 0 11.5 0ZM6 13.6C6 13.7 6.1 13.8 6.1 13.9 6.3 14.5 6.2 15.7 6.1 16.4 6.1 16.6 6 16.9 6 17.1 6 17.1 6.1 17.1 6.1 17.1 7.1 16.9 8.2 16 9.3 15.5 9.8 15.2 10.4 15 10.9 15 11.2 15 11.4 15 11.6 15.2 11.9 15.4 12.1 16 11.6 16.4 11.5 16.5 11.3 16.6 11.1 16.7 10.5 17 9.9 17.4 9.3 17.7 9 17.9 9 18.1 9.1 18.5 9.2 18.9 9.3 19.4 9.3 19.8 9.4 20.3 9.3 20.8 9 21.2 8.8 21.5 8.5 21.6 8.1 21.7 7.9 21.8 7.6 21.9 7.3 21.9L6.5 22C6.3 22 6 21.9 5.8 21.9 5 21.8 4.4 21.5 3.9 20.9 3.3 20.4 3.1 19.6 3 18.8L3 18.5C3 18.2 3 17.9 3.1 17.7L3.1 17.6C3.2 17.1 3.5 16.7 3.7 16.3 4 15.9 4.2 15.4 4.3 15 4.4 14.6 4.4 14.5 4.6 14.2 4.6 13.9 4.7 13.7 4.9 13.6 5.2 13.2 5.7 13.2 6 13.6ZM11.7 11.2C13.1 11.2 14.3 11.7 15.2 12.9 15.3 13 15.4 13.1 15.4 13.2 15.4 13.4 15.3 13.8 15.2 13.8 15 13.9 14.9 13.8 14.8 13.7 14.6 13.5 14.4 13.2 14.1 13.1 13.5 12.6 12.8 12.3 12 12.2 10.7 12.1 9.5 12.3 8.4 12.8 8.3 12.8 8.2 12.8 8.1 12.8 7.9 12.8 7.8 12.4 7.8 12.2 7.7 12.1 7.8 11.9 8 11.8 8.4 11.7 8.8 11.5 9.2 11.4 10 11.2 10.9 11.1 11.7 11.2ZM16.3 5.9C17.3 5.9 18 6.6 18 7.6 18 8.5 17.3 9.3 16.3 9.3 15.4 9.3 14.7 8.5 14.7 7.6 14.7 6.6 15.4 5.9 16.3 5.9ZM8.3 5C9.2 5 9.9 5.8 9.9 6.7 9.9 7.7 9.2 8.4 8.2 8.4 7.3 8.4 6.6 7.7 6.6 6.7 6.6 5.8 7.3 5 8.3 5Z"/></g></g></svg>'
732 732
 			),
733 733
 			array(
734 734
 				'id'          => 'found-better-plugin',
735 735
 				'text'        => $this->client->__trans( 'Found a better plugin' ),
736 736
 				'placeholder' => $this->client->__trans( 'Which plugin?' ),
737
-                'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M17.1 14L22.4 19.3C23.2 20.2 23.2 21.5 22.4 22.4 21.5 23.2 20.2 23.2 19.3 22.4L19.3 22.4 14 17.1C15.3 16.3 16.3 15.3 17.1 14L17.1 14ZM8.6 0C13.4 0 17.3 3.9 17.3 8.6 17.3 13.4 13.4 17.2 8.6 17.2 3.9 17.2 0 13.4 0 8.6 0 3.9 3.9 0 8.6 0ZM8.6 2.2C5.1 2.2 2.2 5.1 2.2 8.6 2.2 12.2 5.1 15.1 8.6 15.1 12.2 15.1 15.1 12.2 15.1 8.6 15.1 5.1 12.2 2.2 8.6 2.2ZM8.6 3.6L8.6 5C6.6 5 5 6.6 5 8.6L5 8.6 3.6 8.6C3.6 5.9 5.9 3.6 8.6 3.6L8.6 3.6Z"/></g></g></svg>',
737
+				'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M17.1 14L22.4 19.3C23.2 20.2 23.2 21.5 22.4 22.4 21.5 23.2 20.2 23.2 19.3 22.4L19.3 22.4 14 17.1C15.3 16.3 16.3 15.3 17.1 14L17.1 14ZM8.6 0C13.4 0 17.3 3.9 17.3 8.6 17.3 13.4 13.4 17.2 8.6 17.2 3.9 17.2 0 13.4 0 8.6 0 3.9 3.9 0 8.6 0ZM8.6 2.2C5.1 2.2 2.2 5.1 2.2 8.6 2.2 12.2 5.1 15.1 8.6 15.1 12.2 15.1 15.1 12.2 15.1 8.6 15.1 5.1 12.2 2.2 8.6 2.2ZM8.6 3.6L8.6 5C6.6 5 5 6.6 5 8.6L5 8.6 3.6 8.6C3.6 5.9 5.9 3.6 8.6 3.6L8.6 3.6Z"/></g></g></svg>',
738 738
 			),
739 739
 			array(
740 740
 				'id'          => 'not-have-that-feature',
741 741
 				'text'        => $this->client->__trans( "Missing a specific feature" ),
742 742
 				'placeholder' => $this->client->__trans( 'Could you tell us more about that feature?' ),
743
-                'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="17" viewBox="0 0 24 17"><g fill="none"><g fill="#3B86FF"><path d="M19.4 0C19.7 0.6 19.8 1.3 19.8 2 19.8 3.2 19.4 4.4 18.5 5.3 17.6 6.2 16.5 6.7 15.2 6.7 15.2 6.7 15.2 6.7 15.2 6.7 14 6.7 12.9 6.2 12 5.3 11.2 4.4 10.7 3.3 10.7 2 10.7 1.3 10.8 0.6 11.1 0L7.6 0 7 0 6.5 0 6.5 5.7C6.3 5.6 5.9 5.3 5.6 5.1 5 4.6 4.3 4.3 3.5 4.3 3.5 4.3 3.5 4.3 3.4 4.3 1.6 4.4 0 5.9 0 7.9 0 8.6 0.2 9.2 0.5 9.7 1.1 10.8 2.2 11.5 3.5 11.5 4.3 11.5 5 11.2 5.6 10.8 6 10.5 6.3 10.3 6.5 10.2L6.5 10.2 6.5 17 6.5 17 7 17 7.6 17 22.5 17C23.3 17 24 16.3 24 15.5L24 0 19.4 0Z"/></g></g></svg>',
743
+				'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="17" viewBox="0 0 24 17"><g fill="none"><g fill="#3B86FF"><path d="M19.4 0C19.7 0.6 19.8 1.3 19.8 2 19.8 3.2 19.4 4.4 18.5 5.3 17.6 6.2 16.5 6.7 15.2 6.7 15.2 6.7 15.2 6.7 15.2 6.7 14 6.7 12.9 6.2 12 5.3 11.2 4.4 10.7 3.3 10.7 2 10.7 1.3 10.8 0.6 11.1 0L7.6 0 7 0 6.5 0 6.5 5.7C6.3 5.6 5.9 5.3 5.6 5.1 5 4.6 4.3 4.3 3.5 4.3 3.5 4.3 3.5 4.3 3.4 4.3 1.6 4.4 0 5.9 0 7.9 0 8.6 0.2 9.2 0.5 9.7 1.1 10.8 2.2 11.5 3.5 11.5 4.3 11.5 5 11.2 5.6 10.8 6 10.5 6.3 10.3 6.5 10.2L6.5 10.2 6.5 17 6.5 17 7 17 7.6 17 22.5 17C23.3 17 24 16.3 24 15.5L24 0 19.4 0Z"/></g></g></svg>',
744 744
 			),
745 745
 			array(
746 746
 				'id'          => 'is-not-working',
747 747
 				'text'        => $this->client->__trans( 'Not working' ),
748 748
 				'placeholder' => $this->client->__trans( 'Could you tell us a bit more whats not working?' ),
749
-                'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 5.1 23 0 17.9 0 11.5 0 5.1 5.1 0 11.5 0ZM11.8 14.4C11.2 14.4 10.7 14.8 10.7 15.4 10.7 16 11.2 16.4 11.8 16.4 12.4 16.4 12.8 16 12.8 15.4 12.8 14.8 12.4 14.4 11.8 14.4ZM12 7C10.1 7 9.1 8.1 9 9.6L10.5 9.6C10.5 8.8 11.1 8.3 11.9 8.3 12.7 8.3 13.2 8.8 13.2 9.5 13.2 10.1 13 10.4 12.2 10.9 11.3 11.4 10.9 12 11 12.9L11 13.4 12.5 13.4 12.5 13C12.5 12.4 12.7 12.1 13.5 11.6 14.4 11.1 14.9 10.4 14.9 9.4 14.9 8 13.7 7 12 7Z"/></g></g></svg>',
749
+				'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 5.1 23 0 17.9 0 11.5 0 5.1 5.1 0 11.5 0ZM11.8 14.4C11.2 14.4 10.7 14.8 10.7 15.4 10.7 16 11.2 16.4 11.8 16.4 12.4 16.4 12.8 16 12.8 15.4 12.8 14.8 12.4 14.4 11.8 14.4ZM12 7C10.1 7 9.1 8.1 9 9.6L10.5 9.6C10.5 8.8 11.1 8.3 11.9 8.3 12.7 8.3 13.2 8.8 13.2 9.5 13.2 10.1 13 10.4 12.2 10.9 11.3 11.4 10.9 12 11 12.9L11 13.4 12.5 13.4 12.5 13C12.5 12.4 12.7 12.1 13.5 11.6 14.4 11.1 14.9 10.4 14.9 9.4 14.9 8 13.7 7 12 7Z"/></g></g></svg>',
750 750
 			),
751 751
 			array(
752 752
 				'id'          => 'looking-for-other',
753 753
 				'text'        => $this->client->__trans( "Not what I was looking" ),
754 754
 				'placeholder' => $this->client->__trans( 'Could you tell us a bit more?' ),
755
-                'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="17" viewBox="0 0 24 17"><g fill="none"><g fill="#3B86FF"><path d="M23.5 9C23.5 9 23.5 8.9 23.5 8.9 23.5 8.9 23.5 8.9 23.5 8.9 23.4 8.6 23.2 8.3 23 8 22.2 6.5 20.6 3.7 19.8 2.6 18.8 1.3 17.7 0 16.1 0 15.7 0 15.3 0.1 14.9 0.2 13.8 0.6 12.6 1.2 12.3 2.7L11.7 2.7C11.4 1.2 10.2 0.6 9.1 0.2 8.7 0.1 8.3 0 7.9 0 6.3 0 5.2 1.3 4.2 2.6 3.4 3.7 1.8 6.5 1 8 0.8 8.3 0.6 8.6 0.5 8.9 0.5 8.9 0.5 8.9 0.5 8.9 0.5 8.9 0.5 9 0.5 9 0.2 9.7 0 10.5 0 11.3 0 14.4 2.5 17 5.5 17 7.3 17 8.8 16.1 9.8 14.8L14.2 14.8C15.2 16.1 16.7 17 18.5 17 21.5 17 24 14.4 24 11.3 24 10.5 23.8 9.7 23.5 9ZM5.5 15C3.6 15 2 13.2 2 11 2 8.8 3.6 7 5.5 7 7.4 7 9 8.8 9 11 9 13.2 7.4 15 5.5 15ZM18.5 15C16.6 15 15 13.2 15 11 15 8.8 16.6 7 18.5 7 20.4 7 22 8.8 22 11 22 13.2 20.4 15 18.5 15Z"/></g></g></svg>',
755
+				'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="17" viewBox="0 0 24 17"><g fill="none"><g fill="#3B86FF"><path d="M23.5 9C23.5 9 23.5 8.9 23.5 8.9 23.5 8.9 23.5 8.9 23.5 8.9 23.4 8.6 23.2 8.3 23 8 22.2 6.5 20.6 3.7 19.8 2.6 18.8 1.3 17.7 0 16.1 0 15.7 0 15.3 0.1 14.9 0.2 13.8 0.6 12.6 1.2 12.3 2.7L11.7 2.7C11.4 1.2 10.2 0.6 9.1 0.2 8.7 0.1 8.3 0 7.9 0 6.3 0 5.2 1.3 4.2 2.6 3.4 3.7 1.8 6.5 1 8 0.8 8.3 0.6 8.6 0.5 8.9 0.5 8.9 0.5 8.9 0.5 8.9 0.5 8.9 0.5 9 0.5 9 0.2 9.7 0 10.5 0 11.3 0 14.4 2.5 17 5.5 17 7.3 17 8.8 16.1 9.8 14.8L14.2 14.8C15.2 16.1 16.7 17 18.5 17 21.5 17 24 14.4 24 11.3 24 10.5 23.8 9.7 23.5 9ZM5.5 15C3.6 15 2 13.2 2 11 2 8.8 3.6 7 5.5 7 7.4 7 9 8.8 9 11 9 13.2 7.4 15 5.5 15ZM18.5 15C16.6 15 15 13.2 15 11 15 8.8 16.6 7 18.5 7 20.4 7 22 8.8 22 11 22 13.2 20.4 15 18.5 15Z"/></g></g></svg>',
756 756
 			),
757 757
 			array(
758 758
 				'id'          => 'did-not-work-as-expected',
759 759
 				'text'        => $this->client->__trans( "Didn't work as expected" ),
760 760
 				'placeholder' => $this->client->__trans( 'What did you expect?' ),
761
-                'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 5.1 23 0 17.9 0 11.5 0 5.1 5.1 0 11.5 0ZM11.5 2C6.3 2 2 6.3 2 11.5 2 16.7 6.3 21 11.5 21 16.7 21 21 16.7 21 11.5 21 6.3 16.7 2 11.5 2ZM12.5 12.9L12.7 5 10.2 5 10.5 12.9 12.5 12.9ZM11.5 17.4C12.4 17.4 13 16.8 13 15.9 13 15 12.4 14.4 11.5 14.4 10.6 14.4 10 15 10 15.9 10 16.8 10.6 17.4 11.5 17.4Z"/></g></g></svg>',
761
+				'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 5.1 23 0 17.9 0 11.5 0 5.1 5.1 0 11.5 0ZM11.5 2C6.3 2 2 6.3 2 11.5 2 16.7 6.3 21 11.5 21 16.7 21 21 16.7 21 11.5 21 6.3 16.7 2 11.5 2ZM12.5 12.9L12.7 5 10.2 5 10.5 12.9 12.5 12.9ZM11.5 17.4C12.4 17.4 13 16.8 13 15.9 13 15 12.4 14.4 11.5 14.4 10.6 14.4 10 15 10 15.9 10 16.8 10.6 17.4 11.5 17.4Z"/></g></g></svg>',
762 762
 			),
763 763
 			array(
764 764
 				'id'          => 'other',
765 765
 				'text'        => $this->client->__trans( 'Others' ),
766 766
 				'placeholder' => $this->client->__trans( 'Could you tell us a bit more?' ),
767
-                'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="23" viewBox="0 0 24 6"><g fill="none"><g fill="#3B86FF"><path d="M3 0C4.7 0 6 1.3 6 3 6 4.7 4.7 6 3 6 1.3 6 0 4.7 0 3 0 1.3 1.3 0 3 0ZM12 0C13.7 0 15 1.3 15 3 15 4.7 13.7 6 12 6 10.3 6 9 4.7 9 3 9 1.3 10.3 0 12 0ZM21 0C22.7 0 24 1.3 24 3 24 4.7 22.7 6 21 6 19.3 6 18 4.7 18 3 18 1.3 19.3 0 21 0Z"/></g></g></svg>',
767
+				'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="23" viewBox="0 0 24 6"><g fill="none"><g fill="#3B86FF"><path d="M3 0C4.7 0 6 1.3 6 3 6 4.7 4.7 6 3 6 1.3 6 0 4.7 0 3 0 1.3 1.3 0 3 0ZM12 0C13.7 0 15 1.3 15 3 15 4.7 13.7 6 12 6 10.3 6 9 4.7 9 3 9 1.3 10.3 0 12 0ZM21 0C22.7 0 24 1.3 24 3 24 4.7 22.7 6 21 6 19.3 6 18 4.7 18 3 18 1.3 19.3 0 21 0Z"/></g></g></svg>',
768 768
 			),
769 769
 		);
770 770
 
771
-        return $reasons;
772
-    }
771
+		return $reasons;
772
+	}
773 773
 
774
-    /**
775
-     * Plugin deactivation uninstall reason submission
776
-     *
777
-     * @return void
778
-     */
779
-    public function uninstall_reason_submission() {
774
+	/**
775
+	 * Plugin deactivation uninstall reason submission
776
+	 *
777
+	 * @return void
778
+	 */
779
+	public function uninstall_reason_submission() {
780 780
 
781
-        if ( ! isset( $_POST['reason_id'] ) ) {
782
-            wp_send_json_error();
783
-        }
781
+		if ( ! isset( $_POST['reason_id'] ) ) {
782
+			wp_send_json_error();
783
+		}
784 784
 
785
-        if ( ! wp_verify_nonce( $_POST['nonce'], 'appsero-security-nonce' ) ) {
786
-            wp_send_json_error( 'Nonce verification failed' );
787
-        }
785
+		if ( ! wp_verify_nonce( $_POST['nonce'], 'appsero-security-nonce' ) ) {
786
+			wp_send_json_error( 'Nonce verification failed' );
787
+		}
788 788
 
789
-        $data                = $this->get_tracking_data();
790
-        $data['reason_id']   = sanitize_text_field( $_POST['reason_id'] );
791
-        $data['reason_info'] = isset( $_REQUEST['reason_info'] ) ? trim( stripslashes( $_REQUEST['reason_info'] ) ) : '';
789
+		$data                = $this->get_tracking_data();
790
+		$data['reason_id']   = sanitize_text_field( $_POST['reason_id'] );
791
+		$data['reason_info'] = isset( $_REQUEST['reason_info'] ) ? trim( stripslashes( $_REQUEST['reason_info'] ) ) : '';
792 792
 
793
-        $this->client->send_request( $data, 'deactivate' );
793
+		$this->client->send_request( $data, 'deactivate' );
794 794
 
795
-        wp_send_json_success();
796
-    }
795
+		wp_send_json_success();
796
+	}
797 797
 
798
-    /**
799
-     * Handle the plugin deactivation feedback
800
-     *
801
-     * @return void
802
-     */
803
-    public function deactivate_scripts() {
804
-        global $pagenow;
798
+	/**
799
+	 * Handle the plugin deactivation feedback
800
+	 *
801
+	 * @return void
802
+	 */
803
+	public function deactivate_scripts() {
804
+		global $pagenow;
805 805
 
806
-        if ( 'plugins.php' != $pagenow ) {
807
-            return;
808
-        }
806
+		if ( 'plugins.php' != $pagenow ) {
807
+			return;
808
+		}
809 809
 
810
-        $this->deactivation_modal_styles();
811
-        $reasons = $this->get_uninstall_reasons();
812
-        $custom_reasons = apply_filters( 'appsero_custom_deactivation_reasons', array() );
813
-        ?>
810
+		$this->deactivation_modal_styles();
811
+		$reasons = $this->get_uninstall_reasons();
812
+		$custom_reasons = apply_filters( 'appsero_custom_deactivation_reasons', array() );
813
+		?>
814 814
 
815 815
         <div class="wd-dr-modal" id="<?php echo $this->client->slug; ?>-wd-dr-modal">
816 816
             <div class="wd-dr-modal-wrap">
@@ -846,12 +846,12 @@  discard block
 block discarded – undo
846 846
                     <div class="wd-dr-modal-reason-input"><textarea></textarea></div>
847 847
                     <p class="wd-dr-modal-reasons-bottom">
848 848
                        <?php
849
-                       echo sprintf(
850
-	                       $this->client->__trans( 'We share your data with <a href="%1$s" target="_blank">Appsero</a> to troubleshoot problems &amp; make product improvements. <a href="%2$s" target="_blank">Learn more</a> about how Appsero handles your data.'),
851
-	                       esc_url( 'https://appsero.com/' ),
852
-                           esc_url( 'https://appsero.com/privacy-policy' )
853
-                       );
854
-                       ?>
849
+					   echo sprintf(
850
+						   $this->client->__trans( 'We share your data with <a href="%1$s" target="_blank">Appsero</a> to troubleshoot problems &amp; make product improvements. <a href="%2$s" target="_blank">Learn more</a> about how Appsero handles your data.'),
851
+						   esc_url( 'https://appsero.com/' ),
852
+						   esc_url( 'https://appsero.com/privacy-policy' )
853
+					   );
854
+					   ?>
855 855
                     </p>
856 856
                 </div>
857 857
 
@@ -947,84 +947,84 @@  discard block
 block discarded – undo
947 947
         </script>
948 948
 
949 949
         <?php
950
-    }
951
-
952
-    /**
953
-     * Run after theme deactivated
954
-     * @param  string $new_name
955
-     * @param  object $new_theme
956
-     * @param  object $old_theme
957
-     * @return void
958
-     */
959
-    public function theme_deactivated( $new_name, $new_theme, $old_theme ) {
960
-        // Make sure this is appsero theme
961
-        if ( $old_theme->get_template() == $this->client->slug ) {
962
-            $this->client->send_request( $this->get_tracking_data(), 'deactivate' );
963
-        }
964
-    }
965
-
966
-    /**
967
-     * Get user IP Address
968
-     */
969
-    private function get_user_ip_address() {
970
-        $response = wp_remote_get( 'https://icanhazip.com/' );
971
-
972
-        if ( is_wp_error( $response ) ) {
973
-            return '';
974
-        }
975
-
976
-        $ip = trim( wp_remote_retrieve_body( $response ) );
977
-
978
-        if ( ! filter_var( $ip, FILTER_VALIDATE_IP ) ) {
979
-            return '';
980
-        }
981
-
982
-        return $ip;
983
-    }
984
-
985
-    /**
986
-     * Get site name
987
-     */
988
-    private function get_site_name() {
989
-        $site_name = get_bloginfo( 'name' );
990
-
991
-        if ( empty( $site_name ) ) {
992
-            $site_name = get_bloginfo( 'description' );
993
-            $site_name = wp_trim_words( $site_name, 3, '' );
994
-        }
995
-
996
-        if ( empty( $site_name ) ) {
997
-            $site_name = esc_url( home_url() );
998
-        }
999
-
1000
-        return $site_name;
1001
-    }
1002
-
1003
-    /**
1004
-     * Send request to appsero if user skip to send tracking data
1005
-     */
1006
-    private function send_tracking_skipped_request() {
1007
-        $skipped = get_option( $this->client->slug . '_tracking_skipped' );
1008
-
1009
-        $data = array(
1010
-            'hash'               => $this->client->hash,
1011
-            'previously_skipped' => false,
1012
-        );
1013
-
1014
-        if ( $skipped === 'yes' ) {
1015
-            $data['previously_skipped'] = true;
1016
-        } else {
1017
-            update_option( $this->client->slug . '_tracking_skipped', 'yes' );
1018
-        }
1019
-
1020
-        $this->client->send_request( $data, 'tracking-skipped' );
1021
-    }
1022
-
1023
-    /**
1024
-     * Deactivation modal styles
1025
-     */
1026
-    private function deactivation_modal_styles() {
1027
-        ?>
950
+	}
951
+
952
+	/**
953
+	 * Run after theme deactivated
954
+	 * @param  string $new_name
955
+	 * @param  object $new_theme
956
+	 * @param  object $old_theme
957
+	 * @return void
958
+	 */
959
+	public function theme_deactivated( $new_name, $new_theme, $old_theme ) {
960
+		// Make sure this is appsero theme
961
+		if ( $old_theme->get_template() == $this->client->slug ) {
962
+			$this->client->send_request( $this->get_tracking_data(), 'deactivate' );
963
+		}
964
+	}
965
+
966
+	/**
967
+	 * Get user IP Address
968
+	 */
969
+	private function get_user_ip_address() {
970
+		$response = wp_remote_get( 'https://icanhazip.com/' );
971
+
972
+		if ( is_wp_error( $response ) ) {
973
+			return '';
974
+		}
975
+
976
+		$ip = trim( wp_remote_retrieve_body( $response ) );
977
+
978
+		if ( ! filter_var( $ip, FILTER_VALIDATE_IP ) ) {
979
+			return '';
980
+		}
981
+
982
+		return $ip;
983
+	}
984
+
985
+	/**
986
+	 * Get site name
987
+	 */
988
+	private function get_site_name() {
989
+		$site_name = get_bloginfo( 'name' );
990
+
991
+		if ( empty( $site_name ) ) {
992
+			$site_name = get_bloginfo( 'description' );
993
+			$site_name = wp_trim_words( $site_name, 3, '' );
994
+		}
995
+
996
+		if ( empty( $site_name ) ) {
997
+			$site_name = esc_url( home_url() );
998
+		}
999
+
1000
+		return $site_name;
1001
+	}
1002
+
1003
+	/**
1004
+	 * Send request to appsero if user skip to send tracking data
1005
+	 */
1006
+	private function send_tracking_skipped_request() {
1007
+		$skipped = get_option( $this->client->slug . '_tracking_skipped' );
1008
+
1009
+		$data = array(
1010
+			'hash'               => $this->client->hash,
1011
+			'previously_skipped' => false,
1012
+		);
1013
+
1014
+		if ( $skipped === 'yes' ) {
1015
+			$data['previously_skipped'] = true;
1016
+		} else {
1017
+			update_option( $this->client->slug . '_tracking_skipped', 'yes' );
1018
+		}
1019
+
1020
+		$this->client->send_request( $data, 'tracking-skipped' );
1021
+	}
1022
+
1023
+	/**
1024
+	 * Deactivation modal styles
1025
+	 */
1026
+	private function deactivation_modal_styles() {
1027
+		?>
1028 1028
         <style type="text/css">
1029 1029
             .wd-dr-modal {
1030 1030
                 position: fixed;
@@ -1180,6 +1180,6 @@  discard block
 block discarded – undo
1180 1180
             }
1181 1181
         </style>
1182 1182
         <?php
1183
-    }
1183
+	}
1184 1184
 
1185 1185
 }
Please login to merge, or discard this patch.
Spacing   +183 added lines, -183 removed lines patch added patch discarded remove patch
@@ -51,13 +51,13 @@  discard block
 block discarded – undo
51 51
      * @param null $name
52 52
      * @param null $file
53 53
      */
54
-    public function __construct( $client, $name = null, $file = null ) {
54
+    public function __construct($client, $name = null, $file = null) {
55 55
 
56
-        if ( is_string( $client ) && ! empty( $name ) && ! empty( $file ) ) {
57
-            $client = new Client( $client, $name, $file );
56
+        if (is_string($client) && ! empty($name) && ! empty($file)) {
57
+            $client = new Client($client, $name, $file);
58 58
         }
59 59
 
60
-        if ( is_object( $client ) && is_a( $client, 'Appsero\Client' ) ) {
60
+        if (is_object($client) && is_a($client, 'Appsero\Client')) {
61 61
             $this->client = $client;
62 62
         }
63 63
     }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      *
92 92
      * @return \self
93 93
      */
94
-    public function add_extra( $data = array() ) {
94
+    public function add_extra($data = array()) {
95 95
         $this->extra_data = $data;
96 96
 
97 97
         return $this;
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      *
105 105
      * @return \self
106 106
      */
107
-    public function notice($text='' ) {
107
+    public function notice($text = '') {
108 108
         $this->notice = $text;
109 109
 
110 110
         return $this;
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
      * @return void
117 117
      */
118 118
     public function init() {
119
-        if ( $this->client->type == 'plugin' ) {
119
+        if ($this->client->type == 'plugin') {
120 120
             $this->init_plugin();
121
-        } else if ( $this->client->type == 'theme' ) {
121
+        } else if ($this->client->type == 'theme') {
122 122
             $this->init_theme();
123 123
         }
124 124
     }
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
     public function init_theme() {
132 132
         $this->init_common();
133 133
 
134
-        add_action( 'switch_theme', array( $this, 'deactivation_cleanup' ) );
135
-        add_action( 'switch_theme', array( $this, 'theme_deactivated' ), 12, 3 );
134
+        add_action('switch_theme', array($this, 'deactivation_cleanup'));
135
+        add_action('switch_theme', array($this, 'theme_deactivated'), 12, 3);
136 136
     }
137 137
 
138 138
     /**
@@ -142,15 +142,15 @@  discard block
 block discarded – undo
142 142
      */
143 143
     public function init_plugin() {
144 144
         // plugin deactivate popup
145
-        if ( ! $this->is_local_server() ) {
146
-            add_filter( 'plugin_action_links_' . $this->client->basename, array( $this, 'plugin_action_links' ) );
147
-            add_action( 'admin_footer', array( $this, 'deactivate_scripts' ) );
145
+        if ( ! $this->is_local_server()) {
146
+            add_filter('plugin_action_links_'.$this->client->basename, array($this, 'plugin_action_links'));
147
+            add_action('admin_footer', array($this, 'deactivate_scripts'));
148 148
         }
149 149
 
150 150
         $this->init_common();
151 151
 
152
-        register_activation_hook( $this->client->file, array( $this, 'activate_plugin' ) );
153
-        register_deactivation_hook( $this->client->file, array( $this, 'deactivation_cleanup' ) );
152
+        register_activation_hook($this->client->file, array($this, 'activate_plugin'));
153
+        register_deactivation_hook($this->client->file, array($this, 'deactivation_cleanup'));
154 154
     }
155 155
 
156 156
     /**
@@ -160,19 +160,19 @@  discard block
 block discarded – undo
160 160
      */
161 161
     protected function init_common() {
162 162
 
163
-        if ( $this->show_notice ) {
163
+        if ($this->show_notice) {
164 164
             // tracking notice
165
-            add_action( 'admin_notices', array( $this, 'admin_notice' ) );
165
+            add_action('admin_notices', array($this, 'admin_notice'));
166 166
         }
167 167
 
168
-        add_action( 'admin_init', array( $this, 'handle_optin_optout' ) );
168
+        add_action('admin_init', array($this, 'handle_optin_optout'));
169 169
 
170 170
         // uninstall reason
171
-        add_action( 'wp_ajax_' . $this->client->slug . '_submit-uninstall-reason', array( $this, 'uninstall_reason_submission' ) );
171
+        add_action('wp_ajax_'.$this->client->slug.'_submit-uninstall-reason', array($this, 'uninstall_reason_submission'));
172 172
 
173 173
         // cron events
174
-        add_filter( 'cron_schedules', array( $this, 'add_weekly_schedule' ) );
175
-        add_action( $this->client->slug . '_tracker_send_event', array( $this, 'send_tracking_data' ) );
174
+        add_filter('cron_schedules', array($this, 'add_weekly_schedule'));
175
+        add_action($this->client->slug.'_tracker_send_event', array($this, 'send_tracking_data'));
176 176
         // add_action( 'admin_init', array( $this, 'send_tracking_data' ) ); // test
177 177
     }
178 178
 
@@ -183,23 +183,23 @@  discard block
 block discarded – undo
183 183
      *
184 184
      * @return void
185 185
      */
186
-    public function send_tracking_data( $override = false ) {
187
-        if ( ! $this->tracking_allowed() && ! $override ) {
186
+    public function send_tracking_data($override = false) {
187
+        if ( ! $this->tracking_allowed() && ! $override) {
188 188
             return;
189 189
         }
190 190
 
191 191
         // Send a maximum of once per week
192 192
         $last_send = $this->get_last_send();
193 193
 
194
-        if ( $last_send && $last_send > strtotime( '-1 week' ) ) {
194
+        if ($last_send && $last_send > strtotime('-1 week')) {
195 195
             return;
196 196
         }
197 197
 
198 198
         $tracking_data = $this->get_tracking_data();
199 199
 
200
-        $response = $this->client->send_request( $tracking_data, 'track' );
200
+        $response = $this->client->send_request($tracking_data, 'track');
201 201
 
202
-        update_option( $this->client->slug . '_tracking_last_send', time() );
202
+        update_option($this->client->slug.'_tracking_last_send', time());
203 203
     }
204 204
 
205 205
     /**
@@ -210,34 +210,34 @@  discard block
 block discarded – undo
210 210
     protected function get_tracking_data() {
211 211
         $all_plugins = $this->get_all_plugins();
212 212
 
213
-        $users = get_users( array(
213
+        $users = get_users(array(
214 214
             'role'    => 'administrator',
215 215
             'orderby' => 'ID',
216 216
             'order'   => 'ASC',
217 217
             'number'  => 1,
218 218
             'paged'   => 1,
219
-        ) );
219
+        ));
220 220
 
221
-        $admin_user =  ( is_array( $users ) && ! empty( $users ) ) ? $users[0] : false;
221
+        $admin_user = (is_array($users) && ! empty($users)) ? $users[0] : false;
222 222
         $first_name = $last_name = '';
223 223
 
224
-        if ( $admin_user ) {
224
+        if ($admin_user) {
225 225
             $first_name = $admin_user->first_name ? $admin_user->first_name : $admin_user->display_name;
226 226
             $last_name  = $admin_user->last_name;
227 227
         }
228 228
 
229 229
         $data = array(
230
-            'url'              => esc_url( home_url() ),
230
+            'url'              => esc_url(home_url()),
231 231
             'site'             => $this->get_site_name(),
232
-            'admin_email'      => get_option( 'admin_email' ),
232
+            'admin_email'      => get_option('admin_email'),
233 233
             'first_name'       => $first_name,
234 234
             'last_name'        => $last_name,
235 235
             'hash'             => $this->client->hash,
236 236
             'server'           => $this->get_server_info(),
237 237
             'wp'               => $this->get_wp_info(),
238 238
             'users'            => $this->get_user_counts(),
239
-            'active_plugins'   => count( $all_plugins['active_plugins'] ),
240
-            'inactive_plugins' => count( $all_plugins['inactive_plugins'] ),
239
+            'active_plugins'   => count($all_plugins['active_plugins']),
240
+            'inactive_plugins' => count($all_plugins['inactive_plugins']),
241 241
             'ip_address'       => $this->get_user_ip_address(),
242 242
             'project_version'  => $this->client->project_version,
243 243
             'tracking_skipped' => false,
@@ -251,11 +251,11 @@  discard block
 block discarded – undo
251 251
 
252 252
             foreach ($all_plugins['active_plugins'] as $slug => $plugin) {
253 253
                 $slug = strstr($slug, '/', true);
254
-                if (! $slug) {
254
+                if ( ! $slug) {
255 255
                     continue;
256 256
                 }
257 257
 
258
-                $plugins_data[ $slug ] = array(
258
+                $plugins_data[$slug] = array(
259 259
                     'name' => isset($plugin['name']) ? $plugin['name'] : '',
260 260
                     'version' => isset($plugin['version']) ? $plugin['version'] : '',
261 261
                 );
@@ -269,20 +269,20 @@  discard block
 block discarded – undo
269 269
         }
270 270
 
271 271
         // Add metadata
272
-        if ( $extra = $this->get_extra_data() ) {
272
+        if ($extra = $this->get_extra_data()) {
273 273
             $data['extra'] = $extra;
274 274
         }
275 275
 
276 276
         // Check this has previously skipped tracking
277
-        $skipped = get_option( $this->client->slug . '_tracking_skipped' );
277
+        $skipped = get_option($this->client->slug.'_tracking_skipped');
278 278
 
279
-        if ( $skipped === 'yes' ) {
280
-            delete_option( $this->client->slug . '_tracking_skipped' );
279
+        if ($skipped === 'yes') {
280
+            delete_option($this->client->slug.'_tracking_skipped');
281 281
 
282 282
             $data['tracking_skipped'] = true;
283 283
         }
284 284
 
285
-        return apply_filters( $this->client->slug . '_tracker_data', $data );
285
+        return apply_filters($this->client->slug.'_tracker_data', $data);
286 286
     }
287 287
 
288 288
     /**
@@ -291,11 +291,11 @@  discard block
 block discarded – undo
291 291
      * @return mixed
292 292
      */
293 293
     protected function get_extra_data() {
294
-        if ( is_callable( $this->extra_data ) ) {
295
-            return call_user_func( $this->extra_data );
294
+        if (is_callable($this->extra_data)) {
295
+            return call_user_func($this->extra_data);
296 296
         }
297 297
 
298
-        if ( is_array( $this->extra_data ) ) {
298
+        if (is_array($this->extra_data)) {
299 299
             return $this->extra_data;
300 300
         }
301 301
 
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
      * @return bool
331 331
      */
332 332
     public function tracking_allowed() {
333
-        $allow_tracking = get_option( $this->client->slug . '_allow_tracking', 'no' );
333
+        $allow_tracking = get_option($this->client->slug.'_allow_tracking', 'no');
334 334
 
335 335
         return $allow_tracking == 'yes';
336 336
     }
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
      * @return false|string
342 342
      */
343 343
     private function get_last_send() {
344
-        return get_option( $this->client->slug . '_tracking_last_send', false );
344
+        return get_option($this->client->slug.'_tracking_last_send', false);
345 345
     }
346 346
 
347 347
     /**
@@ -350,9 +350,9 @@  discard block
 block discarded – undo
350 350
      * @return boolean
351 351
      */
352 352
     public function notice_dismissed() {
353
-        $hide_notice = get_option( $this->client->slug . '_tracking_notice', null );
353
+        $hide_notice = get_option($this->client->slug.'_tracking_notice', null);
354 354
 
355
-        if ( 'hide' == $hide_notice ) {
355
+        if ('hide' == $hide_notice) {
356 356
             return true;
357 357
         }
358 358
 
@@ -366,18 +366,18 @@  discard block
 block discarded – undo
366 366
      */
367 367
     private function is_local_server() {
368 368
 
369
-        $host       = isset( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : 'localhost';
370
-        $ip         = isset( $_SERVER['SERVER_ADDR'] ) ? $_SERVER['SERVER_ADDR'] : '127.0.0.1';
369
+        $host       = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
370
+        $ip         = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : '127.0.0.1';
371 371
         $is_local   = false;
372 372
 
373
-        if( in_array( $ip,array( '127.0.0.1', '::1' ) )
374
-            || ! strpos( $host, '.' )
375
-            || in_array( strrchr( $host, '.' ), array( '.test', '.testing', '.local', '.localhost', '.localdomain' ) )
373
+        if (in_array($ip, array('127.0.0.1', '::1'))
374
+            || ! strpos($host, '.')
375
+            || in_array(strrchr($host, '.'), array('.test', '.testing', '.local', '.localhost', '.localdomain'))
376 376
         ) {
377 377
             $is_local = true;
378 378
         }
379 379
 
380
-        return apply_filters( 'appsero_is_local', $is_local );
380
+        return apply_filters('appsero_is_local', $is_local);
381 381
     }
382 382
 
383 383
     /**
@@ -386,10 +386,10 @@  discard block
 block discarded – undo
386 386
      * @return void
387 387
      */
388 388
     private function schedule_event() {
389
-        $hook_name = $this->client->slug . '_tracker_send_event';
389
+        $hook_name = $this->client->slug.'_tracker_send_event';
390 390
 
391
-        if ( ! wp_next_scheduled( $hook_name ) ) {
392
-            wp_schedule_event( time(), 'weekly', $hook_name );
391
+        if ( ! wp_next_scheduled($hook_name)) {
392
+            wp_schedule_event(time(), 'weekly', $hook_name);
393 393
         }
394 394
     }
395 395
 
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
      * @return void
400 400
      */
401 401
     private function clear_schedule_event() {
402
-        wp_clear_scheduled_hook( $this->client->slug . '_tracker_send_event' );
402
+        wp_clear_scheduled_hook($this->client->slug.'_tracker_send_event');
403 403
     }
404 404
 
405 405
     /**
@@ -409,47 +409,47 @@  discard block
 block discarded – undo
409 409
      */
410 410
     public function admin_notice() {
411 411
 
412
-        if ( $this->notice_dismissed() ) {
412
+        if ($this->notice_dismissed()) {
413 413
             return;
414 414
         }
415 415
 
416
-        if ( $this->tracking_allowed() ) {
416
+        if ($this->tracking_allowed()) {
417 417
             return;
418 418
         }
419 419
 
420
-        if ( ! current_user_can( 'manage_options' ) ) {
420
+        if ( ! current_user_can('manage_options')) {
421 421
             return;
422 422
         }
423 423
 
424 424
         // don't show tracking if a local server
425
-        if ( $this->is_local_server() ) {
425
+        if ($this->is_local_server()) {
426 426
             return;
427 427
         }
428 428
 
429
-        $optin_url  = add_query_arg( $this->client->slug . '_tracker_optin', 'true' );
430
-        $optout_url = add_query_arg( $this->client->slug . '_tracker_optout', 'true' );
429
+        $optin_url  = add_query_arg($this->client->slug.'_tracker_optin', 'true');
430
+        $optout_url = add_query_arg($this->client->slug.'_tracker_optout', 'true');
431 431
 
432
-        if ( empty( $this->notice ) ) {
433
-            $notice = sprintf( $this->client->__trans( 'Want to help make <strong>%1$s</strong> even more awesome? Allow %1$s to collect non-sensitive diagnostic data and usage information.' ), $this->client->name );
432
+        if (empty($this->notice)) {
433
+            $notice = sprintf($this->client->__trans('Want to help make <strong>%1$s</strong> even more awesome? Allow %1$s to collect non-sensitive diagnostic data and usage information.'), $this->client->name);
434 434
         } else {
435 435
             $notice = $this->notice;
436 436
         }
437 437
 
438
-        $policy_url = 'https://' . 'appsero.com/privacy-policy/';
438
+        $policy_url = 'https://'.'appsero.com/privacy-policy/';
439 439
 
440
-        $notice .= ' (<a class="' . $this->client->slug . '-insights-data-we-collect" href="#">' . $this->client->__trans( 'what we collect' ) . '</a>)';
441
-        $notice .= '<p class="description" style="display:none;">' . implode( ', ', $this->data_we_collect() ) . '. No sensitive data is tracked. ';
442
-        $notice .= 'We are using Appsero to collect your data. <a href="' . $policy_url . '" target="_blank">Learn more</a> about how Appsero collects and handle your data.</p>';
440
+        $notice .= ' (<a class="'.$this->client->slug.'-insights-data-we-collect" href="#">'.$this->client->__trans('what we collect').'</a>)';
441
+        $notice .= '<p class="description" style="display:none;">'.implode(', ', $this->data_we_collect()).'. No sensitive data is tracked. ';
442
+        $notice .= 'We are using Appsero to collect your data. <a href="'.$policy_url.'" target="_blank">Learn more</a> about how Appsero collects and handle your data.</p>';
443 443
 
444 444
         echo '<div class="updated"><p>';
445 445
             echo $notice;
446 446
             echo '</p><p class="submit">';
447
-            echo '&nbsp;<a href="' . esc_url( $optin_url ) . '" class="button button--primary button--big">' . $this->client->__trans( 'Allow' ) . '</a>';
448
-            echo '&nbsp;<a href="' . esc_url( $optout_url ) . '" class="button button--secondary button--big">' .
449
-                 $this->client->__trans( 'No thanks' ) . '</a>';
447
+            echo '&nbsp;<a href="'.esc_url($optin_url).'" class="button button--primary button--big">'.$this->client->__trans('Allow').'</a>';
448
+            echo '&nbsp;<a href="'.esc_url($optout_url).'" class="button button--secondary button--big">'.
449
+                 $this->client->__trans('No thanks').'</a>';
450 450
         echo '</p></div>';
451 451
 
452
-        echo "<script type='text/javascript'>jQuery('." . $this->client->slug . "-insights-data-we-collect').on('click', function(e) {
452
+        echo "<script type='text/javascript'>jQuery('.".$this->client->slug."-insights-data-we-collect').on('click', function(e) {
453 453
                 e.preventDefault();
454 454
                 jQuery(this).parents('.updated').find('p.description').slideToggle('fast');
455 455
             });
@@ -464,17 +464,17 @@  discard block
 block discarded – undo
464 464
      */
465 465
     public function handle_optin_optout() {
466 466
 
467
-        if ( isset( $_GET[ $this->client->slug . '_tracker_optin' ] ) && $_GET[ $this->client->slug . '_tracker_optin' ] == 'true' ) {
467
+        if (isset($_GET[$this->client->slug.'_tracker_optin']) && $_GET[$this->client->slug.'_tracker_optin'] == 'true') {
468 468
             $this->optin();
469 469
 
470
-            wp_redirect( remove_query_arg( $this->client->slug . '_tracker_optin' ) );
470
+            wp_redirect(remove_query_arg($this->client->slug.'_tracker_optin'));
471 471
             exit;
472 472
         }
473 473
 
474
-        if ( isset( $_GET[ $this->client->slug . '_tracker_optout' ] ) && $_GET[ $this->client->slug . '_tracker_optout' ] == 'true' ) {
474
+        if (isset($_GET[$this->client->slug.'_tracker_optout']) && $_GET[$this->client->slug.'_tracker_optout'] == 'true') {
475 475
             $this->optout();
476 476
 
477
-            wp_redirect( remove_query_arg( $this->client->slug . '_tracker_optout' ) );
477
+            wp_redirect(remove_query_arg($this->client->slug.'_tracker_optout'));
478 478
             exit;
479 479
         }
480 480
     }
@@ -485,8 +485,8 @@  discard block
 block discarded – undo
485 485
      * @return void
486 486
      */
487 487
     public function optin() {
488
-        update_option( $this->client->slug . '_allow_tracking', 'yes' );
489
-        update_option( $this->client->slug . '_tracking_notice', 'hide' );
488
+        update_option($this->client->slug.'_allow_tracking', 'yes');
489
+        update_option($this->client->slug.'_tracking_notice', 'hide');
490 490
 
491 491
         $this->clear_schedule_event();
492 492
         $this->schedule_event();
@@ -499,8 +499,8 @@  discard block
 block discarded – undo
499 499
      * @return void
500 500
      */
501 501
     public function optout() {
502
-        update_option( $this->client->slug . '_allow_tracking', 'no' );
503
-        update_option( $this->client->slug . '_tracking_notice', 'hide' );
502
+        update_option($this->client->slug.'_allow_tracking', 'no');
503
+        update_option($this->client->slug.'_tracking_notice', 'hide');
504 504
 
505 505
         $this->send_tracking_skipped_request();
506 506
 
@@ -514,10 +514,10 @@  discard block
 block discarded – undo
514 514
      *
515 515
      * @return integer
516 516
      */
517
-    public function get_post_count( $post_type ) {
517
+    public function get_post_count($post_type) {
518 518
         global $wpdb;
519 519
 
520
-        return (int) $wpdb->get_var( "SELECT count(ID) FROM $wpdb->posts WHERE post_type = '$post_type' and post_status = 'publish'");
520
+        return (int) $wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_type = '$post_type' and post_status = 'publish'");
521 521
     }
522 522
 
523 523
     /**
@@ -530,21 +530,21 @@  discard block
 block discarded – undo
530 530
 
531 531
         $server_data = array();
532 532
 
533
-        if ( isset( $_SERVER['SERVER_SOFTWARE'] ) && ! empty( $_SERVER['SERVER_SOFTWARE'] ) ) {
533
+        if (isset($_SERVER['SERVER_SOFTWARE']) && ! empty($_SERVER['SERVER_SOFTWARE'])) {
534 534
             $server_data['software'] = $_SERVER['SERVER_SOFTWARE'];
535 535
         }
536 536
 
537
-        if ( function_exists( 'phpversion' ) ) {
537
+        if (function_exists('phpversion')) {
538 538
             $server_data['php_version'] = phpversion();
539 539
         }
540 540
 
541 541
         $server_data['mysql_version']        = $wpdb->db_version();
542 542
 
543
-        $server_data['php_max_upload_size']  = size_format( wp_max_upload_size() );
543
+        $server_data['php_max_upload_size']  = size_format(wp_max_upload_size());
544 544
         $server_data['php_default_timezone'] = date_default_timezone_get();
545
-        $server_data['php_soap']             = class_exists( 'SoapClient' ) ? 'Yes' : 'No';
546
-        $server_data['php_fsockopen']        = function_exists( 'fsockopen' ) ? 'Yes' : 'No';
547
-        $server_data['php_curl']             = function_exists( 'curl_init' ) ? 'Yes' : 'No';
545
+        $server_data['php_soap']             = class_exists('SoapClient') ? 'Yes' : 'No';
546
+        $server_data['php_fsockopen']        = function_exists('fsockopen') ? 'Yes' : 'No';
547
+        $server_data['php_curl']             = function_exists('curl_init') ? 'Yes' : 'No';
548 548
 
549 549
         return $server_data;
550 550
     }
@@ -558,18 +558,18 @@  discard block
 block discarded – undo
558 558
         $wp_data = array();
559 559
 
560 560
         $wp_data['memory_limit'] = WP_MEMORY_LIMIT;
561
-        $wp_data['debug_mode']   = ( defined('WP_DEBUG') && WP_DEBUG ) ? 'Yes' : 'No';
561
+        $wp_data['debug_mode']   = (defined('WP_DEBUG') && WP_DEBUG) ? 'Yes' : 'No';
562 562
         $wp_data['locale']       = get_locale();
563
-        $wp_data['version']      = get_bloginfo( 'version' );
563
+        $wp_data['version']      = get_bloginfo('version');
564 564
         $wp_data['multisite']    = is_multisite() ? 'Yes' : 'No';
565 565
         $wp_data['theme_slug']   = get_stylesheet();
566 566
 
567
-        $theme = wp_get_theme( $wp_data['theme_slug'] );
567
+        $theme = wp_get_theme($wp_data['theme_slug']);
568 568
 
569
-        $wp_data['theme_name']    = $theme->get( 'Name' );
570
-        $wp_data['theme_version'] = $theme->get( 'Version' );
571
-        $wp_data['theme_uri']     = $theme->get( 'ThemeURI' );
572
-        $wp_data['theme_author']  = $theme->get( 'Author' );
569
+        $wp_data['theme_name']    = $theme->get('Name');
570
+        $wp_data['theme_version'] = $theme->get('Version');
571
+        $wp_data['theme_uri']     = $theme->get('ThemeURI');
572
+        $wp_data['theme_author']  = $theme->get('Author');
573 573
 
574 574
         return $wp_data;
575 575
     }
@@ -581,45 +581,45 @@  discard block
 block discarded – undo
581 581
      */
582 582
     private function get_all_plugins() {
583 583
         // Ensure get_plugins function is loaded
584
-        if ( ! function_exists( 'get_plugins' ) ) {
585
-            include ABSPATH . '/wp-admin/includes/plugin.php';
584
+        if ( ! function_exists('get_plugins')) {
585
+            include ABSPATH.'/wp-admin/includes/plugin.php';
586 586
         }
587 587
 
588 588
         $plugins             = get_plugins();
589
-        $active_plugins_keys = get_option( 'active_plugins', array() );
589
+        $active_plugins_keys = get_option('active_plugins', array());
590 590
         $active_plugins      = array();
591 591
 
592
-        foreach ( $plugins as $k => $v ) {
592
+        foreach ($plugins as $k => $v) {
593 593
             // Take care of formatting the data how we want it.
594 594
             $formatted = array();
595
-            $formatted['name'] = strip_tags( $v['Name'] );
595
+            $formatted['name'] = strip_tags($v['Name']);
596 596
 
597
-            if ( isset( $v['Version'] ) ) {
598
-                $formatted['version'] = strip_tags( $v['Version'] );
597
+            if (isset($v['Version'])) {
598
+                $formatted['version'] = strip_tags($v['Version']);
599 599
             }
600 600
 
601
-            if ( isset( $v['Author'] ) ) {
602
-                $formatted['author'] = strip_tags( $v['Author'] );
601
+            if (isset($v['Author'])) {
602
+                $formatted['author'] = strip_tags($v['Author']);
603 603
             }
604 604
 
605
-            if ( isset( $v['Network'] ) ) {
606
-                $formatted['network'] = strip_tags( $v['Network'] );
605
+            if (isset($v['Network'])) {
606
+                $formatted['network'] = strip_tags($v['Network']);
607 607
             }
608 608
 
609
-            if ( isset( $v['PluginURI'] ) ) {
610
-                $formatted['plugin_uri'] = strip_tags( $v['PluginURI'] );
609
+            if (isset($v['PluginURI'])) {
610
+                $formatted['plugin_uri'] = strip_tags($v['PluginURI']);
611 611
             }
612 612
 
613
-            if ( in_array( $k, $active_plugins_keys ) ) {
613
+            if (in_array($k, $active_plugins_keys)) {
614 614
                 // Remove active plugins from list so we can show active and inactive separately
615
-                unset( $plugins[$k] );
615
+                unset($plugins[$k]);
616 616
                 $active_plugins[$k] = $formatted;
617 617
             } else {
618 618
                 $plugins[$k] = $formatted;
619 619
             }
620 620
         }
621 621
 
622
-        return array( 'active_plugins' => $active_plugins, 'inactive_plugins' => $plugins );
622
+        return array('active_plugins' => $active_plugins, 'inactive_plugins' => $plugins);
623 623
     }
624 624
 
625 625
     /**
@@ -633,12 +633,12 @@  discard block
 block discarded – undo
633 633
         $user_count['total'] = $user_count_data['total_users'];
634 634
 
635 635
         // Get user count based on user role
636
-        foreach ( $user_count_data['avail_roles'] as $role => $count ) {
637
-            if ( ! $count ) {
636
+        foreach ($user_count_data['avail_roles'] as $role => $count) {
637
+            if ( ! $count) {
638 638
                 continue;
639 639
             }
640 640
 
641
-            $user_count[ $role ] = $count;
641
+            $user_count[$role] = $count;
642 642
         }
643 643
 
644 644
         return $user_count;
@@ -651,7 +651,7 @@  discard block
 block discarded – undo
651 651
      *
652 652
      * @return array
653 653
      */
654
-    public function add_weekly_schedule( $schedules ) {
654
+    public function add_weekly_schedule($schedules) {
655 655
 
656 656
         $schedules['weekly'] = array(
657 657
             'interval' => DAY_IN_SECONDS * 7,
@@ -667,22 +667,22 @@  discard block
 block discarded – undo
667 667
      * @return void
668 668
      */
669 669
     public function activate_plugin() {
670
-        $allowed = get_option( $this->client->slug . '_allow_tracking', 'no' );
670
+        $allowed = get_option($this->client->slug.'_allow_tracking', 'no');
671 671
 
672 672
         // if it wasn't allowed before, do nothing
673
-        if ( 'yes' !== $allowed ) {
673
+        if ('yes' !== $allowed) {
674 674
             return;
675 675
         }
676 676
 
677 677
         // re-schedule and delete the last sent time so we could force send again
678
-        $hook_name = $this->client->slug . '_tracker_send_event';
679
-        if ( ! wp_next_scheduled( $hook_name ) ) {
680
-            wp_schedule_event( time(), 'weekly', $hook_name );
678
+        $hook_name = $this->client->slug.'_tracker_send_event';
679
+        if ( ! wp_next_scheduled($hook_name)) {
680
+            wp_schedule_event(time(), 'weekly', $hook_name);
681 681
         }
682 682
 
683
-        delete_option( $this->client->slug . '_tracking_last_send' );
683
+        delete_option($this->client->slug.'_tracking_last_send');
684 684
 
685
-        $this->send_tracking_data( true );
685
+        $this->send_tracking_data(true);
686 686
     }
687 687
 
688 688
     /**
@@ -693,12 +693,12 @@  discard block
 block discarded – undo
693 693
     public function deactivation_cleanup() {
694 694
         $this->clear_schedule_event();
695 695
 
696
-        if ( 'theme' == $this->client->type ) {
697
-            delete_option( $this->client->slug . '_tracking_last_send' );
698
-            delete_option( $this->client->slug . '_allow_tracking' );
696
+        if ('theme' == $this->client->type) {
697
+            delete_option($this->client->slug.'_tracking_last_send');
698
+            delete_option($this->client->slug.'_allow_tracking');
699 699
         }
700 700
 
701
-        delete_option( $this->client->slug . '_tracking_notice' );
701
+        delete_option($this->client->slug.'_tracking_notice');
702 702
     }
703 703
 
704 704
     /**
@@ -708,10 +708,10 @@  discard block
 block discarded – undo
708 708
      *
709 709
      * @return array
710 710
      */
711
-    public function plugin_action_links( $links ) {
711
+    public function plugin_action_links($links) {
712 712
 
713
-        if ( array_key_exists( 'deactivate', $links ) ) {
714
-            $links['deactivate'] = str_replace( '<a', '<a class="' . $this->client->slug . '-deactivate-link"', $links['deactivate'] );
713
+        if (array_key_exists('deactivate', $links)) {
714
+            $links['deactivate'] = str_replace('<a', '<a class="'.$this->client->slug.'-deactivate-link"', $links['deactivate']);
715 715
         }
716 716
 
717 717
         return $links;
@@ -726,44 +726,44 @@  discard block
 block discarded – undo
726 726
         $reasons = array(
727 727
 			array(
728 728
 				'id'          => 'could-not-understand',
729
-				'text'        => $this->client->__trans( "Couldn't understand" ),
730
-				'placeholder' => $this->client->__trans( 'Would you like us to assist you?' ),
729
+				'text'        => $this->client->__trans("Couldn't understand"),
730
+				'placeholder' => $this->client->__trans('Would you like us to assist you?'),
731 731
                 'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 10.6 23 9.6 22.9 8.8 22.7L8.8 22.6C9.3 22.5 9.7 22.3 10 21.9 10.3 21.6 10.4 21.3 10.4 20.9 10.8 21 11.1 21 11.5 21 16.7 21 21 16.7 21 11.5 21 6.3 16.7 2 11.5 2 6.3 2 2 6.3 2 11.5 2 13 2.3 14.3 2.9 15.6 2.7 16 2.4 16.3 2.2 16.8L2.1 17.1 2.1 17.3C2 17.5 2 17.7 2 18 0.7 16.1 0 13.9 0 11.5 0 5.1 5.1 0 11.5 0ZM6 13.6C6 13.7 6.1 13.8 6.1 13.9 6.3 14.5 6.2 15.7 6.1 16.4 6.1 16.6 6 16.9 6 17.1 6 17.1 6.1 17.1 6.1 17.1 7.1 16.9 8.2 16 9.3 15.5 9.8 15.2 10.4 15 10.9 15 11.2 15 11.4 15 11.6 15.2 11.9 15.4 12.1 16 11.6 16.4 11.5 16.5 11.3 16.6 11.1 16.7 10.5 17 9.9 17.4 9.3 17.7 9 17.9 9 18.1 9.1 18.5 9.2 18.9 9.3 19.4 9.3 19.8 9.4 20.3 9.3 20.8 9 21.2 8.8 21.5 8.5 21.6 8.1 21.7 7.9 21.8 7.6 21.9 7.3 21.9L6.5 22C6.3 22 6 21.9 5.8 21.9 5 21.8 4.4 21.5 3.9 20.9 3.3 20.4 3.1 19.6 3 18.8L3 18.5C3 18.2 3 17.9 3.1 17.7L3.1 17.6C3.2 17.1 3.5 16.7 3.7 16.3 4 15.9 4.2 15.4 4.3 15 4.4 14.6 4.4 14.5 4.6 14.2 4.6 13.9 4.7 13.7 4.9 13.6 5.2 13.2 5.7 13.2 6 13.6ZM11.7 11.2C13.1 11.2 14.3 11.7 15.2 12.9 15.3 13 15.4 13.1 15.4 13.2 15.4 13.4 15.3 13.8 15.2 13.8 15 13.9 14.9 13.8 14.8 13.7 14.6 13.5 14.4 13.2 14.1 13.1 13.5 12.6 12.8 12.3 12 12.2 10.7 12.1 9.5 12.3 8.4 12.8 8.3 12.8 8.2 12.8 8.1 12.8 7.9 12.8 7.8 12.4 7.8 12.2 7.7 12.1 7.8 11.9 8 11.8 8.4 11.7 8.8 11.5 9.2 11.4 10 11.2 10.9 11.1 11.7 11.2ZM16.3 5.9C17.3 5.9 18 6.6 18 7.6 18 8.5 17.3 9.3 16.3 9.3 15.4 9.3 14.7 8.5 14.7 7.6 14.7 6.6 15.4 5.9 16.3 5.9ZM8.3 5C9.2 5 9.9 5.8 9.9 6.7 9.9 7.7 9.2 8.4 8.2 8.4 7.3 8.4 6.6 7.7 6.6 6.7 6.6 5.8 7.3 5 8.3 5Z"/></g></g></svg>'
732 732
 			),
733 733
 			array(
734 734
 				'id'          => 'found-better-plugin',
735
-				'text'        => $this->client->__trans( 'Found a better plugin' ),
736
-				'placeholder' => $this->client->__trans( 'Which plugin?' ),
735
+				'text'        => $this->client->__trans('Found a better plugin'),
736
+				'placeholder' => $this->client->__trans('Which plugin?'),
737 737
                 'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M17.1 14L22.4 19.3C23.2 20.2 23.2 21.5 22.4 22.4 21.5 23.2 20.2 23.2 19.3 22.4L19.3 22.4 14 17.1C15.3 16.3 16.3 15.3 17.1 14L17.1 14ZM8.6 0C13.4 0 17.3 3.9 17.3 8.6 17.3 13.4 13.4 17.2 8.6 17.2 3.9 17.2 0 13.4 0 8.6 0 3.9 3.9 0 8.6 0ZM8.6 2.2C5.1 2.2 2.2 5.1 2.2 8.6 2.2 12.2 5.1 15.1 8.6 15.1 12.2 15.1 15.1 12.2 15.1 8.6 15.1 5.1 12.2 2.2 8.6 2.2ZM8.6 3.6L8.6 5C6.6 5 5 6.6 5 8.6L5 8.6 3.6 8.6C3.6 5.9 5.9 3.6 8.6 3.6L8.6 3.6Z"/></g></g></svg>',
738 738
 			),
739 739
 			array(
740 740
 				'id'          => 'not-have-that-feature',
741
-				'text'        => $this->client->__trans( "Missing a specific feature" ),
742
-				'placeholder' => $this->client->__trans( 'Could you tell us more about that feature?' ),
741
+				'text'        => $this->client->__trans("Missing a specific feature"),
742
+				'placeholder' => $this->client->__trans('Could you tell us more about that feature?'),
743 743
                 'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="17" viewBox="0 0 24 17"><g fill="none"><g fill="#3B86FF"><path d="M19.4 0C19.7 0.6 19.8 1.3 19.8 2 19.8 3.2 19.4 4.4 18.5 5.3 17.6 6.2 16.5 6.7 15.2 6.7 15.2 6.7 15.2 6.7 15.2 6.7 14 6.7 12.9 6.2 12 5.3 11.2 4.4 10.7 3.3 10.7 2 10.7 1.3 10.8 0.6 11.1 0L7.6 0 7 0 6.5 0 6.5 5.7C6.3 5.6 5.9 5.3 5.6 5.1 5 4.6 4.3 4.3 3.5 4.3 3.5 4.3 3.5 4.3 3.4 4.3 1.6 4.4 0 5.9 0 7.9 0 8.6 0.2 9.2 0.5 9.7 1.1 10.8 2.2 11.5 3.5 11.5 4.3 11.5 5 11.2 5.6 10.8 6 10.5 6.3 10.3 6.5 10.2L6.5 10.2 6.5 17 6.5 17 7 17 7.6 17 22.5 17C23.3 17 24 16.3 24 15.5L24 0 19.4 0Z"/></g></g></svg>',
744 744
 			),
745 745
 			array(
746 746
 				'id'          => 'is-not-working',
747
-				'text'        => $this->client->__trans( 'Not working' ),
748
-				'placeholder' => $this->client->__trans( 'Could you tell us a bit more whats not working?' ),
747
+				'text'        => $this->client->__trans('Not working'),
748
+				'placeholder' => $this->client->__trans('Could you tell us a bit more whats not working?'),
749 749
                 'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 5.1 23 0 17.9 0 11.5 0 5.1 5.1 0 11.5 0ZM11.8 14.4C11.2 14.4 10.7 14.8 10.7 15.4 10.7 16 11.2 16.4 11.8 16.4 12.4 16.4 12.8 16 12.8 15.4 12.8 14.8 12.4 14.4 11.8 14.4ZM12 7C10.1 7 9.1 8.1 9 9.6L10.5 9.6C10.5 8.8 11.1 8.3 11.9 8.3 12.7 8.3 13.2 8.8 13.2 9.5 13.2 10.1 13 10.4 12.2 10.9 11.3 11.4 10.9 12 11 12.9L11 13.4 12.5 13.4 12.5 13C12.5 12.4 12.7 12.1 13.5 11.6 14.4 11.1 14.9 10.4 14.9 9.4 14.9 8 13.7 7 12 7Z"/></g></g></svg>',
750 750
 			),
751 751
 			array(
752 752
 				'id'          => 'looking-for-other',
753
-				'text'        => $this->client->__trans( "Not what I was looking" ),
754
-				'placeholder' => $this->client->__trans( 'Could you tell us a bit more?' ),
753
+				'text'        => $this->client->__trans("Not what I was looking"),
754
+				'placeholder' => $this->client->__trans('Could you tell us a bit more?'),
755 755
                 'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="17" viewBox="0 0 24 17"><g fill="none"><g fill="#3B86FF"><path d="M23.5 9C23.5 9 23.5 8.9 23.5 8.9 23.5 8.9 23.5 8.9 23.5 8.9 23.4 8.6 23.2 8.3 23 8 22.2 6.5 20.6 3.7 19.8 2.6 18.8 1.3 17.7 0 16.1 0 15.7 0 15.3 0.1 14.9 0.2 13.8 0.6 12.6 1.2 12.3 2.7L11.7 2.7C11.4 1.2 10.2 0.6 9.1 0.2 8.7 0.1 8.3 0 7.9 0 6.3 0 5.2 1.3 4.2 2.6 3.4 3.7 1.8 6.5 1 8 0.8 8.3 0.6 8.6 0.5 8.9 0.5 8.9 0.5 8.9 0.5 8.9 0.5 8.9 0.5 9 0.5 9 0.2 9.7 0 10.5 0 11.3 0 14.4 2.5 17 5.5 17 7.3 17 8.8 16.1 9.8 14.8L14.2 14.8C15.2 16.1 16.7 17 18.5 17 21.5 17 24 14.4 24 11.3 24 10.5 23.8 9.7 23.5 9ZM5.5 15C3.6 15 2 13.2 2 11 2 8.8 3.6 7 5.5 7 7.4 7 9 8.8 9 11 9 13.2 7.4 15 5.5 15ZM18.5 15C16.6 15 15 13.2 15 11 15 8.8 16.6 7 18.5 7 20.4 7 22 8.8 22 11 22 13.2 20.4 15 18.5 15Z"/></g></g></svg>',
756 756
 			),
757 757
 			array(
758 758
 				'id'          => 'did-not-work-as-expected',
759
-				'text'        => $this->client->__trans( "Didn't work as expected" ),
760
-				'placeholder' => $this->client->__trans( 'What did you expect?' ),
759
+				'text'        => $this->client->__trans("Didn't work as expected"),
760
+				'placeholder' => $this->client->__trans('What did you expect?'),
761 761
                 'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 5.1 23 0 17.9 0 11.5 0 5.1 5.1 0 11.5 0ZM11.5 2C6.3 2 2 6.3 2 11.5 2 16.7 6.3 21 11.5 21 16.7 21 21 16.7 21 11.5 21 6.3 16.7 2 11.5 2ZM12.5 12.9L12.7 5 10.2 5 10.5 12.9 12.5 12.9ZM11.5 17.4C12.4 17.4 13 16.8 13 15.9 13 15 12.4 14.4 11.5 14.4 10.6 14.4 10 15 10 15.9 10 16.8 10.6 17.4 11.5 17.4Z"/></g></g></svg>',
762 762
 			),
763 763
 			array(
764 764
 				'id'          => 'other',
765
-				'text'        => $this->client->__trans( 'Others' ),
766
-				'placeholder' => $this->client->__trans( 'Could you tell us a bit more?' ),
765
+				'text'        => $this->client->__trans('Others'),
766
+				'placeholder' => $this->client->__trans('Could you tell us a bit more?'),
767 767
                 'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="23" viewBox="0 0 24 6"><g fill="none"><g fill="#3B86FF"><path d="M3 0C4.7 0 6 1.3 6 3 6 4.7 4.7 6 3 6 1.3 6 0 4.7 0 3 0 1.3 1.3 0 3 0ZM12 0C13.7 0 15 1.3 15 3 15 4.7 13.7 6 12 6 10.3 6 9 4.7 9 3 9 1.3 10.3 0 12 0ZM21 0C22.7 0 24 1.3 24 3 24 4.7 22.7 6 21 6 19.3 6 18 4.7 18 3 18 1.3 19.3 0 21 0Z"/></g></g></svg>',
768 768
 			),
769 769
 		);
@@ -778,19 +778,19 @@  discard block
 block discarded – undo
778 778
      */
779 779
     public function uninstall_reason_submission() {
780 780
 
781
-        if ( ! isset( $_POST['reason_id'] ) ) {
781
+        if ( ! isset($_POST['reason_id'])) {
782 782
             wp_send_json_error();
783 783
         }
784 784
 
785
-        if ( ! wp_verify_nonce( $_POST['nonce'], 'appsero-security-nonce' ) ) {
786
-            wp_send_json_error( 'Nonce verification failed' );
785
+        if ( ! wp_verify_nonce($_POST['nonce'], 'appsero-security-nonce')) {
786
+            wp_send_json_error('Nonce verification failed');
787 787
         }
788 788
 
789 789
         $data                = $this->get_tracking_data();
790
-        $data['reason_id']   = sanitize_text_field( $_POST['reason_id'] );
791
-        $data['reason_info'] = isset( $_REQUEST['reason_info'] ) ? trim( stripslashes( $_REQUEST['reason_info'] ) ) : '';
790
+        $data['reason_id']   = sanitize_text_field($_POST['reason_id']);
791
+        $data['reason_info'] = isset($_REQUEST['reason_info']) ? trim(stripslashes($_REQUEST['reason_info'])) : '';
792 792
 
793
-        $this->client->send_request( $data, 'deactivate' );
793
+        $this->client->send_request($data, 'deactivate');
794 794
 
795 795
         wp_send_json_success();
796 796
     }
@@ -803,25 +803,25 @@  discard block
 block discarded – undo
803 803
     public function deactivate_scripts() {
804 804
         global $pagenow;
805 805
 
806
-        if ( 'plugins.php' != $pagenow ) {
806
+        if ('plugins.php' != $pagenow) {
807 807
             return;
808 808
         }
809 809
 
810 810
         $this->deactivation_modal_styles();
811 811
         $reasons = $this->get_uninstall_reasons();
812
-        $custom_reasons = apply_filters( 'appsero_custom_deactivation_reasons', array() );
812
+        $custom_reasons = apply_filters('appsero_custom_deactivation_reasons', array());
813 813
         ?>
814 814
 
815 815
         <div class="wd-dr-modal" id="<?php echo $this->client->slug; ?>-wd-dr-modal">
816 816
             <div class="wd-dr-modal-wrap">
817 817
                 <div class="wd-dr-modal-header">
818
-                    <h3><?php $this->client->_etrans( 'Goodbyes are always hard. If you have a moment, please let us know how we can improve.' ); ?></h3>
818
+                    <h3><?php $this->client->_etrans('Goodbyes are always hard. If you have a moment, please let us know how we can improve.'); ?></h3>
819 819
                 </div>
820 820
 
821 821
                 <div class="wd-dr-modal-body">
822 822
                     <ul class="wd-de-reasons">
823
-                        <?php foreach ( $reasons as $reason ) { ?>
824
-                            <li data-placeholder="<?php echo esc_attr( $reason['placeholder'] ); ?>">
823
+                        <?php foreach ($reasons as $reason) { ?>
824
+                            <li data-placeholder="<?php echo esc_attr($reason['placeholder']); ?>">
825 825
                                 <label>
826 826
                                     <input type="radio" name="selected-reason" value="<?php echo $reason['id']; ?>">
827 827
                                     <div class="wd-de-reason-icon"><?php echo $reason['icon']; ?></div>
@@ -830,10 +830,10 @@  discard block
 block discarded – undo
830 830
                             </li>
831 831
                         <?php } ?>
832 832
                     </ul>
833
-                    <?php if ( $custom_reasons && is_array( $custom_reasons ) ) : ?>
833
+                    <?php if ($custom_reasons && is_array($custom_reasons)) : ?>
834 834
                     <ul class="wd-de-reasons wd-de-others-reasons">
835
-                        <?php foreach ( $custom_reasons as $reason ) { ?>
836
-                            <li data-placeholder="<?php echo esc_attr( $reason['placeholder'] ); ?>" data-customreason="true">
835
+                        <?php foreach ($custom_reasons as $reason) { ?>
836
+                            <li data-placeholder="<?php echo esc_attr($reason['placeholder']); ?>" data-customreason="true">
837 837
                                 <label>
838 838
                                     <input type="radio" name="selected-reason" value="<?php echo $reason['id']; ?>">
839 839
                                     <div class="wd-de-reason-icon"><?php echo $reason['icon']; ?></div>
@@ -847,18 +847,18 @@  discard block
 block discarded – undo
847 847
                     <p class="wd-dr-modal-reasons-bottom">
848 848
                        <?php
849 849
                        echo sprintf(
850
-	                       $this->client->__trans( 'We share your data with <a href="%1$s" target="_blank">Appsero</a> to troubleshoot problems &amp; make product improvements. <a href="%2$s" target="_blank">Learn more</a> about how Appsero handles your data.'),
851
-	                       esc_url( 'https://appsero.com/' ),
852
-                           esc_url( 'https://appsero.com/privacy-policy' )
850
+	                       $this->client->__trans('We share your data with <a href="%1$s" target="_blank">Appsero</a> to troubleshoot problems &amp; make product improvements. <a href="%2$s" target="_blank">Learn more</a> about how Appsero handles your data.'),
851
+	                       esc_url('https://appsero.com/'),
852
+                           esc_url('https://appsero.com/privacy-policy')
853 853
                        );
854 854
                        ?>
855 855
                     </p>
856 856
                 </div>
857 857
 
858 858
                 <div class="wd-dr-modal-footer">
859
-                    <a href="#" class="dont-bother-me wd-dr-button-secondary"><?php $this->client->_etrans( "Skip & Deactivate" ); ?></a>
860
-                    <button class="wd-dr-button-secondary wd-dr-cancel-modal"><?php $this->client->_etrans( 'Cancel' ); ?></button>
861
-                    <button class="wd-dr-submit-modal"><?php $this->client->_etrans( 'Submit & Deactivate' ); ?></button>
859
+                    <a href="#" class="dont-bother-me wd-dr-button-secondary"><?php $this->client->_etrans("Skip & Deactivate"); ?></a>
860
+                    <button class="wd-dr-button-secondary wd-dr-cancel-modal"><?php $this->client->_etrans('Cancel'); ?></button>
861
+                    <button class="wd-dr-submit-modal"><?php $this->client->_etrans('Submit & Deactivate'); ?></button>
862 862
                 </div>
863 863
             </div>
864 864
         </div>
@@ -928,7 +928,7 @@  discard block
 block discarded – undo
928 928
                             url: ajaxurl,
929 929
                             type: 'POST',
930 930
                             data: {
931
-                                nonce: '<?php echo wp_create_nonce( 'appsero-security-nonce' ); ?>',
931
+                                nonce: '<?php echo wp_create_nonce('appsero-security-nonce'); ?>',
932 932
                                 action: '<?php echo $this->client->slug; ?>_submit-uninstall-reason',
933 933
                                 reason_id: ( 0 === $radio.length ) ? 'none' : $radio.val(),
934 934
                                 reason_info: ( 0 !== $input.length ) ? $input.val().trim() : ''
@@ -956,10 +956,10 @@  discard block
 block discarded – undo
956 956
      * @param  object $old_theme
957 957
      * @return void
958 958
      */
959
-    public function theme_deactivated( $new_name, $new_theme, $old_theme ) {
959
+    public function theme_deactivated($new_name, $new_theme, $old_theme) {
960 960
         // Make sure this is appsero theme
961
-        if ( $old_theme->get_template() == $this->client->slug ) {
962
-            $this->client->send_request( $this->get_tracking_data(), 'deactivate' );
961
+        if ($old_theme->get_template() == $this->client->slug) {
962
+            $this->client->send_request($this->get_tracking_data(), 'deactivate');
963 963
         }
964 964
     }
965 965
 
@@ -967,15 +967,15 @@  discard block
 block discarded – undo
967 967
      * Get user IP Address
968 968
      */
969 969
     private function get_user_ip_address() {
970
-        $response = wp_remote_get( 'https://icanhazip.com/' );
970
+        $response = wp_remote_get('https://icanhazip.com/');
971 971
 
972
-        if ( is_wp_error( $response ) ) {
972
+        if (is_wp_error($response)) {
973 973
             return '';
974 974
         }
975 975
 
976
-        $ip = trim( wp_remote_retrieve_body( $response ) );
976
+        $ip = trim(wp_remote_retrieve_body($response));
977 977
 
978
-        if ( ! filter_var( $ip, FILTER_VALIDATE_IP ) ) {
978
+        if ( ! filter_var($ip, FILTER_VALIDATE_IP)) {
979 979
             return '';
980 980
         }
981 981
 
@@ -986,15 +986,15 @@  discard block
 block discarded – undo
986 986
      * Get site name
987 987
      */
988 988
     private function get_site_name() {
989
-        $site_name = get_bloginfo( 'name' );
989
+        $site_name = get_bloginfo('name');
990 990
 
991
-        if ( empty( $site_name ) ) {
992
-            $site_name = get_bloginfo( 'description' );
993
-            $site_name = wp_trim_words( $site_name, 3, '' );
991
+        if (empty($site_name)) {
992
+            $site_name = get_bloginfo('description');
993
+            $site_name = wp_trim_words($site_name, 3, '');
994 994
         }
995 995
 
996
-        if ( empty( $site_name ) ) {
997
-            $site_name = esc_url( home_url() );
996
+        if (empty($site_name)) {
997
+            $site_name = esc_url(home_url());
998 998
         }
999 999
 
1000 1000
         return $site_name;
@@ -1004,20 +1004,20 @@  discard block
 block discarded – undo
1004 1004
      * Send request to appsero if user skip to send tracking data
1005 1005
      */
1006 1006
     private function send_tracking_skipped_request() {
1007
-        $skipped = get_option( $this->client->slug . '_tracking_skipped' );
1007
+        $skipped = get_option($this->client->slug.'_tracking_skipped');
1008 1008
 
1009 1009
         $data = array(
1010 1010
             'hash'               => $this->client->hash,
1011 1011
             'previously_skipped' => false,
1012 1012
         );
1013 1013
 
1014
-        if ( $skipped === 'yes' ) {
1014
+        if ($skipped === 'yes') {
1015 1015
             $data['previously_skipped'] = true;
1016 1016
         } else {
1017
-            update_option( $this->client->slug . '_tracking_skipped', 'yes' );
1017
+            update_option($this->client->slug.'_tracking_skipped', 'yes');
1018 1018
         }
1019 1019
 
1020
-        $this->client->send_request( $data, 'tracking-skipped' );
1020
+        $this->client->send_request($data, 'tracking-skipped');
1021 1021
     }
1022 1022
 
1023 1023
     /**
Please login to merge, or discard this patch.
languages/event_espresso-translations-js.php 1 patch
Spacing   +704 added lines, -704 removed lines patch added patch discarded remove patch
@@ -2,137 +2,137 @@  discard block
 block discarded – undo
2 2
 /* THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. */
3 3
 $generated_i18n_strings = array(
4 4
 	// Reference: packages/ui-components/src/Pagination/constants.ts:6
5
-	__( '2', 'event_espresso' ),
5
+	__('2', 'event_espresso'),
6 6
 
7 7
 	// Reference: packages/ui-components/src/Pagination/constants.ts:7
8
-	__( '6', 'event_espresso' ),
8
+	__('6', 'event_espresso'),
9 9
 
10 10
 	// Reference: packages/ui-components/src/Pagination/constants.ts:8
11
-	__( '12', 'event_espresso' ),
11
+	__('12', 'event_espresso'),
12 12
 
13 13
 	// Reference: packages/ui-components/src/Pagination/constants.ts:9
14
-	__( '24', 'event_espresso' ),
14
+	__('24', 'event_espresso'),
15 15
 
16 16
 	// Reference: packages/ui-components/src/Pagination/constants.ts:10
17
-	__( '48', 'event_espresso' ),
17
+	__('48', 'event_espresso'),
18 18
 
19 19
 	// Reference: domains/core/admin/blocks/src/components/AvatarImage.tsx:27
20
-	__( 'contact avatar', 'event_espresso' ),
20
+	__('contact avatar', 'event_espresso'),
21 21
 
22 22
 	// Reference: domains/core/admin/blocks/src/components/OrderByControl.tsx:12
23
-	__( 'Order by', 'event_espresso' ),
23
+	__('Order by', 'event_espresso'),
24 24
 
25 25
 	// Reference: domains/core/admin/blocks/src/components/RegStatusControl.tsx:17
26 26
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectStatus.tsx:13
27
-	__( 'Select Registration Status', 'event_espresso' ),
27
+	__('Select Registration Status', 'event_espresso'),
28 28
 
29 29
 	// Reference: domains/core/admin/blocks/src/components/SortOrderControl.tsx:14
30
-	__( 'Ascending', 'event_espresso' ),
30
+	__('Ascending', 'event_espresso'),
31 31
 
32 32
 	// Reference: domains/core/admin/blocks/src/components/SortOrderControl.tsx:18
33
-	__( 'Descending', 'event_espresso' ),
33
+	__('Descending', 'event_espresso'),
34 34
 
35 35
 	// Reference: domains/core/admin/blocks/src/components/SortOrderControl.tsx:24
36
-	__( 'Sort order:', 'event_espresso' ),
36
+	__('Sort order:', 'event_espresso'),
37 37
 
38 38
 	// Reference: domains/core/admin/blocks/src/event-attendees/AttendeesDisplay.tsx:41
39
-	__( 'There was some error fetching attendees list', 'event_espresso' ),
39
+	__('There was some error fetching attendees list', 'event_espresso'),
40 40
 
41 41
 	// Reference: domains/core/admin/blocks/src/event-attendees/AttendeesDisplay.tsx:47
42
-	__( 'To get started, select what event you want to show attendees from in the block settings.', 'event_espresso' ),
42
+	__('To get started, select what event you want to show attendees from in the block settings.', 'event_espresso'),
43 43
 
44 44
 	// Reference: domains/core/admin/blocks/src/event-attendees/AttendeesDisplay.tsx:53
45
-	__( 'There are no attendees for selected options.', 'event_espresso' ),
45
+	__('There are no attendees for selected options.', 'event_espresso'),
46 46
 
47 47
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/ArchiveSettings.tsx:12
48
-	__( 'Display on Archives', 'event_espresso' ),
48
+	__('Display on Archives', 'event_espresso'),
49 49
 
50 50
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/ArchiveSettings.tsx:17
51
-	__( 'Attendees are shown whenever this post is listed in an archive view.', 'event_espresso' ),
51
+	__('Attendees are shown whenever this post is listed in an archive view.', 'event_espresso'),
52 52
 
53 53
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/ArchiveSettings.tsx:18
54
-	__( 'Attendees are hidden whenever this post is listed in an archive view.', 'event_espresso' ),
54
+	__('Attendees are hidden whenever this post is listed in an archive view.', 'event_espresso'),
55 55
 
56 56
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/AttendeeLimit.tsx:29
57
-	__( 'Number of Attendees to Display:', 'event_espresso' ),
57
+	__('Number of Attendees to Display:', 'event_espresso'),
58 58
 
59 59
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/AttendeeLimit.tsx:34
60 60
 	/* translators: %d attendees count */
61
-	_n_noop( 'Used to adjust the number of attendees displayed (There is %d total attendee for the current filter settings).', 'Used to adjust the number of attendees displayed (There are %d total attendees for the current filter settings).', 'event_espresso' ),
61
+	_n_noop('Used to adjust the number of attendees displayed (There is %d total attendee for the current filter settings).', 'Used to adjust the number of attendees displayed (There are %d total attendees for the current filter settings).', 'event_espresso'),
62 62
 
63 63
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/GravatarSettings.tsx:27
64
-	__( 'Display Gravatar', 'event_espresso' ),
64
+	__('Display Gravatar', 'event_espresso'),
65 65
 
66 66
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/GravatarSettings.tsx:32
67
-	__( 'Gravatar images are shown for each attendee.', 'event_espresso' ),
67
+	__('Gravatar images are shown for each attendee.', 'event_espresso'),
68 68
 
69 69
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/GravatarSettings.tsx:33
70
-	__( 'No gravatar images are shown for each attendee.', 'event_espresso' ),
70
+	__('No gravatar images are shown for each attendee.', 'event_espresso'),
71 71
 
72 72
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/GravatarSettings.tsx:38
73
-	__( 'Size of Gravatar', 'event_espresso' ),
73
+	__('Size of Gravatar', 'event_espresso'),
74 74
 
75 75
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectDatetime.tsx:22
76
-	__( 'Select Datetime', 'event_espresso' ),
76
+	__('Select Datetime', 'event_espresso'),
77 77
 
78 78
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectEvent.tsx:22
79 79
 	// Reference: domains/core/admin/blocks/src/event/controls/SelectEvent.tsx:22
80
-	__( 'Select Event', 'event_espresso' ),
80
+	__('Select Event', 'event_espresso'),
81 81
 
82 82
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectOrderBy.tsx:11
83
-	__( 'Attendee id', 'event_espresso' ),
83
+	__('Attendee id', 'event_espresso'),
84 84
 
85 85
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectOrderBy.tsx:15
86
-	__( 'Last name only', 'event_espresso' ),
86
+	__('Last name only', 'event_espresso'),
87 87
 
88 88
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectOrderBy.tsx:19
89
-	__( 'First name only', 'event_espresso' ),
89
+	__('First name only', 'event_espresso'),
90 90
 
91 91
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectOrderBy.tsx:23
92
-	__( 'First, then Last name', 'event_espresso' ),
92
+	__('First, then Last name', 'event_espresso'),
93 93
 
94 94
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectOrderBy.tsx:27
95
-	__( 'Last, then First name', 'event_espresso' ),
95
+	__('Last, then First name', 'event_espresso'),
96 96
 
97 97
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectOrderBy.tsx:41
98
-	__( 'Order Attendees by:', 'event_espresso' ),
98
+	__('Order Attendees by:', 'event_espresso'),
99 99
 
100 100
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/SelectTicket.tsx:22
101
-	__( 'Select Ticket', 'event_espresso' ),
101
+	__('Select Ticket', 'event_espresso'),
102 102
 
103 103
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/index.tsx:21
104
-	__( 'Filter By Settings', 'event_espresso' ),
104
+	__('Filter By Settings', 'event_espresso'),
105 105
 
106 106
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/index.tsx:36
107
-	__( 'Gravatar Setttings', 'event_espresso' ),
107
+	__('Gravatar Setttings', 'event_espresso'),
108 108
 
109 109
 	// Reference: domains/core/admin/blocks/src/event-attendees/controls/index.tsx:39
110
-	__( 'Archive Settings', 'event_espresso' ),
110
+	__('Archive Settings', 'event_espresso'),
111 111
 
112 112
 	// Reference: domains/core/admin/blocks/src/event-attendees/index.tsx:10
113
-	__( 'Event Attendees', 'event_espresso' ),
113
+	__('Event Attendees', 'event_espresso'),
114 114
 
115 115
 	// Reference: domains/core/admin/blocks/src/event-attendees/index.tsx:11
116
-	__( 'Displays a list of people that have registered for the specified event', 'event_espresso' ),
116
+	__('Displays a list of people that have registered for the specified event', 'event_espresso'),
117 117
 
118 118
 	// Reference: domains/core/admin/blocks/src/event-attendees/index.tsx:14
119 119
 	// Reference: domains/core/admin/blocks/src/event/index.tsx:12
120 120
 	// Reference: packages/edtr-services/src/constants.ts:25
121
-	__( 'event', 'event_espresso' ),
121
+	__('event', 'event_espresso'),
122 122
 
123 123
 	// Reference: domains/core/admin/blocks/src/event-attendees/index.tsx:14
124
-	__( 'attendees', 'event_espresso' ),
124
+	__('attendees', 'event_espresso'),
125 125
 
126 126
 	// Reference: domains/core/admin/blocks/src/event-attendees/index.tsx:14
127
-	__( 'list', 'event_espresso' ),
127
+	__('list', 'event_espresso'),
128 128
 
129 129
 	// Reference: domains/core/admin/blocks/src/event/DisplayField.tsx:41
130
-	__( 'An unknown error occurred while fetching event details.', 'event_espresso' ),
130
+	__('An unknown error occurred while fetching event details.', 'event_espresso'),
131 131
 
132 132
 	// Reference: domains/core/admin/blocks/src/event/controls/SelectField.tsx:10
133 133
 	// Reference: domains/core/admin/blocks/src/services/utils.ts:24
134 134
 	// Reference: packages/utils/src/list/index.ts:14
135
-	__( 'Select…', 'event_espresso' ),
135
+	__('Select…', 'event_espresso'),
136 136
 
137 137
 	// Reference: domains/core/admin/blocks/src/event/controls/SelectField.tsx:15
138 138
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:75
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:198
142 142
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:49
143 143
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:40
144
-	__( 'Name', 'event_espresso' ),
144
+	__('Name', 'event_espresso'),
145 145
 
146 146
 	// Reference: domains/core/admin/blocks/src/event/controls/SelectField.tsx:19
147 147
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:80
@@ -149,404 +149,404 @@  discard block
 block discarded – undo
149 149
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:203
150 150
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:55
151 151
 	// Reference: packages/tpc/src/components/table/useHeaderRowGenerator.ts:47
152
-	__( 'Description', 'event_espresso' ),
152
+	__('Description', 'event_espresso'),
153 153
 
154 154
 	// Reference: domains/core/admin/blocks/src/event/controls/SelectField.tsx:23
155
-	__( 'Short description', 'event_espresso' ),
155
+	__('Short description', 'event_espresso'),
156 156
 
157 157
 	// Reference: domains/core/admin/blocks/src/event/controls/SelectField.tsx:35
158
-	__( 'Select Field', 'event_espresso' ),
158
+	__('Select Field', 'event_espresso'),
159 159
 
160 160
 	// Reference: domains/core/admin/blocks/src/event/controls/index.tsx:27
161
-	__( 'Text Color', 'event_espresso' ),
161
+	__('Text Color', 'event_espresso'),
162 162
 
163 163
 	// Reference: domains/core/admin/blocks/src/event/controls/index.tsx:32
164
-	__( 'Background Color', 'event_espresso' ),
164
+	__('Background Color', 'event_espresso'),
165 165
 
166 166
 	// Reference: domains/core/admin/blocks/src/event/controls/index.tsx:41
167 167
 	// Reference: packages/form-builder/src/FormElement/Tabs/FormElementTabs.tsx:22
168 168
 	// Reference: packages/form-builder/src/FormSection/Tabs/FormSectionTabs.tsx:21
169
-	__( 'Settings', 'event_espresso' ),
169
+	__('Settings', 'event_espresso'),
170 170
 
171 171
 	// Reference: domains/core/admin/blocks/src/event/controls/index.tsx:45
172
-	__( 'Typography', 'event_espresso' ),
172
+	__('Typography', 'event_espresso'),
173 173
 
174 174
 	// Reference: domains/core/admin/blocks/src/event/controls/index.tsx:48
175
-	__( 'Color', 'event_espresso' ),
175
+	__('Color', 'event_espresso'),
176 176
 
177 177
 	// Reference: domains/core/admin/blocks/src/event/index.tsx:12
178
-	__( 'field', 'event_espresso' ),
178
+	__('field', 'event_espresso'),
179 179
 
180 180
 	// Reference: domains/core/admin/blocks/src/event/index.tsx:8
181
-	__( 'Event Field', 'event_espresso' ),
181
+	__('Event Field', 'event_espresso'),
182 182
 
183 183
 	// Reference: domains/core/admin/blocks/src/event/index.tsx:9
184
-	__( 'Displays the selected field of an event', 'event_espresso' ),
184
+	__('Displays the selected field of an event', 'event_espresso'),
185 185
 
186 186
 	// Reference: domains/core/admin/blocks/src/services/utils.ts:17
187
-	__( 'Error', 'event_espresso' ),
187
+	__('Error', 'event_espresso'),
188 188
 
189 189
 	// Reference: domains/core/admin/blocks/src/services/utils.ts:9
190
-	__( 'Loading…', 'event_espresso' ),
190
+	__('Loading…', 'event_espresso'),
191 191
 
192 192
 	// Reference: domains/core/admin/eventEditor/src/ui/EventDescription.tsx:33
193
-	__( 'Event Description', 'event_espresso' ),
193
+	__('Event Description', 'event_espresso'),
194 194
 
195 195
 	// Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/ActiveStatus.tsx:28
196
-	__( 'Active status', 'event_espresso' ),
196
+	__('Active status', 'event_espresso'),
197 197
 
198 198
 	// Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/AltRegPage.tsx:12
199
-	__( 'Alternative Registration Page', 'event_espresso' ),
199
+	__('Alternative Registration Page', 'event_espresso'),
200 200
 
201 201
 	// Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/DefaultRegistrationStatus.tsx:25
202
-	__( 'Default Registration Status', 'event_espresso' ),
202
+	__('Default Registration Status', 'event_espresso'),
203 203
 
204 204
 	// Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/Donations.tsx:8
205
-	__( 'Donations Enabled', 'event_espresso' ),
205
+	__('Donations Enabled', 'event_espresso'),
206 206
 
207 207
 	// Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/Donations.tsx:8
208
-	__( 'Donations Disabled', 'event_espresso' ),
208
+	__('Donations Disabled', 'event_espresso'),
209 209
 
210 210
 	// Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/EventManager.tsx:16
211
-	__( 'Event Manager', 'event_espresso' ),
211
+	__('Event Manager', 'event_espresso'),
212 212
 
213 213
 	// Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/EventPhoneNumber.tsx:15
214
-	__( 'Event Phone Number', 'event_espresso' ),
214
+	__('Event Phone Number', 'event_espresso'),
215 215
 
216 216
 	// Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/MaxRegistrations.tsx:13
217
-	__( 'Max Registrations per Transaction', 'event_espresso' ),
217
+	__('Max Registrations per Transaction', 'event_espresso'),
218 218
 
219 219
 	// Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/TicketSelector.tsx:8
220
-	__( 'Ticket Selector Enabled', 'event_espresso' ),
220
+	__('Ticket Selector Enabled', 'event_espresso'),
221 221
 
222 222
 	// Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/TicketSelector.tsx:8
223
-	__( 'Ticket Selector Disabled', 'event_espresso' ),
223
+	__('Ticket Selector Disabled', 'event_espresso'),
224 224
 
225 225
 	// Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/index.tsx:41
226
-	__( 'Event Details', 'event_espresso' ),
226
+	__('Event Details', 'event_espresso'),
227 227
 
228 228
 	// Reference: domains/core/admin/eventEditor/src/ui/EventRegistrationOptions/index.tsx:47
229
-	__( 'Registration Options', 'event_espresso' ),
229
+	__('Registration Options', 'event_espresso'),
230 230
 
231 231
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/multiStep/DateFormSteps.tsx:10
232
-	__( 'primary information about the date', 'event_espresso' ),
232
+	__('primary information about the date', 'event_espresso'),
233 233
 
234 234
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/multiStep/DateFormSteps.tsx:10
235
-	__( 'Date Details', 'event_espresso' ),
235
+	__('Date Details', 'event_espresso'),
236 236
 
237 237
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/multiStep/DateFormSteps.tsx:11
238 238
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/TicketFormSteps.tsx:16
239 239
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/TicketFormSteps.tsx:16
240
-	__( 'relations between tickets and dates', 'event_espresso' ),
240
+	__('relations between tickets and dates', 'event_espresso'),
241 241
 
242 242
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/multiStep/DateFormSteps.tsx:11
243
-	__( 'Assign Tickets', 'event_espresso' ),
243
+	__('Assign Tickets', 'event_espresso'),
244 244
 
245 245
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/multiStep/FooterButtons.tsx:22
246
-	__( 'Save and assign tickets', 'event_espresso' ),
246
+	__('Save and assign tickets', 'event_espresso'),
247 247
 
248 248
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/multiStep/Modal.tsx:27
249 249
 	/* translators: %s datetime id */
250
-	__( 'Edit datetime %s', 'event_espresso' ),
250
+	__('Edit datetime %s', 'event_espresso'),
251 251
 
252 252
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/multiStep/Modal.tsx:30
253
-	__( 'New Datetime', 'event_espresso' ),
253
+	__('New Datetime', 'event_espresso'),
254 254
 
255 255
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:110
256 256
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/useBulkEditFormConfig.ts:108
257 257
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:233
258 258
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:108
259
-	__( 'Details', 'event_espresso' ),
259
+	__('Details', 'event_espresso'),
260 260
 
261 261
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:114
262 262
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/useBulkEditFormConfig.ts:112
263 263
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:81
264
-	__( 'Capacity', 'event_espresso' ),
264
+	__('Capacity', 'event_espresso'),
265 265
 
266 266
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:119
267
-	__( 'The maximum number of registrants that can attend the event at this particular date.', 'event_espresso' ),
267
+	__('The maximum number of registrants that can attend the event at this particular date.', 'event_espresso'),
268 268
 
269 269
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:123
270
-	__( 'Set to 0 to close registration or leave blank for no limit.', 'event_espresso' ),
270
+	__('Set to 0 to close registration or leave blank for no limit.', 'event_espresso'),
271 271
 
272 272
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:129
273 273
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:171
274
-	__( 'Trash', 'event_espresso' ),
274
+	__('Trash', 'event_espresso'),
275 275
 
276 276
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:71
277 277
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/useBulkEditFormConfig.ts:45
278 278
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:194
279 279
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:45
280
-	__( 'Basics', 'event_espresso' ),
280
+	__('Basics', 'event_espresso'),
281 281
 
282 282
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:88
283 283
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/useBulkEditFormConfig.ts:63
284 284
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:63
285
-	__( 'Dates', 'event_espresso' ),
285
+	__('Dates', 'event_espresso'),
286 286
 
287 287
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:92
288 288
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:51
289 289
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:215
290
-	__( 'Start Date', 'event_espresso' ),
290
+	__('Start Date', 'event_espresso'),
291 291
 
292 292
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/dateForm/useDateFormConfig.ts:99
293 293
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:65
294 294
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:222
295
-	__( 'End Date', 'event_espresso' ),
295
+	__('End Date', 'event_espresso'),
296 296
 
297 297
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/DateRegistrationsLink.tsx:13
298
-	__( 'view ALL registrations for this date.', 'event_espresso' ),
298
+	__('view ALL registrations for this date.', 'event_espresso'),
299 299
 
300 300
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/DateSoldLink.tsx:13
301
-	__( 'view approved registrations for this date.', 'event_espresso' ),
301
+	__('view approved registrations for this date.', 'event_espresso'),
302 302
 
303 303
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/DatesList.tsx:35
304 304
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/TableView.tsx:33
305
-	__( 'Event Dates', 'event_espresso' ),
305
+	__('Event Dates', 'event_espresso'),
306 306
 
307 307
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/DatesList.tsx:38
308
-	__( 'loading event dates…', 'event_espresso' ),
308
+	__('loading event dates…', 'event_espresso'),
309 309
 
310 310
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/DatesListButtons.tsx:22
311
-	__( 'Add a date or a ticket in order to use Ticket Assignment Manager', 'event_espresso' ),
311
+	__('Add a date or a ticket in order to use Ticket Assignment Manager', 'event_espresso'),
312 312
 
313 313
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/DatesListButtons.tsx:32
314
-	__( 'Ticket Assignments', 'event_espresso' ),
314
+	__('Ticket Assignments', 'event_espresso'),
315 315
 
316 316
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/AssignTicketsButton.tsx:25
317
-	__( 'Number of related tickets', 'event_espresso' ),
317
+	__('Number of related tickets', 'event_espresso'),
318 318
 
319 319
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/AssignTicketsButton.tsx:26
320
-	__( 'There are no tickets assigned to this datetime. Please click the ticket icon to update the assignments.', 'event_espresso' ),
320
+	__('There are no tickets assigned to this datetime. Please click the ticket icon to update the assignments.', 'event_espresso'),
321 321
 
322 322
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/AssignTicketsButton.tsx:34
323
-	__( 'assign tickets', 'event_espresso' ),
323
+	__('assign tickets', 'event_espresso'),
324 324
 
325 325
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DateMainMenu.tsx:21
326
-	__( 'event date main menu', 'event_espresso' ),
326
+	__('event date main menu', 'event_espresso'),
327 327
 
328 328
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DateMainMenu.tsx:33
329
-	__( 'edit datetime', 'event_espresso' ),
329
+	__('edit datetime', 'event_espresso'),
330 330
 
331 331
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DateMainMenu.tsx:34
332
-	__( 'copy datetime', 'event_espresso' ),
332
+	__('copy datetime', 'event_espresso'),
333 333
 
334 334
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DeleteDatetime.tsx:15
335 335
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/DeleteTicket.tsx:48
336
-	__( 'delete permanently', 'event_espresso' ),
336
+	__('delete permanently', 'event_espresso'),
337 337
 
338 338
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DeleteDatetime.tsx:15
339
-	__( 'trash datetime', 'event_espresso' ),
339
+	__('trash datetime', 'event_espresso'),
340 340
 
341 341
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DeleteDatetime.tsx:18
342
-	__( 'Permanently Delete Datetime?', 'event_espresso' ),
342
+	__('Permanently Delete Datetime?', 'event_espresso'),
343 343
 
344 344
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DeleteDatetime.tsx:18
345
-	__( 'Move Datetime to Trash?', 'event_espresso' ),
345
+	__('Move Datetime to Trash?', 'event_espresso'),
346 346
 
347 347
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DeleteDatetime.tsx:20
348
-	__( 'Are you sure you want to permanently delete this datetime? This action is permanent and can not be undone.', 'event_espresso' ),
348
+	__('Are you sure you want to permanently delete this datetime? This action is permanent and can not be undone.', 'event_espresso'),
349 349
 
350 350
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DeleteDatetime.tsx:23
351
-	__( 'Are you sure you want to move this datetime to the trash? You can "untrash" this datetime later if you need to.', 'event_espresso' ),
351
+	__('Are you sure you want to move this datetime to the trash? You can "untrash" this datetime later if you need to.', 'event_espresso'),
352 352
 
353 353
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/actionsMenu/dropdown/DeleteDatetime.tsx:33
354
-	__( 'delete', 'event_espresso' ),
354
+	__('delete', 'event_espresso'),
355 355
 
356 356
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/actions/Actions.tsx:36
357 357
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/actions/Actions.tsx:40
358 358
 	// Reference: packages/ui-components/src/bulkEdit/BulkActions.tsx:43
359
-	__( 'bulk actions', 'event_espresso' ),
359
+	__('bulk actions', 'event_espresso'),
360 360
 
361 361
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/actions/Actions.tsx:40
362
-	__( 'edit datetime details', 'event_espresso' ),
362
+	__('edit datetime details', 'event_espresso'),
363 363
 
364 364
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/actions/Actions.tsx:44
365
-	__( 'delete datetimes', 'event_espresso' ),
365
+	__('delete datetimes', 'event_espresso'),
366 366
 
367 367
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/actions/Actions.tsx:44
368
-	__( 'trash datetimes', 'event_espresso' ),
368
+	__('trash datetimes', 'event_espresso'),
369 369
 
370 370
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/delete/Delete.tsx:14
371
-	__( 'Are you sure you want to permanently delete these datetimes? This action can NOT be undone!', 'event_espresso' ),
371
+	__('Are you sure you want to permanently delete these datetimes? This action can NOT be undone!', 'event_espresso'),
372 372
 
373 373
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/delete/Delete.tsx:15
374
-	__( 'Are you sure you want to trash these datetimes?', 'event_espresso' ),
374
+	__('Are you sure you want to trash these datetimes?', 'event_espresso'),
375 375
 
376 376
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/delete/Delete.tsx:16
377
-	__( 'Delete datetimes permanently', 'event_espresso' ),
377
+	__('Delete datetimes permanently', 'event_espresso'),
378 378
 
379 379
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/delete/Delete.tsx:16
380
-	__( 'Trash datetimes', 'event_espresso' ),
380
+	__('Trash datetimes', 'event_espresso'),
381 381
 
382 382
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/EditDetails.tsx:21
383
-	__( 'Bulk edit date details', 'event_espresso' ),
383
+	__('Bulk edit date details', 'event_espresso'),
384 384
 
385 385
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/EditDetails.tsx:22
386
-	__( 'any changes will be applied to ALL of the selected dates.', 'event_espresso' ),
386
+	__('any changes will be applied to ALL of the selected dates.', 'event_espresso'),
387 387
 
388 388
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/formValidation.ts:12
389 389
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/formValidation.ts:12
390
-	__( 'Name must be at least three characters', 'event_espresso' ),
390
+	__('Name must be at least three characters', 'event_espresso'),
391 391
 
392 392
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/useBulkEditFormConfig.ts:67
393 393
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:67
394
-	__( 'Shift dates', 'event_espresso' ),
394
+	__('Shift dates', 'event_espresso'),
395 395
 
396 396
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/useBulkEditFormConfig.ts:92
397 397
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:92
398
-	__( 'earlier', 'event_espresso' ),
398
+	__('earlier', 'event_espresso'),
399 399
 
400 400
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/bulkEdit/details/useBulkEditFormConfig.ts:96
401 401
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:96
402
-	__( 'later', 'event_espresso' ),
402
+	__('later', 'event_espresso'),
403 403
 
404 404
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateCapacity.tsx:31
405 405
 	/* translators: click to edit capacity<linebreak>(registration limit)… */
406
-	__( 'click to edit capacity%s(registration limit)…', 'event_espresso' ),
406
+	__('click to edit capacity%s(registration limit)…', 'event_espresso'),
407 407
 
408 408
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateCardSidebar.tsx:31
409 409
 	// Reference: packages/ee-components/src/SimpleTicketCard/SimpleTicketCard.tsx:27
410 410
 	// Reference: packages/ui-components/src/CalendarDateSwitcher/CalendarDateSwitcher.tsx:34
411
-	__( 'starts', 'event_espresso' ),
411
+	__('starts', 'event_espresso'),
412 412
 
413 413
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateCardSidebar.tsx:32
414 414
 	// Reference: packages/ee-components/src/SimpleTicketCard/SimpleTicketCard.tsx:34
415 415
 	// Reference: packages/ui-components/src/CalendarDateSwitcher/CalendarDateSwitcher.tsx:47
416
-	__( 'ends', 'event_espresso' ),
416
+	__('ends', 'event_espresso'),
417 417
 
418 418
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateCardSidebar.tsx:32
419
-	__( 'started', 'event_espresso' ),
419
+	__('started', 'event_espresso'),
420 420
 
421 421
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateCardSidebar.tsx:32
422
-	__( 'ended', 'event_espresso' ),
422
+	__('ended', 'event_espresso'),
423 423
 
424 424
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateCardSidebar.tsx:46
425
-	__( 'Edit Event Date', 'event_espresso' ),
425
+	__('Edit Event Date', 'event_espresso'),
426 426
 
427 427
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateCardSidebar.tsx:50
428
-	__( 'edit start and end dates', 'event_espresso' ),
428
+	__('edit start and end dates', 'event_espresso'),
429 429
 
430 430
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateDetailsPanel.tsx:16
431 431
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketDetailsPanel.tsx:16
432
-	__( 'sold', 'event_espresso' ),
432
+	__('sold', 'event_espresso'),
433 433
 
434 434
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateDetailsPanel.tsx:21
435
-	__( 'capacity', 'event_espresso' ),
435
+	__('capacity', 'event_espresso'),
436 436
 
437 437
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/DateDetailsPanel.tsx:27
438 438
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketDetailsPanel.tsx:26
439
-	__( 'reg list', 'event_espresso' ),
439
+	__('reg list', 'event_espresso'),
440 440
 
441 441
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/Details.tsx:43
442 442
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/Details.tsx:35
443
-	__( 'add description…', 'event_espresso' ),
443
+	__('add description…', 'event_espresso'),
444 444
 
445 445
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/Details.tsx:44
446 446
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/Details.tsx:36
447
-	__( 'Edit description', 'event_espresso' ),
447
+	__('Edit description', 'event_espresso'),
448 448
 
449 449
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/cardView/Details.tsx:45
450 450
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/Details.tsx:37
451
-	__( 'click to edit description…', 'event_espresso' ),
451
+	__('click to edit description…', 'event_espresso'),
452 452
 
453 453
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:10
454
-	__( 'Move Date to Trash', 'event_espresso' ),
454
+	__('Move Date to Trash', 'event_espresso'),
455 455
 
456 456
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:13
457 457
 	// Reference: packages/constants/src/datetime.ts:6
458
-	__( 'Active', 'event_espresso' ),
458
+	__('Active', 'event_espresso'),
459 459
 
460 460
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:14
461 461
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:13
462
-	__( 'Trashed', 'event_espresso' ),
462
+	__('Trashed', 'event_espresso'),
463 463
 
464 464
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:15
465 465
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:14
466 466
 	// Reference: packages/constants/src/datetime.ts:8
467
-	__( 'Expired', 'event_espresso' ),
467
+	__('Expired', 'event_espresso'),
468 468
 
469 469
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:16
470 470
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:16
471
-	__( 'Sold Out', 'event_espresso' ),
471
+	__('Sold Out', 'event_espresso'),
472 472
 
473 473
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:17
474 474
 	// Reference: packages/constants/src/datetime.ts:12
475
-	__( 'Upcoming', 'event_espresso' ),
475
+	__('Upcoming', 'event_espresso'),
476 476
 
477 477
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:7
478
-	__( 'Edit Event Date Details', 'event_espresso' ),
478
+	__('Edit Event Date Details', 'event_espresso'),
479 479
 
480 480
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:8
481
-	__( 'View Registrations for this Date', 'event_espresso' ),
481
+	__('View Registrations for this Date', 'event_espresso'),
482 482
 
483 483
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/config.ts:9
484
-	__( 'Manage Ticket Assignments', 'event_espresso' ),
484
+	__('Manage Ticket Assignments', 'event_espresso'),
485 485
 
486 486
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/editable/EditableName.tsx:41
487 487
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/editable/EditableName.tsx:41
488
-	__( 'click to edit title…', 'event_espresso' ),
488
+	__('click to edit title…', 'event_espresso'),
489 489
 
490 490
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/editable/EditableName.tsx:42
491 491
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/editable/EditableName.tsx:42
492
-	__( 'add title…', 'event_espresso' ),
492
+	__('add title…', 'event_espresso'),
493 493
 
494 494
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/ActiveDatesFilters.tsx:17
495 495
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/ActiveTicketsFilters.tsx:17
496
-	__( 'ON', 'event_espresso' ),
496
+	__('ON', 'event_espresso'),
497 497
 
498 498
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:10
499
-	__( 'end dates only', 'event_espresso' ),
499
+	__('end dates only', 'event_espresso'),
500 500
 
501 501
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:11
502
-	__( 'start and end dates', 'event_espresso' ),
502
+	__('start and end dates', 'event_espresso'),
503 503
 
504 504
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:16
505
-	__( 'dates above 90% capacity', 'event_espresso' ),
505
+	__('dates above 90% capacity', 'event_espresso'),
506 506
 
507 507
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:17
508
-	__( 'dates above 75% capacity', 'event_espresso' ),
508
+	__('dates above 75% capacity', 'event_espresso'),
509 509
 
510 510
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:18
511
-	__( 'dates above 50% capacity', 'event_espresso' ),
511
+	__('dates above 50% capacity', 'event_espresso'),
512 512
 
513 513
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:19
514
-	__( 'dates below 50% capacity', 'event_espresso' ),
514
+	__('dates below 50% capacity', 'event_espresso'),
515 515
 
516 516
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:23
517
-	__( 'all dates', 'event_espresso' ),
517
+	__('all dates', 'event_espresso'),
518 518
 
519 519
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:24
520
-	__( 'all active and upcoming', 'event_espresso' ),
520
+	__('all active and upcoming', 'event_espresso'),
521 521
 
522 522
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:25
523
-	__( 'active dates only', 'event_espresso' ),
523
+	__('active dates only', 'event_espresso'),
524 524
 
525 525
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:26
526
-	__( 'upcoming dates only', 'event_espresso' ),
526
+	__('upcoming dates only', 'event_espresso'),
527 527
 
528 528
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:27
529
-	__( 'next active or upcoming only', 'event_espresso' ),
529
+	__('next active or upcoming only', 'event_espresso'),
530 530
 
531 531
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:28
532
-	__( 'sold out dates only', 'event_espresso' ),
532
+	__('sold out dates only', 'event_espresso'),
533 533
 
534 534
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:29
535
-	__( 'recently expired dates', 'event_espresso' ),
535
+	__('recently expired dates', 'event_espresso'),
536 536
 
537 537
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:30
538
-	__( 'all expired dates', 'event_espresso' ),
538
+	__('all expired dates', 'event_espresso'),
539 539
 
540 540
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:31
541
-	__( 'trashed dates only', 'event_espresso' ),
541
+	__('trashed dates only', 'event_espresso'),
542 542
 
543 543
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:35
544 544
 	// Reference: packages/dates/src/components/DateRangePicker/DateRangePickerLegend.tsx:9
545 545
 	// Reference: packages/dates/src/components/DateRangePicker/index.tsx:61
546
-	__( 'start date', 'event_espresso' ),
546
+	__('start date', 'event_espresso'),
547 547
 
548 548
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:36
549
-	__( 'name', 'event_espresso' ),
549
+	__('name', 'event_espresso'),
550 550
 
551 551
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:37
552 552
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:31
@@ -554,180 +554,180 @@  discard block
 block discarded – undo
554 554
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/table/HeaderCell.tsx:27
555 555
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:31
556 556
 	// Reference: packages/tpc/src/components/table/useHeaderRowGenerator.ts:23
557
-	__( 'ID', 'event_espresso' ),
557
+	__('ID', 'event_espresso'),
558 558
 
559 559
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:38
560 560
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:47
561
-	__( 'custom order', 'event_espresso' ),
561
+	__('custom order', 'event_espresso'),
562 562
 
563 563
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:42
564 564
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:51
565
-	__( 'display', 'event_espresso' ),
565
+	__('display', 'event_espresso'),
566 566
 
567 567
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:43
568
-	__( 'recurrence', 'event_espresso' ),
568
+	__('recurrence', 'event_espresso'),
569 569
 
570 570
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:44
571 571
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:53
572
-	__( 'sales', 'event_espresso' ),
572
+	__('sales', 'event_espresso'),
573 573
 
574 574
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:45
575 575
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:55
576
-	__( 'sort by', 'event_espresso' ),
576
+	__('sort by', 'event_espresso'),
577 577
 
578 578
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:46
579 579
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:54
580 580
 	// Reference: packages/ee-components/src/EntityList/EntityListFilterBar.tsx:46
581
-	__( 'search', 'event_espresso' ),
581
+	__('search', 'event_espresso'),
582 582
 
583 583
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:47
584 584
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:56
585
-	__( 'status', 'event_espresso' ),
585
+	__('status', 'event_espresso'),
586 586
 
587 587
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/filterBar/controls/options.ts:9
588
-	__( 'start dates only', 'event_espresso' ),
588
+	__('start dates only', 'event_espresso'),
589 589
 
590 590
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/newDateOptions/AddSingleDate.tsx:26
591 591
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/newDateOptions/NewDateModal.tsx:12
592 592
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/newDateOptions/OptionsModalButton.tsx:18
593
-	__( 'Add New Date', 'event_espresso' ),
593
+	__('Add New Date', 'event_espresso'),
594 594
 
595 595
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/newDateOptions/AddSingleDate.tsx:26
596
-	__( 'Add Single Date', 'event_espresso' ),
596
+	__('Add Single Date', 'event_espresso'),
597 597
 
598 598
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/newDateOptions/AddSingleDate.tsx:44
599
-	__( 'Add a single date that only occurs once', 'event_espresso' ),
599
+	__('Add a single date that only occurs once', 'event_espresso'),
600 600
 
601 601
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/newDateOptions/AddSingleDate.tsx:46
602
-	__( 'Single Date', 'event_espresso' ),
602
+	__('Single Date', 'event_espresso'),
603 603
 
604 604
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:106
605
-	__( 'Reg list', 'event_espresso' ),
605
+	__('Reg list', 'event_espresso'),
606 606
 
607 607
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:107
608 608
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:111
609
-	__( 'Regs', 'event_espresso' ),
609
+	__('Regs', 'event_espresso'),
610 610
 
611 611
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:122
612 612
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:126
613 613
 	// Reference: packages/tpc/src/components/table/useHeaderRowGenerator.ts:59
614
-	__( 'Actions', 'event_espresso' ),
614
+	__('Actions', 'event_espresso'),
615 615
 
616 616
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:52
617
-	__( 'Start', 'event_espresso' ),
617
+	__('Start', 'event_espresso'),
618 618
 
619 619
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:66
620
-	__( 'End', 'event_espresso' ),
620
+	__('End', 'event_espresso'),
621 621
 
622 622
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:82
623
-	__( 'Cap', 'event_espresso' ),
623
+	__('Cap', 'event_espresso'),
624 624
 
625 625
 	// Reference: domains/core/admin/eventEditor/src/ui/datetimes/datesList/tableView/useHeaderRowGenerator.tsx:94
626 626
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:98
627
-	__( 'Sold', 'event_espresso' ),
627
+	__('Sold', 'event_espresso'),
628 628
 
629 629
 	// Reference: domains/core/admin/eventEditor/src/ui/registrationForm/ErrorMessage.tsx:33
630 630
 	// Reference: packages/form-builder/src/constants.ts:67
631
-	__( 'Text Input', 'event_espresso' ),
631
+	__('Text Input', 'event_espresso'),
632 632
 
633 633
 	// Reference: domains/core/admin/eventEditor/src/ui/registrationForm/ErrorMessage.tsx:34
634 634
 	// Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:32
635
-	__( 'Attendee First Name', 'event_espresso' ),
635
+	__('Attendee First Name', 'event_espresso'),
636 636
 
637 637
 	// Reference: domains/core/admin/eventEditor/src/ui/registrationForm/ErrorMessage.tsx:39
638 638
 	/* translators: field name */
639
-	__( 'Registration form must have a field of type "%1$s" which maps to "%2$s"', 'event_espresso' ),
639
+	__('Registration form must have a field of type "%1$s" which maps to "%2$s"', 'event_espresso'),
640 640
 
641 641
 	// Reference: domains/core/admin/eventEditor/src/ui/registrationForm/ErrorMessage.tsx:40
642 642
 	// Reference: packages/form-builder/src/constants.ts:82
643
-	__( 'Email Address', 'event_espresso' ),
643
+	__('Email Address', 'event_espresso'),
644 644
 
645 645
 	// Reference: domains/core/admin/eventEditor/src/ui/registrationForm/ErrorMessage.tsx:41
646 646
 	// Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:40
647
-	__( 'Attendee Email Address', 'event_espresso' ),
647
+	__('Attendee Email Address', 'event_espresso'),
648 648
 
649 649
 	// Reference: domains/core/admin/eventEditor/src/ui/registrationForm/ErrorMessage.tsx:49
650
-	__( 'Please add the required fields', 'event_espresso' ),
650
+	__('Please add the required fields', 'event_espresso'),
651 651
 
652 652
 	// Reference: domains/core/admin/eventEditor/src/ui/registrationForm/RegistrationForm.tsx:12
653
-	__( 'Registration Form', 'event_espresso' ),
653
+	__('Registration Form', 'event_espresso'),
654 654
 
655 655
 	// Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:13
656
-	__( 'primary registrant', 'event_espresso' ),
656
+	__('primary registrant', 'event_espresso'),
657 657
 
658 658
 	// Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:17
659
-	__( 'purchaser', 'event_espresso' ),
659
+	__('purchaser', 'event_espresso'),
660 660
 
661 661
 	// Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:21
662
-	__( 'registrants', 'event_espresso' ),
662
+	__('registrants', 'event_espresso'),
663 663
 
664 664
 	// Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:36
665
-	__( 'Attendee Last Name', 'event_espresso' ),
665
+	__('Attendee Last Name', 'event_espresso'),
666 666
 
667 667
 	// Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:44
668
-	__( 'Attendee Address', 'event_espresso' ),
668
+	__('Attendee Address', 'event_espresso'),
669 669
 
670 670
 	// Reference: domains/core/admin/eventEditor/src/ui/registrationForm/constants.ts:9
671
-	__( 'all', 'event_espresso' ),
671
+	__('all', 'event_espresso'),
672 672
 
673 673
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/ErrorMessage.tsx:18
674
-	__( 'Tickets must always have at least one date assigned to them but one or more of the tickets below does not have any. 
675
-Please correct the assignments for the highlighted cells.', 'event_espresso' ),
674
+	__('Tickets must always have at least one date assigned to them but one or more of the tickets below does not have any. 
675
+Please correct the assignments for the highlighted cells.', 'event_espresso'),
676 676
 
677 677
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/ErrorMessage.tsx:22
678
-	__( 'Event Dates must always have at least one Ticket assigned to them but one or more of the Event Dates below does not have any. 
679
-Please correct the assignments for the highlighted cells.', 'event_espresso' ),
678
+	__('Event Dates must always have at least one Ticket assigned to them but one or more of the Event Dates below does not have any. 
679
+Please correct the assignments for the highlighted cells.', 'event_espresso'),
680 680
 
681 681
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/ErrorMessage.tsx:32
682
-	__( 'Please Update Assignments', 'event_espresso' ),
682
+	__('Please Update Assignments', 'event_espresso'),
683 683
 
684 684
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/ModalContainer.tsx:26
685
-	__( 'There seem to be some dates/tickets which have no tickets/dates assigned. Do you want to fix them now?', 'event_espresso' ),
685
+	__('There seem to be some dates/tickets which have no tickets/dates assigned. Do you want to fix them now?', 'event_espresso'),
686 686
 
687 687
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/ModalContainer.tsx:29
688
-	__( 'Alert!', 'event_espresso' ),
688
+	__('Alert!', 'event_espresso'),
689 689
 
690 690
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/ModalContainer.tsx:42
691 691
 	/* translators: 1 entity id, 2 entity name */
692
-	__( 'Ticket Assignment Manager for Datetime: %1$s - %2$s', 'event_espresso' ),
692
+	__('Ticket Assignment Manager for Datetime: %1$s - %2$s', 'event_espresso'),
693 693
 
694 694
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/ModalContainer.tsx:49
695 695
 	/* translators: 1 entity id, 2 entity name */
696
-	__( 'Ticket Assignment Manager for Ticket: %1$s - %2$s', 'event_espresso' ),
696
+	__('Ticket Assignment Manager for Ticket: %1$s - %2$s', 'event_espresso'),
697 697
 
698 698
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/TicketAssignmentsManagerModal.tsx:28
699 699
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/table/Table.tsx:13
700
-	__( 'Ticket Assignment Manager', 'event_espresso' ),
700
+	__('Ticket Assignment Manager', 'event_espresso'),
701 701
 
702 702
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/config.ts:10
703
-	__( 'existing relation', 'event_espresso' ),
703
+	__('existing relation', 'event_espresso'),
704 704
 
705 705
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/config.ts:15
706
-	__( 'remove existing relation', 'event_espresso' ),
706
+	__('remove existing relation', 'event_espresso'),
707 707
 
708 708
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/config.ts:20
709
-	__( 'add new relation', 'event_espresso' ),
709
+	__('add new relation', 'event_espresso'),
710 710
 
711 711
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/config.ts:25
712
-	__( 'invalid relation', 'event_espresso' ),
712
+	__('invalid relation', 'event_espresso'),
713 713
 
714 714
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/config.ts:29
715
-	__( 'no relation', 'event_espresso' ),
715
+	__('no relation', 'event_espresso'),
716 716
 
717 717
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/table/BodyCell.tsx:23
718
-	__( 'assign ticket', 'event_espresso' ),
718
+	__('assign ticket', 'event_espresso'),
719 719
 
720 720
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/table/useGetHeaderRows.tsx:15
721
-	__( 'Assignments', 'event_espresso' ),
721
+	__('Assignments', 'event_espresso'),
722 722
 
723 723
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/table/useGetHeaderRows.tsx:16
724
-	__( 'Event Dates are listed below', 'event_espresso' ),
724
+	__('Event Dates are listed below', 'event_espresso'),
725 725
 
726 726
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/table/useGetHeaderRows.tsx:17
727
-	__( 'Tickets are listed along the top', 'event_espresso' ),
727
+	__('Tickets are listed along the top', 'event_espresso'),
728 728
 
729 729
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/table/useGetHeaderRows.tsx:18
730
-	__( 'Click the cell buttons to toggle assigments', 'event_espresso' ),
730
+	__('Click the cell buttons to toggle assigments', 'event_espresso'),
731 731
 
732 732
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/components/useSubmitButtonProps.ts:29
733 733
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/buttons/FooterButtons.tsx:16
@@ -736,1547 +736,1547 @@  discard block
 block discarded – undo
736 736
 	// Reference: packages/tpc/src/buttons/useSubmitButtonProps.tsx:29
737 737
 	// Reference: packages/ui-components/src/Modal/useSubmitButtonProps.tsx:13
738 738
 	// Reference: packages/ui-components/src/Stepper/buttons/Submit.tsx:7
739
-	__( 'Submit', 'event_espresso' ),
739
+	__('Submit', 'event_espresso'),
740 740
 
741 741
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/filters/controls/DatesByMonthControl.tsx:20
742
-	__( 'All Dates', 'event_espresso' ),
742
+	__('All Dates', 'event_espresso'),
743 743
 
744 744
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/filters/controls/DatesByMonthControl.tsx:27
745
-	__( 'dates by month', 'event_espresso' ),
745
+	__('dates by month', 'event_espresso'),
746 746
 
747 747
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/filters/controls/ShowExpiredTicketsControl.tsx:16
748
-	__( 'show expired tickets', 'event_espresso' ),
748
+	__('show expired tickets', 'event_espresso'),
749 749
 
750 750
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/filters/controls/ShowTrashedDatesControl.tsx:13
751
-	__( 'show trashed dates', 'event_espresso' ),
751
+	__('show trashed dates', 'event_espresso'),
752 752
 
753 753
 	// Reference: domains/core/admin/eventEditor/src/ui/ticketAssignmentsManager/filters/controls/ShowTrashedTicketsControl.tsx:16
754
-	__( 'show trashed tickets', 'event_espresso' ),
754
+	__('show trashed tickets', 'event_espresso'),
755 755
 
756 756
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/Container.tsx:38
757 757
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actions/Actions.tsx:25
758
-	__( 'Default tickets', 'event_espresso' ),
758
+	__('Default tickets', 'event_espresso'),
759 759
 
760 760
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/ModalBody.tsx:63
761 761
 	// Reference: packages/edtr-services/src/constants.ts:26
762
-	__( 'ticket', 'event_espresso' ),
762
+	__('ticket', 'event_espresso'),
763 763
 
764 764
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/FooterButtons.tsx:26
765 765
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/FooterButtons.tsx:33
766
-	__( 'Set ticket prices', 'event_espresso' ),
766
+	__('Set ticket prices', 'event_espresso'),
767 767
 
768 768
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/FooterButtons.tsx:31
769
-	__( 'Skip prices - Save', 'event_espresso' ),
769
+	__('Skip prices - Save', 'event_espresso'),
770 770
 
771 771
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/FooterButtons.tsx:37
772 772
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/FooterButtons.tsx:57
773
-	__( 'Ticket details', 'event_espresso' ),
773
+	__('Ticket details', 'event_espresso'),
774 774
 
775 775
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/FooterButtons.tsx:38
776
-	__( 'Save', 'event_espresso' ),
776
+	__('Save', 'event_espresso'),
777 777
 
778 778
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/Modal.tsx:22
779 779
 	/* translators: %s ticket id */
780
-	__( 'Edit ticket %s', 'event_espresso' ),
780
+	__('Edit ticket %s', 'event_espresso'),
781 781
 
782 782
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/Modal.tsx:25
783 783
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/Modal.tsx:30
784
-	__( 'New Ticket Details', 'event_espresso' ),
784
+	__('New Ticket Details', 'event_espresso'),
785 785
 
786 786
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/TicketFormSteps.tsx:10
787 787
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/TicketFormSteps.tsx:10
788
-	__( 'primary information about the ticket', 'event_espresso' ),
788
+	__('primary information about the ticket', 'event_espresso'),
789 789
 
790 790
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/TicketFormSteps.tsx:10
791 791
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/TicketFormSteps.tsx:10
792
-	__( 'Ticket Details', 'event_espresso' ),
792
+	__('Ticket Details', 'event_espresso'),
793 793
 
794 794
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/TicketFormSteps.tsx:12
795 795
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/TicketFormSteps.tsx:12
796
-	__( 'apply ticket price modifiers and taxes', 'event_espresso' ),
796
+	__('apply ticket price modifiers and taxes', 'event_espresso'),
797 797
 
798 798
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/TicketFormSteps.tsx:14
799 799
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/TicketFormSteps.tsx:14
800
-	__( 'Price Calculator', 'event_espresso' ),
800
+	__('Price Calculator', 'event_espresso'),
801 801
 
802 802
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/defaultTickets/multiStep/TicketFormSteps.tsx:16
803 803
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/TicketFormSteps.tsx:16
804
-	__( 'Assign Dates', 'event_espresso' ),
804
+	__('Assign Dates', 'event_espresso'),
805 805
 
806 806
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/FooterButtons.tsx:39
807
-	__( 'Skip prices - assign dates', 'event_espresso' ),
807
+	__('Skip prices - assign dates', 'event_espresso'),
808 808
 
809 809
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/FooterButtons.tsx:50
810
-	__( 'Save and assign dates', 'event_espresso' ),
810
+	__('Save and assign dates', 'event_espresso'),
811 811
 
812 812
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/multiStep/Modal.tsx:26
813 813
 	/* translators: 1 ticket name, 2 ticket id */
814
-	__( 'Edit ticket "%1$s" - %2$s', 'event_espresso' ),
814
+	__('Edit ticket "%1$s" - %2$s', 'event_espresso'),
815 815
 
816 816
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:101
817
-	__( 'The maximum number of this ticket available for sale.', 'event_espresso' ),
817
+	__('The maximum number of this ticket available for sale.', 'event_espresso'),
818 818
 
819 819
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:103
820
-	__( 'Set to 0 to stop sales, or leave blank for no limit.', 'event_espresso' ),
820
+	__('Set to 0 to stop sales, or leave blank for no limit.', 'event_espresso'),
821 821
 
822 822
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:114
823 823
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:121
824
-	__( 'Number of Uses', 'event_espresso' ),
824
+	__('Number of Uses', 'event_espresso'),
825 825
 
826 826
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:120
827
-	__( 'Controls the total number of times this ticket can be used, regardless of the number of dates it is assigned to.', 'event_espresso' ),
827
+	__('Controls the total number of times this ticket can be used, regardless of the number of dates it is assigned to.', 'event_espresso'),
828 828
 
829 829
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:124
830
-	__( 'Example: A ticket might have access to 4 different dates, but setting this field to 2 would mean that the ticket could only be used twice. Leave blank for no limit.', 'event_espresso' ),
830
+	__('Example: A ticket might have access to 4 different dates, but setting this field to 2 would mean that the ticket could only be used twice. Leave blank for no limit.', 'event_espresso'),
831 831
 
832 832
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:132
833 833
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:129
834
-	__( 'Minimum Quantity', 'event_espresso' ),
834
+	__('Minimum Quantity', 'event_espresso'),
835 835
 
836 836
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:137
837
-	__( 'The minimum quantity that can be selected for this ticket. Use this to create ticket bundles or graduated pricing.', 'event_espresso' ),
837
+	__('The minimum quantity that can be selected for this ticket. Use this to create ticket bundles or graduated pricing.', 'event_espresso'),
838 838
 
839 839
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:141
840
-	__( 'Leave blank for no minimum.', 'event_espresso' ),
840
+	__('Leave blank for no minimum.', 'event_espresso'),
841 841
 
842 842
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:147
843 843
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:137
844
-	__( 'Maximum Quantity', 'event_espresso' ),
844
+	__('Maximum Quantity', 'event_espresso'),
845 845
 
846 846
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:153
847
-	__( 'The maximum quantity that can be selected for this ticket. Use this to create ticket bundles or graduated pricing.', 'event_espresso' ),
847
+	__('The maximum quantity that can be selected for this ticket. Use this to create ticket bundles or graduated pricing.', 'event_espresso'),
848 848
 
849 849
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:157
850
-	__( 'Leave blank for no maximum.', 'event_espresso' ),
850
+	__('Leave blank for no maximum.', 'event_espresso'),
851 851
 
852 852
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:163
853 853
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:146
854
-	__( 'Required Ticket', 'event_espresso' ),
854
+	__('Required Ticket', 'event_espresso'),
855 855
 
856 856
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:165
857
-	__( 'If enabled, the ticket must be selected and will appear first in frontend ticket lists.', 'event_espresso' ),
857
+	__('If enabled, the ticket must be selected and will appear first in frontend ticket lists.', 'event_espresso'),
858 858
 
859 859
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:177
860
-	__( 'Visibility', 'event_espresso' ),
860
+	__('Visibility', 'event_espresso'),
861 861
 
862 862
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:211
863
-	__( 'Ticket Sales', 'event_espresso' ),
863
+	__('Ticket Sales', 'event_espresso'),
864 864
 
865 865
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketForm/useTicketFormConfig.ts:95
866 866
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/useBulkEditFormConfig.ts:112
867
-	__( 'Quantity For Sale', 'event_espresso' ),
867
+	__('Quantity For Sale', 'event_espresso'),
868 868
 
869 869
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/TicketRegistrationsLink.tsx:13
870
-	__( 'total registrations.', 'event_espresso' ),
870
+	__('total registrations.', 'event_espresso'),
871 871
 
872 872
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/TicketRegistrationsLink.tsx:14
873
-	__( 'view ALL registrations for this ticket.', 'event_espresso' ),
873
+	__('view ALL registrations for this ticket.', 'event_espresso'),
874 874
 
875 875
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/TicketSoldLink.tsx:13
876
-	__( 'view approved registrations for this ticket.', 'event_espresso' ),
876
+	__('view approved registrations for this ticket.', 'event_espresso'),
877 877
 
878 878
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/TicketsList.tsx:36
879
-	__( 'Available Tickets', 'event_espresso' ),
879
+	__('Available Tickets', 'event_espresso'),
880 880
 
881 881
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/TicketsList.tsx:39
882
-	__( 'loading tickets…', 'event_espresso' ),
882
+	__('loading tickets…', 'event_espresso'),
883 883
 
884 884
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/AssignDatesButton.tsx:26
885
-	__( 'Number of related dates', 'event_espresso' ),
885
+	__('Number of related dates', 'event_espresso'),
886 886
 
887 887
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/AssignDatesButton.tsx:27
888
-	__( 'There are no event dates assigned to this ticket. Please click the calendar icon to update the assignments.', 'event_espresso' ),
888
+	__('There are no event dates assigned to this ticket. Please click the calendar icon to update the assignments.', 'event_espresso'),
889 889
 
890 890
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/AssignDatesButton.tsx:37
891
-	__( 'assign dates', 'event_espresso' ),
891
+	__('assign dates', 'event_espresso'),
892 892
 
893 893
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/DeleteTicket.tsx:19
894
-	__( 'Permanently Delete Ticket?', 'event_espresso' ),
894
+	__('Permanently Delete Ticket?', 'event_espresso'),
895 895
 
896 896
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/DeleteTicket.tsx:19
897
-	__( 'Move Ticket to Trash?', 'event_espresso' ),
897
+	__('Move Ticket to Trash?', 'event_espresso'),
898 898
 
899 899
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/DeleteTicket.tsx:22
900
-	__( 'Are you sure you want to permanently delete this ticket? This action is permanent and can not be undone.', 'event_espresso' ),
900
+	__('Are you sure you want to permanently delete this ticket? This action is permanent and can not be undone.', 'event_espresso'),
901 901
 
902 902
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/DeleteTicket.tsx:48
903 903
 	// Reference: packages/ee-components/src/SimpleTicketCard/actions/Trash.tsx:6
904
-	__( 'trash ticket', 'event_espresso' ),
904
+	__('trash ticket', 'event_espresso'),
905 905
 
906 906
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/TicketMainMenu.tsx:25
907
-	__( 'ticket main menu', 'event_espresso' ),
907
+	__('ticket main menu', 'event_espresso'),
908 908
 
909 909
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/TicketMainMenu.tsx:38
910 910
 	// Reference: packages/ee-components/src/SimpleTicketCard/actions/Edit.tsx:15
911
-	__( 'edit ticket', 'event_espresso' ),
911
+	__('edit ticket', 'event_espresso'),
912 912
 
913 913
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/actionsMenu/dropdown/TicketMainMenu.tsx:39
914
-	__( 'copy ticket', 'event_espresso' ),
914
+	__('copy ticket', 'event_espresso'),
915 915
 
916 916
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/actions/Actions.tsx:44
917
-	__( 'edit ticket details', 'event_espresso' ),
917
+	__('edit ticket details', 'event_espresso'),
918 918
 
919 919
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/actions/Actions.tsx:48
920
-	__( 'delete tickets', 'event_espresso' ),
920
+	__('delete tickets', 'event_espresso'),
921 921
 
922 922
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/actions/Actions.tsx:48
923
-	__( 'trash tickets', 'event_espresso' ),
923
+	__('trash tickets', 'event_espresso'),
924 924
 
925 925
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/actions/Actions.tsx:52
926
-	__( 'edit ticket prices', 'event_espresso' ),
926
+	__('edit ticket prices', 'event_espresso'),
927 927
 
928 928
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/delete/Delete.tsx:14
929
-	__( 'Are you sure you want to permanently delete these tickets? This action can NOT be undone!', 'event_espresso' ),
929
+	__('Are you sure you want to permanently delete these tickets? This action can NOT be undone!', 'event_espresso'),
930 930
 
931 931
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/delete/Delete.tsx:15
932
-	__( 'Are you sure you want to trash these tickets?', 'event_espresso' ),
932
+	__('Are you sure you want to trash these tickets?', 'event_espresso'),
933 933
 
934 934
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/delete/Delete.tsx:16
935
-	__( 'Delete tickets permanently', 'event_espresso' ),
935
+	__('Delete tickets permanently', 'event_espresso'),
936 936
 
937 937
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/delete/Delete.tsx:16
938
-	__( 'Trash tickets', 'event_espresso' ),
938
+	__('Trash tickets', 'event_espresso'),
939 939
 
940 940
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/EditDetails.tsx:21
941
-	__( 'Bulk edit ticket details', 'event_espresso' ),
941
+	__('Bulk edit ticket details', 'event_espresso'),
942 942
 
943 943
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/details/EditDetails.tsx:22
944
-	__( 'any changes will be applied to ALL of the selected tickets.', 'event_espresso' ),
944
+	__('any changes will be applied to ALL of the selected tickets.', 'event_espresso'),
945 945
 
946 946
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/EditPrices.tsx:19
947
-	__( 'Bulk edit ticket prices', 'event_espresso' ),
947
+	__('Bulk edit ticket prices', 'event_espresso'),
948 948
 
949 949
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/buttons/EditModeButtons.tsx:20
950
-	__( 'Edit all prices together', 'event_espresso' ),
950
+	__('Edit all prices together', 'event_espresso'),
951 951
 
952 952
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/buttons/EditModeButtons.tsx:21
953
-	__( 'Edit all the selected ticket prices dynamically', 'event_espresso' ),
953
+	__('Edit all the selected ticket prices dynamically', 'event_espresso'),
954 954
 
955 955
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/buttons/EditModeButtons.tsx:25
956
-	__( 'Edit prices individually', 'event_espresso' ),
956
+	__('Edit prices individually', 'event_espresso'),
957 957
 
958 958
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/buttons/EditModeButtons.tsx:26
959
-	__( 'Edit prices for each ticket individually', 'event_espresso' ),
959
+	__('Edit prices for each ticket individually', 'event_espresso'),
960 960
 
961 961
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/buttons/FooterButtons.tsx:14
962 962
 	// Reference: packages/ee-components/src/bulkEdit/details/Submit.tsx:34
963 963
 	// Reference: packages/form/src/ResetButton.tsx:18
964 964
 	// Reference: packages/tpc/src/buttons/useResetButtonProps.tsx:12
965
-	__( 'Reset', 'event_espresso' ),
965
+	__('Reset', 'event_espresso'),
966 966
 
967 967
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/buttons/FooterButtons.tsx:15
968 968
 	// Reference: packages/tpc/src/hooks/useLockedTicketAction.ts:76
969 969
 	// Reference: packages/ui-components/src/Modal/useCancelButtonProps.tsx:10
970
-	__( 'Cancel', 'event_espresso' ),
970
+	__('Cancel', 'event_espresso'),
971 971
 
972 972
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/bulkEdit/prices/editSeparately/TPCInstance.tsx:26
973 973
 	/* translators: %s ticket name */
974
-	__( 'Edit prices for Ticket: %s', 'event_espresso' ),
974
+	__('Edit prices for Ticket: %s', 'event_espresso'),
975 975
 
976 976
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketCardSidebar.tsx:30
977
-	__( 'sales start', 'event_espresso' ),
977
+	__('sales start', 'event_espresso'),
978 978
 
979 979
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketCardSidebar.tsx:33
980
-	__( 'sales began', 'event_espresso' ),
980
+	__('sales began', 'event_espresso'),
981 981
 
982 982
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketCardSidebar.tsx:35
983
-	__( 'sales ended', 'event_espresso' ),
983
+	__('sales ended', 'event_espresso'),
984 984
 
985 985
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketCardSidebar.tsx:36
986
-	__( 'sales end', 'event_espresso' ),
986
+	__('sales end', 'event_espresso'),
987 987
 
988 988
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketCardSidebar.tsx:50
989
-	__( 'Edit Ticket Sale Dates', 'event_espresso' ),
989
+	__('Edit Ticket Sale Dates', 'event_espresso'),
990 990
 
991 991
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketCardSidebar.tsx:54
992
-	__( 'edit ticket sales start and end dates', 'event_espresso' ),
992
+	__('edit ticket sales start and end dates', 'event_espresso'),
993 993
 
994 994
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketDetailsPanel.tsx:21
995
-	__( 'quantity', 'event_espresso' ),
995
+	__('quantity', 'event_espresso'),
996 996
 
997 997
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketQuantity.tsx:28
998 998
 	// Reference: packages/edtr-services/src/apollo/mutations/tickets/useUpdateTicketQtyByCapacity.ts:78
999
-	__( 'Ticket quantity has been adjusted because it cannot be more than the related event date capacity.', 'event_espresso' ),
999
+	__('Ticket quantity has been adjusted because it cannot be more than the related event date capacity.', 'event_espresso'),
1000 1000
 
1001 1001
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/cardView/TicketQuantity.tsx:51
1002
-	__( 'edit quantity of tickets available…', 'event_espresso' ),
1002
+	__('edit quantity of tickets available…', 'event_espresso'),
1003 1003
 
1004 1004
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:10
1005
-	__( 'Move Ticket to Trash', 'event_espresso' ),
1005
+	__('Move Ticket to Trash', 'event_espresso'),
1006 1006
 
1007 1007
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:15
1008 1008
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:52
1009
-	__( 'On Sale', 'event_espresso' ),
1009
+	__('On Sale', 'event_espresso'),
1010 1010
 
1011 1011
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:17
1012
-	__( 'Pending', 'event_espresso' ),
1012
+	__('Pending', 'event_espresso'),
1013 1013
 
1014 1014
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:7
1015
-	__( 'Edit Ticket Details', 'event_espresso' ),
1015
+	__('Edit Ticket Details', 'event_espresso'),
1016 1016
 
1017 1017
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:8
1018
-	__( 'Manage Date Assignments', 'event_espresso' ),
1018
+	__('Manage Date Assignments', 'event_espresso'),
1019 1019
 
1020 1020
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/config.ts:9
1021 1021
 	// Reference: packages/tpc/src/components/table/Table.tsx:43
1022
-	__( 'Ticket Price Calculator', 'event_espresso' ),
1022
+	__('Ticket Price Calculator', 'event_espresso'),
1023 1023
 
1024 1024
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/editable/EditablePrice.tsx:39
1025
-	__( 'edit ticket total…', 'event_espresso' ),
1025
+	__('edit ticket total…', 'event_espresso'),
1026 1026
 
1027 1027
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/editable/EditablePrice.tsx:53
1028
-	__( 'set price…', 'event_espresso' ),
1028
+	__('set price…', 'event_espresso'),
1029 1029
 
1030 1030
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/IsChainedButton.tsx:23
1031
-	__( 'tickets list is linked to dates list and is showing tickets for above dates only', 'event_espresso' ),
1031
+	__('tickets list is linked to dates list and is showing tickets for above dates only', 'event_espresso'),
1032 1032
 
1033 1033
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/IsChainedButton.tsx:24
1034
-	__( 'tickets list is unlinked and is showing tickets for all event dates', 'event_espresso' ),
1034
+	__('tickets list is unlinked and is showing tickets for all event dates', 'event_espresso'),
1035 1035
 
1036 1036
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:10
1037
-	__( 'ticket sales start and end dates', 'event_espresso' ),
1037
+	__('ticket sales start and end dates', 'event_espresso'),
1038 1038
 
1039 1039
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:15
1040
-	__( 'tickets with 90% or more sold', 'event_espresso' ),
1040
+	__('tickets with 90% or more sold', 'event_espresso'),
1041 1041
 
1042 1042
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:16
1043
-	__( 'tickets with 75% or more sold', 'event_espresso' ),
1043
+	__('tickets with 75% or more sold', 'event_espresso'),
1044 1044
 
1045 1045
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:17
1046
-	__( 'tickets with 50% or more sold', 'event_espresso' ),
1046
+	__('tickets with 50% or more sold', 'event_espresso'),
1047 1047
 
1048 1048
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:19
1049
-	__( 'tickets with less than 50% sold', 'event_espresso' ),
1049
+	__('tickets with less than 50% sold', 'event_espresso'),
1050 1050
 
1051 1051
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:28
1052
-	__( 'all tickets for all dates', 'event_espresso' ),
1052
+	__('all tickets for all dates', 'event_espresso'),
1053 1053
 
1054 1054
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:29
1055
-	__( 'all on sale and sale pending', 'event_espresso' ),
1055
+	__('all on sale and sale pending', 'event_espresso'),
1056 1056
 
1057 1057
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:30
1058
-	__( 'on sale tickets only', 'event_espresso' ),
1058
+	__('on sale tickets only', 'event_espresso'),
1059 1059
 
1060 1060
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:31
1061
-	__( 'sale pending tickets only', 'event_espresso' ),
1061
+	__('sale pending tickets only', 'event_espresso'),
1062 1062
 
1063 1063
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:32
1064
-	__( 'next on sale or sale pending only', 'event_espresso' ),
1064
+	__('next on sale or sale pending only', 'event_espresso'),
1065 1065
 
1066 1066
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:33
1067
-	__( 'sold out tickets only', 'event_espresso' ),
1067
+	__('sold out tickets only', 'event_espresso'),
1068 1068
 
1069 1069
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:34
1070
-	__( 'expired tickets only', 'event_espresso' ),
1070
+	__('expired tickets only', 'event_espresso'),
1071 1071
 
1072 1072
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:35
1073
-	__( 'trashed tickets only', 'event_espresso' ),
1073
+	__('trashed tickets only', 'event_espresso'),
1074 1074
 
1075 1075
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:40
1076
-	__( 'all tickets for above dates', 'event_espresso' ),
1076
+	__('all tickets for above dates', 'event_espresso'),
1077 1077
 
1078 1078
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:44
1079
-	__( 'ticket sale date', 'event_espresso' ),
1079
+	__('ticket sale date', 'event_espresso'),
1080 1080
 
1081 1081
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:45
1082
-	__( 'ticket name', 'event_espresso' ),
1082
+	__('ticket name', 'event_espresso'),
1083 1083
 
1084 1084
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:46
1085
-	__( 'ticket ID', 'event_espresso' ),
1085
+	__('ticket ID', 'event_espresso'),
1086 1086
 
1087 1087
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:52
1088
-	__( 'link', 'event_espresso' ),
1088
+	__('link', 'event_espresso'),
1089 1089
 
1090 1090
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:8
1091
-	__( 'ticket sales start date only', 'event_espresso' ),
1091
+	__('ticket sales start date only', 'event_espresso'),
1092 1092
 
1093 1093
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/filterBar/controls/options.ts:9
1094
-	__( 'ticket sales end date only', 'event_espresso' ),
1094
+	__('ticket sales end date only', 'event_espresso'),
1095 1095
 
1096 1096
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/newTicketOptions/AddSingleTicket.tsx:18
1097
-	__( 'Add New Ticket', 'event_espresso' ),
1097
+	__('Add New Ticket', 'event_espresso'),
1098 1098
 
1099 1099
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/newTicketOptions/AddSingleTicket.tsx:32
1100
-	__( 'Add a single ticket and assign the dates to it', 'event_espresso' ),
1100
+	__('Add a single ticket and assign the dates to it', 'event_espresso'),
1101 1101
 
1102 1102
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/newTicketOptions/AddSingleTicket.tsx:34
1103
-	__( 'Single Ticket', 'event_espresso' ),
1103
+	__('Single Ticket', 'event_espresso'),
1104 1104
 
1105 1105
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/TableView.tsx:39
1106
-	__( 'Tickets', 'event_espresso' ),
1106
+	__('Tickets', 'event_espresso'),
1107 1107
 
1108 1108
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:110
1109
-	__( 'Registrations', 'event_espresso' ),
1109
+	__('Registrations', 'event_espresso'),
1110 1110
 
1111 1111
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:51
1112
-	__( 'Goes on Sale', 'event_espresso' ),
1112
+	__('Goes on Sale', 'event_espresso'),
1113 1113
 
1114 1114
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:65
1115
-	__( 'Sale Ends', 'event_espresso' ),
1115
+	__('Sale Ends', 'event_espresso'),
1116 1116
 
1117 1117
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:66
1118
-	__( 'Ends', 'event_espresso' ),
1118
+	__('Ends', 'event_espresso'),
1119 1119
 
1120 1120
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:78
1121
-	__( 'Price', 'event_espresso' ),
1121
+	__('Price', 'event_espresso'),
1122 1122
 
1123 1123
 	// Reference: domains/core/admin/eventEditor/src/ui/tickets/ticketsList/tableView/useHeaderRowGenerator.tsx:88
1124
-	__( 'Quantity', 'event_espresso' ),
1124
+	__('Quantity', 'event_espresso'),
1125 1125
 
1126 1126
 	// Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:105
1127
-	__( 'Select a Venue for the Event', 'event_espresso' ),
1127
+	__('Select a Venue for the Event', 'event_espresso'),
1128 1128
 
1129 1129
 	// Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:21
1130
-	__( 'Venue Details', 'event_espresso' ),
1130
+	__('Venue Details', 'event_espresso'),
1131 1131
 
1132 1132
 	// Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:38
1133
-	__( 'unlimited space', 'event_espresso' ),
1133
+	__('unlimited space', 'event_espresso'),
1134 1134
 
1135 1135
 	// Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:41
1136 1136
 	/* translators: %d venue capacity */
1137
-	__( 'Space for up to %d people', 'event_espresso' ),
1137
+	__('Space for up to %d people', 'event_espresso'),
1138 1138
 
1139 1139
 	// Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:60
1140
-	__( 'no image', 'event_espresso' ),
1140
+	__('no image', 'event_espresso'),
1141 1141
 
1142 1142
 	// Reference: domains/core/admin/eventEditor/src/ui/venue/VenueDetails.tsx:96
1143
-	__( 'Edit this Venue', 'event_espresso' ),
1143
+	__('Edit this Venue', 'event_espresso'),
1144 1144
 
1145 1145
 	// Reference: domains/core/admin/wpPluginsPage/src/exitSurvey/Popup.tsx:29
1146
-	__( 'Do you have a moment to share why you are deactivating Event Espresso?', 'event_espresso' ),
1146
+	__('Do you have a moment to share why you are deactivating Event Espresso?', 'event_espresso'),
1147 1147
 
1148 1148
 	// Reference: domains/core/admin/wpPluginsPage/src/exitSurvey/Popup.tsx:40
1149
-	__( 'Skip', 'event_espresso' ),
1149
+	__('Skip', 'event_espresso'),
1150 1150
 
1151 1151
 	// Reference: domains/core/admin/wpPluginsPage/src/exitSurvey/Popup.tsx:42
1152
-	__( 'Sure I\'ll help', 'event_espresso' ),
1152
+	__('Sure I\'ll help', 'event_espresso'),
1153 1153
 
1154 1154
 	// Reference: packages/adapters/src/Pagination/Pagination.tsx:23
1155
-	__( 'pagination', 'event_espresso' ),
1155
+	__('pagination', 'event_espresso'),
1156 1156
 
1157 1157
 	// Reference: packages/adapters/src/TagSelector/TagSelector.tsx:113
1158
-	__( 'toggle menu', 'event_espresso' ),
1158
+	__('toggle menu', 'event_espresso'),
1159 1159
 
1160 1160
 	// Reference: packages/constants/src/datetime.ts:10
1161
-	__( 'Postponed', 'event_espresso' ),
1161
+	__('Postponed', 'event_espresso'),
1162 1162
 
1163 1163
 	// Reference: packages/constants/src/datetime.ts:11
1164
-	__( 'SoldOut', 'event_espresso' ),
1164
+	__('SoldOut', 'event_espresso'),
1165 1165
 
1166 1166
 	// Reference: packages/constants/src/datetime.ts:7
1167 1167
 	// Reference: packages/predicates/src/registration/statusOptions.ts:11
1168
-	__( 'Cancelled', 'event_espresso' ),
1168
+	__('Cancelled', 'event_espresso'),
1169 1169
 
1170 1170
 	// Reference: packages/constants/src/datetime.ts:9
1171
-	__( 'Inactive', 'event_espresso' ),
1171
+	__('Inactive', 'event_espresso'),
1172 1172
 
1173 1173
 	// Reference: packages/data/src/mutations/useMutationWithFeedback.ts:25
1174
-	__( 'error creating %s', 'event_espresso' ),
1174
+	__('error creating %s', 'event_espresso'),
1175 1175
 
1176 1176
 	// Reference: packages/data/src/mutations/useMutationWithFeedback.ts:26
1177
-	__( 'error deleting %s', 'event_espresso' ),
1177
+	__('error deleting %s', 'event_espresso'),
1178 1178
 
1179 1179
 	// Reference: packages/data/src/mutations/useMutationWithFeedback.ts:27
1180
-	__( 'error updating %s', 'event_espresso' ),
1180
+	__('error updating %s', 'event_espresso'),
1181 1181
 
1182 1182
 	// Reference: packages/data/src/mutations/useMutationWithFeedback.ts:28
1183
-	__( 'creating %s', 'event_espresso' ),
1183
+	__('creating %s', 'event_espresso'),
1184 1184
 
1185 1185
 	// Reference: packages/data/src/mutations/useMutationWithFeedback.ts:29
1186
-	__( 'deleting %s', 'event_espresso' ),
1186
+	__('deleting %s', 'event_espresso'),
1187 1187
 
1188 1188
 	// Reference: packages/data/src/mutations/useMutationWithFeedback.ts:30
1189
-	__( 'updating %s', 'event_espresso' ),
1189
+	__('updating %s', 'event_espresso'),
1190 1190
 
1191 1191
 	// Reference: packages/data/src/mutations/useMutationWithFeedback.ts:31
1192
-	__( 'successfully created %s', 'event_espresso' ),
1192
+	__('successfully created %s', 'event_espresso'),
1193 1193
 
1194 1194
 	// Reference: packages/data/src/mutations/useMutationWithFeedback.ts:32
1195
-	__( 'successfully deleted %s', 'event_espresso' ),
1195
+	__('successfully deleted %s', 'event_espresso'),
1196 1196
 
1197 1197
 	// Reference: packages/data/src/mutations/useMutationWithFeedback.ts:33
1198
-	__( 'successfully updated %s', 'event_espresso' ),
1198
+	__('successfully updated %s', 'event_espresso'),
1199 1199
 
1200 1200
 	// Reference: packages/dates/src/components/DateRangePicker/DateRangePickerLegend.tsx:13
1201
-	__( 'day in range', 'event_espresso' ),
1201
+	__('day in range', 'event_espresso'),
1202 1202
 
1203 1203
 	// Reference: packages/dates/src/components/DateRangePicker/DateRangePickerLegend.tsx:17
1204 1204
 	// Reference: packages/dates/src/components/DateRangePicker/index.tsx:79
1205
-	__( 'end date', 'event_espresso' ),
1205
+	__('end date', 'event_espresso'),
1206 1206
 
1207 1207
 	// Reference: packages/dates/src/components/DateTimePicker.tsx:17
1208 1208
 	// Reference: packages/dates/src/components/TimePicker.tsx:17
1209 1209
 	// Reference: packages/form-builder/src/state/utils.ts:433
1210
-	__( 'time', 'event_espresso' ),
1210
+	__('time', 'event_espresso'),
1211 1211
 
1212 1212
 	// Reference: packages/dates/src/constants.ts:7
1213
-	__( 'End Date & Time must be set later than the Start Date & Time', 'event_espresso' ),
1213
+	__('End Date & Time must be set later than the Start Date & Time', 'event_espresso'),
1214 1214
 
1215 1215
 	// Reference: packages/dates/src/constants.ts:9
1216
-	__( 'Start Date & Time must be set before the End Date & Time', 'event_espresso' ),
1216
+	__('Start Date & Time must be set before the End Date & Time', 'event_espresso'),
1217 1217
 
1218 1218
 	// Reference: packages/dates/src/utils/misc.ts:16
1219
-	__( 'month(s)', 'event_espresso' ),
1219
+	__('month(s)', 'event_espresso'),
1220 1220
 
1221 1221
 	// Reference: packages/dates/src/utils/misc.ts:17
1222
-	__( 'week(s)', 'event_espresso' ),
1222
+	__('week(s)', 'event_espresso'),
1223 1223
 
1224 1224
 	// Reference: packages/dates/src/utils/misc.ts:18
1225
-	__( 'day(s)', 'event_espresso' ),
1225
+	__('day(s)', 'event_espresso'),
1226 1226
 
1227 1227
 	// Reference: packages/dates/src/utils/misc.ts:19
1228
-	__( 'hour(s)', 'event_espresso' ),
1228
+	__('hour(s)', 'event_espresso'),
1229 1229
 
1230 1230
 	// Reference: packages/dates/src/utils/misc.ts:20
1231
-	__( 'minute(s)', 'event_espresso' ),
1231
+	__('minute(s)', 'event_espresso'),
1232 1232
 
1233 1233
 	// Reference: packages/edtr-services/src/apollo/initialization/useCacheRehydration.ts:107
1234
-	__( 'price types initialized', 'event_espresso' ),
1234
+	__('price types initialized', 'event_espresso'),
1235 1235
 
1236 1236
 	// Reference: packages/edtr-services/src/apollo/initialization/useCacheRehydration.ts:117
1237
-	__( 'datetimes initialized', 'event_espresso' ),
1237
+	__('datetimes initialized', 'event_espresso'),
1238 1238
 
1239 1239
 	// Reference: packages/edtr-services/src/apollo/initialization/useCacheRehydration.ts:127
1240
-	__( 'tickets initialized', 'event_espresso' ),
1240
+	__('tickets initialized', 'event_espresso'),
1241 1241
 
1242 1242
 	// Reference: packages/edtr-services/src/apollo/initialization/useCacheRehydration.ts:137
1243
-	__( 'prices initialized', 'event_espresso' ),
1243
+	__('prices initialized', 'event_espresso'),
1244 1244
 
1245 1245
 	// Reference: packages/edtr-services/src/apollo/mutations/useReorderEntities.ts:63
1246
-	__( 'order updated', 'event_espresso' ),
1246
+	__('order updated', 'event_espresso'),
1247 1247
 
1248 1248
 	// Reference: packages/edtr-services/src/constants.ts:24
1249
-	__( 'datetime', 'event_espresso' ),
1249
+	__('datetime', 'event_espresso'),
1250 1250
 
1251 1251
 	// Reference: packages/edtr-services/src/constants.ts:27
1252
-	__( 'price', 'event_espresso' ),
1252
+	__('price', 'event_espresso'),
1253 1253
 
1254 1254
 	// Reference: packages/edtr-services/src/constants.ts:28
1255 1255
 	// Reference: packages/tpc/src/inputs/PriceTypeInput.tsx:19
1256
-	__( 'price type', 'event_espresso' ),
1256
+	__('price type', 'event_espresso'),
1257 1257
 
1258 1258
 	// Reference: packages/edtr-services/src/utils/dateAndTime.ts:38
1259 1259
 	// Reference: packages/ui-components/src/EditDateRangeButton/EditDateRangeButton.tsx:39
1260
-	__( 'End date has been adjusted', 'event_espresso' ),
1260
+	__('End date has been adjusted', 'event_espresso'),
1261 1261
 
1262 1262
 	// Reference: packages/edtr-services/src/utils/dateAndTime.ts:59
1263
-	__( 'Required', 'event_espresso' ),
1263
+	__('Required', 'event_espresso'),
1264 1264
 
1265 1265
 	// Reference: packages/edtr-services/src/utils/dateAndTime.ts:64
1266
-	__( 'Start Date is required', 'event_espresso' ),
1266
+	__('Start Date is required', 'event_espresso'),
1267 1267
 
1268 1268
 	// Reference: packages/edtr-services/src/utils/dateAndTime.ts:68
1269
-	__( 'End Date is required', 'event_espresso' ),
1269
+	__('End Date is required', 'event_espresso'),
1270 1270
 
1271 1271
 	// Reference: packages/ee-components/src/EntityList/EntityList.tsx:32
1272
-	__( 'no results found', 'event_espresso' ),
1272
+	__('no results found', 'event_espresso'),
1273 1273
 
1274 1274
 	// Reference: packages/ee-components/src/EntityList/EntityList.tsx:33
1275
-	__( 'try changing filter settings', 'event_espresso' ),
1275
+	__('try changing filter settings', 'event_espresso'),
1276 1276
 
1277 1277
 	// Reference: packages/ee-components/src/bulkEdit/ActionCheckbox.tsx:38
1278 1278
 	/* translators: %d entity id */
1279
-	__( 'select entity with id %d', 'event_espresso' ),
1279
+	__('select entity with id %d', 'event_espresso'),
1280 1280
 
1281 1281
 	// Reference: packages/ee-components/src/bulkEdit/ActionCheckbox.tsx:41
1282
-	__( 'select all entities', 'event_espresso' ),
1282
+	__('select all entities', 'event_espresso'),
1283 1283
 
1284 1284
 	// Reference: packages/ee-components/src/bulkEdit/details/BulkEditDetails.tsx:20
1285
-	__( 'Note: ', 'event_espresso' ),
1285
+	__('Note: ', 'event_espresso'),
1286 1286
 
1287 1287
 	// Reference: packages/ee-components/src/bulkEdit/details/BulkEditDetails.tsx:20
1288
-	__( 'any changes will be applied to ALL of the selected entities.', 'event_espresso' ),
1288
+	__('any changes will be applied to ALL of the selected entities.', 'event_espresso'),
1289 1289
 
1290 1290
 	// Reference: packages/ee-components/src/bulkEdit/details/BulkEditDetails.tsx:27
1291
-	__( 'Bulk edit details', 'event_espresso' ),
1291
+	__('Bulk edit details', 'event_espresso'),
1292 1292
 
1293 1293
 	// Reference: packages/ee-components/src/bulkEdit/details/Submit.tsx:17
1294
-	__( 'Are you sure you want to bulk update the details?', 'event_espresso' ),
1294
+	__('Are you sure you want to bulk update the details?', 'event_espresso'),
1295 1295
 
1296 1296
 	// Reference: packages/ee-components/src/bulkEdit/details/Submit.tsx:18
1297
-	__( 'Bulk update details', 'event_espresso' ),
1297
+	__('Bulk update details', 'event_espresso'),
1298 1298
 
1299 1299
 	// Reference: packages/ee-components/src/filterBar/SortByControl/index.tsx:27
1300
-	__( 'set custom dates order', 'event_espresso' ),
1300
+	__('set custom dates order', 'event_espresso'),
1301 1301
 
1302 1302
 	// Reference: packages/ee-components/src/filterBar/SortByControl/index.tsx:28
1303
-	__( 'set custom tickets order', 'event_espresso' ),
1303
+	__('set custom tickets order', 'event_espresso'),
1304 1304
 
1305 1305
 	// Reference: packages/ee-components/src/filterBar/SortByControl/index.tsx:30
1306
-	__( 'Set Custom Dates Order - this is how dates are ordered on the frontend', 'event_espresso' ),
1306
+	__('Set Custom Dates Order - this is how dates are ordered on the frontend', 'event_espresso'),
1307 1307
 
1308 1308
 	// Reference: packages/ee-components/src/filterBar/SortByControl/index.tsx:31
1309
-	__( 'Set Custom Tickets Order - this is how tickets are ordered on the frontend', 'event_espresso' ),
1309
+	__('Set Custom Tickets Order - this is how tickets are ordered on the frontend', 'event_espresso'),
1310 1310
 
1311 1311
 	// Reference: packages/form-builder/src/FormElement/FormElementToolbar.tsx:32
1312
-	__( 'delete form element', 'event_espresso' ),
1312
+	__('delete form element', 'event_espresso'),
1313 1313
 
1314 1314
 	// Reference: packages/form-builder/src/FormElement/FormElementToolbar.tsx:49
1315
-	__( 'form element settings', 'event_espresso' ),
1315
+	__('form element settings', 'event_espresso'),
1316 1316
 
1317 1317
 	// Reference: packages/form-builder/src/FormElement/FormElementToolbar.tsx:59
1318
-	__( 'copy form element', 'event_espresso' ),
1318
+	__('copy form element', 'event_espresso'),
1319 1319
 
1320 1320
 	// Reference: packages/form-builder/src/FormElement/FormElementToolbar.tsx:69
1321
-	__( 'click, hold, and drag to reorder form element', 'event_espresso' ),
1321
+	__('click, hold, and drag to reorder form element', 'event_espresso'),
1322 1322
 
1323 1323
 	// Reference: packages/form-builder/src/FormElement/Tabs/FieldOption.tsx:20
1324
-	__( 'remove option', 'event_espresso' ),
1324
+	__('remove option', 'event_espresso'),
1325 1325
 
1326 1326
 	// Reference: packages/form-builder/src/FormElement/Tabs/FieldOption.tsx:42
1327
-	__( 'value', 'event_espresso' ),
1327
+	__('value', 'event_espresso'),
1328 1328
 
1329 1329
 	// Reference: packages/form-builder/src/FormElement/Tabs/FieldOption.tsx:52
1330
-	__( 'label', 'event_espresso' ),
1330
+	__('label', 'event_espresso'),
1331 1331
 
1332 1332
 	// Reference: packages/form-builder/src/FormElement/Tabs/FieldOption.tsx:63
1333
-	__( 'click, hold, and drag to reorder field option', 'event_espresso' ),
1333
+	__('click, hold, and drag to reorder field option', 'event_espresso'),
1334 1334
 
1335 1335
 	// Reference: packages/form-builder/src/FormElement/Tabs/FieldOptions.tsx:61
1336
-	__( 'Options are the choices you give people to select from.', 'event_espresso' ),
1336
+	__('Options are the choices you give people to select from.', 'event_espresso'),
1337 1337
 
1338 1338
 	// Reference: packages/form-builder/src/FormElement/Tabs/FieldOptions.tsx:63
1339
-	__( 'The value is a simple key that will be saved to the database and the label is what is shown to the user.', 'event_espresso' ),
1339
+	__('The value is a simple key that will be saved to the database and the label is what is shown to the user.', 'event_espresso'),
1340 1340
 
1341 1341
 	// Reference: packages/form-builder/src/FormElement/Tabs/FieldOptions.tsx:96
1342
-	__( 'add new option', 'event_espresso' ),
1342
+	__('add new option', 'event_espresso'),
1343 1343
 
1344 1344
 	// Reference: packages/form-builder/src/FormElement/Tabs/FormElementTabs.tsx:26
1345 1345
 	// Reference: packages/form-builder/src/FormSection/Tabs/FormSectionTabs.tsx:25
1346
-	__( 'Styles', 'event_espresso' ),
1346
+	__('Styles', 'event_espresso'),
1347 1347
 
1348 1348
 	// Reference: packages/form-builder/src/FormElement/Tabs/FormElementTabs.tsx:30
1349
-	__( 'Validation', 'event_espresso' ),
1349
+	__('Validation', 'event_espresso'),
1350 1350
 
1351 1351
 	// Reference: packages/form-builder/src/FormElement/Tabs/InputType.tsx:18
1352
-	__( 'Change input type', 'event_espresso' ),
1352
+	__('Change input type', 'event_espresso'),
1353 1353
 
1354 1354
 	// Reference: packages/form-builder/src/FormElement/Tabs/InputType.tsx:19
1355
-	__( 'Some configurations might be lost. Are you sure you want to change the input type?', 'event_espresso' ),
1355
+	__('Some configurations might be lost. Are you sure you want to change the input type?', 'event_espresso'),
1356 1356
 
1357 1357
 	// Reference: packages/form-builder/src/FormElement/Tabs/InputType.tsx:40
1358
-	__( 'type', 'event_espresso' ),
1358
+	__('type', 'event_espresso'),
1359 1359
 
1360 1360
 	// Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:26
1361 1361
 	// Reference: packages/form-builder/src/FormSection/Tabs/Settings.tsx:17
1362
-	__( 'public label', 'event_espresso' ),
1362
+	__('public label', 'event_espresso'),
1363 1363
 
1364 1364
 	// Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:33
1365 1365
 	// Reference: packages/form-builder/src/FormSection/Tabs/Settings.tsx:22
1366
-	__( 'admin label', 'event_espresso' ),
1366
+	__('admin label', 'event_espresso'),
1367 1367
 
1368 1368
 	// Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:40
1369
-	__( 'content', 'event_espresso' ),
1369
+	__('content', 'event_espresso'),
1370 1370
 
1371 1371
 	// Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:48
1372
-	__( 'options', 'event_espresso' ),
1372
+	__('options', 'event_espresso'),
1373 1373
 
1374 1374
 	// Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:51
1375
-	__( 'placeholder', 'event_espresso' ),
1375
+	__('placeholder', 'event_espresso'),
1376 1376
 
1377 1377
 	// Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:57
1378
-	__( 'admin only', 'event_espresso' ),
1378
+	__('admin only', 'event_espresso'),
1379 1379
 
1380 1380
 	// Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:62
1381
-	__( 'help text', 'event_espresso' ),
1381
+	__('help text', 'event_espresso'),
1382 1382
 
1383 1383
 	// Reference: packages/form-builder/src/FormElement/Tabs/Settings.tsx:71
1384
-	__( 'maps to', 'event_espresso' ),
1384
+	__('maps to', 'event_espresso'),
1385 1385
 
1386 1386
 	// Reference: packages/form-builder/src/FormElement/Tabs/Styles.tsx:15
1387 1387
 	// Reference: packages/form-builder/src/FormSection/Tabs/Styles.tsx:13
1388
-	__( 'css class', 'event_espresso' ),
1388
+	__('css class', 'event_espresso'),
1389 1389
 
1390 1390
 	// Reference: packages/form-builder/src/FormElement/Tabs/Styles.tsx:20
1391
-	__( 'help text css class', 'event_espresso' ),
1391
+	__('help text css class', 'event_espresso'),
1392 1392
 
1393 1393
 	// Reference: packages/form-builder/src/FormElement/Tabs/Styles.tsx:27
1394
-	__( 'size', 'event_espresso' ),
1394
+	__('size', 'event_espresso'),
1395 1395
 
1396 1396
 	// Reference: packages/form-builder/src/FormElement/Tabs/Styles.tsx:35
1397
-	__( 'step', 'event_espresso' ),
1397
+	__('step', 'event_espresso'),
1398 1398
 
1399 1399
 	// Reference: packages/form-builder/src/FormElement/Tabs/Styles.tsx:41
1400
-	__( 'maxlength', 'event_espresso' ),
1400
+	__('maxlength', 'event_espresso'),
1401 1401
 
1402 1402
 	// Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:123
1403
-	__( 'min', 'event_espresso' ),
1403
+	__('min', 'event_espresso'),
1404 1404
 
1405 1405
 	// Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:128
1406
-	__( 'max', 'event_espresso' ),
1406
+	__('max', 'event_espresso'),
1407 1407
 
1408 1408
 	// Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:28
1409
-	__( 'Germany', 'event_espresso' ),
1409
+	__('Germany', 'event_espresso'),
1410 1410
 
1411 1411
 	// Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:32
1412
-	__( 'France', 'event_espresso' ),
1412
+	__('France', 'event_espresso'),
1413 1413
 
1414 1414
 	// Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:36
1415
-	__( 'United Kingdom', 'event_espresso' ),
1415
+	__('United Kingdom', 'event_espresso'),
1416 1416
 
1417 1417
 	// Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:40
1418
-	__( 'United States', 'event_espresso' ),
1418
+	__('United States', 'event_espresso'),
1419 1419
 
1420 1420
 	// Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:44
1421
-	__( 'Custom', 'event_espresso' ),
1421
+	__('Custom', 'event_espresso'),
1422 1422
 
1423 1423
 	// Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:54
1424
-	__( 'required', 'event_espresso' ),
1424
+	__('required', 'event_espresso'),
1425 1425
 
1426 1426
 	// Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:59
1427
-	__( 'required text', 'event_espresso' ),
1427
+	__('required text', 'event_espresso'),
1428 1428
 
1429 1429
 	// Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:66
1430
-	__( 'autocomplete', 'event_espresso' ),
1430
+	__('autocomplete', 'event_espresso'),
1431 1431
 
1432 1432
 	// Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:74
1433
-	__( 'custom format', 'event_espresso' ),
1433
+	__('custom format', 'event_espresso'),
1434 1434
 
1435 1435
 	// Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:75
1436
-	__( 'format', 'event_espresso' ),
1436
+	__('format', 'event_espresso'),
1437 1437
 
1438 1438
 	// Reference: packages/form-builder/src/FormElement/Tabs/Validation.tsx:83
1439
-	__( 'pattern', 'event_espresso' ),
1439
+	__('pattern', 'event_espresso'),
1440 1440
 
1441 1441
 	// Reference: packages/form-builder/src/FormSection/AddFormElementPopover.tsx:110
1442
-	__( 'add new form element', 'event_espresso' ),
1442
+	__('add new form element', 'event_espresso'),
1443 1443
 
1444 1444
 	// Reference: packages/form-builder/src/FormSection/AddFormElementPopover.tsx:117
1445 1445
 	// Reference: packages/form/src/renderers/RepeatableRenderer.tsx:52
1446
-	__( 'Add', 'event_espresso' ),
1446
+	__('Add', 'event_espresso'),
1447 1447
 
1448 1448
 	// Reference: packages/form-builder/src/FormSection/AddFormElementPopover.tsx:76
1449
-	__( 'Add Form Element', 'event_espresso' ),
1449
+	__('Add Form Element', 'event_espresso'),
1450 1450
 
1451 1451
 	// Reference: packages/form-builder/src/FormSection/AddFormElementPopover.tsx:85
1452
-	__( 'form element order can be changed after adding by using the drag handles in the form element toolbar', 'event_espresso' ),
1452
+	__('form element order can be changed after adding by using the drag handles in the form element toolbar', 'event_espresso'),
1453 1453
 
1454 1454
 	// Reference: packages/form-builder/src/FormSection/AddFormElementPopover.tsx:92
1455
-	__( 'load existing form section', 'event_espresso' ),
1455
+	__('load existing form section', 'event_espresso'),
1456 1456
 
1457 1457
 	// Reference: packages/form-builder/src/FormSection/FormSectionToolbar.tsx:32
1458
-	__( 'delete form section', 'event_espresso' ),
1458
+	__('delete form section', 'event_espresso'),
1459 1459
 
1460 1460
 	// Reference: packages/form-builder/src/FormSection/FormSectionToolbar.tsx:47
1461
-	__( 'form section settings', 'event_espresso' ),
1461
+	__('form section settings', 'event_espresso'),
1462 1462
 
1463 1463
 	// Reference: packages/form-builder/src/FormSection/FormSectionToolbar.tsx:57
1464
-	__( 'copy form section', 'event_espresso' ),
1464
+	__('copy form section', 'event_espresso'),
1465 1465
 
1466 1466
 	// Reference: packages/form-builder/src/FormSection/FormSectionToolbar.tsx:74
1467
-	__( 'click, hold, and drag to reorder form section', 'event_espresso' ),
1467
+	__('click, hold, and drag to reorder form section', 'event_espresso'),
1468 1468
 
1469 1469
 	// Reference: packages/form-builder/src/FormSection/FormSections.tsx:26
1470
-	__( 'Add Form Section', 'event_espresso' ),
1470
+	__('Add Form Section', 'event_espresso'),
1471 1471
 
1472 1472
 	// Reference: packages/form-builder/src/FormSection/SaveSection.tsx:47
1473
-	__( 'save form section for use in other forms', 'event_espresso' ),
1473
+	__('save form section for use in other forms', 'event_espresso'),
1474 1474
 
1475 1475
 	// Reference: packages/form-builder/src/FormSection/SaveSection.tsx:51
1476
-	__( 'save as', 'event_espresso' ),
1476
+	__('save as', 'event_espresso'),
1477 1477
 
1478 1478
 	// Reference: packages/form-builder/src/FormSection/SaveSection.tsx:55
1479
-	__( 'default', 'event_espresso' ),
1479
+	__('default', 'event_espresso'),
1480 1480
 
1481 1481
 	// Reference: packages/form-builder/src/FormSection/SaveSection.tsx:58
1482
-	__( ' a copy of this form section will be automatically added to ALL new events', 'event_espresso' ),
1482
+	__(' a copy of this form section will be automatically added to ALL new events', 'event_espresso'),
1483 1483
 
1484 1484
 	// Reference: packages/form-builder/src/FormSection/SaveSection.tsx:61
1485
-	__( 'shared', 'event_espresso' ),
1485
+	__('shared', 'event_espresso'),
1486 1486
 
1487 1487
 	// Reference: packages/form-builder/src/FormSection/SaveSection.tsx:64
1488
-	__( 'a copy of this form section will be saved for use in other events but not loaded by default', 'event_espresso' ),
1488
+	__('a copy of this form section will be saved for use in other events but not loaded by default', 'event_espresso'),
1489 1489
 
1490 1490
 	// Reference: packages/form-builder/src/FormSection/Tabs/Settings.tsx:27
1491
-	__( 'show label', 'event_espresso' ),
1491
+	__('show label', 'event_espresso'),
1492 1492
 
1493 1493
 	// Reference: packages/form-builder/src/FormSection/Tabs/Settings.tsx:33
1494
-	__( 'applies to', 'event_espresso' ),
1494
+	__('applies to', 'event_espresso'),
1495 1495
 
1496 1496
 	// Reference: packages/form-builder/src/constants.ts:102
1497 1497
 	// Reference: packages/form-builder/src/state/utils.ts:436
1498
-	__( 'URL', 'event_espresso' ),
1498
+	__('URL', 'event_espresso'),
1499 1499
 
1500 1500
 	// Reference: packages/form-builder/src/constants.ts:104
1501
-	__( 'adds a text input for entering a URL address', 'event_espresso' ),
1501
+	__('adds a text input for entering a URL address', 'event_espresso'),
1502 1502
 
1503 1503
 	// Reference: packages/form-builder/src/constants.ts:107
1504
-	__( 'Date', 'event_espresso' ),
1504
+	__('Date', 'event_espresso'),
1505 1505
 
1506 1506
 	// Reference: packages/form-builder/src/constants.ts:109
1507
-	__( 'adds a text input that allows users to enter a date directly via keyboard or a datepicker', 'event_espresso' ),
1507
+	__('adds a text input that allows users to enter a date directly via keyboard or a datepicker', 'event_espresso'),
1508 1508
 
1509 1509
 	// Reference: packages/form-builder/src/constants.ts:112
1510 1510
 	// Reference: packages/form-builder/src/state/utils.ts:369
1511
-	__( 'Local Date', 'event_espresso' ),
1511
+	__('Local Date', 'event_espresso'),
1512 1512
 
1513 1513
 	// Reference: packages/form-builder/src/constants.ts:117
1514
-	__( 'Month', 'event_espresso' ),
1514
+	__('Month', 'event_espresso'),
1515 1515
 
1516 1516
 	// Reference: packages/form-builder/src/constants.ts:119
1517
-	__( 'adds a text input that allows users to enter a month and year directly via keyboard or a datepicker', 'event_espresso' ),
1517
+	__('adds a text input that allows users to enter a month and year directly via keyboard or a datepicker', 'event_espresso'),
1518 1518
 
1519 1519
 	// Reference: packages/form-builder/src/constants.ts:122
1520
-	__( 'Time', 'event_espresso' ),
1520
+	__('Time', 'event_espresso'),
1521 1521
 
1522 1522
 	// Reference: packages/form-builder/src/constants.ts:124
1523
-	__( 'adds a text input that allows users to enter a time directly via keyboard or a timepicker', 'event_espresso' ),
1523
+	__('adds a text input that allows users to enter a time directly via keyboard or a timepicker', 'event_espresso'),
1524 1524
 
1525 1525
 	// Reference: packages/form-builder/src/constants.ts:127
1526
-	__( 'Week', 'event_espresso' ),
1526
+	__('Week', 'event_espresso'),
1527 1527
 
1528 1528
 	// Reference: packages/form-builder/src/constants.ts:129
1529
-	__( 'adds a text input that allows users to enter a week and year directly via keyboard or a datepicker', 'event_espresso' ),
1529
+	__('adds a text input that allows users to enter a week and year directly via keyboard or a datepicker', 'event_espresso'),
1530 1530
 
1531 1531
 	// Reference: packages/form-builder/src/constants.ts:132
1532
-	__( 'Day Selector', 'event_espresso' ),
1532
+	__('Day Selector', 'event_espresso'),
1533 1533
 
1534 1534
 	// Reference: packages/form-builder/src/constants.ts:134
1535
-	__( 'adds a dropdown selector that allows users to select the day of the month (01 to 31)', 'event_espresso' ),
1535
+	__('adds a dropdown selector that allows users to select the day of the month (01 to 31)', 'event_espresso'),
1536 1536
 
1537 1537
 	// Reference: packages/form-builder/src/constants.ts:137
1538
-	__( 'Month Selector', 'event_espresso' ),
1538
+	__('Month Selector', 'event_espresso'),
1539 1539
 
1540 1540
 	// Reference: packages/form-builder/src/constants.ts:139
1541
-	__( 'adds a dropdown selector that allows users to select the month of the year (01 to 12)', 'event_espresso' ),
1541
+	__('adds a dropdown selector that allows users to select the month of the year (01 to 12)', 'event_espresso'),
1542 1542
 
1543 1543
 	// Reference: packages/form-builder/src/constants.ts:142
1544
-	__( 'Year Selector', 'event_espresso' ),
1544
+	__('Year Selector', 'event_espresso'),
1545 1545
 
1546 1546
 	// Reference: packages/form-builder/src/constants.ts:144
1547
-	__( 'adds a dropdown selector that allows users to select the year from a configurable range', 'event_espresso' ),
1547
+	__('adds a dropdown selector that allows users to select the year from a configurable range', 'event_espresso'),
1548 1548
 
1549 1549
 	// Reference: packages/form-builder/src/constants.ts:147
1550
-	__( 'Radio Buttons', 'event_espresso' ),
1550
+	__('Radio Buttons', 'event_espresso'),
1551 1551
 
1552 1552
 	// Reference: packages/form-builder/src/constants.ts:149
1553
-	__( 'adds one or more radio buttons that allow users to only select one option from those provided', 'event_espresso' ),
1553
+	__('adds one or more radio buttons that allow users to only select one option from those provided', 'event_espresso'),
1554 1554
 
1555 1555
 	// Reference: packages/form-builder/src/constants.ts:152
1556 1556
 	// Reference: packages/form-builder/src/state/utils.ts:375
1557
-	__( 'Decimal Number', 'event_espresso' ),
1557
+	__('Decimal Number', 'event_espresso'),
1558 1558
 
1559 1559
 	// Reference: packages/form-builder/src/constants.ts:154
1560
-	__( 'adds a text input that only accepts numbers whose value is a decimal (float)', 'event_espresso' ),
1560
+	__('adds a text input that only accepts numbers whose value is a decimal (float)', 'event_espresso'),
1561 1561
 
1562 1562
 	// Reference: packages/form-builder/src/constants.ts:157
1563 1563
 	// Reference: packages/form-builder/src/state/utils.ts:378
1564
-	__( 'Whole Number', 'event_espresso' ),
1564
+	__('Whole Number', 'event_espresso'),
1565 1565
 
1566 1566
 	// Reference: packages/form-builder/src/constants.ts:159
1567
-	__( 'adds a text input that only accepts numbers whose value is an integer (whole number)', 'event_espresso' ),
1567
+	__('adds a text input that only accepts numbers whose value is an integer (whole number)', 'event_espresso'),
1568 1568
 
1569 1569
 	// Reference: packages/form-builder/src/constants.ts:162
1570
-	__( 'Number Range', 'event_espresso' ),
1570
+	__('Number Range', 'event_espresso'),
1571 1571
 
1572 1572
 	// Reference: packages/form-builder/src/constants.ts:167
1573
-	__( 'Phone Number', 'event_espresso' ),
1573
+	__('Phone Number', 'event_espresso'),
1574 1574
 
1575 1575
 	// Reference: packages/form-builder/src/constants.ts:172
1576
-	__( 'Dropdown', 'event_espresso' ),
1576
+	__('Dropdown', 'event_espresso'),
1577 1577
 
1578 1578
 	// Reference: packages/form-builder/src/constants.ts:174
1579
-	__( 'adds a dropdown selector that accepts a single value', 'event_espresso' ),
1579
+	__('adds a dropdown selector that accepts a single value', 'event_espresso'),
1580 1580
 
1581 1581
 	// Reference: packages/form-builder/src/constants.ts:177
1582
-	__( 'Multi Select', 'event_espresso' ),
1582
+	__('Multi Select', 'event_espresso'),
1583 1583
 
1584 1584
 	// Reference: packages/form-builder/src/constants.ts:179
1585
-	__( 'adds a dropdown selector that accepts multiple values', 'event_espresso' ),
1585
+	__('adds a dropdown selector that accepts multiple values', 'event_espresso'),
1586 1586
 
1587 1587
 	// Reference: packages/form-builder/src/constants.ts:182
1588
-	__( 'Toggle/Switch', 'event_espresso' ),
1588
+	__('Toggle/Switch', 'event_espresso'),
1589 1589
 
1590 1590
 	// Reference: packages/form-builder/src/constants.ts:184
1591
-	__( 'adds a toggle or a switch to accept true or false value', 'event_espresso' ),
1591
+	__('adds a toggle or a switch to accept true or false value', 'event_espresso'),
1592 1592
 
1593 1593
 	// Reference: packages/form-builder/src/constants.ts:187
1594
-	__( 'Multi Checkbox', 'event_espresso' ),
1594
+	__('Multi Checkbox', 'event_espresso'),
1595 1595
 
1596 1596
 	// Reference: packages/form-builder/src/constants.ts:189
1597
-	__( 'adds checkboxes that allow users to select zero or more options from those provided', 'event_espresso' ),
1597
+	__('adds checkboxes that allow users to select zero or more options from those provided', 'event_espresso'),
1598 1598
 
1599 1599
 	// Reference: packages/form-builder/src/constants.ts:192
1600
-	__( 'Country Selector', 'event_espresso' ),
1600
+	__('Country Selector', 'event_espresso'),
1601 1601
 
1602 1602
 	// Reference: packages/form-builder/src/constants.ts:194
1603
-	__( 'adds a dropdown selector populated with names of countries that are enabled for the site', 'event_espresso' ),
1603
+	__('adds a dropdown selector populated with names of countries that are enabled for the site', 'event_espresso'),
1604 1604
 
1605 1605
 	// Reference: packages/form-builder/src/constants.ts:197
1606
-	__( 'State Selector', 'event_espresso' ),
1606
+	__('State Selector', 'event_espresso'),
1607 1607
 
1608 1608
 	// Reference: packages/form-builder/src/constants.ts:202
1609
-	__( 'Button', 'event_espresso' ),
1609
+	__('Button', 'event_espresso'),
1610 1610
 
1611 1611
 	// Reference: packages/form-builder/src/constants.ts:204
1612
-	__( 'adds a button to the form that can be used for triggering fucntionality (requires custom coding)', 'event_espresso' ),
1612
+	__('adds a button to the form that can be used for triggering fucntionality (requires custom coding)', 'event_espresso'),
1613 1613
 
1614 1614
 	// Reference: packages/form-builder/src/constants.ts:207
1615
-	__( 'Reset Button', 'event_espresso' ),
1615
+	__('Reset Button', 'event_espresso'),
1616 1616
 
1617 1617
 	// Reference: packages/form-builder/src/constants.ts:209
1618
-	__( 'adds a button that will reset the form back to its original state.', 'event_espresso' ),
1618
+	__('adds a button that will reset the form back to its original state.', 'event_espresso'),
1619 1619
 
1620 1620
 	// Reference: packages/form-builder/src/constants.ts:55
1621
-	__( 'Form Section', 'event_espresso' ),
1621
+	__('Form Section', 'event_espresso'),
1622 1622
 
1623 1623
 	// Reference: packages/form-builder/src/constants.ts:57
1624
-	__( 'Used for creating logical groupings for questions and form elements. Need to add a heading or description? Use the HTML form element.', 'event_espresso' ),
1624
+	__('Used for creating logical groupings for questions and form elements. Need to add a heading or description? Use the HTML form element.', 'event_espresso'),
1625 1625
 
1626 1626
 	// Reference: packages/form-builder/src/constants.ts:62
1627
-	__( 'HTML Block', 'event_espresso' ),
1627
+	__('HTML Block', 'event_espresso'),
1628 1628
 
1629 1629
 	// Reference: packages/form-builder/src/constants.ts:64
1630
-	__( 'allows you to add HTML like headings or text paragraphs to your form', 'event_espresso' ),
1630
+	__('allows you to add HTML like headings or text paragraphs to your form', 'event_espresso'),
1631 1631
 
1632 1632
 	// Reference: packages/form-builder/src/constants.ts:69
1633
-	__( 'adds a text input that only accepts plain text', 'event_espresso' ),
1633
+	__('adds a text input that only accepts plain text', 'event_espresso'),
1634 1634
 
1635 1635
 	// Reference: packages/form-builder/src/constants.ts:72
1636
-	__( 'Plain Text Area', 'event_espresso' ),
1636
+	__('Plain Text Area', 'event_espresso'),
1637 1637
 
1638 1638
 	// Reference: packages/form-builder/src/constants.ts:74
1639
-	__( 'adds a textarea block that only accepts plain text', 'event_espresso' ),
1639
+	__('adds a textarea block that only accepts plain text', 'event_espresso'),
1640 1640
 
1641 1641
 	// Reference: packages/form-builder/src/constants.ts:77
1642
-	__( 'HTML Text Area', 'event_espresso' ),
1642
+	__('HTML Text Area', 'event_espresso'),
1643 1643
 
1644 1644
 	// Reference: packages/form-builder/src/constants.ts:79
1645
-	__( 'adds a textarea block that accepts text including simple HTML markup', 'event_espresso' ),
1645
+	__('adds a textarea block that accepts text including simple HTML markup', 'event_espresso'),
1646 1646
 
1647 1647
 	// Reference: packages/form-builder/src/constants.ts:84
1648
-	__( 'adds a text input that only accepts a valid email address', 'event_espresso' ),
1648
+	__('adds a text input that only accepts a valid email address', 'event_espresso'),
1649 1649
 
1650 1650
 	// Reference: packages/form-builder/src/constants.ts:87
1651
-	__( 'Email Confirmation', 'event_espresso' ),
1651
+	__('Email Confirmation', 'event_espresso'),
1652 1652
 
1653 1653
 	// Reference: packages/form-builder/src/constants.ts:92
1654
-	__( 'Password', 'event_espresso' ),
1654
+	__('Password', 'event_espresso'),
1655 1655
 
1656 1656
 	// Reference: packages/form-builder/src/constants.ts:94
1657
-	__( 'adds a text input that accepts text but masks what the user enters', 'event_espresso' ),
1657
+	__('adds a text input that accepts text but masks what the user enters', 'event_espresso'),
1658 1658
 
1659 1659
 	// Reference: packages/form-builder/src/constants.ts:97
1660
-	__( 'Password Confirmation', 'event_espresso' ),
1660
+	__('Password Confirmation', 'event_espresso'),
1661 1661
 
1662 1662
 	// Reference: packages/form-builder/src/data/useElementMutator.ts:54
1663
-	__( 'element', 'event_espresso' ),
1663
+	__('element', 'event_espresso'),
1664 1664
 
1665 1665
 	// Reference: packages/form-builder/src/data/useSectionMutator.ts:54
1666
-	__( 'section', 'event_espresso' ),
1666
+	__('section', 'event_espresso'),
1667 1667
 
1668 1668
 	// Reference: packages/form-builder/src/state/utils.ts:360
1669
-	__( 'click', 'event_espresso' ),
1669
+	__('click', 'event_espresso'),
1670 1670
 
1671 1671
 	// Reference: packages/form-builder/src/state/utils.ts:363
1672
-	__( 'checkboxes', 'event_espresso' ),
1672
+	__('checkboxes', 'event_espresso'),
1673 1673
 
1674 1674
 	// Reference: packages/form-builder/src/state/utils.ts:366
1675
-	__( 'date', 'event_espresso' ),
1675
+	__('date', 'event_espresso'),
1676 1676
 
1677 1677
 	// Reference: packages/form-builder/src/state/utils.ts:372
1678
-	__( 'day', 'event_espresso' ),
1678
+	__('day', 'event_espresso'),
1679 1679
 
1680 1680
 	// Reference: packages/form-builder/src/state/utils.ts:381
1681
-	__( 'email address', 'event_espresso' ),
1681
+	__('email address', 'event_espresso'),
1682 1682
 
1683 1683
 	// Reference: packages/form-builder/src/state/utils.ts:384
1684
-	__( 'confirm email address', 'event_espresso' ),
1684
+	__('confirm email address', 'event_espresso'),
1685 1685
 
1686 1686
 	// Reference: packages/form-builder/src/state/utils.ts:388
1687
-	__( 'month', 'event_espresso' ),
1687
+	__('month', 'event_espresso'),
1688 1688
 
1689 1689
 	// Reference: packages/form-builder/src/state/utils.ts:391
1690
-	__( 'password', 'event_espresso' ),
1690
+	__('password', 'event_espresso'),
1691 1691
 
1692 1692
 	// Reference: packages/form-builder/src/state/utils.ts:394
1693
-	__( 'confirm password', 'event_espresso' ),
1693
+	__('confirm password', 'event_espresso'),
1694 1694
 
1695 1695
 	// Reference: packages/form-builder/src/state/utils.ts:397
1696
-	__( 'radio buttons', 'event_espresso' ),
1696
+	__('radio buttons', 'event_espresso'),
1697 1697
 
1698 1698
 	// Reference: packages/form-builder/src/state/utils.ts:400
1699
-	__( 'number range', 'event_espresso' ),
1699
+	__('number range', 'event_espresso'),
1700 1700
 
1701 1701
 	// Reference: packages/form-builder/src/state/utils.ts:403
1702
-	__( 'selection dropdown', 'event_espresso' ),
1702
+	__('selection dropdown', 'event_espresso'),
1703 1703
 
1704 1704
 	// Reference: packages/form-builder/src/state/utils.ts:406
1705
-	__( 'country', 'event_espresso' ),
1705
+	__('country', 'event_espresso'),
1706 1706
 
1707 1707
 	// Reference: packages/form-builder/src/state/utils.ts:409
1708
-	__( 'multi-select dropdown', 'event_espresso' ),
1708
+	__('multi-select dropdown', 'event_espresso'),
1709 1709
 
1710 1710
 	// Reference: packages/form-builder/src/state/utils.ts:412
1711
-	__( 'state/province', 'event_espresso' ),
1711
+	__('state/province', 'event_espresso'),
1712 1712
 
1713 1713
 	// Reference: packages/form-builder/src/state/utils.ts:415
1714
-	__( 'on/off switch', 'event_espresso' ),
1714
+	__('on/off switch', 'event_espresso'),
1715 1715
 
1716 1716
 	// Reference: packages/form-builder/src/state/utils.ts:418
1717
-	__( 'reset', 'event_espresso' ),
1717
+	__('reset', 'event_espresso'),
1718 1718
 
1719 1719
 	// Reference: packages/form-builder/src/state/utils.ts:421
1720
-	__( 'phone number', 'event_espresso' ),
1720
+	__('phone number', 'event_espresso'),
1721 1721
 
1722 1722
 	// Reference: packages/form-builder/src/state/utils.ts:424
1723
-	__( 'text', 'event_espresso' ),
1723
+	__('text', 'event_espresso'),
1724 1724
 
1725 1725
 	// Reference: packages/form-builder/src/state/utils.ts:427
1726
-	__( 'simple textarea', 'event_espresso' ),
1726
+	__('simple textarea', 'event_espresso'),
1727 1727
 
1728 1728
 	// Reference: packages/form-builder/src/state/utils.ts:430
1729
-	__( 'html textarea', 'event_espresso' ),
1729
+	__('html textarea', 'event_espresso'),
1730 1730
 
1731 1731
 	// Reference: packages/form-builder/src/state/utils.ts:439
1732
-	__( 'week', 'event_espresso' ),
1732
+	__('week', 'event_espresso'),
1733 1733
 
1734 1734
 	// Reference: packages/form-builder/src/state/utils.ts:442
1735
-	__( 'year', 'event_espresso' ),
1735
+	__('year', 'event_espresso'),
1736 1736
 
1737 1737
 	// Reference: packages/form/src/adapters/WPMediaImage.tsx:12
1738
-	__( 'Select Image', 'event_espresso' ),
1738
+	__('Select Image', 'event_espresso'),
1739 1739
 
1740 1740
 	// Reference: packages/form/src/adapters/WPMediaImage.tsx:44
1741 1741
 	// Reference: packages/rich-text-editor/src/components/AdvancedTextEditor/toolbarButtons/WPMedia.tsx:11
1742 1742
 	// Reference: packages/rich-text-editor/src/rte-old/components/toolbarButtons/WPMedia.tsx:12
1743 1743
 	// Reference: packages/ui-components/src/SimpleEntityList/EntityTemplate.tsx:32
1744
-	__( 'Select', 'event_espresso' ),
1744
+	__('Select', 'event_espresso'),
1745 1745
 
1746 1746
 	// Reference: packages/form/src/renderers/RepeatableRenderer.tsx:36
1747 1747
 	/* translators: %d the entry number */
1748
-	__( 'Entry %d', 'event_espresso' ),
1748
+	__('Entry %d', 'event_espresso'),
1749 1749
 
1750 1750
 	// Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:11
1751 1751
 	// Reference: packages/helpers/src/tickets/getStatusTextLabel.ts:17
1752
-	__( 'sold out', 'event_espresso' ),
1752
+	__('sold out', 'event_espresso'),
1753 1753
 
1754 1754
 	// Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:14
1755 1755
 	// Reference: packages/helpers/src/tickets/getStatusTextLabel.ts:14
1756
-	__( 'expired', 'event_espresso' ),
1756
+	__('expired', 'event_espresso'),
1757 1757
 
1758 1758
 	// Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:17
1759
-	__( 'upcoming', 'event_espresso' ),
1759
+	__('upcoming', 'event_espresso'),
1760 1760
 
1761 1761
 	// Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:20
1762
-	__( 'active', 'event_espresso' ),
1762
+	__('active', 'event_espresso'),
1763 1763
 
1764 1764
 	// Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:23
1765 1765
 	// Reference: packages/helpers/src/tickets/getStatusTextLabel.ts:11
1766
-	__( 'trashed', 'event_espresso' ),
1766
+	__('trashed', 'event_espresso'),
1767 1767
 
1768 1768
 	// Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:26
1769
-	__( 'cancelled', 'event_espresso' ),
1769
+	__('cancelled', 'event_espresso'),
1770 1770
 
1771 1771
 	// Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:29
1772
-	__( 'postponed', 'event_espresso' ),
1772
+	__('postponed', 'event_espresso'),
1773 1773
 
1774 1774
 	// Reference: packages/helpers/src/datetimes/getStatusTextLabel.ts:33
1775
-	__( 'inactive', 'event_espresso' ),
1775
+	__('inactive', 'event_espresso'),
1776 1776
 
1777 1777
 	// Reference: packages/helpers/src/tickets/getStatusTextLabel.ts:20
1778
-	__( 'pending', 'event_espresso' ),
1778
+	__('pending', 'event_espresso'),
1779 1779
 
1780 1780
 	// Reference: packages/helpers/src/tickets/getStatusTextLabel.ts:23
1781
-	__( 'on sale', 'event_espresso' ),
1781
+	__('on sale', 'event_espresso'),
1782 1782
 
1783 1783
 	// Reference: packages/helpers/src/tickets/ticketVisibilityOptions.ts:6
1784
-	__( 'Where the ticket can be viewed throughout the UI. ', 'event_espresso' ),
1784
+	__('Where the ticket can be viewed throughout the UI. ', 'event_espresso'),
1785 1785
 
1786 1786
 	// Reference: packages/predicates/src/registration/statusOptions.ts:16
1787
-	__( 'Declined', 'event_espresso' ),
1787
+	__('Declined', 'event_espresso'),
1788 1788
 
1789 1789
 	// Reference: packages/predicates/src/registration/statusOptions.ts:21
1790
-	__( 'Incomplete', 'event_espresso' ),
1790
+	__('Incomplete', 'event_espresso'),
1791 1791
 
1792 1792
 	// Reference: packages/predicates/src/registration/statusOptions.ts:26
1793
-	__( 'Not Approved', 'event_espresso' ),
1793
+	__('Not Approved', 'event_espresso'),
1794 1794
 
1795 1795
 	// Reference: packages/predicates/src/registration/statusOptions.ts:31
1796
-	__( 'Pending Payment', 'event_espresso' ),
1796
+	__('Pending Payment', 'event_espresso'),
1797 1797
 
1798 1798
 	// Reference: packages/predicates/src/registration/statusOptions.ts:36
1799
-	__( 'Wait List', 'event_espresso' ),
1799
+	__('Wait List', 'event_espresso'),
1800 1800
 
1801 1801
 	// Reference: packages/predicates/src/registration/statusOptions.ts:6
1802
-	__( 'Approved', 'event_espresso' ),
1802
+	__('Approved', 'event_espresso'),
1803 1803
 
1804 1804
 	// Reference: packages/rich-text-editor/src/components/AdvancedTextEditor/toolbarButtons/WPMedia.tsx:9
1805 1805
 	// Reference: packages/rich-text-editor/src/rte-old/components/toolbarButtons/WPMedia.tsx:10
1806
-	__( 'Select media', 'event_espresso' ),
1806
+	__('Select media', 'event_espresso'),
1807 1807
 
1808 1808
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/RichTextEditor.tsx:84
1809
-	__( 'Write something…', 'event_espresso' ),
1809
+	__('Write something…', 'event_espresso'),
1810 1810
 
1811 1811
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/Toolbar.tsx:20
1812
-	__( 'RTE Toolbar', 'event_espresso' ),
1812
+	__('RTE Toolbar', 'event_espresso'),
1813 1813
 
1814 1814
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:11
1815
-	__( 'Normal', 'event_espresso' ),
1815
+	__('Normal', 'event_espresso'),
1816 1816
 
1817 1817
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:12
1818
-	__( 'H1', 'event_espresso' ),
1818
+	__('H1', 'event_espresso'),
1819 1819
 
1820 1820
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:13
1821
-	__( 'H2', 'event_espresso' ),
1821
+	__('H2', 'event_espresso'),
1822 1822
 
1823 1823
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:14
1824
-	__( 'H3', 'event_espresso' ),
1824
+	__('H3', 'event_espresso'),
1825 1825
 
1826 1826
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:15
1827
-	__( 'H4', 'event_espresso' ),
1827
+	__('H4', 'event_espresso'),
1828 1828
 
1829 1829
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:16
1830
-	__( 'H5', 'event_espresso' ),
1830
+	__('H5', 'event_espresso'),
1831 1831
 
1832 1832
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:17
1833
-	__( 'H6', 'event_espresso' ),
1833
+	__('H6', 'event_espresso'),
1834 1834
 
1835 1835
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:18
1836
-	__( 'Block quote', 'event_espresso' ),
1836
+	__('Block quote', 'event_espresso'),
1837 1837
 
1838 1838
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/blockType/Component.tsx:19
1839
-	__( 'Code', 'event_espresso' ),
1839
+	__('Code', 'event_espresso'),
1840 1840
 
1841 1841
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/colorPicker/Component.tsx:36
1842
-	__( 'Set color', 'event_espresso' ),
1842
+	__('Set color', 'event_espresso'),
1843 1843
 
1844 1844
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/colorPicker/Component.tsx:45
1845
-	__( 'Text color', 'event_espresso' ),
1845
+	__('Text color', 'event_espresso'),
1846 1846
 
1847 1847
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/colorPicker/Component.tsx:47
1848
-	__( 'Background color', 'event_espresso' ),
1848
+	__('Background color', 'event_espresso'),
1849 1849
 
1850 1850
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/image/Component.tsx:39
1851
-	__( 'Add image', 'event_espresso' ),
1851
+	__('Add image', 'event_espresso'),
1852 1852
 
1853 1853
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/image/Component.tsx:51
1854
-	__( 'Image URL', 'event_espresso' ),
1854
+	__('Image URL', 'event_espresso'),
1855 1855
 
1856 1856
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/image/Component.tsx:55
1857
-	__( 'Alt text', 'event_espresso' ),
1857
+	__('Alt text', 'event_espresso'),
1858 1858
 
1859 1859
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/image/Component.tsx:56
1860
-	__( 'Width', 'event_espresso' ),
1860
+	__('Width', 'event_espresso'),
1861 1861
 
1862 1862
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/image/Component.tsx:60
1863
-	__( 'Height', 'event_espresso' ),
1863
+	__('Height', 'event_espresso'),
1864 1864
 
1865 1865
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/link/Component.tsx:54
1866
-	__( 'Edit link', 'event_espresso' ),
1866
+	__('Edit link', 'event_espresso'),
1867 1867
 
1868 1868
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/link/Component.tsx:64
1869
-	__( 'URL title', 'event_espresso' ),
1869
+	__('URL title', 'event_espresso'),
1870 1870
 
1871 1871
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/list/Component.tsx:11
1872
-	__( 'Unordered list', 'event_espresso' ),
1872
+	__('Unordered list', 'event_espresso'),
1873 1873
 
1874 1874
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/list/Component.tsx:12
1875
-	__( 'Ordered list', 'event_espresso' ),
1875
+	__('Ordered list', 'event_espresso'),
1876 1876
 
1877 1877
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/list/Component.tsx:13
1878 1878
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/textAlign/Component.tsx:13
1879
-	__( 'Indent', 'event_espresso' ),
1879
+	__('Indent', 'event_espresso'),
1880 1880
 
1881 1881
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/list/Component.tsx:14
1882 1882
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/textAlign/Component.tsx:14
1883
-	__( 'Outdent', 'event_espresso' ),
1883
+	__('Outdent', 'event_espresso'),
1884 1884
 
1885 1885
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/textAlign/Component.tsx:11
1886
-	__( 'Unordered textalign', 'event_espresso' ),
1886
+	__('Unordered textalign', 'event_espresso'),
1887 1887
 
1888 1888
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/Toolbar/controls/textAlign/Component.tsx:12
1889
-	__( 'Ordered textalign', 'event_espresso' ),
1889
+	__('Ordered textalign', 'event_espresso'),
1890 1890
 
1891 1891
 	// Reference: packages/rich-text-editor/src/components/RichTextEditor/render/Image/Toolbar.tsx:32
1892
-	__( 'Image toolbar', 'event_espresso' ),
1892
+	__('Image toolbar', 'event_espresso'),
1893 1893
 
1894 1894
 	// Reference: packages/rich-text-editor/src/components/WithEditMode/WithEditMode.tsx:62
1895 1895
 	// Reference: packages/rich-text-editor/src/rte-old/components/RTEWithEditMode/RTEWithEditMode.tsx:35
1896
-	__( 'Visual editor', 'event_espresso' ),
1896
+	__('Visual editor', 'event_espresso'),
1897 1897
 
1898 1898
 	// Reference: packages/rich-text-editor/src/components/WithEditMode/WithEditMode.tsx:66
1899 1899
 	// Reference: packages/rich-text-editor/src/rte-old/components/RTEWithEditMode/RTEWithEditMode.tsx:39
1900
-	__( 'HTML editor', 'event_espresso' ),
1900
+	__('HTML editor', 'event_espresso'),
1901 1901
 
1902 1902
 	// Reference: packages/rich-text-editor/src/rte-old/components/toolbarButtons/WPMedia.tsx:68
1903
-	__( 'Add Media', 'event_espresso' ),
1903
+	__('Add Media', 'event_espresso'),
1904 1904
 
1905 1905
 	// Reference: packages/tpc/src/buttons/AddPriceModifierButton.tsx:14
1906
-	__( 'add new price modifier after this row', 'event_espresso' ),
1906
+	__('add new price modifier after this row', 'event_espresso'),
1907 1907
 
1908 1908
 	// Reference: packages/tpc/src/buttons/DeleteAllPricesButton.tsx:14
1909
-	__( 'Delete all prices', 'event_espresso' ),
1909
+	__('Delete all prices', 'event_espresso'),
1910 1910
 
1911 1911
 	// Reference: packages/tpc/src/buttons/DeleteAllPricesButton.tsx:27
1912
-	__( 'Are you sure you want to delete all of this ticket\'s prices and make it free? This action is permanent and can not be undone.', 'event_espresso' ),
1912
+	__('Are you sure you want to delete all of this ticket\'s prices and make it free? This action is permanent and can not be undone.', 'event_espresso'),
1913 1913
 
1914 1914
 	// Reference: packages/tpc/src/buttons/DeleteAllPricesButton.tsx:31
1915
-	__( 'Delete all prices?', 'event_espresso' ),
1915
+	__('Delete all prices?', 'event_espresso'),
1916 1916
 
1917 1917
 	// Reference: packages/tpc/src/buttons/DeletePriceModifierButton.tsx:12
1918
-	__( 'delete price modifier', 'event_espresso' ),
1918
+	__('delete price modifier', 'event_espresso'),
1919 1919
 
1920 1920
 	// Reference: packages/tpc/src/buttons/ReverseCalculateButton.tsx:14
1921
-	__( 'Ticket base price is being reverse calculated from bottom to top starting with the ticket total. Entering a new ticket total will reverse calculate the ticket base price after applying all price modifiers in reverse. Click to turn off reverse calculations', 'event_espresso' ),
1921
+	__('Ticket base price is being reverse calculated from bottom to top starting with the ticket total. Entering a new ticket total will reverse calculate the ticket base price after applying all price modifiers in reverse. Click to turn off reverse calculations', 'event_espresso'),
1922 1922
 
1923 1923
 	// Reference: packages/tpc/src/buttons/ReverseCalculateButton.tsx:17
1924
-	__( 'Ticket total is being calculated normally from top to bottom starting from the base price. Entering a new ticket base price will recalculate the ticket total after applying all price modifiers. Click to turn on reverse calculations', 'event_espresso' ),
1924
+	__('Ticket total is being calculated normally from top to bottom starting from the base price. Entering a new ticket base price will recalculate the ticket total after applying all price modifiers. Click to turn on reverse calculations', 'event_espresso'),
1925 1925
 
1926 1926
 	// Reference: packages/tpc/src/buttons/ReverseCalculateButton.tsx:21
1927
-	__( 'Disable reverse calculate', 'event_espresso' ),
1927
+	__('Disable reverse calculate', 'event_espresso'),
1928 1928
 
1929 1929
 	// Reference: packages/tpc/src/buttons/ReverseCalculateButton.tsx:21
1930
-	__( 'Enable reverse calculate', 'event_espresso' ),
1930
+	__('Enable reverse calculate', 'event_espresso'),
1931 1931
 
1932 1932
 	// Reference: packages/tpc/src/buttons/TicketPriceCalculatorButton.tsx:28
1933
-	__( 'ticket price calculator', 'event_espresso' ),
1933
+	__('ticket price calculator', 'event_espresso'),
1934 1934
 
1935 1935
 	// Reference: packages/tpc/src/buttons/taxes/AddDefaultTaxesButton.tsx:9
1936
-	__( 'Add default taxes', 'event_espresso' ),
1936
+	__('Add default taxes', 'event_espresso'),
1937 1937
 
1938 1938
 	// Reference: packages/tpc/src/buttons/taxes/RemoveTaxesButton.tsx:10
1939
-	__( 'Are you sure you want to remove all of this ticket\'s taxes?', 'event_espresso' ),
1939
+	__('Are you sure you want to remove all of this ticket\'s taxes?', 'event_espresso'),
1940 1940
 
1941 1941
 	// Reference: packages/tpc/src/buttons/taxes/RemoveTaxesButton.tsx:14
1942
-	__( 'Remove all taxes?', 'event_espresso' ),
1942
+	__('Remove all taxes?', 'event_espresso'),
1943 1943
 
1944 1944
 	// Reference: packages/tpc/src/buttons/taxes/RemoveTaxesButton.tsx:7
1945
-	__( 'Remove taxes', 'event_espresso' ),
1945
+	__('Remove taxes', 'event_espresso'),
1946 1946
 
1947 1947
 	// Reference: packages/tpc/src/components/DefaultPricesInfo.tsx:29
1948
-	__( 'Modify default prices.', 'event_espresso' ),
1948
+	__('Modify default prices.', 'event_espresso'),
1949 1949
 
1950 1950
 	// Reference: packages/tpc/src/components/DefaultTaxesInfo.tsx:29
1951
-	__( 'New default taxes are available. Click the - Add default taxes - button to add them now.', 'event_espresso' ),
1951
+	__('New default taxes are available. Click the - Add default taxes - button to add them now.', 'event_espresso'),
1952 1952
 
1953 1953
 	// Reference: packages/tpc/src/components/LockedTicketsBanner.tsx:12
1954 1954
 	// Reference: packages/tpc/src/hooks/useLockedTicketAction.ts:74
1955
-	__( 'Price editing is disabled!', 'event_espresso' ),
1955
+	__('Price editing is disabled!', 'event_espresso'),
1956 1956
 
1957 1957
 	// Reference: packages/tpc/src/components/NoPricesBanner/AddDefaultPricesButton.tsx:9
1958
-	__( 'Add default prices', 'event_espresso' ),
1958
+	__('Add default prices', 'event_espresso'),
1959 1959
 
1960 1960
 	// Reference: packages/tpc/src/components/NoPricesBanner/index.tsx:13
1961
-	__( 'This Ticket is Currently Free', 'event_espresso' ),
1961
+	__('This Ticket is Currently Free', 'event_espresso'),
1962 1962
 
1963 1963
 	// Reference: packages/tpc/src/components/NoPricesBanner/index.tsx:21
1964 1964
 	/* translators: %s default prices */
1965
-	__( 'Click the button below to load your %s into the calculator.', 'event_espresso' ),
1965
+	__('Click the button below to load your %s into the calculator.', 'event_espresso'),
1966 1966
 
1967 1967
 	// Reference: packages/tpc/src/components/NoPricesBanner/index.tsx:22
1968
-	__( 'default prices', 'event_espresso' ),
1968
+	__('default prices', 'event_espresso'),
1969 1969
 
1970 1970
 	// Reference: packages/tpc/src/components/NoPricesBanner/index.tsx:29
1971
-	__( 'Additional ticket price modifiers can be added or removed.', 'event_espresso' ),
1971
+	__('Additional ticket price modifiers can be added or removed.', 'event_espresso'),
1972 1972
 
1973 1973
 	// Reference: packages/tpc/src/components/NoPricesBanner/index.tsx:32
1974
-	__( 'Click the save button below to assign which dates this ticket will be available for purchase on.', 'event_espresso' ),
1974
+	__('Click the save button below to assign which dates this ticket will be available for purchase on.', 'event_espresso'),
1975 1975
 
1976 1976
 	// Reference: packages/tpc/src/components/TicketPriceCalculatorModal.tsx:22
1977 1977
 	// Reference: packages/ui-components/src/Confirm/ConfirmClose.tsx:7
1978 1978
 	// Reference: packages/ui-components/src/Confirm/useConfirmWithButton.tsx:10
1979 1979
 	// Reference: packages/ui-components/src/Confirm/useConfirmationDialog.tsx:52
1980
-	__( 'Changes will be lost if you proceed.', 'event_espresso' ),
1980
+	__('Changes will be lost if you proceed.', 'event_espresso'),
1981 1981
 
1982 1982
 	// Reference: packages/tpc/src/components/TicketPriceCalculatorModal.tsx:33
1983 1983
 	/* translators: %s ticket name */
1984
-	__( 'Price Calculator for Ticket: %s', 'event_espresso' ),
1984
+	__('Price Calculator for Ticket: %s', 'event_espresso'),
1985 1985
 
1986 1986
 	// Reference: packages/tpc/src/components/table/useFooterRowGenerator.tsx:48
1987
-	__( 'Total', 'event_espresso' ),
1987
+	__('Total', 'event_espresso'),
1988 1988
 
1989 1989
 	// Reference: packages/tpc/src/components/table/useFooterRowGenerator.tsx:57
1990
-	__( 'ticket total', 'event_espresso' ),
1990
+	__('ticket total', 'event_espresso'),
1991 1991
 
1992 1992
 	// Reference: packages/tpc/src/components/table/useHeaderRowGenerator.ts:29
1993
-	__( 'Order', 'event_espresso' ),
1993
+	__('Order', 'event_espresso'),
1994 1994
 
1995 1995
 	// Reference: packages/tpc/src/components/table/useHeaderRowGenerator.ts:35
1996
-	__( 'Price Type', 'event_espresso' ),
1996
+	__('Price Type', 'event_espresso'),
1997 1997
 
1998 1998
 	// Reference: packages/tpc/src/components/table/useHeaderRowGenerator.ts:41
1999
-	__( 'Label', 'event_espresso' ),
1999
+	__('Label', 'event_espresso'),
2000 2000
 
2001 2001
 	// Reference: packages/tpc/src/components/table/useHeaderRowGenerator.ts:53
2002
-	__( 'Amount', 'event_espresso' ),
2002
+	__('Amount', 'event_espresso'),
2003 2003
 
2004 2004
 	// Reference: packages/tpc/src/hooks/useLockedTicketAction.ts:22
2005
-	__( 'Copy ticket', 'event_espresso' ),
2005
+	__('Copy ticket', 'event_espresso'),
2006 2006
 
2007 2007
 	// Reference: packages/tpc/src/hooks/useLockedTicketAction.ts:26
2008
-	__( 'Copy and archive this ticket', 'event_espresso' ),
2008
+	__('Copy and archive this ticket', 'event_espresso'),
2009 2009
 
2010 2010
 	// Reference: packages/tpc/src/hooks/useLockedTicketAction.ts:29
2011
-	__( 'OK', 'event_espresso' ),
2011
+	__('OK', 'event_espresso'),
2012 2012
 
2013 2013
 	// Reference: packages/tpc/src/inputs/PriceAmountInput.tsx:34
2014
-	__( 'amount', 'event_espresso' ),
2014
+	__('amount', 'event_espresso'),
2015 2015
 
2016 2016
 	// Reference: packages/tpc/src/inputs/PriceAmountInput.tsx:46
2017
-	__( 'amount…', 'event_espresso' ),
2017
+	__('amount…', 'event_espresso'),
2018 2018
 
2019 2019
 	// Reference: packages/tpc/src/inputs/PriceDescriptionInput.tsx:14
2020
-	__( 'description…', 'event_espresso' ),
2020
+	__('description…', 'event_espresso'),
2021 2021
 
2022 2022
 	// Reference: packages/tpc/src/inputs/PriceDescriptionInput.tsx:9
2023
-	__( 'price description', 'event_espresso' ),
2023
+	__('price description', 'event_espresso'),
2024 2024
 
2025 2025
 	// Reference: packages/tpc/src/inputs/PriceIdInput.tsx:6
2026
-	__( 'price id', 'event_espresso' ),
2026
+	__('price id', 'event_espresso'),
2027 2027
 
2028 2028
 	// Reference: packages/tpc/src/inputs/PriceNameInput.tsx:13
2029
-	__( 'label…', 'event_espresso' ),
2029
+	__('label…', 'event_espresso'),
2030 2030
 
2031 2031
 	// Reference: packages/tpc/src/inputs/PriceNameInput.tsx:8
2032
-	__( 'price name', 'event_espresso' ),
2032
+	__('price name', 'event_espresso'),
2033 2033
 
2034 2034
 	// Reference: packages/tpc/src/inputs/PriceOrderInput.tsx:14
2035
-	__( 'price order', 'event_espresso' ),
2035
+	__('price order', 'event_espresso'),
2036 2036
 
2037 2037
 	// Reference: packages/tpc/src/utils/constants.ts:8
2038
-	__( 'Ticket price modifications are blocked for Tickets that have already been sold to registrants, because doing so would negatively affect internal accounting for the event. If you still need to modify ticket prices, then create a copy of those tickets, edit the prices for the new tickets, and then trash the old tickets.', 'event_espresso' ),
2038
+	__('Ticket price modifications are blocked for Tickets that have already been sold to registrants, because doing so would negatively affect internal accounting for the event. If you still need to modify ticket prices, then create a copy of those tickets, edit the prices for the new tickets, and then trash the old tickets.', 'event_espresso'),
2039 2039
 
2040 2040
 	// Reference: packages/ui-components/src/ActiveFilters/ActiveFilters.tsx:8
2041
-	__( 'active filters:', 'event_espresso' ),
2041
+	__('active filters:', 'event_espresso'),
2042 2042
 
2043 2043
 	// Reference: packages/ui-components/src/ActiveFilters/FilterTag/index.tsx:15
2044 2044
 	/* translators: %s filter name */
2045
-	__( 'remove filter - %s', 'event_espresso' ),
2045
+	__('remove filter - %s', 'event_espresso'),
2046 2046
 
2047 2047
 	// Reference: packages/ui-components/src/Address/Address.tsx:72
2048
-	__( 'Address:', 'event_espresso' ),
2048
+	__('Address:', 'event_espresso'),
2049 2049
 
2050 2050
 	// Reference: packages/ui-components/src/Address/Address.tsx:80
2051
-	__( 'City:', 'event_espresso' ),
2051
+	__('City:', 'event_espresso'),
2052 2052
 
2053 2053
 	// Reference: packages/ui-components/src/Address/Address.tsx:86
2054
-	__( 'State:', 'event_espresso' ),
2054
+	__('State:', 'event_espresso'),
2055 2055
 
2056 2056
 	// Reference: packages/ui-components/src/Address/Address.tsx:92
2057
-	__( 'Country:', 'event_espresso' ),
2057
+	__('Country:', 'event_espresso'),
2058 2058
 
2059 2059
 	// Reference: packages/ui-components/src/Address/Address.tsx:98
2060
-	__( 'Zip:', 'event_espresso' ),
2060
+	__('Zip:', 'event_espresso'),
2061 2061
 
2062 2062
 	// Reference: packages/ui-components/src/CalendarDateRange/CalendarDateRange.tsx:37
2063
-	__( 'to', 'event_espresso' ),
2063
+	__('to', 'event_espresso'),
2064 2064
 
2065 2065
 	// Reference: packages/ui-components/src/CalendarPageDate/CalendarPageDate.tsx:54
2066
-	__( 'TO', 'event_espresso' ),
2066
+	__('TO', 'event_espresso'),
2067 2067
 
2068 2068
 	// Reference: packages/ui-components/src/ColorPicker/ColorPicker.tsx:60
2069
-	__( 'Custom color', 'event_espresso' ),
2069
+	__('Custom color', 'event_espresso'),
2070 2070
 
2071 2071
 	// Reference: packages/ui-components/src/ColorPicker/Swatch.tsx:23
2072 2072
 	/* translators: color name */
2073
-	__( 'Color: %s', 'event_espresso' ),
2073
+	__('Color: %s', 'event_espresso'),
2074 2074
 
2075 2075
 	// Reference: packages/ui-components/src/ColorPicker/constants.ts:13
2076
-	__( 'Cyan bluish gray', 'event_espresso' ),
2076
+	__('Cyan bluish gray', 'event_espresso'),
2077 2077
 
2078 2078
 	// Reference: packages/ui-components/src/ColorPicker/constants.ts:17
2079
-	__( 'White', 'event_espresso' ),
2079
+	__('White', 'event_espresso'),
2080 2080
 
2081 2081
 	// Reference: packages/ui-components/src/ColorPicker/constants.ts:21
2082
-	__( 'Pale pink', 'event_espresso' ),
2082
+	__('Pale pink', 'event_espresso'),
2083 2083
 
2084 2084
 	// Reference: packages/ui-components/src/ColorPicker/constants.ts:25
2085
-	__( 'Vivid red', 'event_espresso' ),
2085
+	__('Vivid red', 'event_espresso'),
2086 2086
 
2087 2087
 	// Reference: packages/ui-components/src/ColorPicker/constants.ts:29
2088
-	__( 'Luminous vivid orange', 'event_espresso' ),
2088
+	__('Luminous vivid orange', 'event_espresso'),
2089 2089
 
2090 2090
 	// Reference: packages/ui-components/src/ColorPicker/constants.ts:33
2091
-	__( 'Luminous vivid amber', 'event_espresso' ),
2091
+	__('Luminous vivid amber', 'event_espresso'),
2092 2092
 
2093 2093
 	// Reference: packages/ui-components/src/ColorPicker/constants.ts:37
2094
-	__( 'Light green cyan', 'event_espresso' ),
2094
+	__('Light green cyan', 'event_espresso'),
2095 2095
 
2096 2096
 	// Reference: packages/ui-components/src/ColorPicker/constants.ts:41
2097
-	__( 'Vivid green cyan', 'event_espresso' ),
2097
+	__('Vivid green cyan', 'event_espresso'),
2098 2098
 
2099 2099
 	// Reference: packages/ui-components/src/ColorPicker/constants.ts:45
2100
-	__( 'Pale cyan blue', 'event_espresso' ),
2100
+	__('Pale cyan blue', 'event_espresso'),
2101 2101
 
2102 2102
 	// Reference: packages/ui-components/src/ColorPicker/constants.ts:49
2103
-	__( 'Vivid cyan blue', 'event_espresso' ),
2103
+	__('Vivid cyan blue', 'event_espresso'),
2104 2104
 
2105 2105
 	// Reference: packages/ui-components/src/ColorPicker/constants.ts:53
2106
-	__( 'Vivid purple', 'event_espresso' ),
2106
+	__('Vivid purple', 'event_espresso'),
2107 2107
 
2108 2108
 	// Reference: packages/ui-components/src/ColorPicker/constants.ts:9
2109
-	__( 'Black', 'event_espresso' ),
2109
+	__('Black', 'event_espresso'),
2110 2110
 
2111 2111
 	// Reference: packages/ui-components/src/Confirm/ConfirmClose.tsx:8
2112 2112
 	// Reference: packages/ui-components/src/Modal/ModalWithAlert.tsx:24
2113
-	__( 'Are you sure you want to close this?', 'event_espresso' ),
2113
+	__('Are you sure you want to close this?', 'event_espresso'),
2114 2114
 
2115 2115
 	// Reference: packages/ui-components/src/Confirm/ConfirmClose.tsx:9
2116 2116
 	// Reference: packages/ui-components/src/Modal/ModalWithAlert.tsx:25
2117
-	__( 'Yes, discard changes', 'event_espresso' ),
2117
+	__('Yes, discard changes', 'event_espresso'),
2118 2118
 
2119 2119
 	// Reference: packages/ui-components/src/Confirm/ConfirmDelete.tsx:7
2120
-	__( 'Are you sure you want to delete this?', 'event_espresso' ),
2120
+	__('Are you sure you want to delete this?', 'event_espresso'),
2121 2121
 
2122 2122
 	// Reference: packages/ui-components/src/Confirm/useConfirmWithButton.tsx:11
2123
-	__( 'Please confirm this action.', 'event_espresso' ),
2123
+	__('Please confirm this action.', 'event_espresso'),
2124 2124
 
2125 2125
 	// Reference: packages/ui-components/src/Confirm/useConfirmationDialog.tsx:39
2126
-	__( 'cancel', 'event_espresso' ),
2126
+	__('cancel', 'event_espresso'),
2127 2127
 
2128 2128
 	// Reference: packages/ui-components/src/Confirm/useConfirmationDialog.tsx:40
2129
-	__( 'confirm', 'event_espresso' ),
2129
+	__('confirm', 'event_espresso'),
2130 2130
 
2131 2131
 	// Reference: packages/ui-components/src/CurrencyDisplay/CurrencyDisplay.tsx:34
2132
-	__( 'free', 'event_espresso' ),
2132
+	__('free', 'event_espresso'),
2133 2133
 
2134 2134
 	// Reference: packages/ui-components/src/DateTimeRangePicker/DateTimeRangePicker.tsx:117
2135 2135
 	// Reference: packages/ui-components/src/Popover/PopoverForm/PopoverForm.tsx:44
2136
-	__( 'save', 'event_espresso' ),
2136
+	__('save', 'event_espresso'),
2137 2137
 
2138 2138
 	// Reference: packages/ui-components/src/DebugInfo/DebugInfo.tsx:36
2139
-	__( 'Hide Debug Info', 'event_espresso' ),
2139
+	__('Hide Debug Info', 'event_espresso'),
2140 2140
 
2141 2141
 	// Reference: packages/ui-components/src/DebugInfo/DebugInfo.tsx:36
2142
-	__( 'Show Debug Info', 'event_espresso' ),
2142
+	__('Show Debug Info', 'event_espresso'),
2143 2143
 
2144 2144
 	// Reference: packages/ui-components/src/EditDateRangeButton/EditDateRangeButton.tsx:49
2145
-	__( 'Edit Start and End Dates and Times', 'event_espresso' ),
2145
+	__('Edit Start and End Dates and Times', 'event_espresso'),
2146 2146
 
2147 2147
 	// Reference: packages/ui-components/src/EntityActionsMenu/entityMenuItems/CopyEntity.tsx:8
2148
-	__( 'copy', 'event_espresso' ),
2148
+	__('copy', 'event_espresso'),
2149 2149
 
2150 2150
 	// Reference: packages/ui-components/src/EntityActionsMenu/entityMenuItems/EditEntity.tsx:8
2151
-	__( 'edit', 'event_espresso' ),
2151
+	__('edit', 'event_espresso'),
2152 2152
 
2153 2153
 	// Reference: packages/ui-components/src/EntityActionsMenu/entityMenuItems/TrashEntity.tsx:8
2154
-	__( 'trash', 'event_espresso' ),
2154
+	__('trash', 'event_espresso'),
2155 2155
 
2156 2156
 	// Reference: packages/ui-components/src/EntityActionsMenu/entityMenuItems/Untrash.tsx:8
2157
-	__( 'untrash', 'event_espresso' ),
2157
+	__('untrash', 'event_espresso'),
2158 2158
 
2159 2159
 	// Reference: packages/ui-components/src/EntityList/RegistrationsLink/index.tsx:12
2160
-	__( 'click to open the registrations admin page in a new tab or window', 'event_espresso' ),
2160
+	__('click to open the registrations admin page in a new tab or window', 'event_espresso'),
2161 2161
 
2162 2162
 	// Reference: packages/ui-components/src/EntityList/filterBar/buttons/CardViewFilterButton.tsx:22
2163
-	__( 'card view', 'event_espresso' ),
2163
+	__('card view', 'event_espresso'),
2164 2164
 
2165 2165
 	// Reference: packages/ui-components/src/EntityList/filterBar/buttons/TableViewFilterButton.tsx:21
2166
-	__( 'table view', 'event_espresso' ),
2166
+	__('table view', 'event_espresso'),
2167 2167
 
2168 2168
 	// Reference: packages/ui-components/src/EntityList/filterBar/buttons/ToggleBulkActionsButton.tsx:8
2169
-	__( 'hide bulk actions', 'event_espresso' ),
2169
+	__('hide bulk actions', 'event_espresso'),
2170 2170
 
2171 2171
 	// Reference: packages/ui-components/src/EntityList/filterBar/buttons/ToggleBulkActionsButton.tsx:8
2172
-	__( 'show bulk actions', 'event_espresso' ),
2172
+	__('show bulk actions', 'event_espresso'),
2173 2173
 
2174 2174
 	// Reference: packages/ui-components/src/EntityList/filterBar/buttons/ToggleFiltersButton.tsx:9
2175
-	__( 'hide filters', 'event_espresso' ),
2175
+	__('hide filters', 'event_espresso'),
2176 2176
 
2177 2177
 	// Reference: packages/ui-components/src/EntityList/filterBar/buttons/ToggleFiltersButton.tsx:9
2178
-	__( 'show filters', 'event_espresso' ),
2178
+	__('show filters', 'event_espresso'),
2179 2179
 
2180 2180
 	// Reference: packages/ui-components/src/Legend/ToggleLegendButton.tsx:26
2181
-	__( 'hide legend', 'event_espresso' ),
2181
+	__('hide legend', 'event_espresso'),
2182 2182
 
2183 2183
 	// Reference: packages/ui-components/src/Legend/ToggleLegendButton.tsx:26
2184
-	__( 'show legend', 'event_espresso' ),
2184
+	__('show legend', 'event_espresso'),
2185 2185
 
2186 2186
 	// Reference: packages/ui-components/src/LoadingNotice/LoadingNotice.tsx:11
2187
-	__( 'loading…', 'event_espresso' ),
2187
+	__('loading…', 'event_espresso'),
2188 2188
 
2189 2189
 	// Reference: packages/ui-components/src/Modal/Modal.tsx:58
2190
-	__( 'close modal', 'event_espresso' ),
2190
+	__('close modal', 'event_espresso'),
2191 2191
 
2192 2192
 	// Reference: packages/ui-components/src/Pagination/ItemRender.tsx:10
2193
-	__( 'jump to previous', 'event_espresso' ),
2193
+	__('jump to previous', 'event_espresso'),
2194 2194
 
2195 2195
 	// Reference: packages/ui-components/src/Pagination/ItemRender.tsx:11
2196
-	__( 'jump to next', 'event_espresso' ),
2196
+	__('jump to next', 'event_espresso'),
2197 2197
 
2198 2198
 	// Reference: packages/ui-components/src/Pagination/ItemRender.tsx:12
2199
-	__( 'page', 'event_espresso' ),
2199
+	__('page', 'event_espresso'),
2200 2200
 
2201 2201
 	// Reference: packages/ui-components/src/Pagination/ItemRender.tsx:8
2202
-	__( 'previous', 'event_espresso' ),
2202
+	__('previous', 'event_espresso'),
2203 2203
 
2204 2204
 	// Reference: packages/ui-components/src/Pagination/ItemRender.tsx:9
2205
-	__( 'next', 'event_espresso' ),
2205
+	__('next', 'event_espresso'),
2206 2206
 
2207 2207
 	// Reference: packages/ui-components/src/Pagination/PerPage.tsx:37
2208
-	__( 'items per page', 'event_espresso' ),
2208
+	__('items per page', 'event_espresso'),
2209 2209
 
2210 2210
 	// Reference: packages/ui-components/src/Pagination/constants.ts:10
2211 2211
 	/* translators: %s is per page value */
2212
-	__( '%s / page', 'event_espresso' ),
2212
+	__('%s / page', 'event_espresso'),
2213 2213
 
2214 2214
 	// Reference: packages/ui-components/src/Pagination/constants.ts:13
2215
-	__( 'Next Page', 'event_espresso' ),
2215
+	__('Next Page', 'event_espresso'),
2216 2216
 
2217 2217
 	// Reference: packages/ui-components/src/Pagination/constants.ts:14
2218
-	__( 'Previous Page', 'event_espresso' ),
2218
+	__('Previous Page', 'event_espresso'),
2219 2219
 
2220 2220
 	// Reference: packages/ui-components/src/PercentSign/index.tsx:10
2221
-	__( '%', 'event_espresso' ),
2221
+	__('%', 'event_espresso'),
2222 2222
 
2223 2223
 	// Reference: packages/ui-components/src/SimpleEntityList/EntityOptionsRow/index.tsx:31
2224 2224
 	/* translators: entity type to select */
2225
-	__( 'Select an existing %s to use as a template.', 'event_espresso' ),
2225
+	__('Select an existing %s to use as a template.', 'event_espresso'),
2226 2226
 
2227 2227
 	// Reference: packages/ui-components/src/SimpleEntityList/EntityOptionsRow/index.tsx:38
2228
-	__( 'or', 'event_espresso' ),
2228
+	__('or', 'event_espresso'),
2229 2229
 
2230 2230
 	// Reference: packages/ui-components/src/SimpleEntityList/EntityOptionsRow/index.tsx:43
2231 2231
 	/* translators: entity type to add */
2232
-	__( 'Add a new %s and insert details manually', 'event_espresso' ),
2232
+	__('Add a new %s and insert details manually', 'event_espresso'),
2233 2233
 
2234 2234
 	// Reference: packages/ui-components/src/SimpleEntityList/EntityOptionsRow/index.tsx:48
2235
-	__( 'Add New', 'event_espresso' ),
2235
+	__('Add New', 'event_espresso'),
2236 2236
 
2237 2237
 	// Reference: packages/ui-components/src/Stepper/buttons/Next.tsx:8
2238
-	__( 'Next', 'event_espresso' ),
2238
+	__('Next', 'event_espresso'),
2239 2239
 
2240 2240
 	// Reference: packages/ui-components/src/Stepper/buttons/Previous.tsx:8
2241
-	__( 'Previous', 'event_espresso' ),
2241
+	__('Previous', 'event_espresso'),
2242 2242
 
2243 2243
 	// Reference: packages/ui-components/src/Steps/Steps.tsx:31
2244
-	__( 'Steps', 'event_espresso' ),
2244
+	__('Steps', 'event_espresso'),
2245 2245
 
2246 2246
 	// Reference: packages/ui-components/src/TabbableText/index.tsx:21
2247
-	__( 'click to edit…', 'event_espresso' ),
2247
+	__('click to edit…', 'event_espresso'),
2248 2248
 
2249 2249
 	// Reference: packages/ui-components/src/TimezoneTimeInfo/Content.tsx:14
2250
-	__( 'The Website\'s Time Zone', 'event_espresso' ),
2250
+	__('The Website\'s Time Zone', 'event_espresso'),
2251 2251
 
2252 2252
 	// Reference: packages/ui-components/src/TimezoneTimeInfo/Content.tsx:19
2253
-	__( 'UTC (Greenwich Mean Time)', 'event_espresso' ),
2253
+	__('UTC (Greenwich Mean Time)', 'event_espresso'),
2254 2254
 
2255 2255
 	// Reference: packages/ui-components/src/TimezoneTimeInfo/Content.tsx:9
2256
-	__( 'Your Local Time Zone', 'event_espresso' ),
2256
+	__('Your Local Time Zone', 'event_espresso'),
2257 2257
 
2258 2258
 	// Reference: packages/ui-components/src/TimezoneTimeInfo/TimezoneTimeInfo.tsx:25
2259
-	__( 'click for timezone information', 'event_espresso' ),
2259
+	__('click for timezone information', 'event_espresso'),
2260 2260
 
2261 2261
 	// Reference: packages/ui-components/src/TimezoneTimeInfo/TimezoneTimeInfo.tsx:30
2262
-	__( 'This Date Converted To:', 'event_espresso' ),
2262
+	__('This Date Converted To:', 'event_espresso'),
2263 2263
 
2264 2264
 	// Reference: packages/ui-components/src/VenueSelector/VenueSelector.tsx:120
2265
-	__( 'Add New Venue', 'event_espresso' ),
2265
+	__('Add New Venue', 'event_espresso'),
2266 2266
 
2267 2267
 	// Reference: packages/ui-components/src/VenueSelector/VenueSelector.tsx:36
2268
-	__( '~ no venue ~', 'event_espresso' ),
2268
+	__('~ no venue ~', 'event_espresso'),
2269 2269
 
2270 2270
 	// Reference: packages/ui-components/src/VenueSelector/VenueSelector.tsx:43
2271
-	__( 'assign venue…', 'event_espresso' ),
2271
+	__('assign venue…', 'event_espresso'),
2272 2272
 
2273 2273
 	// Reference: packages/ui-components/src/VenueSelector/VenueSelector.tsx:44
2274
-	__( 'click to select a venue…', 'event_espresso' ),
2274
+	__('click to select a venue…', 'event_espresso'),
2275 2275
 
2276 2276
 	// Reference: packages/ui-components/src/bulkEdit/BulkActions.tsx:51
2277
-	__( 'select all', 'event_espresso' ),
2277
+	__('select all', 'event_espresso'),
2278 2278
 
2279 2279
 	// Reference: packages/ui-components/src/bulkEdit/BulkActions.tsx:54
2280
-	__( 'apply', 'event_espresso' )
2280
+	__('apply', 'event_espresso')
2281 2281
 );
2282 2282
 /* THIS IS THE END OF THE GENERATED FILE */
Please login to merge, or discard this patch.
espresso.php 1 patch
Indentation   +97 added lines, -97 removed lines patch added patch discarded remove patch
@@ -37,124 +37,124 @@
 block discarded – undo
37 37
  * @since           4.0
38 38
  */
39 39
 if (function_exists('espresso_version')) {
40
-    if (! function_exists('espresso_duplicate_plugin_error')) {
41
-        /**
42
-         *    espresso_duplicate_plugin_error
43
-         *    displays if more than one version of EE is activated at the same time.
44
-         */
45
-        function espresso_duplicate_plugin_error()
46
-        {
47
-            ?>
40
+	if (! function_exists('espresso_duplicate_plugin_error')) {
41
+		/**
42
+		 *    espresso_duplicate_plugin_error
43
+		 *    displays if more than one version of EE is activated at the same time.
44
+		 */
45
+		function espresso_duplicate_plugin_error()
46
+		{
47
+			?>
48 48
 <div class="error">
49 49
 	<p>
50 50
 		<?php
51
-                    echo esc_html__(
52
-                        'Can not run multiple versions of Event Espresso! One version has been automatically deactivated. Please verify that you have the correct version you want still active.',
53
-                        'event_espresso'
54
-                    ); ?>
51
+					echo esc_html__(
52
+						'Can not run multiple versions of Event Espresso! One version has been automatically deactivated. Please verify that you have the correct version you want still active.',
53
+						'event_espresso'
54
+					); ?>
55 55
 	</p>
56 56
 </div>
57 57
 <?php
58
-            espresso_deactivate_plugin(plugin_basename(__FILE__));
59
-        }
60
-    }
61
-    add_action('admin_notices', 'espresso_duplicate_plugin_error', 1);
58
+			espresso_deactivate_plugin(plugin_basename(__FILE__));
59
+		}
60
+	}
61
+	add_action('admin_notices', 'espresso_duplicate_plugin_error', 1);
62 62
 } else {
63
-    define('EE_MIN_PHP_VER_REQUIRED', '7.4.0');
64
-    if (! version_compare(PHP_VERSION, EE_MIN_PHP_VER_REQUIRED, '>=')) {
65
-        /**
66
-         * espresso_minimum_php_version_error
67
-         *
68
-         * @return void
69
-         */
70
-        function espresso_minimum_php_version_error()
71
-        {
72
-            ?>
63
+	define('EE_MIN_PHP_VER_REQUIRED', '7.4.0');
64
+	if (! version_compare(PHP_VERSION, EE_MIN_PHP_VER_REQUIRED, '>=')) {
65
+		/**
66
+		 * espresso_minimum_php_version_error
67
+		 *
68
+		 * @return void
69
+		 */
70
+		function espresso_minimum_php_version_error()
71
+		{
72
+			?>
73 73
 <div class="error">
74 74
 	<p>
75 75
 		<?php
76
-                    printf(
77
-                        esc_html__(
78
-                            'We\'re sorry, but Event Espresso requires PHP version %1$s or greater in order to operate. You are currently running version %2$s.%3$sIn order to update your version of PHP, you will need to contact your current hosting provider.%3$sFor information on stable PHP versions, please go to %4$s.',
79
-                            'event_espresso'
80
-                        ),
81
-                        EE_MIN_PHP_VER_REQUIRED,
82
-                        PHP_VERSION,
83
-                        '<br/>',
84
-                        '<a href="http://php.net/downloads.php">http://php.net/downloads.php</a>'
85
-                    );
86
-                    ?>
76
+					printf(
77
+						esc_html__(
78
+							'We\'re sorry, but Event Espresso requires PHP version %1$s or greater in order to operate. You are currently running version %2$s.%3$sIn order to update your version of PHP, you will need to contact your current hosting provider.%3$sFor information on stable PHP versions, please go to %4$s.',
79
+							'event_espresso'
80
+						),
81
+						EE_MIN_PHP_VER_REQUIRED,
82
+						PHP_VERSION,
83
+						'<br/>',
84
+						'<a href="http://php.net/downloads.php">http://php.net/downloads.php</a>'
85
+					);
86
+					?>
87 87
 	</p>
88 88
 </div>
89 89
 <?php
90
-            espresso_deactivate_plugin(plugin_basename(__FILE__));
91
-        }
90
+			espresso_deactivate_plugin(plugin_basename(__FILE__));
91
+		}
92 92
 
93
-        add_action('admin_notices', 'espresso_minimum_php_version_error', 1);
94
-    } else {
95
-        define('EVENT_ESPRESSO_MAIN_FILE', __FILE__);
93
+		add_action('admin_notices', 'espresso_minimum_php_version_error', 1);
94
+	} else {
95
+		define('EVENT_ESPRESSO_MAIN_FILE', __FILE__);
96 96
 
97
-        require_once __DIR__ . '/vendor/autoload.php';
98
-        require_once __DIR__ . '/vendor/wp-graphql/wp-graphql/wp-graphql.php';
97
+		require_once __DIR__ . '/vendor/autoload.php';
98
+		require_once __DIR__ . '/vendor/wp-graphql/wp-graphql/wp-graphql.php';
99 99
 
100
-        /**
101
-         * espresso_version
102
-         * Returns the plugin version
103
-         *
104
-         * @return string
105
-         */
106
-        function espresso_version()
107
-        {
108
-            return apply_filters('FHEE__espresso__espresso_version', '5.0.5.rc.000');
109
-        }
100
+		/**
101
+		 * espresso_version
102
+		 * Returns the plugin version
103
+		 *
104
+		 * @return string
105
+		 */
106
+		function espresso_version()
107
+		{
108
+			return apply_filters('FHEE__espresso__espresso_version', '5.0.5.rc.000');
109
+		}
110 110
 
111
-        /**
112
-         * espresso_plugin_activation
113
-         * adds a wp-option to indicate that EE has been activated via the WP admin plugins page
114
-         */
115
-        function espresso_plugin_activation()
116
-        {
117
-            update_option('ee_espresso_activation', true);
118
-            update_option('event-espresso-core_allow_tracking', 'no');
119
-            update_option('event-espresso-core_tracking_notice', 'hide');
120
-            // Run WP GraphQL activation callback
121
-            graphql_activation_callback();
122
-        }
111
+		/**
112
+		 * espresso_plugin_activation
113
+		 * adds a wp-option to indicate that EE has been activated via the WP admin plugins page
114
+		 */
115
+		function espresso_plugin_activation()
116
+		{
117
+			update_option('ee_espresso_activation', true);
118
+			update_option('event-espresso-core_allow_tracking', 'no');
119
+			update_option('event-espresso-core_tracking_notice', 'hide');
120
+			// Run WP GraphQL activation callback
121
+			graphql_activation_callback();
122
+		}
123 123
 
124
-        register_activation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation');
124
+		register_activation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation');
125 125
 
126
-        /**
127
-         * espresso_plugin_deactivation
128
-         */
129
-        function espresso_plugin_deactivation()
130
-        {
131
-            // Run WP GraphQL deactivation callback
132
-            graphql_deactivation_callback();
133
-            delete_option('event-espresso-core_allow_tracking');
134
-            delete_option('event-espresso-core_tracking_notice');
135
-        }
136
-        register_deactivation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_deactivation');
126
+		/**
127
+		 * espresso_plugin_deactivation
128
+		 */
129
+		function espresso_plugin_deactivation()
130
+		{
131
+			// Run WP GraphQL deactivation callback
132
+			graphql_deactivation_callback();
133
+			delete_option('event-espresso-core_allow_tracking');
134
+			delete_option('event-espresso-core_tracking_notice');
135
+		}
136
+		register_deactivation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_deactivation');
137 137
 
138
-        require_once __DIR__ . '/core/bootstrap_espresso.php';
139
-        bootstrap_espresso();
140
-    }
138
+		require_once __DIR__ . '/core/bootstrap_espresso.php';
139
+		bootstrap_espresso();
140
+	}
141 141
 }
142 142
 
143 143
 if (! function_exists('espresso_deactivate_plugin')) {
144
-    /**
145
-     *    deactivate_plugin
146
-     * usage:  espresso_deactivate_plugin( plugin_basename( __FILE__ ));
147
-     *
148
-     * @access public
149
-     * @param string $plugin_basename - the results of plugin_basename( __FILE__ ) for the plugin's main file
150
-     * @return    void
151
-     */
152
-    function espresso_deactivate_plugin($plugin_basename = '')
153
-    {
154
-        if (! function_exists('deactivate_plugins')) {
155
-            require_once ABSPATH . 'wp-admin/includes/plugin.php';
156
-        }
157
-        unset($_GET['activate'], $_REQUEST['activate']);
158
-        deactivate_plugins($plugin_basename);
159
-    }
144
+	/**
145
+	 *    deactivate_plugin
146
+	 * usage:  espresso_deactivate_plugin( plugin_basename( __FILE__ ));
147
+	 *
148
+	 * @access public
149
+	 * @param string $plugin_basename - the results of plugin_basename( __FILE__ ) for the plugin's main file
150
+	 * @return    void
151
+	 */
152
+	function espresso_deactivate_plugin($plugin_basename = '')
153
+	{
154
+		if (! function_exists('deactivate_plugins')) {
155
+			require_once ABSPATH . 'wp-admin/includes/plugin.php';
156
+		}
157
+		unset($_GET['activate'], $_REQUEST['activate']);
158
+		deactivate_plugins($plugin_basename);
159
+	}
160 160
 }
Please login to merge, or discard this patch.
core/helpers/EEH_Tabbed_Content.helper.php 1 patch
Indentation   +194 added lines, -194 removed lines patch added patch discarded remove patch
@@ -13,249 +13,249 @@
 block discarded – undo
13 13
  */
14 14
 class EEH_Tabbed_Content
15 15
 {
16
-    /**
17
-     * assembles and returns the html structure for tabs
18
-     *
19
-     * @static
20
-     * @param array $tabs_contents an array of the content for each tab [required]
21
-     * @param array $tabs_names    a numerically indexed array of names for each tab [optional]
22
-     *                             - if this isn't included then we use the indexes for $tabs_content as the tab names)
23
-     * @param bool  $small_tabs
24
-     * @param bool  $tabs_content
25
-     * @return string the assembled html string containing the tabbed content for display.
26
-     * @throws EE_Error
27
-     */
28
-    public static function display($tabs_contents, $tabs_names = [], $small_tabs = true, $tabs_content = true)
29
-    {
16
+	/**
17
+	 * assembles and returns the html structure for tabs
18
+	 *
19
+	 * @static
20
+	 * @param array $tabs_contents an array of the content for each tab [required]
21
+	 * @param array $tabs_names    a numerically indexed array of names for each tab [optional]
22
+	 *                             - if this isn't included then we use the indexes for $tabs_content as the tab names)
23
+	 * @param bool  $small_tabs
24
+	 * @param bool  $tabs_content
25
+	 * @return string the assembled html string containing the tabbed content for display.
26
+	 * @throws EE_Error
27
+	 */
28
+	public static function display($tabs_contents, $tabs_names = [], $small_tabs = true, $tabs_content = true)
29
+	{
30 30
 
31
-        // first check if $tabs_names is not empty then the count must match the count of $tabs_content otherwise we've got a problem houston
32
-        if (! empty($tabs_names) && (count((array) $tabs_names) != count((array) $tabs_content))) {
33
-            throw new EE_Error(
34
-                esc_html__('The count for $tabs_names and $tabs_content does not match.', 'event_espresso')
35
-            );
36
-        }
31
+		// first check if $tabs_names is not empty then the count must match the count of $tabs_content otherwise we've got a problem houston
32
+		if (! empty($tabs_names) && (count((array) $tabs_names) != count((array) $tabs_content))) {
33
+			throw new EE_Error(
34
+				esc_html__('The count for $tabs_names and $tabs_content does not match.', 'event_espresso')
35
+			);
36
+		}
37 37
 
38
-        // make sure we've got incoming data setup properly
39
-        $tabs         = ! empty($tabs_names)
40
-            ? (array) $tabs_names
41
-            : array_keys((array) $tabs_contents);
42
-        $tabs_content = ! empty($tabs_names)
43
-            ? array_combine((array) $tabs_names, (array) $tabs_content)
44
-            : $tabs_contents;
38
+		// make sure we've got incoming data setup properly
39
+		$tabs         = ! empty($tabs_names)
40
+			? (array) $tabs_names
41
+			: array_keys((array) $tabs_contents);
42
+		$tabs_content = ! empty($tabs_names)
43
+			? array_combine((array) $tabs_names, (array) $tabs_content)
44
+			: $tabs_contents;
45 45
 
46
-        $tabs_html         = '';
47
-        $tabs_content_html = '';
46
+		$tabs_html         = '';
47
+		$tabs_content_html = '';
48 48
 
49
-        $index = 0;
50
-        foreach ($tabs as $tab) {
51
-            $active            = $index === 0;
52
-            $tabs_html         .= self::tab($tab, $active);
53
-            $tabs_content_html .= self::tab_content($tab, $tabs_content[ $tab ], $active);
54
-            $index++;
55
-        }
49
+		$index = 0;
50
+		foreach ($tabs as $tab) {
51
+			$active            = $index === 0;
52
+			$tabs_html         .= self::tab($tab, $active);
53
+			$tabs_content_html .= self::tab_content($tab, $tabs_content[ $tab ], $active);
54
+			$index++;
55
+		}
56 56
 
57
-        $tabs_class = $small_tabs ? ' ee-nav-tabs-small' : '';
57
+		$tabs_class = $small_tabs ? ' ee-nav-tabs-small' : '';
58 58
 
59
-        return "
59
+		return "
60 60
     <div class='ee-nav-tabs{$tabs_class}'>
61 61
         <h2 class='nav-tab-wrapper'>{$tabs_html}</h2>
62 62
         {$tabs_content_html}
63 63
     </div>
64 64
     ";
65
-    }
65
+	}
66 66
 
67 67
 
68
-    /**
69
-     * display_admin_nav_tabs
70
-     * this returns the properly formatted tab html for EE_Admin_Pages.
71
-     * We are expecting an array of tabs in the following format
72
-     * array(
73
-     *    'nav_tab_name' => array(
74
-     *        'url' => 'url for tab',
75
-     *        'link_text' => 'tab text',
76
-     *        'css_class' => 'tab class' //including the nav-tab-active class if its active
77
-     *    )
78
-     * )
79
-     *
80
-     * @access public
81
-     * @static
82
-     * @param string[][] $nav_tabs tab array for nav tabs
83
-     * @return string
84
-     * @throws EE_Error
85
-     */
86
-    public static function display_admin_nav_tabs(array $nav_tabs = [], string $page_slug = '')
87
-    {
88
-        if (empty($nav_tabs)) {
89
-            throw new EE_Error(
90
-                esc_html__('Nav Tabs cannot be generated because the tab array is missing', 'event_espresso')
91
-            );
92
-        }
93
-        $tab_content = '';
94
-        $tab_count = 0;
95
-        foreach ($nav_tabs as $slug => $tab) {
96
-            $tab_count++;
97
-            $tab_content .= self::tab($slug, false, $tab['link_text'], $tab['url'], $tab['css_class']);
98
-        }
99
-        $aria_label = esc_attr__('Secondary menu', 'event_espresso');
100
-        $css_class = "ee-nav-tabs--{$tab_count}";
101
-        $css_class .= $page_slug ? " ee-nav-tabs--$page_slug" : '';
102
-        return "
68
+	/**
69
+	 * display_admin_nav_tabs
70
+	 * this returns the properly formatted tab html for EE_Admin_Pages.
71
+	 * We are expecting an array of tabs in the following format
72
+	 * array(
73
+	 *    'nav_tab_name' => array(
74
+	 *        'url' => 'url for tab',
75
+	 *        'link_text' => 'tab text',
76
+	 *        'css_class' => 'tab class' //including the nav-tab-active class if its active
77
+	 *    )
78
+	 * )
79
+	 *
80
+	 * @access public
81
+	 * @static
82
+	 * @param string[][] $nav_tabs tab array for nav tabs
83
+	 * @return string
84
+	 * @throws EE_Error
85
+	 */
86
+	public static function display_admin_nav_tabs(array $nav_tabs = [], string $page_slug = '')
87
+	{
88
+		if (empty($nav_tabs)) {
89
+			throw new EE_Error(
90
+				esc_html__('Nav Tabs cannot be generated because the tab array is missing', 'event_espresso')
91
+			);
92
+		}
93
+		$tab_content = '';
94
+		$tab_count = 0;
95
+		foreach ($nav_tabs as $slug => $tab) {
96
+			$tab_count++;
97
+			$tab_content .= self::tab($slug, false, $tab['link_text'], $tab['url'], $tab['css_class']);
98
+		}
99
+		$aria_label = esc_attr__('Secondary menu', 'event_espresso');
100
+		$css_class = "ee-nav-tabs--{$tab_count}";
101
+		$css_class .= $page_slug ? " ee-nav-tabs--$page_slug" : '';
102
+		return "
103 103
         <nav class='nav-tab-wrapper wp-clearfix $css_class' aria-label='$aria_label'>
104 104
             $tab_content
105 105
         </nav>
106 106
         ";
107
-    }
107
+	}
108 108
 
109 109
 
110
-    /**
111
-     * this simply returns a single tab given a tab name & content
112
-     *
113
-     * @param string      $name      name of tab
114
-     * @param bool        $active    true=tab active, false=tab not active
115
-     * @param bool|string $nice_name if string given then this value will be used for the tab link text.
116
-     * @param bool|string $url       If url given then tabs will be generated linking to the url.
117
-     * @param bool|string $css       If string given then the generated tab will include that as the class.
118
-     * @return string          html for tab
119
-     */
120
-    private static function tab($name, $active = false, $nice_name = false, $url = false, $css = false)
121
-    {
122
-        $nice_name = $nice_name ?: esc_html(ucwords(str_replace(['_', '-'], ' ', $name)));
123
-        $name      = self::generateTabID($name);
124
-        $class     = $css ? ' ' . esc_attr($css) : '';
125
-        $class     .= $active ? ' nav-tab-active' : '';
126
-        $url       = $url ?: '#' . esc_attr($name);
127
-        return "
110
+	/**
111
+	 * this simply returns a single tab given a tab name & content
112
+	 *
113
+	 * @param string      $name      name of tab
114
+	 * @param bool        $active    true=tab active, false=tab not active
115
+	 * @param bool|string $nice_name if string given then this value will be used for the tab link text.
116
+	 * @param bool|string $url       If url given then tabs will be generated linking to the url.
117
+	 * @param bool|string $css       If string given then the generated tab will include that as the class.
118
+	 * @return string          html for tab
119
+	 */
120
+	private static function tab($name, $active = false, $nice_name = false, $url = false, $css = false)
121
+	{
122
+		$nice_name = $nice_name ?: esc_html(ucwords(str_replace(['_', '-'], ' ', $name)));
123
+		$name      = self::generateTabID($name);
124
+		$class     = $css ? ' ' . esc_attr($css) : '';
125
+		$class     .= $active ? ' nav-tab-active' : '';
126
+		$url       = $url ?: '#' . esc_attr($name);
127
+		return "
128 128
         <a class='nav-tab{$class}' rel='{$name}' href='{$url}'>
129 129
             $nice_name
130 130
         </a>
131 131
         ";
132
-    }
132
+	}
133 133
 
134 134
 
135
-    /**
136
-     * @param string $tab_name
137
-     * @return string
138
-     * @since   4.10.14.p
139
-     */
140
-    private static function generateTabID($tab_name)
141
-    {
142
-        return 'ee-tab-' . esc_attr(str_replace(' ', '-', $tab_name));
143
-    }
135
+	/**
136
+	 * @param string $tab_name
137
+	 * @return string
138
+	 * @since   4.10.14.p
139
+	 */
140
+	private static function generateTabID($tab_name)
141
+	{
142
+		return 'ee-tab-' . esc_attr(str_replace(' ', '-', $tab_name));
143
+	}
144 144
 
145 145
 
146
-    /**
147
-     * this just returns the properly formatted tab content for our tab box.
148
-     *
149
-     * @param string $name        name of tab (used for selector)
150
-     * @param string $tab_content content of tab
151
-     * @param bool   $active
152
-     * @return string html for content area
153
-     */
154
-    private static function tab_content($name, $tab_content, $active = false)
155
-    {
156
-        $class = $active ? '' : ' hidden';
157
-        $name  = self::generateTabID($name);
158
-        return "
146
+	/**
147
+	 * this just returns the properly formatted tab content for our tab box.
148
+	 *
149
+	 * @param string $name        name of tab (used for selector)
150
+	 * @param string $tab_content content of tab
151
+	 * @param bool   $active
152
+	 * @return string html for content area
153
+	 */
154
+	private static function tab_content($name, $tab_content, $active = false)
155
+	{
156
+		$class = $active ? '' : ' hidden';
157
+		$name  = self::generateTabID($name);
158
+		return "
159 159
     <div class='nav-tab-content{$class}' id='{$name}'>
160 160
         {$tab_content}
161 161
         <div style='clear:both'></div>
162 162
     </div>";
163
-    }
163
+	}
164 164
 
165 165
 
166 166
 
167
-    /** HORIZONTAL TEXT LINKS **/
167
+	/** HORIZONTAL TEXT LINKS **/
168 168
 
169
-    /**
170
-     * This will take in an array of link items and spit out a formatted list of links that can be used to navigate to
171
-     * items. There is a corresponding js file that can be loaded to dynamically display containers with the same id as
172
-     * the href -ref.
173
-     *
174
-     * @param string[] $item_array      formatted array of items.  Format:
175
-     *                                  array(
176
-     *                                  'label' => esc_html__('localized label displayed'),
177
-     *                                  'class' => 'class_for_item',
178
-     *                                  'href' => '#some_item_id', //url/bookmark for item.  If you include a bookmark
179
-     *                                  the js will used this to show the container div.
180
-     *                                  'title' => esc_html__('localized text for the title attribute of the link'),
181
-     *                                  'slug' => 'slug_used_for_reference'
182
-     *                                  )
183
-     * @param string   $container_class class used for main container
184
-     * @param string   $sep             you can add in what is used as a separator between each link (or leave blank for
185
-     *                                  none)
186
-     * @param string   $default         You can include a string for the item that will receive the "item_display" class
187
-     *                                  for the js.
188
-     * @return string                  a html snippet of of all the formatted link elements.
189
-     */
190
-    public static function tab_text_links(array $item_array, $container_class = '', $sep = '|', $default = '')
191
-    {
192
-        $item_array = apply_filters('FHEE__EEH_Tabbed_Content__tab_text_links', $item_array, $container_class);
193
-        if (! is_array($item_array) || empty($item_array)) {
194
-            return false; // get out we don't have even the basic thing we need!
195
-        }
169
+	/**
170
+	 * This will take in an array of link items and spit out a formatted list of links that can be used to navigate to
171
+	 * items. There is a corresponding js file that can be loaded to dynamically display containers with the same id as
172
+	 * the href -ref.
173
+	 *
174
+	 * @param string[] $item_array      formatted array of items.  Format:
175
+	 *                                  array(
176
+	 *                                  'label' => esc_html__('localized label displayed'),
177
+	 *                                  'class' => 'class_for_item',
178
+	 *                                  'href' => '#some_item_id', //url/bookmark for item.  If you include a bookmark
179
+	 *                                  the js will used this to show the container div.
180
+	 *                                  'title' => esc_html__('localized text for the title attribute of the link'),
181
+	 *                                  'slug' => 'slug_used_for_reference'
182
+	 *                                  )
183
+	 * @param string   $container_class class used for main container
184
+	 * @param string   $sep             you can add in what is used as a separator between each link (or leave blank for
185
+	 *                                  none)
186
+	 * @param string   $default         You can include a string for the item that will receive the "item_display" class
187
+	 *                                  for the js.
188
+	 * @return string                  a html snippet of of all the formatted link elements.
189
+	 */
190
+	public static function tab_text_links(array $item_array, $container_class = '', $sep = '|', $default = '')
191
+	{
192
+		$item_array = apply_filters('FHEE__EEH_Tabbed_Content__tab_text_links', $item_array, $container_class);
193
+		if (! is_array($item_array) || empty($item_array)) {
194
+			return false; // get out we don't have even the basic thing we need!
195
+		}
196 196
 
197
-        $defaults        = [
198
-            'label' => esc_html__('Item', 'event_espresso'),
199
-            'class' => '',
200
-            'href'  => '',
201
-            'title' => esc_attr__('Link for Item', 'event_espresso'),
202
-            'slug'  => 'item_slug',
203
-        ];
204
-        $container_class = ! empty($container_class) ? ' ' . esc_attr($container_class) : '';
205
-        $list            = '';
206
-        $list_length     = count($item_array);
207
-        // if we're' adding separators, set $current to 1, otherwise set it to list length + 1
208
-        // then we'll increment $current while looping and only add separators if $current is < list length
209
-        // (if we aren't adding separators $current will always be > list length cuz it started at list length + 1)
210
-        $current = empty($sep) ? $list_length + 1 : 1;
211
-        foreach ($item_array as $item) {
212
-            $item          = wp_parse_args($item, $defaults);
213
-            $item['class'] .= $default === $item['slug'] ? ' item_display' : '';
214
-            $list          .= self::textLinkItem($item);
215
-            $list          .= $current < $list_length ? self::textLinkSeparator($sep) : '';
216
-            $current++;
217
-        }
197
+		$defaults        = [
198
+			'label' => esc_html__('Item', 'event_espresso'),
199
+			'class' => '',
200
+			'href'  => '',
201
+			'title' => esc_attr__('Link for Item', 'event_espresso'),
202
+			'slug'  => 'item_slug',
203
+		];
204
+		$container_class = ! empty($container_class) ? ' ' . esc_attr($container_class) : '';
205
+		$list            = '';
206
+		$list_length     = count($item_array);
207
+		// if we're' adding separators, set $current to 1, otherwise set it to list length + 1
208
+		// then we'll increment $current while looping and only add separators if $current is < list length
209
+		// (if we aren't adding separators $current will always be > list length cuz it started at list length + 1)
210
+		$current = empty($sep) ? $list_length + 1 : 1;
211
+		foreach ($item_array as $item) {
212
+			$item          = wp_parse_args($item, $defaults);
213
+			$item['class'] .= $default === $item['slug'] ? ' item_display' : '';
214
+			$list          .= self::textLinkItem($item);
215
+			$list          .= $current < $list_length ? self::textLinkSeparator($sep) : '';
216
+			$current++;
217
+		}
218 218
 
219
-        return "
219
+		return "
220 220
         <div class='ee-text-links{$container_class}'>{$list}</div>
221 221
         ";
222
-    }
222
+	}
223 223
 
224 224
 
225
-    /**
226
-     * @param string[] $item
227
-     * @return string
228
-     */
229
-    private static function textLinkItem(array $item)
230
-    {
231
-        $class = $item['class'] ? esc_attr($item['class']) : '';
232
-        $label = esc_html($item['label']);
233
-        $href  = $item['href'] ? esc_attr($item['href']) : '';
234
-        $icon  = $item['icon'] ?? '';
235
-        $title = esc_attr($item['title']);
236
-        $tag = $item['tag'] ?? 'a';
225
+	/**
226
+	 * @param string[] $item
227
+	 * @return string
228
+	 */
229
+	private static function textLinkItem(array $item)
230
+	{
231
+		$class = $item['class'] ? esc_attr($item['class']) : '';
232
+		$label = esc_html($item['label']);
233
+		$href  = $item['href'] ? esc_attr($item['href']) : '';
234
+		$icon  = $item['icon'] ?? '';
235
+		$title = esc_attr($item['title']);
236
+		$tag = $item['tag'] ?? 'a';
237 237
 
238 238
 
239
-        return ! empty($href)
240
-            ? "
239
+		return ! empty($href)
240
+			? "
241 241
             <{$tag} class='{$class} ee-text-link ee-aria-tooltip' href='#{$href}' aria-label='{$title}'>
242 242
                 {$icon}{$label}
243 243
             </{$tag}>
244 244
             "
245
-            : $label;
246
-    }
245
+			: $label;
246
+	}
247 247
 
248 248
 
249
-    /**
250
-     * @param string $separator
251
-     * @return string
252
-     * @since   4.10.14.p
253
-     */
254
-    private static function textLinkSeparator($separator)
255
-    {
256
-        $separator = esc_html($separator);
257
-        return "
249
+	/**
250
+	 * @param string $separator
251
+	 * @return string
252
+	 * @since   4.10.14.p
253
+	 */
254
+	private static function textLinkSeparator($separator)
255
+	{
256
+		$separator = esc_html($separator);
257
+		return "
258 258
         <span class='ee-text-link-sep'>{$separator}</span>
259 259
         ";
260
-    }
260
+	}
261 261
 }
Please login to merge, or discard this patch.
core/db_models/EEM_Registration.model.php 2 patches
Indentation   +883 added lines, -883 removed lines patch added patch discarded remove patch
@@ -14,832 +14,832 @@  discard block
 block discarded – undo
14 14
  */
15 15
 class EEM_Registration extends EEM_Soft_Delete_Base
16 16
 {
17
-    /**
18
-     * The value of REG_count for a primary registrant
19
-     */
20
-    const PRIMARY_REGISTRANT_COUNT = 1;
21
-
22
-    /**
23
-     * Status ID (STS_ID on esp_status table) to indicate an INCOMPLETE registration.
24
-     * Initial status for registrations when they are first created
25
-     * Payments are NOT allowed.
26
-     * Automatically toggled to whatever the default Event registration status is upon completion of the attendee
27
-     * information reg step NO space reserved. Registration is NOT active
28
-     */
29
-    const status_id_incomplete = 'RIC';
30
-
31
-    /**
32
-     * Status ID (STS_ID on esp_status table) to indicate an UNAPPROVED registration.
33
-     * Payments are NOT allowed.
34
-     * Event Admin must manually toggle STS_ID for it to change
35
-     * No space reserved.
36
-     * Registration is active
37
-     */
38
-    const status_id_not_approved = 'RNA';
39
-
40
-    /**
41
-     * Status ID (STS_ID on esp_status table) to indicate registration is PENDING_PAYMENT .
42
-     * Payments are allowed.
43
-     * STS_ID will automatically be toggled to RAP if payment is made in full by the attendee
44
-     * No space reserved.
45
-     * Registration is active
46
-     */
47
-    const status_id_pending_payment = 'RPP';
48
-
49
-    /**
50
-     * Status ID (STS_ID on esp_status table) to indicate registration is on the WAIT_LIST .
51
-     * Payments are allowed.
52
-     * STS_ID will automatically be toggled to RAP if payment is made in full by the attendee
53
-     * No space reserved.
54
-     * Registration is active
55
-     */
56
-    const status_id_wait_list = 'RWL';
57
-
58
-    /**
59
-     * Status ID (STS_ID on esp_status table) to indicate an APPROVED registration.
60
-     * the TXN may or may not be completed ( paid in full )
61
-     * Payments are allowed.
62
-     * A space IS reserved.
63
-     * Registration is active
64
-     */
65
-    const status_id_approved = 'RAP';
66
-
67
-    /**
68
-     * Status ID (STS_ID on esp_status table) to indicate a registration was CANCELLED by the attendee.
69
-     * Payments are NOT allowed.
70
-     * NO space reserved.
71
-     * Registration is NOT active
72
-     */
73
-    const status_id_cancelled = 'RCN';
74
-
75
-    /**
76
-     * Status ID (STS_ID on esp_status table) to indicate a registration was DECLINED by the Event Admin
77
-     * Payments are NOT allowed.
78
-     * No space reserved.
79
-     * Registration is NOT active
80
-     */
81
-    const status_id_declined = 'RDC';
82
-
83
-
84
-    protected static ?EEM_Registration $_instance       = null;
85
-
86
-    protected ?TableAnalysis           $_table_analysis = null;
87
-
88
-    /**
89
-     * Keys are the status IDs for registrations (eg, RAP, RCN, etc), and the values
90
-     * are status codes (eg, approved, cancelled, etc)
91
-     *
92
-     * @var array|null
93
-     */
94
-    private static array $_reg_status = [];
95
-
96
-
97
-    /**
98
-     *    private constructor to prevent direct creation
99
-     *
100
-     * @Constructor
101
-     * @access protected
102
-     * @param string $timezone string representing the timezone we want to set for returned Date Time Strings (and any
103
-     *                         incoming timezone data that gets saved). Note this just sends the timezone info to the
104
-     *                         date time model field objects.  Default is NULL (and will be assumed using the set
105
-     *                         timezone in the 'timezone_string' wp option)
106
-     * @throws EE_Error
107
-     * @throws ReflectionException
108
-     */
109
-    protected function __construct($timezone = null)
110
-    {
111
-        $this->_table_analysis         = EE_Registry::instance()->create('TableAnalysis', [], true);
112
-        $this->singular_item           = esc_html__('Registration', 'event_espresso');
113
-        $this->plural_item             = esc_html__('Registrations', 'event_espresso');
114
-        $this->_tables                 = [
115
-            'Registration' => new EE_Primary_Table('esp_registration', 'REG_ID'),
116
-        ];
117
-        $this->_fields                 = [
118
-            'Registration' => [
119
-                'REG_ID'           => new EE_Primary_Key_Int_Field(
120
-                    'REG_ID',
121
-                    esc_html__('Registration ID', 'event_espresso')
122
-                ),
123
-                'EVT_ID'           => new EE_Foreign_Key_Int_Field(
124
-                    'EVT_ID',
125
-                    esc_html__('Event ID', 'event_espresso'),
126
-                    false,
127
-                    0,
128
-                    'Event'
129
-                ),
130
-                'ATT_ID'           => new EE_Foreign_Key_Int_Field(
131
-                    'ATT_ID',
132
-                    esc_html__('Attendee ID', 'event_espresso'),
133
-                    false,
134
-                    0,
135
-                    'Attendee'
136
-                ),
137
-                'TXN_ID'           => new EE_Foreign_Key_Int_Field(
138
-                    'TXN_ID',
139
-                    esc_html__('Transaction ID', 'event_espresso'),
140
-                    false,
141
-                    0,
142
-                    'Transaction'
143
-                ),
144
-                'TKT_ID'           => new EE_Foreign_Key_Int_Field(
145
-                    'TKT_ID',
146
-                    esc_html__('Ticket ID', 'event_espresso'),
147
-                    false,
148
-                    0,
149
-                    'Ticket'
150
-                ),
151
-                'STS_ID'           => new EE_Foreign_Key_String_Field(
152
-                    'STS_ID',
153
-                    esc_html__('Status ID', 'event_espresso'),
154
-                    false,
155
-                    EEM_Registration::status_id_incomplete,
156
-                    'Status'
157
-                ),
158
-                'REG_date'         => new EE_Datetime_Field(
159
-                    'REG_date',
160
-                    esc_html__('Time registration occurred', 'event_espresso'),
161
-                    false,
162
-                    EE_Datetime_Field::now,
163
-                    $timezone
164
-                ),
165
-                'REG_final_price'  => new EE_Money_Field(
166
-                    'REG_final_price',
167
-                    esc_html__('Registration\'s share of the transaction total', 'event_espresso'),
168
-                    false,
169
-                    0
170
-                ),
171
-                'REG_paid'         => new EE_Money_Field(
172
-                    'REG_paid',
173
-                    esc_html__('Amount paid to date towards registration', 'event_espresso'),
174
-                    false,
175
-                    0
176
-                ),
177
-                'REG_session'      => new EE_Plain_Text_Field(
178
-                    'REG_session',
179
-                    esc_html__('Session ID of registration', 'event_espresso'),
180
-                    false,
181
-                    ''
182
-                ),
183
-                'REG_code'         => new EE_Plain_Text_Field(
184
-                    'REG_code',
185
-                    esc_html__('Unique Code for this registration', 'event_espresso'),
186
-                    false,
187
-                    ''
188
-                ),
189
-                'REG_url_link'     => new EE_Plain_Text_Field(
190
-                    'REG_url_link',
191
-                    esc_html__('String to be used in URL for identifying registration', 'event_espresso'),
192
-                    false,
193
-                    ''
194
-                ),
195
-                'REG_count'        => new EE_Integer_Field(
196
-                    'REG_count',
197
-                    esc_html__('Count of this registration in the group registration', 'event_espresso'),
198
-                    true,
199
-                    1
200
-                ),
201
-                'REG_group_size'   => new EE_Integer_Field(
202
-                    'REG_group_size',
203
-                    esc_html__('Number of registrations on this group', 'event_espresso'),
204
-                    false,
205
-                    1
206
-                ),
207
-                'REG_att_is_going' => new EE_Boolean_Field(
208
-                    'REG_att_is_going',
209
-                    esc_html__('Flag indicating the registrant plans on attending', 'event_espresso'),
210
-                    false,
211
-                    false
212
-                ),
213
-                'REG_deleted'      => new EE_Trashed_Flag_Field(
214
-                    'REG_deleted',
215
-                    esc_html__('Flag indicating if registration has been archived or not.', 'event_espresso'),
216
-                    false,
217
-                    false
218
-                ),
219
-            ],
220
-        ];
221
-        $this->_model_relations        = [
222
-            'Event'                => new EE_Belongs_To_Relation(),
223
-            'Attendee'             => new EE_Belongs_To_Relation(),
224
-            'Transaction'          => new EE_Belongs_To_Relation(),
225
-            'Ticket'               => new EE_Belongs_To_Relation(),
226
-            'Status'               => new EE_Belongs_To_Relation(),
227
-            'Answer'               => new EE_Has_Many_Relation(),
228
-            'Checkin'              => new EE_Has_Many_Relation(),
229
-            'Registration_Payment' => new EE_Has_Many_Relation(),
230
-            'Payment'              => new EE_HABTM_Relation('Registration_Payment'),
231
-            'Message'              => new EE_Has_Many_Any_Relation(false),
232
-            // allow deletes even if there are messages in the queue related
233
-        ];
234
-        $this->_model_chain_to_wp_user = 'Event';
235
-        parent::__construct($timezone);
236
-    }
237
-
238
-
239
-    /**
240
-     * a list of ALL valid registration statuses currently in use within the system
241
-     * generated by combining the filterable active and inactive reg status arrays
242
-     *
243
-     * @return array
244
-     */
245
-    public static function reg_statuses(): array
246
-    {
247
-        return array_unique(
248
-            array_merge(
249
-                EEM_Registration::active_reg_statuses(),
250
-                EEM_Registration::inactive_reg_statuses()
251
-            )
252
-        );
253
-    }
254
-
255
-
256
-    /**
257
-     * reg_statuses_that_allow_payment
258
-     * a filterable list of registration statuses that allow a registrant to make a payment
259
-     *
260
-     * @access public
261
-     * @return array
262
-     */
263
-    public static function reg_statuses_that_allow_payment(): array
264
-    {
265
-        return (array) apply_filters(
266
-            'FHEE__EEM_Registration__reg_statuses_that_allow_payment',
267
-            [
268
-                EEM_Registration::status_id_approved,
269
-                EEM_Registration::status_id_pending_payment,
270
-            ]
271
-        );
272
-    }
273
-
274
-
275
-    /**
276
-     * active_reg_statuses
277
-     * a filterable list of registration statuses that are considered active
278
-     *
279
-     * @access public
280
-     * @return array
281
-     */
282
-    public static function active_reg_statuses(): array
283
-    {
284
-        return (array) apply_filters(
285
-            'FHEE__EEM_Registration__active_reg_statuses',
286
-            [
287
-                EEM_Registration::status_id_approved,
288
-                EEM_Registration::status_id_pending_payment,
289
-                EEM_Registration::status_id_wait_list,
290
-                EEM_Registration::status_id_not_approved,
291
-            ]
292
-        );
293
-    }
294
-
295
-
296
-    /**
297
-     * inactive_reg_statuses
298
-     * a filterable list of registration statuses that are not considered active
299
-     *
300
-     * @access public
301
-     * @return array
302
-     */
303
-    public static function inactive_reg_statuses(): array
304
-    {
305
-        return (array) apply_filters(
306
-            'FHEE__EEM_Registration__inactive_reg_statuses',
307
-            [
308
-                EEM_Registration::status_id_incomplete,
309
-                EEM_Registration::status_id_cancelled,
310
-                EEM_Registration::status_id_declined,
311
-            ]
312
-        );
313
-    }
314
-
315
-
316
-    /**
317
-     *    closed_reg_statuses
318
-     *    a filterable list of registration statuses that are considered "closed"
319
-     * meaning they should not be considered in any calculations involving monies owing
320
-     *
321
-     * @access public
322
-     * @return array
323
-     */
324
-    public static function closed_reg_statuses(): array
325
-    {
326
-        return (array) apply_filters(
327
-            'FHEE__EEM_Registration__closed_reg_statuses',
328
-            [
329
-                EEM_Registration::status_id_cancelled,
330
-                EEM_Registration::status_id_declined,
331
-                EEM_Registration::status_id_wait_list,
332
-            ]
333
-        );
334
-    }
335
-
336
-
337
-    /**
338
-     * get list of registration statuses
339
-     *
340
-     * @param array $exclude    The status ids to exclude from the returned results
341
-     * @param bool  $translated If true will return the values as singular localized strings
342
-     * @return array
343
-     * @throws EE_Error
344
-     * @throws ReflectionException
345
-     */
346
-    public static function reg_status_array(array $exclude = [], bool $translated = false): array
347
-    {
348
-        if (empty(self::$_reg_status)) {
349
-            EEM_Registration::instance()->_get_registration_status_array($exclude);
350
-        }
351
-        return $translated
352
-            ? EEM_Status::instance()->localized_status(self::$_reg_status, false, 'sentence')
353
-            : self::$_reg_status;
354
-    }
355
-
356
-
357
-    /**
358
-     * get list of registration statuses
359
-     *
360
-     * @param array $exclude
361
-     * @param bool  $recurse
362
-     * @return void
363
-     * @throws EE_Error
364
-     * @throws ReflectionException
365
-     */
366
-    private function _get_registration_status_array(array $exclude = [], bool $recurse = true)
367
-    {
368
-        // in the very rare circumstance that we are deleting a model's table's data
369
-        // and the table hasn't actually been created, this could have an error
370
-        /** @type WPDB $wpdb */
371
-        global $wpdb;
372
-        if ($this->_get_table_analysis()->tableExists($wpdb->prefix . 'esp_status')) {
373
-            $results           = $wpdb->get_results(
374
-                "SELECT STS_ID, STS_code FROM {$wpdb->prefix}esp_status WHERE STS_type = 'registration'"
375
-            );
376
-            self::$_reg_status = [];
377
-            foreach ($results as $status) {
378
-                if (! in_array($status->STS_ID, $exclude, true)) {
379
-                    self::$_reg_status[ $status->STS_ID ] = $status->STS_code;
380
-                }
381
-            }
382
-        }
383
-        // in case reg status codes have been deleted from db
384
-        if ($recurse && empty(self::$_reg_status)) {
385
-            EEH_Activation::insert_default_status_codes();
386
-            EEM_Registration::instance()->_get_registration_status_array($exclude, false);
387
-        }
388
-    }
389
-
390
-
391
-    /**
392
-     * Gets the injected table analyzer, or throws an exception
393
-     *
394
-     * @return TableAnalysis
395
-     * @throws EE_Error
396
-     */
397
-    protected function _get_table_analysis(): TableAnalysis
398
-    {
399
-        if ($this->_table_analysis instanceof TableAnalysis) {
400
-            return $this->_table_analysis;
401
-        }
402
-        throw new EE_Error(
403
-            sprintf(
404
-                esc_html__('Table analysis class on class %1$s is not set properly.', 'event_espresso'),
405
-                get_class($this)
406
-            )
407
-        );
408
-    }
409
-
410
-
411
-    /**
412
-     * This returns a wpdb->results array of all registration date month and years matching the incoming query params
413
-     * and grouped by month and year.
414
-     *
415
-     * @param array $where_params
416
-     * @return bool|stdClass[]
417
-     * @throws EE_Error
418
-     * @see https://github.com/eventespresso/event-espresso-core/tree/master/docs/G--Model-System/model-query-params.md#0-where-conditions
419
-     */
420
-    public function get_reg_months_and_years(array $where_params)
421
-    {
422
-        $query_params[0]          = $where_params;
423
-        $query_params['group_by'] = ['reg_year', 'reg_month'];
424
-        $query_params['order_by'] = ['REG_date' => 'DESC'];
425
-        $columns_to_select        = [
426
-            'reg_year'  => ['YEAR(REG_date)', '%s'],
427
-            'reg_month' => ['MONTHNAME(REG_date)', '%s'],
428
-        ];
429
-        return $this->_get_all_wpdb_results($query_params, OBJECT, $columns_to_select);
430
-    }
431
-
432
-
433
-    /**
434
-     * retrieve ALL registrations for a particular Attendee from db
435
-     *
436
-     * @param int $ATT_ID
437
-     * @return EE_Registration[]|bool|null
438
-     * @throws EE_Error
439
-     * @throws ReflectionException
440
-     */
441
-    public function get_all_registrations_for_attendee(int $ATT_ID = 0): ?array
442
-    {
443
-        if (! $ATT_ID) {
444
-            return null;
445
-        }
446
-        return $this->get_all([['ATT_ID' => $ATT_ID]]);
447
-    }
448
-
449
-
450
-    /**
451
-     * Gets a registration given their REG_url_link. Yes, this should usually
452
-     * be passed via a GET parameter.
453
-     *
454
-     * @param string $REG_url_link
455
-     * @return EE_Registration|null
456
-     * @throws EE_Error
457
-     */
458
-    public function get_registration_for_reg_url_link(string $REG_url_link): ?EE_Registration
459
-    {
460
-        if (! $REG_url_link) {
461
-            return null;
462
-        }
463
-        return $this->get_one([['REG_url_link' => $REG_url_link]]);
464
-    }
465
-
466
-
467
-    /**
468
-     *        retrieve registration for a specific transaction attendee from db
469
-     *
470
-     * @access        public
471
-     * @param int $TXN_ID
472
-     * @param int $ATT_ID
473
-     * @param int $att_nmbr    in case the ATT_ID is the same for multiple registrations (same details used) then the
474
-     *                         attendee number is required
475
-     * @return EE_Registration|null array on success, FALSE on fail
476
-     * @throws EE_Error
477
-     */
478
-    public function get_registration_for_transaction_attendee(int $TXN_ID = 0, int $ATT_ID = 0, int $att_nmbr = 0):
479
-    ?EE_Registration {
480
-        return $this->get_one([
481
-            [
482
-                'TXN_ID' => $TXN_ID,
483
-                'ATT_ID' => $ATT_ID,
484
-            ],
485
-            'limit' => [min($att_nmbr - 1, 0), 1],
486
-        ]);
487
-    }
488
-
489
-
490
-    /**
491
-     *        get the number of registrations per day  for the Registration Admin page Reports Tab.
492
-     *        (doesn't utilize models because it's a fairly specialized query)
493
-     *
494
-     * @access        public
495
-     * @param $period string which can be passed to php's strtotime function (eg "-1 month")
496
-     * @return EE_Registration[]|bool|null with properties regDate and total
497
-     * @throws EE_Error
498
-     */
499
-    public function get_registrations_per_day_report(string $period = '-1 month')
500
-    {
501
-        $sql_date = $this->convert_datetime_for_query(
502
-            'REG_date',
503
-            date('Y-m-d H:i:s', strtotime($period)),
504
-            'Y-m-d H:i:s',
505
-            'UTC'
506
-        );
507
-        $where    = [
508
-            'REG_date' => ['>=', $sql_date],
509
-            'STS_ID'   => ['!=', EEM_Registration::status_id_incomplete],
510
-        ];
511
-        if (! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'reg_per_day_report')) {
512
-            $where['Event.EVT_wp_user'] = get_current_user_id();
513
-        }
514
-        $query_interval = EEH_DTT_Helper::get_sql_query_interval_for_offset($this->get_timezone(), 'REG_date');
515
-        return $this->_get_all_wpdb_results(
516
-            [
517
-                $where,
518
-                'group_by' => 'regDate',
519
-                'order_by' => ['REG_date' => 'ASC'],
520
-            ],
521
-            OBJECT,
522
-            [
523
-                'regDate' => ['DATE(' . $query_interval . ')', '%s'],
524
-                'total'   => ['count(REG_ID)', '%d'],
525
-            ]
526
-        );
527
-    }
528
-
529
-
530
-    /**
531
-     * Get the number of registrations per day including the count of registrations for each Registration Status.
532
-     * Note: EEM_Registration::status_id_incomplete registrations are excluded from the results.
533
-     *
534
-     * @param string $period
535
-     * @return stdClass[] with properties Registration_REG_date and a column for each registration status as the STS_ID
536
-     * @throws EE_Error
537
-     *                    (i.e. RAP)
538
-     * @throws EE_Error|ReflectionException
539
-     */
540
-    public function get_registrations_per_day_and_per_status_report(string $period = '-1 month'): array
541
-    {
542
-        global $wpdb;
543
-        $registration_table = $wpdb->prefix . 'esp_registration';
544
-        $event_table        = $wpdb->posts;
545
-        $sql_date           = date('Y-m-d H:i:s', strtotime($period));
546
-        // prepare the query interval for displaying offset
547
-        $query_interval = EEH_DTT_Helper::get_sql_query_interval_for_offset($this->get_timezone(), 'dates.REG_date');
548
-        // inner date query
549
-        $inner_date_query = "SELECT DISTINCT REG_date from $registration_table ";
550
-        $inner_where      = ' WHERE';
551
-        // exclude events not authored by user if permissions in effect
552
-        if (! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'reg_per_event_report')) {
553
-            $inner_date_query .= "LEFT JOIN $event_table ON ID = EVT_ID";
554
-            $inner_where      .= ' post_author = ' . get_current_user_id() . ' AND';
555
-        }
556
-        $inner_where      .= " REG_date >= '$sql_date'";
557
-        $inner_date_query .= $inner_where;
558
-        // start main query
559
-        $select       = "SELECT DATE($query_interval) as Registration_REG_date, ";
560
-        $join         = '';
561
-        $join_parts   = [];
562
-        $select_parts = [];
563
-        // loop through registration stati to do parts for each status.
564
-        foreach (EEM_Registration::reg_status_array() as $STS_ID => $STS_code) {
565
-            if ($STS_ID === EEM_Registration::status_id_incomplete) {
566
-                continue;
567
-            }
568
-            $select_parts[] = "COUNT($STS_code.REG_ID) as $STS_ID";
569
-            $join_parts[]   =
570
-                "$registration_table AS $STS_code ON $STS_code.REG_date = dates.REG_date AND $STS_code.STS_ID = '$STS_ID'";
571
-        }
572
-        // setup the selects
573
-        $select .= implode(', ', $select_parts);
574
-        $select .= " FROM ($inner_date_query) AS dates LEFT JOIN ";
575
-        // setup the joins
576
-        $join .= implode(' LEFT JOIN ', $join_parts);
577
-        // now let's put it all together
578
-        $query = $select . $join . ' GROUP BY Registration_REG_date';
579
-        // and execute it
580
-        return $wpdb->get_results($query, ARRAY_A);
581
-    }
582
-
583
-
584
-    /**
585
-     *        get the number of registrations per event  for the Registration Admin page Reports Tab
586
-     *
587
-     * @access        public
588
-     * @param $period string which can be passed to php's strtotime function (eg "-1 month")
589
-     * @return stdClass[] each with properties event_name, reg_limit, and total
590
-     * @throws EE_Error
591
-     */
592
-    public function get_registrations_per_event_report(string $period = '-1 month'): array
593
-    {
594
-        $date_sql = $this->convert_datetime_for_query(
595
-            'REG_date',
596
-            date('Y-m-d H:i:s', strtotime($period)),
597
-            'Y-m-d H:i:s',
598
-            'UTC'
599
-        );
600
-        $where    = [
601
-            'REG_date' => ['>=', $date_sql],
602
-            'STS_ID'   => ['!=', EEM_Registration::status_id_incomplete],
603
-        ];
604
-        if (
605
-            ! EE_Registry::instance()->CAP->current_user_can(
606
-                'ee_read_others_registrations',
607
-                'reg_per_event_report'
608
-            )
609
-        ) {
610
-            $where['Event.EVT_wp_user'] = get_current_user_id();
611
-        }
612
-        return $this->_get_all_wpdb_results(
613
-            [
614
-                $where,
615
-                'group_by' => 'Event.EVT_name',
616
-                'order_by' => 'Event.EVT_name',
617
-                'limit'    => [0, 24],
618
-            ],
619
-            OBJECT,
620
-            [
621
-                'event_name' => ['Event_CPT.post_title', '%s'],
622
-                'total'      => ['COUNT(REG_ID)', '%s'],
623
-            ]
624
-        );
625
-    }
626
-
627
-
628
-    /**
629
-     * Get the number of registrations per event grouped by registration status.
630
-     * Note: EEM_Registration::status_id_incomplete registrations are excluded from the results.
631
-     *
632
-     * @param string $period
633
-     * @return stdClass[] with properties `Registration_Event` and a column for each registration status as the STS_ID
634
-     *                    (i.e. RAP)
635
-     * @throws EE_Error
636
-     * @throws ReflectionException
637
-     */
638
-    public function get_registrations_per_event_and_per_status_report(string $period = '-1 month'): array
639
-    {
640
-        global $wpdb;
641
-        $registration_table = $wpdb->prefix . 'esp_registration';
642
-        $event_table        = $wpdb->posts;
643
-        $sql_date           = date('Y-m-d H:i:s', strtotime($period));
644
-        // inner date query
645
-        $inner_date_query = "SELECT DISTINCT EVT_ID, REG_date from $registration_table ";
646
-        $inner_where      = ' WHERE';
647
-        // exclude events not authored by user if permissions in effect
648
-        if (! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'reg_per_event_report')) {
649
-            $inner_date_query .= "LEFT JOIN $event_table ON ID = EVT_ID";
650
-            $inner_where      .= ' post_author = ' . get_current_user_id() . ' AND';
651
-        }
652
-        $inner_where      .= " REG_date >= '$sql_date'";
653
-        $inner_date_query .= $inner_where;
654
-        // build main query
655
-        $select       = 'SELECT Event.post_title as Registration_Event, ';
656
-        $join         = '';
657
-        $join_parts   = [];
658
-        $select_parts = [];
659
-        // loop through registration stati to do parts for each status.
660
-        foreach (EEM_Registration::reg_status_array() as $STS_ID => $STS_code) {
661
-            if ($STS_ID === EEM_Registration::status_id_incomplete) {
662
-                continue;
663
-            }
664
-            $select_parts[] = "COUNT($STS_code.REG_ID) as $STS_ID";
665
-            $join_parts[]   =
666
-                "$registration_table AS $STS_code ON $STS_code.EVT_ID = dates.EVT_ID AND $STS_code.STS_ID = '$STS_ID' AND $STS_code.REG_date = dates.REG_date";
667
-        }
668
-        // setup the selects
669
-        $select .= implode(', ', $select_parts);
670
-        $select .= " FROM ($inner_date_query) AS dates LEFT JOIN $event_table as Event ON Event.ID = dates.EVT_ID LEFT JOIN ";
671
-        // setup remaining joins
672
-        $join .= implode(' LEFT JOIN ', $join_parts);
673
-        // now put it all together
674
-        $query = $select . $join . ' GROUP BY Registration_Event';
675
-        // and execute
676
-        return $wpdb->get_results($query, ARRAY_A);
677
-    }
678
-
679
-
680
-    /**
681
-     * Returns the EE_Registration of the primary attendee on the transaction id provided
682
-     *
683
-     * @param int $TXN_ID
684
-     * @return EE_Registration|null
685
-     * @throws EE_Error
686
-     */
687
-    public function get_primary_registration_for_transaction_ID(int $TXN_ID = 0): ?EE_Registration
688
-    {
689
-        if (! $TXN_ID) {
690
-            return null;
691
-        }
692
-        return $this->get_one([
693
-            [
694
-                'TXN_ID'    => $TXN_ID,
695
-                'REG_count' => EEM_Registration::PRIMARY_REGISTRANT_COUNT,
696
-            ],
697
-        ]);
698
-    }
699
-
700
-
701
-    /**
702
-     *        get_event_registration_count
703
-     *
704
-     * @access public
705
-     * @param int     $EVT_ID
706
-     * @param boolean $for_incomplete_payments
707
-     * @return int
708
-     * @throws EE_Error
709
-     */
710
-    public function get_event_registration_count(int $EVT_ID, bool $for_incomplete_payments = false): int
711
-    {
712
-        // we only count approved registrations towards registration limits
713
-        $query_params = [['EVT_ID' => $EVT_ID, 'STS_ID' => self::status_id_approved]];
714
-        if ($for_incomplete_payments) {
715
-            $query_params[0]['Transaction.STS_ID'] = ['!=', EEM_Transaction::complete_status_code];
716
-        }
717
-        return $this->count($query_params);
718
-    }
719
-
720
-
721
-    /**
722
-     * Deletes all registrations with no transactions. Note that this needs to be very efficient
723
-     * and so it uses wpdb directly. Also, we can't put a limit on this because MySQL doesn't allow a limit on a delete
724
-     * when joining tables like this.
725
-     *
726
-     * @return int|bool number deleted
727
-     * @throws EE_Error
728
-     * @throws ReflectionException
729
-     * @global WPDB $wpdb
730
-     */
731
-    public function delete_registrations_with_no_transaction()
732
-    {
733
-        /** @type WPDB $wpdb */
734
-        global $wpdb;
735
-        return $wpdb->query(
736
-            'DELETE r FROM '
737
-            . $this->table()
738
-            . ' r LEFT JOIN '
739
-            . EEM_Transaction::instance()->table()
740
-            . ' t ON r.TXN_ID = t.TXN_ID WHERE t.TXN_ID IS NULL'
741
-        );
742
-    }
743
-
744
-
745
-    /**
746
-     *  Count registrations checked into (or out of) a datetime
747
-     *
748
-     * @param int  $DTT_ID     datetime ID
749
-     * @param bool $checked_in whether to count registrations checked IN or OUT
750
-     * @return int
751
-     * @throws EE_Error
752
-     * @throws ReflectionException
753
-     * @throws ReflectionException
754
-     */
755
-    public function count_registrations_checked_into_datetime(int $DTT_ID, bool $checked_in = true): int
756
-    {
757
-        global $wpdb;
758
-        // subquery to get latest checkin
759
-        $query = $wpdb->prepare(
760
-            'SELECT '
761
-            . 'COUNT( DISTINCT checkins.REG_ID ) '
762
-            . 'FROM ' . EEM_Checkin::instance()->table() . ' AS checkins INNER JOIN'
763
-            . '( SELECT '
764
-            . 'max( CHK_timestamp ) AS latest_checkin, '
765
-            . 'REG_ID AS REG_ID '
766
-            . 'FROM ' . EEM_Checkin::instance()->table() . ' '
767
-            . 'WHERE DTT_ID=%d '
768
-            . 'GROUP BY REG_ID'
769
-            . ') AS most_recent_checkin_per_reg '
770
-            . 'ON checkins.REG_ID=most_recent_checkin_per_reg.REG_ID '
771
-            . 'AND checkins.CHK_timestamp = most_recent_checkin_per_reg.latest_checkin '
772
-            . 'WHERE '
773
-            . 'checkins.CHK_in=%d',
774
-            $DTT_ID,
775
-            $checked_in
776
-        );
777
-        return (int) $wpdb->get_var($query);
778
-    }
779
-
780
-
781
-    /**
782
-     *  Count registrations checked into (or out of) an event.
783
-     *
784
-     * @param int  $EVT_ID     event ID
785
-     * @param bool $checked_in whether to count registrations checked IN or OUT
786
-     * @return int
787
-     * @throws EE_Error
788
-     * @throws ReflectionException
789
-     * @throws ReflectionException
790
-     * @throws ReflectionException
791
-     */
792
-    public function count_registrations_checked_into_event(int $EVT_ID, bool $checked_in = true): int
793
-    {
794
-        global $wpdb;
795
-        // subquery to get latest checkin
796
-        $query = $wpdb->prepare(
797
-            'SELECT '
798
-            . 'COUNT( DISTINCT checkins.REG_ID ) '
799
-            . 'FROM ' . EEM_Checkin::instance()->table() . ' AS checkins INNER JOIN'
800
-            . '( SELECT '
801
-            . 'max( CHK_timestamp ) AS latest_checkin, '
802
-            . 'REG_ID AS REG_ID '
803
-            . 'FROM ' . EEM_Checkin::instance()->table() . ' AS c '
804
-            . 'INNER JOIN ' . EEM_Datetime::instance()->table() . ' AS d '
805
-            . 'ON c.DTT_ID=d.DTT_ID '
806
-            . 'WHERE d.EVT_ID=%d '
807
-            . 'GROUP BY REG_ID'
808
-            . ') AS most_recent_checkin_per_reg '
809
-            . 'ON checkins.REG_ID=most_recent_checkin_per_reg.REG_ID '
810
-            . 'AND checkins.CHK_timestamp = most_recent_checkin_per_reg.latest_checkin '
811
-            . 'WHERE '
812
-            . 'checkins.CHK_in=%d',
813
-            $EVT_ID,
814
-            $checked_in
815
-        );
816
-        return (int) $wpdb->get_var($query);
817
-    }
818
-
819
-
820
-    /**
821
-     * The purpose of this method is to retrieve an array of
822
-     * EE_Registration objects that represent the latest registration
823
-     * for each ATT_ID given in the function argument.
824
-     *
825
-     * @param array $attendee_ids
826
-     * @return EE_Registration[]|bool|null
827
-     * @throws EE_Error
828
-     * @throws ReflectionException
829
-     */
830
-    public function get_latest_registration_for_each_of_given_contacts(array $attendee_ids = [])
831
-    {
832
-        // first do a native wp_query to get the latest REG_ID's matching these attendees.
833
-        global $wpdb;
834
-        $registration_table = $wpdb->prefix . 'esp_registration';
835
-        $attendee_table     = $wpdb->posts;
836
-        $attendee_ids       = is_array($attendee_ids)
837
-            ? array_map('absint', $attendee_ids)
838
-            : [(int) $attendee_ids];
839
-        $ATT_IDs            = implode(',', $attendee_ids);
840
-        // first we do a query to get the registration ids
841
-        // (because a group by before order by causes the order by to be ignored.)
842
-        $registration_id_query = "
17
+	/**
18
+	 * The value of REG_count for a primary registrant
19
+	 */
20
+	const PRIMARY_REGISTRANT_COUNT = 1;
21
+
22
+	/**
23
+	 * Status ID (STS_ID on esp_status table) to indicate an INCOMPLETE registration.
24
+	 * Initial status for registrations when they are first created
25
+	 * Payments are NOT allowed.
26
+	 * Automatically toggled to whatever the default Event registration status is upon completion of the attendee
27
+	 * information reg step NO space reserved. Registration is NOT active
28
+	 */
29
+	const status_id_incomplete = 'RIC';
30
+
31
+	/**
32
+	 * Status ID (STS_ID on esp_status table) to indicate an UNAPPROVED registration.
33
+	 * Payments are NOT allowed.
34
+	 * Event Admin must manually toggle STS_ID for it to change
35
+	 * No space reserved.
36
+	 * Registration is active
37
+	 */
38
+	const status_id_not_approved = 'RNA';
39
+
40
+	/**
41
+	 * Status ID (STS_ID on esp_status table) to indicate registration is PENDING_PAYMENT .
42
+	 * Payments are allowed.
43
+	 * STS_ID will automatically be toggled to RAP if payment is made in full by the attendee
44
+	 * No space reserved.
45
+	 * Registration is active
46
+	 */
47
+	const status_id_pending_payment = 'RPP';
48
+
49
+	/**
50
+	 * Status ID (STS_ID on esp_status table) to indicate registration is on the WAIT_LIST .
51
+	 * Payments are allowed.
52
+	 * STS_ID will automatically be toggled to RAP if payment is made in full by the attendee
53
+	 * No space reserved.
54
+	 * Registration is active
55
+	 */
56
+	const status_id_wait_list = 'RWL';
57
+
58
+	/**
59
+	 * Status ID (STS_ID on esp_status table) to indicate an APPROVED registration.
60
+	 * the TXN may or may not be completed ( paid in full )
61
+	 * Payments are allowed.
62
+	 * A space IS reserved.
63
+	 * Registration is active
64
+	 */
65
+	const status_id_approved = 'RAP';
66
+
67
+	/**
68
+	 * Status ID (STS_ID on esp_status table) to indicate a registration was CANCELLED by the attendee.
69
+	 * Payments are NOT allowed.
70
+	 * NO space reserved.
71
+	 * Registration is NOT active
72
+	 */
73
+	const status_id_cancelled = 'RCN';
74
+
75
+	/**
76
+	 * Status ID (STS_ID on esp_status table) to indicate a registration was DECLINED by the Event Admin
77
+	 * Payments are NOT allowed.
78
+	 * No space reserved.
79
+	 * Registration is NOT active
80
+	 */
81
+	const status_id_declined = 'RDC';
82
+
83
+
84
+	protected static ?EEM_Registration $_instance       = null;
85
+
86
+	protected ?TableAnalysis           $_table_analysis = null;
87
+
88
+	/**
89
+	 * Keys are the status IDs for registrations (eg, RAP, RCN, etc), and the values
90
+	 * are status codes (eg, approved, cancelled, etc)
91
+	 *
92
+	 * @var array|null
93
+	 */
94
+	private static array $_reg_status = [];
95
+
96
+
97
+	/**
98
+	 *    private constructor to prevent direct creation
99
+	 *
100
+	 * @Constructor
101
+	 * @access protected
102
+	 * @param string $timezone string representing the timezone we want to set for returned Date Time Strings (and any
103
+	 *                         incoming timezone data that gets saved). Note this just sends the timezone info to the
104
+	 *                         date time model field objects.  Default is NULL (and will be assumed using the set
105
+	 *                         timezone in the 'timezone_string' wp option)
106
+	 * @throws EE_Error
107
+	 * @throws ReflectionException
108
+	 */
109
+	protected function __construct($timezone = null)
110
+	{
111
+		$this->_table_analysis         = EE_Registry::instance()->create('TableAnalysis', [], true);
112
+		$this->singular_item           = esc_html__('Registration', 'event_espresso');
113
+		$this->plural_item             = esc_html__('Registrations', 'event_espresso');
114
+		$this->_tables                 = [
115
+			'Registration' => new EE_Primary_Table('esp_registration', 'REG_ID'),
116
+		];
117
+		$this->_fields                 = [
118
+			'Registration' => [
119
+				'REG_ID'           => new EE_Primary_Key_Int_Field(
120
+					'REG_ID',
121
+					esc_html__('Registration ID', 'event_espresso')
122
+				),
123
+				'EVT_ID'           => new EE_Foreign_Key_Int_Field(
124
+					'EVT_ID',
125
+					esc_html__('Event ID', 'event_espresso'),
126
+					false,
127
+					0,
128
+					'Event'
129
+				),
130
+				'ATT_ID'           => new EE_Foreign_Key_Int_Field(
131
+					'ATT_ID',
132
+					esc_html__('Attendee ID', 'event_espresso'),
133
+					false,
134
+					0,
135
+					'Attendee'
136
+				),
137
+				'TXN_ID'           => new EE_Foreign_Key_Int_Field(
138
+					'TXN_ID',
139
+					esc_html__('Transaction ID', 'event_espresso'),
140
+					false,
141
+					0,
142
+					'Transaction'
143
+				),
144
+				'TKT_ID'           => new EE_Foreign_Key_Int_Field(
145
+					'TKT_ID',
146
+					esc_html__('Ticket ID', 'event_espresso'),
147
+					false,
148
+					0,
149
+					'Ticket'
150
+				),
151
+				'STS_ID'           => new EE_Foreign_Key_String_Field(
152
+					'STS_ID',
153
+					esc_html__('Status ID', 'event_espresso'),
154
+					false,
155
+					EEM_Registration::status_id_incomplete,
156
+					'Status'
157
+				),
158
+				'REG_date'         => new EE_Datetime_Field(
159
+					'REG_date',
160
+					esc_html__('Time registration occurred', 'event_espresso'),
161
+					false,
162
+					EE_Datetime_Field::now,
163
+					$timezone
164
+				),
165
+				'REG_final_price'  => new EE_Money_Field(
166
+					'REG_final_price',
167
+					esc_html__('Registration\'s share of the transaction total', 'event_espresso'),
168
+					false,
169
+					0
170
+				),
171
+				'REG_paid'         => new EE_Money_Field(
172
+					'REG_paid',
173
+					esc_html__('Amount paid to date towards registration', 'event_espresso'),
174
+					false,
175
+					0
176
+				),
177
+				'REG_session'      => new EE_Plain_Text_Field(
178
+					'REG_session',
179
+					esc_html__('Session ID of registration', 'event_espresso'),
180
+					false,
181
+					''
182
+				),
183
+				'REG_code'         => new EE_Plain_Text_Field(
184
+					'REG_code',
185
+					esc_html__('Unique Code for this registration', 'event_espresso'),
186
+					false,
187
+					''
188
+				),
189
+				'REG_url_link'     => new EE_Plain_Text_Field(
190
+					'REG_url_link',
191
+					esc_html__('String to be used in URL for identifying registration', 'event_espresso'),
192
+					false,
193
+					''
194
+				),
195
+				'REG_count'        => new EE_Integer_Field(
196
+					'REG_count',
197
+					esc_html__('Count of this registration in the group registration', 'event_espresso'),
198
+					true,
199
+					1
200
+				),
201
+				'REG_group_size'   => new EE_Integer_Field(
202
+					'REG_group_size',
203
+					esc_html__('Number of registrations on this group', 'event_espresso'),
204
+					false,
205
+					1
206
+				),
207
+				'REG_att_is_going' => new EE_Boolean_Field(
208
+					'REG_att_is_going',
209
+					esc_html__('Flag indicating the registrant plans on attending', 'event_espresso'),
210
+					false,
211
+					false
212
+				),
213
+				'REG_deleted'      => new EE_Trashed_Flag_Field(
214
+					'REG_deleted',
215
+					esc_html__('Flag indicating if registration has been archived or not.', 'event_espresso'),
216
+					false,
217
+					false
218
+				),
219
+			],
220
+		];
221
+		$this->_model_relations        = [
222
+			'Event'                => new EE_Belongs_To_Relation(),
223
+			'Attendee'             => new EE_Belongs_To_Relation(),
224
+			'Transaction'          => new EE_Belongs_To_Relation(),
225
+			'Ticket'               => new EE_Belongs_To_Relation(),
226
+			'Status'               => new EE_Belongs_To_Relation(),
227
+			'Answer'               => new EE_Has_Many_Relation(),
228
+			'Checkin'              => new EE_Has_Many_Relation(),
229
+			'Registration_Payment' => new EE_Has_Many_Relation(),
230
+			'Payment'              => new EE_HABTM_Relation('Registration_Payment'),
231
+			'Message'              => new EE_Has_Many_Any_Relation(false),
232
+			// allow deletes even if there are messages in the queue related
233
+		];
234
+		$this->_model_chain_to_wp_user = 'Event';
235
+		parent::__construct($timezone);
236
+	}
237
+
238
+
239
+	/**
240
+	 * a list of ALL valid registration statuses currently in use within the system
241
+	 * generated by combining the filterable active and inactive reg status arrays
242
+	 *
243
+	 * @return array
244
+	 */
245
+	public static function reg_statuses(): array
246
+	{
247
+		return array_unique(
248
+			array_merge(
249
+				EEM_Registration::active_reg_statuses(),
250
+				EEM_Registration::inactive_reg_statuses()
251
+			)
252
+		);
253
+	}
254
+
255
+
256
+	/**
257
+	 * reg_statuses_that_allow_payment
258
+	 * a filterable list of registration statuses that allow a registrant to make a payment
259
+	 *
260
+	 * @access public
261
+	 * @return array
262
+	 */
263
+	public static function reg_statuses_that_allow_payment(): array
264
+	{
265
+		return (array) apply_filters(
266
+			'FHEE__EEM_Registration__reg_statuses_that_allow_payment',
267
+			[
268
+				EEM_Registration::status_id_approved,
269
+				EEM_Registration::status_id_pending_payment,
270
+			]
271
+		);
272
+	}
273
+
274
+
275
+	/**
276
+	 * active_reg_statuses
277
+	 * a filterable list of registration statuses that are considered active
278
+	 *
279
+	 * @access public
280
+	 * @return array
281
+	 */
282
+	public static function active_reg_statuses(): array
283
+	{
284
+		return (array) apply_filters(
285
+			'FHEE__EEM_Registration__active_reg_statuses',
286
+			[
287
+				EEM_Registration::status_id_approved,
288
+				EEM_Registration::status_id_pending_payment,
289
+				EEM_Registration::status_id_wait_list,
290
+				EEM_Registration::status_id_not_approved,
291
+			]
292
+		);
293
+	}
294
+
295
+
296
+	/**
297
+	 * inactive_reg_statuses
298
+	 * a filterable list of registration statuses that are not considered active
299
+	 *
300
+	 * @access public
301
+	 * @return array
302
+	 */
303
+	public static function inactive_reg_statuses(): array
304
+	{
305
+		return (array) apply_filters(
306
+			'FHEE__EEM_Registration__inactive_reg_statuses',
307
+			[
308
+				EEM_Registration::status_id_incomplete,
309
+				EEM_Registration::status_id_cancelled,
310
+				EEM_Registration::status_id_declined,
311
+			]
312
+		);
313
+	}
314
+
315
+
316
+	/**
317
+	 *    closed_reg_statuses
318
+	 *    a filterable list of registration statuses that are considered "closed"
319
+	 * meaning they should not be considered in any calculations involving monies owing
320
+	 *
321
+	 * @access public
322
+	 * @return array
323
+	 */
324
+	public static function closed_reg_statuses(): array
325
+	{
326
+		return (array) apply_filters(
327
+			'FHEE__EEM_Registration__closed_reg_statuses',
328
+			[
329
+				EEM_Registration::status_id_cancelled,
330
+				EEM_Registration::status_id_declined,
331
+				EEM_Registration::status_id_wait_list,
332
+			]
333
+		);
334
+	}
335
+
336
+
337
+	/**
338
+	 * get list of registration statuses
339
+	 *
340
+	 * @param array $exclude    The status ids to exclude from the returned results
341
+	 * @param bool  $translated If true will return the values as singular localized strings
342
+	 * @return array
343
+	 * @throws EE_Error
344
+	 * @throws ReflectionException
345
+	 */
346
+	public static function reg_status_array(array $exclude = [], bool $translated = false): array
347
+	{
348
+		if (empty(self::$_reg_status)) {
349
+			EEM_Registration::instance()->_get_registration_status_array($exclude);
350
+		}
351
+		return $translated
352
+			? EEM_Status::instance()->localized_status(self::$_reg_status, false, 'sentence')
353
+			: self::$_reg_status;
354
+	}
355
+
356
+
357
+	/**
358
+	 * get list of registration statuses
359
+	 *
360
+	 * @param array $exclude
361
+	 * @param bool  $recurse
362
+	 * @return void
363
+	 * @throws EE_Error
364
+	 * @throws ReflectionException
365
+	 */
366
+	private function _get_registration_status_array(array $exclude = [], bool $recurse = true)
367
+	{
368
+		// in the very rare circumstance that we are deleting a model's table's data
369
+		// and the table hasn't actually been created, this could have an error
370
+		/** @type WPDB $wpdb */
371
+		global $wpdb;
372
+		if ($this->_get_table_analysis()->tableExists($wpdb->prefix . 'esp_status')) {
373
+			$results           = $wpdb->get_results(
374
+				"SELECT STS_ID, STS_code FROM {$wpdb->prefix}esp_status WHERE STS_type = 'registration'"
375
+			);
376
+			self::$_reg_status = [];
377
+			foreach ($results as $status) {
378
+				if (! in_array($status->STS_ID, $exclude, true)) {
379
+					self::$_reg_status[ $status->STS_ID ] = $status->STS_code;
380
+				}
381
+			}
382
+		}
383
+		// in case reg status codes have been deleted from db
384
+		if ($recurse && empty(self::$_reg_status)) {
385
+			EEH_Activation::insert_default_status_codes();
386
+			EEM_Registration::instance()->_get_registration_status_array($exclude, false);
387
+		}
388
+	}
389
+
390
+
391
+	/**
392
+	 * Gets the injected table analyzer, or throws an exception
393
+	 *
394
+	 * @return TableAnalysis
395
+	 * @throws EE_Error
396
+	 */
397
+	protected function _get_table_analysis(): TableAnalysis
398
+	{
399
+		if ($this->_table_analysis instanceof TableAnalysis) {
400
+			return $this->_table_analysis;
401
+		}
402
+		throw new EE_Error(
403
+			sprintf(
404
+				esc_html__('Table analysis class on class %1$s is not set properly.', 'event_espresso'),
405
+				get_class($this)
406
+			)
407
+		);
408
+	}
409
+
410
+
411
+	/**
412
+	 * This returns a wpdb->results array of all registration date month and years matching the incoming query params
413
+	 * and grouped by month and year.
414
+	 *
415
+	 * @param array $where_params
416
+	 * @return bool|stdClass[]
417
+	 * @throws EE_Error
418
+	 * @see https://github.com/eventespresso/event-espresso-core/tree/master/docs/G--Model-System/model-query-params.md#0-where-conditions
419
+	 */
420
+	public function get_reg_months_and_years(array $where_params)
421
+	{
422
+		$query_params[0]          = $where_params;
423
+		$query_params['group_by'] = ['reg_year', 'reg_month'];
424
+		$query_params['order_by'] = ['REG_date' => 'DESC'];
425
+		$columns_to_select        = [
426
+			'reg_year'  => ['YEAR(REG_date)', '%s'],
427
+			'reg_month' => ['MONTHNAME(REG_date)', '%s'],
428
+		];
429
+		return $this->_get_all_wpdb_results($query_params, OBJECT, $columns_to_select);
430
+	}
431
+
432
+
433
+	/**
434
+	 * retrieve ALL registrations for a particular Attendee from db
435
+	 *
436
+	 * @param int $ATT_ID
437
+	 * @return EE_Registration[]|bool|null
438
+	 * @throws EE_Error
439
+	 * @throws ReflectionException
440
+	 */
441
+	public function get_all_registrations_for_attendee(int $ATT_ID = 0): ?array
442
+	{
443
+		if (! $ATT_ID) {
444
+			return null;
445
+		}
446
+		return $this->get_all([['ATT_ID' => $ATT_ID]]);
447
+	}
448
+
449
+
450
+	/**
451
+	 * Gets a registration given their REG_url_link. Yes, this should usually
452
+	 * be passed via a GET parameter.
453
+	 *
454
+	 * @param string $REG_url_link
455
+	 * @return EE_Registration|null
456
+	 * @throws EE_Error
457
+	 */
458
+	public function get_registration_for_reg_url_link(string $REG_url_link): ?EE_Registration
459
+	{
460
+		if (! $REG_url_link) {
461
+			return null;
462
+		}
463
+		return $this->get_one([['REG_url_link' => $REG_url_link]]);
464
+	}
465
+
466
+
467
+	/**
468
+	 *        retrieve registration for a specific transaction attendee from db
469
+	 *
470
+	 * @access        public
471
+	 * @param int $TXN_ID
472
+	 * @param int $ATT_ID
473
+	 * @param int $att_nmbr    in case the ATT_ID is the same for multiple registrations (same details used) then the
474
+	 *                         attendee number is required
475
+	 * @return EE_Registration|null array on success, FALSE on fail
476
+	 * @throws EE_Error
477
+	 */
478
+	public function get_registration_for_transaction_attendee(int $TXN_ID = 0, int $ATT_ID = 0, int $att_nmbr = 0):
479
+	?EE_Registration {
480
+		return $this->get_one([
481
+			[
482
+				'TXN_ID' => $TXN_ID,
483
+				'ATT_ID' => $ATT_ID,
484
+			],
485
+			'limit' => [min($att_nmbr - 1, 0), 1],
486
+		]);
487
+	}
488
+
489
+
490
+	/**
491
+	 *        get the number of registrations per day  for the Registration Admin page Reports Tab.
492
+	 *        (doesn't utilize models because it's a fairly specialized query)
493
+	 *
494
+	 * @access        public
495
+	 * @param $period string which can be passed to php's strtotime function (eg "-1 month")
496
+	 * @return EE_Registration[]|bool|null with properties regDate and total
497
+	 * @throws EE_Error
498
+	 */
499
+	public function get_registrations_per_day_report(string $period = '-1 month')
500
+	{
501
+		$sql_date = $this->convert_datetime_for_query(
502
+			'REG_date',
503
+			date('Y-m-d H:i:s', strtotime($period)),
504
+			'Y-m-d H:i:s',
505
+			'UTC'
506
+		);
507
+		$where    = [
508
+			'REG_date' => ['>=', $sql_date],
509
+			'STS_ID'   => ['!=', EEM_Registration::status_id_incomplete],
510
+		];
511
+		if (! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'reg_per_day_report')) {
512
+			$where['Event.EVT_wp_user'] = get_current_user_id();
513
+		}
514
+		$query_interval = EEH_DTT_Helper::get_sql_query_interval_for_offset($this->get_timezone(), 'REG_date');
515
+		return $this->_get_all_wpdb_results(
516
+			[
517
+				$where,
518
+				'group_by' => 'regDate',
519
+				'order_by' => ['REG_date' => 'ASC'],
520
+			],
521
+			OBJECT,
522
+			[
523
+				'regDate' => ['DATE(' . $query_interval . ')', '%s'],
524
+				'total'   => ['count(REG_ID)', '%d'],
525
+			]
526
+		);
527
+	}
528
+
529
+
530
+	/**
531
+	 * Get the number of registrations per day including the count of registrations for each Registration Status.
532
+	 * Note: EEM_Registration::status_id_incomplete registrations are excluded from the results.
533
+	 *
534
+	 * @param string $period
535
+	 * @return stdClass[] with properties Registration_REG_date and a column for each registration status as the STS_ID
536
+	 * @throws EE_Error
537
+	 *                    (i.e. RAP)
538
+	 * @throws EE_Error|ReflectionException
539
+	 */
540
+	public function get_registrations_per_day_and_per_status_report(string $period = '-1 month'): array
541
+	{
542
+		global $wpdb;
543
+		$registration_table = $wpdb->prefix . 'esp_registration';
544
+		$event_table        = $wpdb->posts;
545
+		$sql_date           = date('Y-m-d H:i:s', strtotime($period));
546
+		// prepare the query interval for displaying offset
547
+		$query_interval = EEH_DTT_Helper::get_sql_query_interval_for_offset($this->get_timezone(), 'dates.REG_date');
548
+		// inner date query
549
+		$inner_date_query = "SELECT DISTINCT REG_date from $registration_table ";
550
+		$inner_where      = ' WHERE';
551
+		// exclude events not authored by user if permissions in effect
552
+		if (! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'reg_per_event_report')) {
553
+			$inner_date_query .= "LEFT JOIN $event_table ON ID = EVT_ID";
554
+			$inner_where      .= ' post_author = ' . get_current_user_id() . ' AND';
555
+		}
556
+		$inner_where      .= " REG_date >= '$sql_date'";
557
+		$inner_date_query .= $inner_where;
558
+		// start main query
559
+		$select       = "SELECT DATE($query_interval) as Registration_REG_date, ";
560
+		$join         = '';
561
+		$join_parts   = [];
562
+		$select_parts = [];
563
+		// loop through registration stati to do parts for each status.
564
+		foreach (EEM_Registration::reg_status_array() as $STS_ID => $STS_code) {
565
+			if ($STS_ID === EEM_Registration::status_id_incomplete) {
566
+				continue;
567
+			}
568
+			$select_parts[] = "COUNT($STS_code.REG_ID) as $STS_ID";
569
+			$join_parts[]   =
570
+				"$registration_table AS $STS_code ON $STS_code.REG_date = dates.REG_date AND $STS_code.STS_ID = '$STS_ID'";
571
+		}
572
+		// setup the selects
573
+		$select .= implode(', ', $select_parts);
574
+		$select .= " FROM ($inner_date_query) AS dates LEFT JOIN ";
575
+		// setup the joins
576
+		$join .= implode(' LEFT JOIN ', $join_parts);
577
+		// now let's put it all together
578
+		$query = $select . $join . ' GROUP BY Registration_REG_date';
579
+		// and execute it
580
+		return $wpdb->get_results($query, ARRAY_A);
581
+	}
582
+
583
+
584
+	/**
585
+	 *        get the number of registrations per event  for the Registration Admin page Reports Tab
586
+	 *
587
+	 * @access        public
588
+	 * @param $period string which can be passed to php's strtotime function (eg "-1 month")
589
+	 * @return stdClass[] each with properties event_name, reg_limit, and total
590
+	 * @throws EE_Error
591
+	 */
592
+	public function get_registrations_per_event_report(string $period = '-1 month'): array
593
+	{
594
+		$date_sql = $this->convert_datetime_for_query(
595
+			'REG_date',
596
+			date('Y-m-d H:i:s', strtotime($period)),
597
+			'Y-m-d H:i:s',
598
+			'UTC'
599
+		);
600
+		$where    = [
601
+			'REG_date' => ['>=', $date_sql],
602
+			'STS_ID'   => ['!=', EEM_Registration::status_id_incomplete],
603
+		];
604
+		if (
605
+			! EE_Registry::instance()->CAP->current_user_can(
606
+				'ee_read_others_registrations',
607
+				'reg_per_event_report'
608
+			)
609
+		) {
610
+			$where['Event.EVT_wp_user'] = get_current_user_id();
611
+		}
612
+		return $this->_get_all_wpdb_results(
613
+			[
614
+				$where,
615
+				'group_by' => 'Event.EVT_name',
616
+				'order_by' => 'Event.EVT_name',
617
+				'limit'    => [0, 24],
618
+			],
619
+			OBJECT,
620
+			[
621
+				'event_name' => ['Event_CPT.post_title', '%s'],
622
+				'total'      => ['COUNT(REG_ID)', '%s'],
623
+			]
624
+		);
625
+	}
626
+
627
+
628
+	/**
629
+	 * Get the number of registrations per event grouped by registration status.
630
+	 * Note: EEM_Registration::status_id_incomplete registrations are excluded from the results.
631
+	 *
632
+	 * @param string $period
633
+	 * @return stdClass[] with properties `Registration_Event` and a column for each registration status as the STS_ID
634
+	 *                    (i.e. RAP)
635
+	 * @throws EE_Error
636
+	 * @throws ReflectionException
637
+	 */
638
+	public function get_registrations_per_event_and_per_status_report(string $period = '-1 month'): array
639
+	{
640
+		global $wpdb;
641
+		$registration_table = $wpdb->prefix . 'esp_registration';
642
+		$event_table        = $wpdb->posts;
643
+		$sql_date           = date('Y-m-d H:i:s', strtotime($period));
644
+		// inner date query
645
+		$inner_date_query = "SELECT DISTINCT EVT_ID, REG_date from $registration_table ";
646
+		$inner_where      = ' WHERE';
647
+		// exclude events not authored by user if permissions in effect
648
+		if (! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'reg_per_event_report')) {
649
+			$inner_date_query .= "LEFT JOIN $event_table ON ID = EVT_ID";
650
+			$inner_where      .= ' post_author = ' . get_current_user_id() . ' AND';
651
+		}
652
+		$inner_where      .= " REG_date >= '$sql_date'";
653
+		$inner_date_query .= $inner_where;
654
+		// build main query
655
+		$select       = 'SELECT Event.post_title as Registration_Event, ';
656
+		$join         = '';
657
+		$join_parts   = [];
658
+		$select_parts = [];
659
+		// loop through registration stati to do parts for each status.
660
+		foreach (EEM_Registration::reg_status_array() as $STS_ID => $STS_code) {
661
+			if ($STS_ID === EEM_Registration::status_id_incomplete) {
662
+				continue;
663
+			}
664
+			$select_parts[] = "COUNT($STS_code.REG_ID) as $STS_ID";
665
+			$join_parts[]   =
666
+				"$registration_table AS $STS_code ON $STS_code.EVT_ID = dates.EVT_ID AND $STS_code.STS_ID = '$STS_ID' AND $STS_code.REG_date = dates.REG_date";
667
+		}
668
+		// setup the selects
669
+		$select .= implode(', ', $select_parts);
670
+		$select .= " FROM ($inner_date_query) AS dates LEFT JOIN $event_table as Event ON Event.ID = dates.EVT_ID LEFT JOIN ";
671
+		// setup remaining joins
672
+		$join .= implode(' LEFT JOIN ', $join_parts);
673
+		// now put it all together
674
+		$query = $select . $join . ' GROUP BY Registration_Event';
675
+		// and execute
676
+		return $wpdb->get_results($query, ARRAY_A);
677
+	}
678
+
679
+
680
+	/**
681
+	 * Returns the EE_Registration of the primary attendee on the transaction id provided
682
+	 *
683
+	 * @param int $TXN_ID
684
+	 * @return EE_Registration|null
685
+	 * @throws EE_Error
686
+	 */
687
+	public function get_primary_registration_for_transaction_ID(int $TXN_ID = 0): ?EE_Registration
688
+	{
689
+		if (! $TXN_ID) {
690
+			return null;
691
+		}
692
+		return $this->get_one([
693
+			[
694
+				'TXN_ID'    => $TXN_ID,
695
+				'REG_count' => EEM_Registration::PRIMARY_REGISTRANT_COUNT,
696
+			],
697
+		]);
698
+	}
699
+
700
+
701
+	/**
702
+	 *        get_event_registration_count
703
+	 *
704
+	 * @access public
705
+	 * @param int     $EVT_ID
706
+	 * @param boolean $for_incomplete_payments
707
+	 * @return int
708
+	 * @throws EE_Error
709
+	 */
710
+	public function get_event_registration_count(int $EVT_ID, bool $for_incomplete_payments = false): int
711
+	{
712
+		// we only count approved registrations towards registration limits
713
+		$query_params = [['EVT_ID' => $EVT_ID, 'STS_ID' => self::status_id_approved]];
714
+		if ($for_incomplete_payments) {
715
+			$query_params[0]['Transaction.STS_ID'] = ['!=', EEM_Transaction::complete_status_code];
716
+		}
717
+		return $this->count($query_params);
718
+	}
719
+
720
+
721
+	/**
722
+	 * Deletes all registrations with no transactions. Note that this needs to be very efficient
723
+	 * and so it uses wpdb directly. Also, we can't put a limit on this because MySQL doesn't allow a limit on a delete
724
+	 * when joining tables like this.
725
+	 *
726
+	 * @return int|bool number deleted
727
+	 * @throws EE_Error
728
+	 * @throws ReflectionException
729
+	 * @global WPDB $wpdb
730
+	 */
731
+	public function delete_registrations_with_no_transaction()
732
+	{
733
+		/** @type WPDB $wpdb */
734
+		global $wpdb;
735
+		return $wpdb->query(
736
+			'DELETE r FROM '
737
+			. $this->table()
738
+			. ' r LEFT JOIN '
739
+			. EEM_Transaction::instance()->table()
740
+			. ' t ON r.TXN_ID = t.TXN_ID WHERE t.TXN_ID IS NULL'
741
+		);
742
+	}
743
+
744
+
745
+	/**
746
+	 *  Count registrations checked into (or out of) a datetime
747
+	 *
748
+	 * @param int  $DTT_ID     datetime ID
749
+	 * @param bool $checked_in whether to count registrations checked IN or OUT
750
+	 * @return int
751
+	 * @throws EE_Error
752
+	 * @throws ReflectionException
753
+	 * @throws ReflectionException
754
+	 */
755
+	public function count_registrations_checked_into_datetime(int $DTT_ID, bool $checked_in = true): int
756
+	{
757
+		global $wpdb;
758
+		// subquery to get latest checkin
759
+		$query = $wpdb->prepare(
760
+			'SELECT '
761
+			. 'COUNT( DISTINCT checkins.REG_ID ) '
762
+			. 'FROM ' . EEM_Checkin::instance()->table() . ' AS checkins INNER JOIN'
763
+			. '( SELECT '
764
+			. 'max( CHK_timestamp ) AS latest_checkin, '
765
+			. 'REG_ID AS REG_ID '
766
+			. 'FROM ' . EEM_Checkin::instance()->table() . ' '
767
+			. 'WHERE DTT_ID=%d '
768
+			. 'GROUP BY REG_ID'
769
+			. ') AS most_recent_checkin_per_reg '
770
+			. 'ON checkins.REG_ID=most_recent_checkin_per_reg.REG_ID '
771
+			. 'AND checkins.CHK_timestamp = most_recent_checkin_per_reg.latest_checkin '
772
+			. 'WHERE '
773
+			. 'checkins.CHK_in=%d',
774
+			$DTT_ID,
775
+			$checked_in
776
+		);
777
+		return (int) $wpdb->get_var($query);
778
+	}
779
+
780
+
781
+	/**
782
+	 *  Count registrations checked into (or out of) an event.
783
+	 *
784
+	 * @param int  $EVT_ID     event ID
785
+	 * @param bool $checked_in whether to count registrations checked IN or OUT
786
+	 * @return int
787
+	 * @throws EE_Error
788
+	 * @throws ReflectionException
789
+	 * @throws ReflectionException
790
+	 * @throws ReflectionException
791
+	 */
792
+	public function count_registrations_checked_into_event(int $EVT_ID, bool $checked_in = true): int
793
+	{
794
+		global $wpdb;
795
+		// subquery to get latest checkin
796
+		$query = $wpdb->prepare(
797
+			'SELECT '
798
+			. 'COUNT( DISTINCT checkins.REG_ID ) '
799
+			. 'FROM ' . EEM_Checkin::instance()->table() . ' AS checkins INNER JOIN'
800
+			. '( SELECT '
801
+			. 'max( CHK_timestamp ) AS latest_checkin, '
802
+			. 'REG_ID AS REG_ID '
803
+			. 'FROM ' . EEM_Checkin::instance()->table() . ' AS c '
804
+			. 'INNER JOIN ' . EEM_Datetime::instance()->table() . ' AS d '
805
+			. 'ON c.DTT_ID=d.DTT_ID '
806
+			. 'WHERE d.EVT_ID=%d '
807
+			. 'GROUP BY REG_ID'
808
+			. ') AS most_recent_checkin_per_reg '
809
+			. 'ON checkins.REG_ID=most_recent_checkin_per_reg.REG_ID '
810
+			. 'AND checkins.CHK_timestamp = most_recent_checkin_per_reg.latest_checkin '
811
+			. 'WHERE '
812
+			. 'checkins.CHK_in=%d',
813
+			$EVT_ID,
814
+			$checked_in
815
+		);
816
+		return (int) $wpdb->get_var($query);
817
+	}
818
+
819
+
820
+	/**
821
+	 * The purpose of this method is to retrieve an array of
822
+	 * EE_Registration objects that represent the latest registration
823
+	 * for each ATT_ID given in the function argument.
824
+	 *
825
+	 * @param array $attendee_ids
826
+	 * @return EE_Registration[]|bool|null
827
+	 * @throws EE_Error
828
+	 * @throws ReflectionException
829
+	 */
830
+	public function get_latest_registration_for_each_of_given_contacts(array $attendee_ids = [])
831
+	{
832
+		// first do a native wp_query to get the latest REG_ID's matching these attendees.
833
+		global $wpdb;
834
+		$registration_table = $wpdb->prefix . 'esp_registration';
835
+		$attendee_table     = $wpdb->posts;
836
+		$attendee_ids       = is_array($attendee_ids)
837
+			? array_map('absint', $attendee_ids)
838
+			: [(int) $attendee_ids];
839
+		$ATT_IDs            = implode(',', $attendee_ids);
840
+		// first we do a query to get the registration ids
841
+		// (because a group by before order by causes the order by to be ignored.)
842
+		$registration_id_query = "
843 843
 			SELECT registrations.registration_ids as registration_id
844 844
 			FROM (
845 845
 				SELECT
@@ -853,61 +853,61 @@  discard block
 block discarded – undo
853 853
 			  ) AS registrations
854 854
 			  GROUP BY registrations.attendee_ids
855 855
 		";
856
-        $registration_ids      = $wpdb->get_results($registration_id_query, ARRAY_A);
857
-        if (empty($registration_ids)) {
858
-            return [];
859
-        }
860
-        $ids_for_model_query = [];
861
-        // let's flatten the ids so they can be used in the model query.
862
-        foreach ($registration_ids as $registration_id) {
863
-            if (isset($registration_id['registration_id'])) {
864
-                $ids_for_model_query[] = $registration_id['registration_id'];
865
-            }
866
-        }
867
-        // construct query
868
-        $_where = [
869
-            'REG_ID' => ['IN', $ids_for_model_query],
870
-        ];
871
-        return $this->get_all([$_where]);
872
-    }
873
-
874
-
875
-    /**
876
-     * returns a count of registrations for the supplied event having the status as specified
877
-     *
878
-     * @param int   $EVT_ID
879
-     * @param array|string $statuses
880
-     * @return int
881
-     * @throws InvalidArgumentException
882
-     * @throws InvalidStatusException
883
-     * @throws EE_Error
884
-     */
885
-    public function event_reg_count_for_statuses(int $EVT_ID, $statuses = []): int
886
-    {
887
-        $EVT_ID = absint($EVT_ID);
888
-        if (! $EVT_ID) {
889
-            throw new InvalidArgumentException(
890
-                esc_html__('An invalid Event ID was supplied.', 'event_espresso')
891
-            );
892
-        }
893
-        $statuses = is_array($statuses) ? $statuses : [$statuses];
894
-        $statuses = ! empty($statuses) ? $statuses : [EEM_Registration::status_id_approved];
895
-
896
-        $valid_reg_statuses = EEM_Registration::reg_statuses();
897
-        foreach ($statuses as $status) {
898
-            if (! in_array($status, $valid_reg_statuses, true)) {
899
-                throw new InvalidStatusException($status, esc_html__('Registration', 'event_espresso'));
900
-            }
901
-        }
902
-        return $this->count(
903
-            [
904
-                [
905
-                    'EVT_ID' => $EVT_ID,
906
-                    'STS_ID' => ['IN', $statuses],
907
-                ],
908
-            ],
909
-            'REG_ID',
910
-            true
911
-        );
912
-    }
856
+		$registration_ids      = $wpdb->get_results($registration_id_query, ARRAY_A);
857
+		if (empty($registration_ids)) {
858
+			return [];
859
+		}
860
+		$ids_for_model_query = [];
861
+		// let's flatten the ids so they can be used in the model query.
862
+		foreach ($registration_ids as $registration_id) {
863
+			if (isset($registration_id['registration_id'])) {
864
+				$ids_for_model_query[] = $registration_id['registration_id'];
865
+			}
866
+		}
867
+		// construct query
868
+		$_where = [
869
+			'REG_ID' => ['IN', $ids_for_model_query],
870
+		];
871
+		return $this->get_all([$_where]);
872
+	}
873
+
874
+
875
+	/**
876
+	 * returns a count of registrations for the supplied event having the status as specified
877
+	 *
878
+	 * @param int   $EVT_ID
879
+	 * @param array|string $statuses
880
+	 * @return int
881
+	 * @throws InvalidArgumentException
882
+	 * @throws InvalidStatusException
883
+	 * @throws EE_Error
884
+	 */
885
+	public function event_reg_count_for_statuses(int $EVT_ID, $statuses = []): int
886
+	{
887
+		$EVT_ID = absint($EVT_ID);
888
+		if (! $EVT_ID) {
889
+			throw new InvalidArgumentException(
890
+				esc_html__('An invalid Event ID was supplied.', 'event_espresso')
891
+			);
892
+		}
893
+		$statuses = is_array($statuses) ? $statuses : [$statuses];
894
+		$statuses = ! empty($statuses) ? $statuses : [EEM_Registration::status_id_approved];
895
+
896
+		$valid_reg_statuses = EEM_Registration::reg_statuses();
897
+		foreach ($statuses as $status) {
898
+			if (! in_array($status, $valid_reg_statuses, true)) {
899
+				throw new InvalidStatusException($status, esc_html__('Registration', 'event_espresso'));
900
+			}
901
+		}
902
+		return $this->count(
903
+			[
904
+				[
905
+					'EVT_ID' => $EVT_ID,
906
+					'STS_ID' => ['IN', $statuses],
907
+				],
908
+			],
909
+			'REG_ID',
910
+			true
911
+		);
912
+	}
913 913
 }
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                 ),
219 219
             ],
220 220
         ];
221
-        $this->_model_relations        = [
221
+        $this->_model_relations = [
222 222
             'Event'                => new EE_Belongs_To_Relation(),
223 223
             'Attendee'             => new EE_Belongs_To_Relation(),
224 224
             'Transaction'          => new EE_Belongs_To_Relation(),
@@ -369,14 +369,14 @@  discard block
 block discarded – undo
369 369
         // and the table hasn't actually been created, this could have an error
370 370
         /** @type WPDB $wpdb */
371 371
         global $wpdb;
372
-        if ($this->_get_table_analysis()->tableExists($wpdb->prefix . 'esp_status')) {
372
+        if ($this->_get_table_analysis()->tableExists($wpdb->prefix.'esp_status')) {
373 373
             $results           = $wpdb->get_results(
374 374
                 "SELECT STS_ID, STS_code FROM {$wpdb->prefix}esp_status WHERE STS_type = 'registration'"
375 375
             );
376 376
             self::$_reg_status = [];
377 377
             foreach ($results as $status) {
378
-                if (! in_array($status->STS_ID, $exclude, true)) {
379
-                    self::$_reg_status[ $status->STS_ID ] = $status->STS_code;
378
+                if ( ! in_array($status->STS_ID, $exclude, true)) {
379
+                    self::$_reg_status[$status->STS_ID] = $status->STS_code;
380 380
                 }
381 381
             }
382 382
         }
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
      */
441 441
     public function get_all_registrations_for_attendee(int $ATT_ID = 0): ?array
442 442
     {
443
-        if (! $ATT_ID) {
443
+        if ( ! $ATT_ID) {
444 444
             return null;
445 445
         }
446 446
         return $this->get_all([['ATT_ID' => $ATT_ID]]);
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
      */
458 458
     public function get_registration_for_reg_url_link(string $REG_url_link): ?EE_Registration
459 459
     {
460
-        if (! $REG_url_link) {
460
+        if ( ! $REG_url_link) {
461 461
             return null;
462 462
         }
463 463
         return $this->get_one([['REG_url_link' => $REG_url_link]]);
@@ -504,11 +504,11 @@  discard block
 block discarded – undo
504 504
             'Y-m-d H:i:s',
505 505
             'UTC'
506 506
         );
507
-        $where    = [
507
+        $where = [
508 508
             'REG_date' => ['>=', $sql_date],
509 509
             'STS_ID'   => ['!=', EEM_Registration::status_id_incomplete],
510 510
         ];
511
-        if (! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'reg_per_day_report')) {
511
+        if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'reg_per_day_report')) {
512 512
             $where['Event.EVT_wp_user'] = get_current_user_id();
513 513
         }
514 514
         $query_interval = EEH_DTT_Helper::get_sql_query_interval_for_offset($this->get_timezone(), 'REG_date');
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
             ],
521 521
             OBJECT,
522 522
             [
523
-                'regDate' => ['DATE(' . $query_interval . ')', '%s'],
523
+                'regDate' => ['DATE('.$query_interval.')', '%s'],
524 524
                 'total'   => ['count(REG_ID)', '%d'],
525 525
             ]
526 526
         );
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
     public function get_registrations_per_day_and_per_status_report(string $period = '-1 month'): array
541 541
     {
542 542
         global $wpdb;
543
-        $registration_table = $wpdb->prefix . 'esp_registration';
543
+        $registration_table = $wpdb->prefix.'esp_registration';
544 544
         $event_table        = $wpdb->posts;
545 545
         $sql_date           = date('Y-m-d H:i:s', strtotime($period));
546 546
         // prepare the query interval for displaying offset
@@ -549,9 +549,9 @@  discard block
 block discarded – undo
549 549
         $inner_date_query = "SELECT DISTINCT REG_date from $registration_table ";
550 550
         $inner_where      = ' WHERE';
551 551
         // exclude events not authored by user if permissions in effect
552
-        if (! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'reg_per_event_report')) {
552
+        if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'reg_per_event_report')) {
553 553
             $inner_date_query .= "LEFT JOIN $event_table ON ID = EVT_ID";
554
-            $inner_where      .= ' post_author = ' . get_current_user_id() . ' AND';
554
+            $inner_where      .= ' post_author = '.get_current_user_id().' AND';
555 555
         }
556 556
         $inner_where      .= " REG_date >= '$sql_date'";
557 557
         $inner_date_query .= $inner_where;
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
         // setup the joins
576 576
         $join .= implode(' LEFT JOIN ', $join_parts);
577 577
         // now let's put it all together
578
-        $query = $select . $join . ' GROUP BY Registration_REG_date';
578
+        $query = $select.$join.' GROUP BY Registration_REG_date';
579 579
         // and execute it
580 580
         return $wpdb->get_results($query, ARRAY_A);
581 581
     }
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
             'Y-m-d H:i:s',
598 598
             'UTC'
599 599
         );
600
-        $where    = [
600
+        $where = [
601 601
             'REG_date' => ['>=', $date_sql],
602 602
             'STS_ID'   => ['!=', EEM_Registration::status_id_incomplete],
603 603
         ];
@@ -638,16 +638,16 @@  discard block
 block discarded – undo
638 638
     public function get_registrations_per_event_and_per_status_report(string $period = '-1 month'): array
639 639
     {
640 640
         global $wpdb;
641
-        $registration_table = $wpdb->prefix . 'esp_registration';
641
+        $registration_table = $wpdb->prefix.'esp_registration';
642 642
         $event_table        = $wpdb->posts;
643 643
         $sql_date           = date('Y-m-d H:i:s', strtotime($period));
644 644
         // inner date query
645 645
         $inner_date_query = "SELECT DISTINCT EVT_ID, REG_date from $registration_table ";
646 646
         $inner_where      = ' WHERE';
647 647
         // exclude events not authored by user if permissions in effect
648
-        if (! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'reg_per_event_report')) {
648
+        if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_others_registrations', 'reg_per_event_report')) {
649 649
             $inner_date_query .= "LEFT JOIN $event_table ON ID = EVT_ID";
650
-            $inner_where      .= ' post_author = ' . get_current_user_id() . ' AND';
650
+            $inner_where      .= ' post_author = '.get_current_user_id().' AND';
651 651
         }
652 652
         $inner_where      .= " REG_date >= '$sql_date'";
653 653
         $inner_date_query .= $inner_where;
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
         // setup remaining joins
672 672
         $join .= implode(' LEFT JOIN ', $join_parts);
673 673
         // now put it all together
674
-        $query = $select . $join . ' GROUP BY Registration_Event';
674
+        $query = $select.$join.' GROUP BY Registration_Event';
675 675
         // and execute
676 676
         return $wpdb->get_results($query, ARRAY_A);
677 677
     }
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
      */
687 687
     public function get_primary_registration_for_transaction_ID(int $TXN_ID = 0): ?EE_Registration
688 688
     {
689
-        if (! $TXN_ID) {
689
+        if ( ! $TXN_ID) {
690 690
             return null;
691 691
         }
692 692
         return $this->get_one([
@@ -759,11 +759,11 @@  discard block
 block discarded – undo
759 759
         $query = $wpdb->prepare(
760 760
             'SELECT '
761 761
             . 'COUNT( DISTINCT checkins.REG_ID ) '
762
-            . 'FROM ' . EEM_Checkin::instance()->table() . ' AS checkins INNER JOIN'
762
+            . 'FROM '.EEM_Checkin::instance()->table().' AS checkins INNER JOIN'
763 763
             . '( SELECT '
764 764
             . 'max( CHK_timestamp ) AS latest_checkin, '
765 765
             . 'REG_ID AS REG_ID '
766
-            . 'FROM ' . EEM_Checkin::instance()->table() . ' '
766
+            . 'FROM '.EEM_Checkin::instance()->table().' '
767 767
             . 'WHERE DTT_ID=%d '
768 768
             . 'GROUP BY REG_ID'
769 769
             . ') AS most_recent_checkin_per_reg '
@@ -796,12 +796,12 @@  discard block
 block discarded – undo
796 796
         $query = $wpdb->prepare(
797 797
             'SELECT '
798 798
             . 'COUNT( DISTINCT checkins.REG_ID ) '
799
-            . 'FROM ' . EEM_Checkin::instance()->table() . ' AS checkins INNER JOIN'
799
+            . 'FROM '.EEM_Checkin::instance()->table().' AS checkins INNER JOIN'
800 800
             . '( SELECT '
801 801
             . 'max( CHK_timestamp ) AS latest_checkin, '
802 802
             . 'REG_ID AS REG_ID '
803
-            . 'FROM ' . EEM_Checkin::instance()->table() . ' AS c '
804
-            . 'INNER JOIN ' . EEM_Datetime::instance()->table() . ' AS d '
803
+            . 'FROM '.EEM_Checkin::instance()->table().' AS c '
804
+            . 'INNER JOIN '.EEM_Datetime::instance()->table().' AS d '
805 805
             . 'ON c.DTT_ID=d.DTT_ID '
806 806
             . 'WHERE d.EVT_ID=%d '
807 807
             . 'GROUP BY REG_ID'
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
     {
832 832
         // first do a native wp_query to get the latest REG_ID's matching these attendees.
833 833
         global $wpdb;
834
-        $registration_table = $wpdb->prefix . 'esp_registration';
834
+        $registration_table = $wpdb->prefix.'esp_registration';
835 835
         $attendee_table     = $wpdb->posts;
836 836
         $attendee_ids       = is_array($attendee_ids)
837 837
             ? array_map('absint', $attendee_ids)
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
 			  ) AS registrations
854 854
 			  GROUP BY registrations.attendee_ids
855 855
 		";
856
-        $registration_ids      = $wpdb->get_results($registration_id_query, ARRAY_A);
856
+        $registration_ids = $wpdb->get_results($registration_id_query, ARRAY_A);
857 857
         if (empty($registration_ids)) {
858 858
             return [];
859 859
         }
@@ -885,7 +885,7 @@  discard block
 block discarded – undo
885 885
     public function event_reg_count_for_statuses(int $EVT_ID, $statuses = []): int
886 886
     {
887 887
         $EVT_ID = absint($EVT_ID);
888
-        if (! $EVT_ID) {
888
+        if ( ! $EVT_ID) {
889 889
             throw new InvalidArgumentException(
890 890
                 esc_html__('An invalid Event ID was supplied.', 'event_espresso')
891 891
             );
@@ -895,7 +895,7 @@  discard block
 block discarded – undo
895 895
 
896 896
         $valid_reg_statuses = EEM_Registration::reg_statuses();
897 897
         foreach ($statuses as $status) {
898
-            if (! in_array($status, $valid_reg_statuses, true)) {
898
+            if ( ! in_array($status, $valid_reg_statuses, true)) {
899 899
                 throw new InvalidStatusException($status, esc_html__('Registration', 'event_espresso'));
900 900
             }
901 901
         }
Please login to merge, or discard this patch.
core/db_models/fields/EE_Datetime_Field.php 2 patches
Indentation   +746 added lines, -746 removed lines patch added patch discarded remove patch
@@ -17,751 +17,751 @@
 block discarded – undo
17 17
  */
18 18
 class EE_Datetime_Field extends EE_Model_Field_Base
19 19
 {
20
-    /**
21
-     * The pattern we're looking for is if only the characters 0-9 are found and there are only
22
-     * 10 or more numbers (because 9 numbers even with all 9's would be sometime in 2001 )
23
-     *
24
-     * @type string unix_timestamp_regex
25
-     */
26
-    const unix_timestamp_regex = '/[0-9]{10,}/';
27
-
28
-    /**
29
-     * @type string mysql_timestamp_format
30
-     */
31
-    const mysql_timestamp_format = 'Y-m-d H:i:s';
32
-
33
-    /**
34
-     * @type string mysql_date_format
35
-     */
36
-    const mysql_date_format = 'Y-m-d';
37
-
38
-    /**
39
-     * @type string mysql_time_format
40
-     */
41
-    const mysql_time_format = 'H:i:s';
42
-
43
-    /**
44
-     * Const for using in the default value. If the field's default is set to this,
45
-     * then we will return the time of calling `get_default_value()`, not
46
-     * just the current time at construction
47
-     */
48
-    const now = 'now';
49
-
50
-    /**
51
-     * The following properties hold the default formats for date and time.
52
-     * Defaults are set via the constructor and can be overridden on class instantiation.
53
-     * However they can also be overridden later by the set_format() method
54
-     * (and corresponding set_date_format, set_time_format methods);
55
-     */
56
-
57
-    protected string        $_date_format        = '';
58
-
59
-    protected string        $_time_format        = '';
60
-
61
-    protected string        $_pretty_date_format = '';
62
-
63
-    protected string        $_pretty_time_format = '';
64
-
65
-    protected ?DateTimeZone $_DateTimeZone       = null;
66
-
67
-    protected ?DateTimeZone $_UTC_DateTimeZone   = null;
68
-
69
-    protected ?DateTimeZone $_blog_DateTimeZone  = null;
70
-
71
-
72
-    /**
73
-     * This property holds how we want the output returned when getting a datetime string.  It is set for the
74
-     * set_date_time_output() method.  By default this is empty.  When empty, we are assuming that we want both date
75
-     * and time returned via getters.
76
-     *
77
-     * @var mixed (null|string)
78
-     */
79
-    protected $_date_time_output;
80
-
81
-
82
-    /**
83
-     * timezone string
84
-     * This gets set by the constructor and can be changed by the "set_timezone()" method so that we know what timezone
85
-     * incoming strings|timestamps are in.  This can also be used before a get to set what timezone you want strings
86
-     * coming out of the object to be in.  Default timezone is the current WP timezone option setting
87
-     */
88
-    protected ?string $_timezone_string = null;
89
-
90
-
91
-    /**
92
-     * This holds whatever UTC offset for the blog (we automatically convert timezone strings into their related
93
-     * offsets for comparison purposes).
94
-     *
95
-     * @var int
96
-     */
97
-    protected int $_blog_offset;
98
-
99
-
100
-    /**
101
-     * @param string      $table_column
102
-     * @param string      $nice_name
103
-     * @param bool        $nullable
104
-     * @param string|null $default_value
105
-     * @param string|null $timezone_string
106
-     * @param string|null $date_format
107
-     * @param string|null $time_format
108
-     * @param string|null $pretty_date_format
109
-     * @param string|null $pretty_time_format
110
-     * @throws InvalidArgumentException
111
-     * @throws Exception
112
-     */
113
-    public function __construct(
114
-        string $table_column,
115
-        string $nice_name,
116
-        bool $nullable,
117
-        ?string $default_value,
118
-        ?string $timezone_string = '',
119
-        ?string $date_format = '',
120
-        ?string $time_format = '',
121
-        ?string $pretty_date_format = '',
122
-        ?string $pretty_time_format = ''
123
-    ) {
124
-        $this->set_date_format($date_format);
125
-        $this->set_time_format($time_format);
126
-        $this->set_date_format($pretty_date_format, true);
127
-        $this->set_time_format($pretty_time_format, true);
128
-
129
-        parent::__construct($table_column, $nice_name, $nullable, $default_value);
130
-        $this->set_timezone($timezone_string);
131
-        $this->setSchemaFormat('date-time');
132
-    }
133
-
134
-
135
-    /**
136
-     * @return DateTimeZone
137
-     * @throws Exception
138
-     */
139
-    public function get_UTC_DateTimeZone(): DateTimeZone
140
-    {
141
-        return $this->_UTC_DateTimeZone instanceof DateTimeZone
142
-            ? $this->_UTC_DateTimeZone
143
-            : $this->_create_timezone_object_from_timezone_string('UTC');
144
-    }
145
-
146
-
147
-    /**
148
-     * @return DateTimeZone
149
-     * @throws Exception
150
-     */
151
-    public function get_blog_DateTimeZone(): DateTimeZone
152
-    {
153
-        return $this->_blog_DateTimeZone instanceof DateTimeZone
154
-            ? $this->_blog_DateTimeZone
155
-            : $this->_create_timezone_object_from_timezone_string();
156
-    }
157
-
158
-
159
-    /**
160
-     * this prepares any incoming date data and make sure its converted to a utc unix timestamp
161
-     *
162
-     * @param string|int $value_inputted_for_field_on_model_object  could be a string formatted date time or int unix
163
-     *                                                              timestamp
164
-     * @return DateTime
165
-     * @throws Exception
166
-     */
167
-    public function prepare_for_set($value_inputted_for_field_on_model_object)
168
-    {
169
-        return $this->_get_date_object($value_inputted_for_field_on_model_object);
170
-    }
171
-
172
-
173
-    /**
174
-     * This returns the format string to be used by getters depending on what the $_date_time_output property is set at.
175
-     * getters need to know whether we're just returning the date or the time or both.  By default we return both.
176
-     *
177
-     * @param bool $pretty If we're returning the pretty formats or standard format string.
178
-     * @return string    The final assembled format string.
179
-     */
180
-    protected function _get_date_time_output(bool $pretty = false): string
181
-    {
182
-        switch ($this->_date_time_output) {
183
-            case 'time':
184
-                return $pretty
185
-                    ? $this->_pretty_time_format
186
-                    : $this->_time_format;
187
-
188
-            case 'date':
189
-                return $pretty
190
-                    ? $this->_pretty_date_format
191
-                    : $this->_date_format;
192
-
193
-            default:
194
-                return $pretty
195
-                    ? trim($this->_pretty_date_format . ' ' . $this->_pretty_time_format)
196
-                    : trim($this->_date_format . ' ' . $this->_time_format);
197
-        }
198
-    }
199
-
200
-
201
-    /**
202
-     * This just sets the $_date_time_output property so we can flag how date and times are formatted before being
203
-     * returned (using the format properties)
204
-     *
205
-     * @param string|null $what acceptable values are 'time' or 'date'.
206
-     *                          Any other value will be set but will always result
207
-     *                          in both 'date' and 'time' being returned.
208
-     * @return void
209
-     */
210
-    public function set_date_time_output(?string $what = null)
211
-    {
212
-        $this->_date_time_output = $what;
213
-    }
214
-
215
-
216
-    /**
217
-     * See $_timezone property for description of what the timezone property is for.  This SETS the timezone internally
218
-     * for being able to reference what timezone we are running conversions on when converting TO the internal timezone
219
-     * (UTC Unix Timestamp) for the object OR when converting FROM the internal timezone (UTC Unix Timestamp).
220
-     * We also set some other properties in this method.
221
-     *
222
-     * @param string|null $timezone_string A valid timezone string as described by @link
223
-     *                                     http://www.php.net/manual/en/timezones.php
224
-     * @return void
225
-     * @throws InvalidArgumentException
226
-     * @throws InvalidDataTypeException
227
-     * @throws InvalidInterfaceException
228
-     * @throws Exception
229
-     */
230
-    public function set_timezone(?string $timezone_string)
231
-    {
232
-        if (empty($timezone_string) && $this->_timezone_string !== null) {
233
-            // leave the timezone AS-IS if we already have one and
234
-            // the function arg didn't provide one
235
-            return;
236
-        }
237
-        $timezone_string        = EEH_DTT_Helper::get_valid_timezone_string($timezone_string);
238
-        $this->_timezone_string = ! empty($timezone_string)
239
-            ? $timezone_string
240
-            : 'UTC';
241
-        $this->_DateTimeZone    = $this->_create_timezone_object_from_timezone_string($this->_timezone_string);
242
-    }
243
-
244
-
245
-    /**
246
-     * _create_timezone_object_from_timezone_name
247
-     *
248
-     * @access protected
249
-     * @param string|null $timezone_string
250
-     * @return DateTimeZone
251
-     * @throws InvalidArgumentException
252
-     * @throws InvalidDataTypeException
253
-     * @throws InvalidInterfaceException
254
-     * @throws Exception
255
-     */
256
-    protected function _create_timezone_object_from_timezone_string(?string $timezone_string = ''): DateTimeZone
257
-    {
258
-        return new DateTimeZone(EEH_DTT_Helper::get_valid_timezone_string($timezone_string));
259
-    }
260
-
261
-
262
-    /**
263
-     * This just returns whatever is set for the current timezone.
264
-     *
265
-     * @access public
266
-     * @return string timezone string
267
-     */
268
-    public function get_timezone(): ?string
269
-    {
270
-        return $this->_timezone_string;
271
-    }
272
-
273
-
274
-    /**
275
-     * set the $_date_format property
276
-     *
277
-     * @access public
278
-     * @param string $format a new date format (corresponding to formats accepted by PHP date() function)
279
-     * @param bool   $pretty Whether to set pretty format or not.
280
-     * @return void
281
-     */
282
-    public function set_date_format(string $format, bool $pretty = false)
283
-    {
284
-        if ($pretty) {
285
-            $this->_pretty_date_format = new DateFormat($format);
286
-        } else {
287
-            $this->_date_format = new DateFormat($format);
288
-        }
289
-    }
290
-
291
-
292
-    /**
293
-     * return the $_date_format property value.
294
-     *
295
-     * @param bool $pretty Whether to get pretty format or not.
296
-     * @return string
297
-     */
298
-    public function get_date_format(bool $pretty = false): string
299
-    {
300
-        return $pretty
301
-            ? $this->_pretty_date_format
302
-            : $this->_date_format;
303
-    }
304
-
305
-
306
-    /**
307
-     * set the $_time_format property
308
-     *
309
-     * @access public
310
-     * @param string $format a new time format (corresponding to formats accepted by PHP date() function)
311
-     * @param bool   $pretty Whether to set pretty format or not.
312
-     * @return void
313
-     */
314
-    public function set_time_format(string $format, bool $pretty = false)
315
-    {
316
-        if ($pretty) {
317
-            $this->_pretty_time_format = new TimeFormat($format);
318
-        } else {
319
-            $this->_time_format = new TimeFormat($format);
320
-        }
321
-    }
322
-
323
-
324
-    /**
325
-     * return the $_time_format property value.
326
-     *
327
-     * @param bool $pretty Whether to get pretty format or not.
328
-     * @return string
329
-     */
330
-    public function get_time_format(bool $pretty = false): string
331
-    {
332
-        return $pretty
333
-            ? $this->_pretty_time_format
334
-            : $this->_time_format;
335
-    }
336
-
337
-
338
-    /**
339
-     * set the $_pretty_date_format property
340
-     *
341
-     * @access public
342
-     * @param string|null $format a new pretty date format (corresponding to formats accepted by PHP date() function)
343
-     * @return void
344
-     */
345
-    public function set_pretty_date_format(?string $format)
346
-    {
347
-        $this->set_date_format($format, true);
348
-    }
349
-
350
-
351
-    /**
352
-     * set the $_pretty_time_format property
353
-     *
354
-     * @access public
355
-     * @param string|null $format a new pretty time format (corresponding to formats accepted by PHP date() function)
356
-     * @return void
357
-     */
358
-    public function set_pretty_time_format(?string $format)
359
-    {
360
-        $this->set_time_format($format, true);
361
-    }
362
-
363
-
364
-    /**
365
-     * Only sets the time portion of the datetime.
366
-     *
367
-     * @param string|DateTime $time_to_set_string like 8am OR a DateTime object.
368
-     * @param DateTime        $current            current DateTime object for the datetime field
369
-     * @return DateTime
370
-     */
371
-    public function prepare_for_set_with_new_time($time_to_set_string, DateTime $current): DateTime
372
-    {
373
-        // if $time_to_set_string is datetime object, then let's use it to set the parse array.
374
-        // Otherwise parse the string.
375
-        if ($time_to_set_string instanceof DateTime) {
376
-            $parsed = [
377
-                'hour'   => $time_to_set_string->format('H'),
378
-                'minute' => $time_to_set_string->format('i'),
379
-                'second' => $time_to_set_string->format('s'),
380
-            ];
381
-        } else {
382
-            // parse incoming string
383
-            $parsed = date_parse_from_format($this->_time_format, $time_to_set_string);
384
-        }
385
-        EEH_DTT_Helper::setTimezone($current, $this->_DateTimeZone);
386
-        return $current->setTime($parsed['hour'], $parsed['minute'], $parsed['second']);
387
-    }
388
-
389
-
390
-    /**
391
-     * Only sets the date portion of the datetime.
392
-     *
393
-     * @param string|DateTime $date_to_set_string like Friday, January 8th or a DateTime object.
394
-     * @param DateTime        $current            current DateTime object for the datetime field
395
-     * @return DateTime
396
-     */
397
-    public function prepare_for_set_with_new_date($date_to_set_string, DateTime $current): DateTime
398
-    {
399
-        // if $time_to_set_string is datetime object, then let's use it to set the parse array.
400
-        // Otherwise parse the string.
401
-        if ($date_to_set_string instanceof DateTime) {
402
-            $parsed = [
403
-                'year'  => $date_to_set_string->format('Y'),
404
-                'month' => $date_to_set_string->format('m'),
405
-                'day'   => $date_to_set_string->format('d'),
406
-            ];
407
-        } else {
408
-            // parse incoming string
409
-            $parsed = date_parse_from_format($this->_date_format, $date_to_set_string);
410
-        }
411
-        EEH_DTT_Helper::setTimezone($current, $this->_DateTimeZone);
412
-        return $current->setDate($parsed['year'], $parsed['month'], $parsed['day']);
413
-    }
414
-
415
-
416
-    /**
417
-     * This prepares the EE_DateTime value to be saved to the db as mysql timestamp (UTC +0 timezone).  When the
418
-     * datetime gets to this stage it should ALREADY be in UTC time
419
-     *
420
-     * @param DateTime $DateTime
421
-     * @return string formatted date time for given timezone
422
-     * @throws EE_Error
423
-     */
424
-    public function prepare_for_get($DateTime): string
425
-    {
426
-        return $this->_prepare_for_display($DateTime);
427
-    }
428
-
429
-
430
-    /**
431
-     * This differs from prepare_for_get in that it considers whether the internal $_timezone differs
432
-     * from the set wp timezone.  If so, then it returns the datetime string formatted via
433
-     * _pretty_date_format, and _pretty_time_format.  However, it also appends a timezone
434
-     * abbreviation to the date_string.
435
-     *
436
-     * @param mixed       $DateTime
437
-     * @param string|null $schema
438
-     * @return string
439
-     * @throws EE_Error
440
-     */
441
-    public function prepare_for_pretty_echoing($DateTime, ?string $schema = null): string
442
-    {
443
-        return $this->_prepare_for_display($DateTime, ($schema
444
-            ?: true));
445
-    }
446
-
447
-
448
-    /**
449
-     * This prepares the EE_DateTime value to be saved to the db as mysql timestamp (UTC +0
450
-     * timezone).
451
-     *
452
-     * @param DateTime|null $DateTime
453
-     * @param bool|string   $schema
454
-     * @return string
455
-     * @throws EE_Error
456
-     * @throws Exception
457
-     */
458
-    protected function _prepare_for_display(?DateTime $DateTime, $schema = false): string
459
-    {
460
-        if (! $DateTime instanceof DateTime) {
461
-            if ($this->_nullable) {
462
-                return '';
463
-            }
464
-            if (WP_DEBUG) {
465
-                throw new EE_Error(
466
-                    sprintf(
467
-                        esc_html__(
468
-                            'EE_Datetime_Field::_prepare_for_display requires a DateTime class to be the value for the $DateTime argument because the %s field is not nullable.',
469
-                            'event_espresso'
470
-                        ),
471
-                        $this->_nicename
472
-                    )
473
-                );
474
-            }
475
-            $DateTime = new DbSafeDateTime(EE_Datetime_Field::now);
476
-            EE_Error::add_error(
477
-                sprintf(
478
-                    esc_html__(
479
-                        'EE_Datetime_Field::_prepare_for_display requires a DateTime class to be the value for the $DateTime argument because the %s field is not nullable.  When WP_DEBUG is false, the value is set to "now" instead of throwing an exception.',
480
-                        'event_espresso'
481
-                    ),
482
-                    $this->_nicename
483
-                ),
484
-                __FILE__, __FUNCTION__, __LINE__
485
-            );
486
-        }
487
-        $format_string = $this->_get_date_time_output($schema);
488
-        EEH_DTT_Helper::setTimezone($DateTime, $this->_DateTimeZone);
489
-        if ($schema) {
490
-            $timezone_string = '';
491
-            if ($this->_display_timezone()) {
492
-                // must be explicit because schema could equal true.
493
-                if ($schema === 'no_html') {
494
-                    $timezone_string = ' (' . $DateTime->format('T') . ')';
495
-                } else {
496
-                    $timezone_string = ' <span class="ee_dtt_timezone_string">(' . $DateTime->format('T') . ')</span>';
497
-                }
498
-            }
499
-
500
-            return $DateTime->format($format_string) . $timezone_string;
501
-        }
502
-        return $DateTime->format($format_string);
503
-    }
504
-
505
-
506
-    /**
507
-     * This prepares the EE_DateTime value to be saved to the db as mysql timestamp (UTC +0
508
-     * timezone).
509
-     *
510
-     * @param mixed $datetime_value u
511
-     * @return string mysql timestamp in UTC
512
-     * @throws EE_Error
513
-     * @throws Exception
514
-     */
515
-    public function prepare_for_use_in_db($datetime_value): ?string
516
-    {
517
-        // we allow an empty value or DateTime object, but nothing else.
518
-        if (! empty($datetime_value) && ! $datetime_value instanceof DateTime) {
519
-            throw new EE_Error(
520
-                sprintf(
521
-                    esc_html__(
522
-                        'The incoming value being prepared for setting in the database must either be empty or a php 
20
+	/**
21
+	 * The pattern we're looking for is if only the characters 0-9 are found and there are only
22
+	 * 10 or more numbers (because 9 numbers even with all 9's would be sometime in 2001 )
23
+	 *
24
+	 * @type string unix_timestamp_regex
25
+	 */
26
+	const unix_timestamp_regex = '/[0-9]{10,}/';
27
+
28
+	/**
29
+	 * @type string mysql_timestamp_format
30
+	 */
31
+	const mysql_timestamp_format = 'Y-m-d H:i:s';
32
+
33
+	/**
34
+	 * @type string mysql_date_format
35
+	 */
36
+	const mysql_date_format = 'Y-m-d';
37
+
38
+	/**
39
+	 * @type string mysql_time_format
40
+	 */
41
+	const mysql_time_format = 'H:i:s';
42
+
43
+	/**
44
+	 * Const for using in the default value. If the field's default is set to this,
45
+	 * then we will return the time of calling `get_default_value()`, not
46
+	 * just the current time at construction
47
+	 */
48
+	const now = 'now';
49
+
50
+	/**
51
+	 * The following properties hold the default formats for date and time.
52
+	 * Defaults are set via the constructor and can be overridden on class instantiation.
53
+	 * However they can also be overridden later by the set_format() method
54
+	 * (and corresponding set_date_format, set_time_format methods);
55
+	 */
56
+
57
+	protected string        $_date_format        = '';
58
+
59
+	protected string        $_time_format        = '';
60
+
61
+	protected string        $_pretty_date_format = '';
62
+
63
+	protected string        $_pretty_time_format = '';
64
+
65
+	protected ?DateTimeZone $_DateTimeZone       = null;
66
+
67
+	protected ?DateTimeZone $_UTC_DateTimeZone   = null;
68
+
69
+	protected ?DateTimeZone $_blog_DateTimeZone  = null;
70
+
71
+
72
+	/**
73
+	 * This property holds how we want the output returned when getting a datetime string.  It is set for the
74
+	 * set_date_time_output() method.  By default this is empty.  When empty, we are assuming that we want both date
75
+	 * and time returned via getters.
76
+	 *
77
+	 * @var mixed (null|string)
78
+	 */
79
+	protected $_date_time_output;
80
+
81
+
82
+	/**
83
+	 * timezone string
84
+	 * This gets set by the constructor and can be changed by the "set_timezone()" method so that we know what timezone
85
+	 * incoming strings|timestamps are in.  This can also be used before a get to set what timezone you want strings
86
+	 * coming out of the object to be in.  Default timezone is the current WP timezone option setting
87
+	 */
88
+	protected ?string $_timezone_string = null;
89
+
90
+
91
+	/**
92
+	 * This holds whatever UTC offset for the blog (we automatically convert timezone strings into their related
93
+	 * offsets for comparison purposes).
94
+	 *
95
+	 * @var int
96
+	 */
97
+	protected int $_blog_offset;
98
+
99
+
100
+	/**
101
+	 * @param string      $table_column
102
+	 * @param string      $nice_name
103
+	 * @param bool        $nullable
104
+	 * @param string|null $default_value
105
+	 * @param string|null $timezone_string
106
+	 * @param string|null $date_format
107
+	 * @param string|null $time_format
108
+	 * @param string|null $pretty_date_format
109
+	 * @param string|null $pretty_time_format
110
+	 * @throws InvalidArgumentException
111
+	 * @throws Exception
112
+	 */
113
+	public function __construct(
114
+		string $table_column,
115
+		string $nice_name,
116
+		bool $nullable,
117
+		?string $default_value,
118
+		?string $timezone_string = '',
119
+		?string $date_format = '',
120
+		?string $time_format = '',
121
+		?string $pretty_date_format = '',
122
+		?string $pretty_time_format = ''
123
+	) {
124
+		$this->set_date_format($date_format);
125
+		$this->set_time_format($time_format);
126
+		$this->set_date_format($pretty_date_format, true);
127
+		$this->set_time_format($pretty_time_format, true);
128
+
129
+		parent::__construct($table_column, $nice_name, $nullable, $default_value);
130
+		$this->set_timezone($timezone_string);
131
+		$this->setSchemaFormat('date-time');
132
+	}
133
+
134
+
135
+	/**
136
+	 * @return DateTimeZone
137
+	 * @throws Exception
138
+	 */
139
+	public function get_UTC_DateTimeZone(): DateTimeZone
140
+	{
141
+		return $this->_UTC_DateTimeZone instanceof DateTimeZone
142
+			? $this->_UTC_DateTimeZone
143
+			: $this->_create_timezone_object_from_timezone_string('UTC');
144
+	}
145
+
146
+
147
+	/**
148
+	 * @return DateTimeZone
149
+	 * @throws Exception
150
+	 */
151
+	public function get_blog_DateTimeZone(): DateTimeZone
152
+	{
153
+		return $this->_blog_DateTimeZone instanceof DateTimeZone
154
+			? $this->_blog_DateTimeZone
155
+			: $this->_create_timezone_object_from_timezone_string();
156
+	}
157
+
158
+
159
+	/**
160
+	 * this prepares any incoming date data and make sure its converted to a utc unix timestamp
161
+	 *
162
+	 * @param string|int $value_inputted_for_field_on_model_object  could be a string formatted date time or int unix
163
+	 *                                                              timestamp
164
+	 * @return DateTime
165
+	 * @throws Exception
166
+	 */
167
+	public function prepare_for_set($value_inputted_for_field_on_model_object)
168
+	{
169
+		return $this->_get_date_object($value_inputted_for_field_on_model_object);
170
+	}
171
+
172
+
173
+	/**
174
+	 * This returns the format string to be used by getters depending on what the $_date_time_output property is set at.
175
+	 * getters need to know whether we're just returning the date or the time or both.  By default we return both.
176
+	 *
177
+	 * @param bool $pretty If we're returning the pretty formats or standard format string.
178
+	 * @return string    The final assembled format string.
179
+	 */
180
+	protected function _get_date_time_output(bool $pretty = false): string
181
+	{
182
+		switch ($this->_date_time_output) {
183
+			case 'time':
184
+				return $pretty
185
+					? $this->_pretty_time_format
186
+					: $this->_time_format;
187
+
188
+			case 'date':
189
+				return $pretty
190
+					? $this->_pretty_date_format
191
+					: $this->_date_format;
192
+
193
+			default:
194
+				return $pretty
195
+					? trim($this->_pretty_date_format . ' ' . $this->_pretty_time_format)
196
+					: trim($this->_date_format . ' ' . $this->_time_format);
197
+		}
198
+	}
199
+
200
+
201
+	/**
202
+	 * This just sets the $_date_time_output property so we can flag how date and times are formatted before being
203
+	 * returned (using the format properties)
204
+	 *
205
+	 * @param string|null $what acceptable values are 'time' or 'date'.
206
+	 *                          Any other value will be set but will always result
207
+	 *                          in both 'date' and 'time' being returned.
208
+	 * @return void
209
+	 */
210
+	public function set_date_time_output(?string $what = null)
211
+	{
212
+		$this->_date_time_output = $what;
213
+	}
214
+
215
+
216
+	/**
217
+	 * See $_timezone property for description of what the timezone property is for.  This SETS the timezone internally
218
+	 * for being able to reference what timezone we are running conversions on when converting TO the internal timezone
219
+	 * (UTC Unix Timestamp) for the object OR when converting FROM the internal timezone (UTC Unix Timestamp).
220
+	 * We also set some other properties in this method.
221
+	 *
222
+	 * @param string|null $timezone_string A valid timezone string as described by @link
223
+	 *                                     http://www.php.net/manual/en/timezones.php
224
+	 * @return void
225
+	 * @throws InvalidArgumentException
226
+	 * @throws InvalidDataTypeException
227
+	 * @throws InvalidInterfaceException
228
+	 * @throws Exception
229
+	 */
230
+	public function set_timezone(?string $timezone_string)
231
+	{
232
+		if (empty($timezone_string) && $this->_timezone_string !== null) {
233
+			// leave the timezone AS-IS if we already have one and
234
+			// the function arg didn't provide one
235
+			return;
236
+		}
237
+		$timezone_string        = EEH_DTT_Helper::get_valid_timezone_string($timezone_string);
238
+		$this->_timezone_string = ! empty($timezone_string)
239
+			? $timezone_string
240
+			: 'UTC';
241
+		$this->_DateTimeZone    = $this->_create_timezone_object_from_timezone_string($this->_timezone_string);
242
+	}
243
+
244
+
245
+	/**
246
+	 * _create_timezone_object_from_timezone_name
247
+	 *
248
+	 * @access protected
249
+	 * @param string|null $timezone_string
250
+	 * @return DateTimeZone
251
+	 * @throws InvalidArgumentException
252
+	 * @throws InvalidDataTypeException
253
+	 * @throws InvalidInterfaceException
254
+	 * @throws Exception
255
+	 */
256
+	protected function _create_timezone_object_from_timezone_string(?string $timezone_string = ''): DateTimeZone
257
+	{
258
+		return new DateTimeZone(EEH_DTT_Helper::get_valid_timezone_string($timezone_string));
259
+	}
260
+
261
+
262
+	/**
263
+	 * This just returns whatever is set for the current timezone.
264
+	 *
265
+	 * @access public
266
+	 * @return string timezone string
267
+	 */
268
+	public function get_timezone(): ?string
269
+	{
270
+		return $this->_timezone_string;
271
+	}
272
+
273
+
274
+	/**
275
+	 * set the $_date_format property
276
+	 *
277
+	 * @access public
278
+	 * @param string $format a new date format (corresponding to formats accepted by PHP date() function)
279
+	 * @param bool   $pretty Whether to set pretty format or not.
280
+	 * @return void
281
+	 */
282
+	public function set_date_format(string $format, bool $pretty = false)
283
+	{
284
+		if ($pretty) {
285
+			$this->_pretty_date_format = new DateFormat($format);
286
+		} else {
287
+			$this->_date_format = new DateFormat($format);
288
+		}
289
+	}
290
+
291
+
292
+	/**
293
+	 * return the $_date_format property value.
294
+	 *
295
+	 * @param bool $pretty Whether to get pretty format or not.
296
+	 * @return string
297
+	 */
298
+	public function get_date_format(bool $pretty = false): string
299
+	{
300
+		return $pretty
301
+			? $this->_pretty_date_format
302
+			: $this->_date_format;
303
+	}
304
+
305
+
306
+	/**
307
+	 * set the $_time_format property
308
+	 *
309
+	 * @access public
310
+	 * @param string $format a new time format (corresponding to formats accepted by PHP date() function)
311
+	 * @param bool   $pretty Whether to set pretty format or not.
312
+	 * @return void
313
+	 */
314
+	public function set_time_format(string $format, bool $pretty = false)
315
+	{
316
+		if ($pretty) {
317
+			$this->_pretty_time_format = new TimeFormat($format);
318
+		} else {
319
+			$this->_time_format = new TimeFormat($format);
320
+		}
321
+	}
322
+
323
+
324
+	/**
325
+	 * return the $_time_format property value.
326
+	 *
327
+	 * @param bool $pretty Whether to get pretty format or not.
328
+	 * @return string
329
+	 */
330
+	public function get_time_format(bool $pretty = false): string
331
+	{
332
+		return $pretty
333
+			? $this->_pretty_time_format
334
+			: $this->_time_format;
335
+	}
336
+
337
+
338
+	/**
339
+	 * set the $_pretty_date_format property
340
+	 *
341
+	 * @access public
342
+	 * @param string|null $format a new pretty date format (corresponding to formats accepted by PHP date() function)
343
+	 * @return void
344
+	 */
345
+	public function set_pretty_date_format(?string $format)
346
+	{
347
+		$this->set_date_format($format, true);
348
+	}
349
+
350
+
351
+	/**
352
+	 * set the $_pretty_time_format property
353
+	 *
354
+	 * @access public
355
+	 * @param string|null $format a new pretty time format (corresponding to formats accepted by PHP date() function)
356
+	 * @return void
357
+	 */
358
+	public function set_pretty_time_format(?string $format)
359
+	{
360
+		$this->set_time_format($format, true);
361
+	}
362
+
363
+
364
+	/**
365
+	 * Only sets the time portion of the datetime.
366
+	 *
367
+	 * @param string|DateTime $time_to_set_string like 8am OR a DateTime object.
368
+	 * @param DateTime        $current            current DateTime object for the datetime field
369
+	 * @return DateTime
370
+	 */
371
+	public function prepare_for_set_with_new_time($time_to_set_string, DateTime $current): DateTime
372
+	{
373
+		// if $time_to_set_string is datetime object, then let's use it to set the parse array.
374
+		// Otherwise parse the string.
375
+		if ($time_to_set_string instanceof DateTime) {
376
+			$parsed = [
377
+				'hour'   => $time_to_set_string->format('H'),
378
+				'minute' => $time_to_set_string->format('i'),
379
+				'second' => $time_to_set_string->format('s'),
380
+			];
381
+		} else {
382
+			// parse incoming string
383
+			$parsed = date_parse_from_format($this->_time_format, $time_to_set_string);
384
+		}
385
+		EEH_DTT_Helper::setTimezone($current, $this->_DateTimeZone);
386
+		return $current->setTime($parsed['hour'], $parsed['minute'], $parsed['second']);
387
+	}
388
+
389
+
390
+	/**
391
+	 * Only sets the date portion of the datetime.
392
+	 *
393
+	 * @param string|DateTime $date_to_set_string like Friday, January 8th or a DateTime object.
394
+	 * @param DateTime        $current            current DateTime object for the datetime field
395
+	 * @return DateTime
396
+	 */
397
+	public function prepare_for_set_with_new_date($date_to_set_string, DateTime $current): DateTime
398
+	{
399
+		// if $time_to_set_string is datetime object, then let's use it to set the parse array.
400
+		// Otherwise parse the string.
401
+		if ($date_to_set_string instanceof DateTime) {
402
+			$parsed = [
403
+				'year'  => $date_to_set_string->format('Y'),
404
+				'month' => $date_to_set_string->format('m'),
405
+				'day'   => $date_to_set_string->format('d'),
406
+			];
407
+		} else {
408
+			// parse incoming string
409
+			$parsed = date_parse_from_format($this->_date_format, $date_to_set_string);
410
+		}
411
+		EEH_DTT_Helper::setTimezone($current, $this->_DateTimeZone);
412
+		return $current->setDate($parsed['year'], $parsed['month'], $parsed['day']);
413
+	}
414
+
415
+
416
+	/**
417
+	 * This prepares the EE_DateTime value to be saved to the db as mysql timestamp (UTC +0 timezone).  When the
418
+	 * datetime gets to this stage it should ALREADY be in UTC time
419
+	 *
420
+	 * @param DateTime $DateTime
421
+	 * @return string formatted date time for given timezone
422
+	 * @throws EE_Error
423
+	 */
424
+	public function prepare_for_get($DateTime): string
425
+	{
426
+		return $this->_prepare_for_display($DateTime);
427
+	}
428
+
429
+
430
+	/**
431
+	 * This differs from prepare_for_get in that it considers whether the internal $_timezone differs
432
+	 * from the set wp timezone.  If so, then it returns the datetime string formatted via
433
+	 * _pretty_date_format, and _pretty_time_format.  However, it also appends a timezone
434
+	 * abbreviation to the date_string.
435
+	 *
436
+	 * @param mixed       $DateTime
437
+	 * @param string|null $schema
438
+	 * @return string
439
+	 * @throws EE_Error
440
+	 */
441
+	public function prepare_for_pretty_echoing($DateTime, ?string $schema = null): string
442
+	{
443
+		return $this->_prepare_for_display($DateTime, ($schema
444
+			?: true));
445
+	}
446
+
447
+
448
+	/**
449
+	 * This prepares the EE_DateTime value to be saved to the db as mysql timestamp (UTC +0
450
+	 * timezone).
451
+	 *
452
+	 * @param DateTime|null $DateTime
453
+	 * @param bool|string   $schema
454
+	 * @return string
455
+	 * @throws EE_Error
456
+	 * @throws Exception
457
+	 */
458
+	protected function _prepare_for_display(?DateTime $DateTime, $schema = false): string
459
+	{
460
+		if (! $DateTime instanceof DateTime) {
461
+			if ($this->_nullable) {
462
+				return '';
463
+			}
464
+			if (WP_DEBUG) {
465
+				throw new EE_Error(
466
+					sprintf(
467
+						esc_html__(
468
+							'EE_Datetime_Field::_prepare_for_display requires a DateTime class to be the value for the $DateTime argument because the %s field is not nullable.',
469
+							'event_espresso'
470
+						),
471
+						$this->_nicename
472
+					)
473
+				);
474
+			}
475
+			$DateTime = new DbSafeDateTime(EE_Datetime_Field::now);
476
+			EE_Error::add_error(
477
+				sprintf(
478
+					esc_html__(
479
+						'EE_Datetime_Field::_prepare_for_display requires a DateTime class to be the value for the $DateTime argument because the %s field is not nullable.  When WP_DEBUG is false, the value is set to "now" instead of throwing an exception.',
480
+						'event_espresso'
481
+					),
482
+					$this->_nicename
483
+				),
484
+				__FILE__, __FUNCTION__, __LINE__
485
+			);
486
+		}
487
+		$format_string = $this->_get_date_time_output($schema);
488
+		EEH_DTT_Helper::setTimezone($DateTime, $this->_DateTimeZone);
489
+		if ($schema) {
490
+			$timezone_string = '';
491
+			if ($this->_display_timezone()) {
492
+				// must be explicit because schema could equal true.
493
+				if ($schema === 'no_html') {
494
+					$timezone_string = ' (' . $DateTime->format('T') . ')';
495
+				} else {
496
+					$timezone_string = ' <span class="ee_dtt_timezone_string">(' . $DateTime->format('T') . ')</span>';
497
+				}
498
+			}
499
+
500
+			return $DateTime->format($format_string) . $timezone_string;
501
+		}
502
+		return $DateTime->format($format_string);
503
+	}
504
+
505
+
506
+	/**
507
+	 * This prepares the EE_DateTime value to be saved to the db as mysql timestamp (UTC +0
508
+	 * timezone).
509
+	 *
510
+	 * @param mixed $datetime_value u
511
+	 * @return string mysql timestamp in UTC
512
+	 * @throws EE_Error
513
+	 * @throws Exception
514
+	 */
515
+	public function prepare_for_use_in_db($datetime_value): ?string
516
+	{
517
+		// we allow an empty value or DateTime object, but nothing else.
518
+		if (! empty($datetime_value) && ! $datetime_value instanceof DateTime) {
519
+			throw new EE_Error(
520
+				sprintf(
521
+					esc_html__(
522
+						'The incoming value being prepared for setting in the database must either be empty or a php 
523 523
             		    DateTime object, instead of: %1$s %2$s',
524
-                        'event_espresso'
525
-                    ),
526
-                    '<br />',
527
-                    print_r($datetime_value, true)
528
-                )
529
-            );
530
-        }
531
-
532
-        if ($datetime_value instanceof DateTime) {
533
-            if (! $datetime_value instanceof DbSafeDateTime) {
534
-                $datetime_value = DbSafeDateTime::createFromDateTime($datetime_value);
535
-            }
536
-            EEH_DTT_Helper::setTimezone($datetime_value, $this->get_UTC_DateTimeZone());
537
-            return $datetime_value->format(
538
-                EE_Datetime_Field::mysql_timestamp_format
539
-            );
540
-        }
541
-
542
-        // if $datetime_value is empty, and ! $this->_nullable, use current_time() but set the GMT flag to true
543
-        return ! $this->_nullable
544
-            ? current_time('mysql', true)
545
-            : null;
546
-    }
547
-
548
-
549
-    /**
550
-     * This prepares the datetime for internal usage as a PHP DateTime object OR null (if nullable is
551
-     * allowed)
552
-     *
553
-     * @param string $datetime_string mysql timestamp in UTC
554
-     * @return  bool|DbSafeDateTime|null
555
-     * @throws EE_Error
556
-     * @throws Exception
557
-     */
558
-    public function prepare_for_set_from_db($datetime_string)
559
-    {
560
-        // if $datetime_value is empty, and ! $this->_nullable, just use time()
561
-        if (empty($datetime_string) && $this->_nullable) {
562
-            return null;
563
-        }
564
-        // datetime strings from the db should ALWAYS be in UTC+0, so use UTC_DateTimeZone when creating
565
-        $DateTime = empty($datetime_string)
566
-            ? new DbSafeDateTime(EE_Datetime_Field::now, $this->get_UTC_DateTimeZone())
567
-            : DbSafeDateTime::createFromFormat(
568
-                EE_Datetime_Field::mysql_timestamp_format,
569
-                $datetime_string,
570
-                $this->get_UTC_DateTimeZone()
571
-            );
572
-
573
-        if (! $DateTime instanceof DbSafeDateTime) {
574
-            // if still no datetime object, then let's just use now
575
-            $DateTime = new DbSafeDateTime(EE_Datetime_Field::now, $this->get_UTC_DateTimeZone());
576
-        }
577
-        // THEN apply the field's set DateTimeZone
578
-        EEH_DTT_Helper::setTimezone($DateTime, $this->_DateTimeZone);
579
-        return $DateTime;
580
-    }
581
-
582
-
583
-    /**
584
-     * All this method does is determine if we're going to display the timezone string or not on any output.
585
-     * To determine this we check if the set timezone offset is different than the blog's set timezone offset.
586
-     * If so, then true.
587
-     *
588
-     * @return bool true for yes false for no
589
-     * @throws Exception
590
-     */
591
-    protected function _display_timezone(): bool
592
-    {
593
-        // first let's do a comparison of timezone strings.
594
-        // If they match then we can get out without any further calculations
595
-        $blog_string = get_option('timezone_string');
596
-        if ($blog_string === $this->_timezone_string) {
597
-            return false;
598
-        }
599
-        // now we need to calc the offset for the timezone string so we can compare with the blog offset.
600
-        $this_offset = $this->get_timezone_offset($this->_DateTimeZone);
601
-        $blog_offset = $this->get_timezone_offset($this->get_blog_DateTimeZone());
602
-        // now compare
603
-        return $blog_offset !== $this_offset;
604
-    }
605
-
606
-
607
-    /**
608
-     * This method returns a php DateTime object for setting on the EE_Base_Class model.
609
-     * EE passes around DateTime objects because they are MUCH easier to manipulate and deal
610
-     * with.
611
-     *
612
-     * @param int|string|DateTime $date_string            This should be the incoming date string.  It's assumed to be
613
-     *                                                    in the format that is set on the date_field (or DateTime
614
-     *                                                    object)!
615
-     * @return DateTime
616
-     * @throws Exception
617
-     * @throws Exception
618
-     */
619
-    protected function _get_date_object($date_string)
620
-    {
621
-        // first if this is an empty date_string and nullable is allowed, just return null.
622
-        if ($this->_nullable && empty($date_string)) {
623
-            return null;
624
-        }
625
-
626
-        // if incoming date
627
-        if ($date_string instanceof DateTime) {
628
-            EEH_DTT_Helper::setTimezone($date_string, $this->_DateTimeZone);
629
-            return $date_string;
630
-        }
631
-        // if empty date_string and made it here.
632
-        // Return a datetime object for now in the given timezone.
633
-        if (empty($date_string)) {
634
-            return new DbSafeDateTime(EE_Datetime_Field::now, $this->_DateTimeZone);
635
-        }
636
-        // if $date_string is matches something that looks like a Unix timestamp let's just use it.
637
-        if (preg_match(EE_Datetime_Field::unix_timestamp_regex, $date_string)) {
638
-            try {
639
-                // This is operating under the assumption that the incoming Unix timestamp
640
-                // is an ACTUAL Unix timestamp and not the calculated one output by current_time('timestamp');
641
-                $DateTime = new DbSafeDateTime(EE_Datetime_Field::now, $this->_DateTimeZone);
642
-                $DateTime->setTimestamp($date_string);
643
-
644
-                return $DateTime;
645
-            } catch (Exception $e) {
646
-                // should be rare, but if things got fooled then let's just continue
647
-            }
648
-        }
649
-        // not a unix timestamp.  So we will use the set format on this object and set timezone to
650
-        // create the DateTime object.
651
-        $format = $this->_date_format . ' ' . $this->_time_format;
652
-        try {
653
-            $DateTime = DbSafeDateTime::createFromFormat($format, $date_string, $this->_DateTimeZone);
654
-            if (! $DateTime instanceof DbSafeDateTime) {
655
-                throw new EE_Error(
656
-                    sprintf(
657
-                        esc_html__('"%1$s" does not represent a valid Date Time in the format "%2$s".',
658
-                            'event_espresso'),
659
-                        $date_string,
660
-                        $format
661
-                    )
662
-                );
663
-            }
664
-        } catch (Exception $e) {
665
-            // if we made it here then likely then something went really wrong.
666
-            // Instead of throwing an exception, let's just return a DateTime object for now, in the set timezone.
667
-            $DateTime = new DbSafeDateTime(EE_Datetime_Field::now, $this->_DateTimeZone);
668
-        }
669
-
670
-        return $DateTime;
671
-    }
672
-
673
-
674
-    /**
675
-     * get_timezone_transitions
676
-     *
677
-     * @param DateTimeZone $DateTimeZone
678
-     * @param int|null     $time
679
-     * @param bool|null    $first_only
680
-     * @return array
681
-     */
682
-    public function get_timezone_transitions(
683
-        DateTimeZone $DateTimeZone,
684
-        ?int $time = null,
685
-        bool $first_only = true
686
-    ): array {
687
-        return EEH_DTT_Helper::get_timezone_transitions($DateTimeZone, $time, $first_only);
688
-    }
689
-
690
-
691
-    /**
692
-     * get_timezone_offset
693
-     *
694
-     * @param DateTimeZone $DateTimeZone
695
-     * @param int|null     $time
696
-     * @return mixed
697
-     * @throws DomainException
698
-     */
699
-    public function get_timezone_offset(DateTimeZone $DateTimeZone, ?int $time = null)
700
-    {
701
-        return EEH_DTT_Helper::get_timezone_offset($DateTimeZone, $time);
702
-    }
703
-
704
-
705
-    /**
706
-     * This will take an incoming timezone string and return the abbreviation for that timezone
707
-     *
708
-     * @param string|null $timezone_string
709
-     * @return string           abbreviation
710
-     * @throws Exception
711
-     */
712
-    public function get_timezone_abbrev(?string $timezone_string): string
713
-    {
714
-        $timezone_string = EEH_DTT_Helper::get_valid_timezone_string($timezone_string);
715
-        $dateTime        = new DateTime(EE_Datetime_Field::now, new DateTimeZone($timezone_string));
716
-        return $dateTime->format('T');
717
-    }
718
-
719
-
720
-    /**
721
-     * Overrides the parent to allow for having a dynamic "now" value
722
-     *
723
-     * @return mixed
724
-     */
725
-    public function get_default_value()
726
-    {
727
-        if ($this->_default_value === EE_Datetime_Field::now) {
728
-            return time();
729
-        }
730
-        return parent::get_default_value();
731
-    }
732
-
733
-
734
-    /**
735
-     * Gets the default datetime object from the field's default time
736
-     *
737
-     * @return DbSafeDateTime|DateTime|null
738
-     * @throws InvalidArgumentException
739
-     * @throws InvalidDataTypeException
740
-     * @throws InvalidInterfaceException*@throws Exception
741
-     * @throws Exception
742
-     * @since 4.9.66.p
743
-     */
744
-    public function getDefaultDateTimeObj()
745
-    {
746
-        $default_raw = $this->get_default_value();
747
-        if ($default_raw instanceof DateTime) {
748
-            return $default_raw;
749
-        }
750
-        if (is_null($default_raw)) {
751
-            return null;
752
-        }
753
-        return new DbSafeDateTime(
754
-            $this->get_default_value(),
755
-            EEH_DTT_Helper::get_valid_timezone_string($this->get_timezone())
756
-        );
757
-    }
758
-
759
-
760
-    public function getSchemaDescription(): string
761
-    {
762
-        return sprintf(
763
-            esc_html__('%s - the value for this field is in the timezone of the site.', 'event_espresso'),
764
-            $this->get_nicename()
765
-        );
766
-    }
524
+						'event_espresso'
525
+					),
526
+					'<br />',
527
+					print_r($datetime_value, true)
528
+				)
529
+			);
530
+		}
531
+
532
+		if ($datetime_value instanceof DateTime) {
533
+			if (! $datetime_value instanceof DbSafeDateTime) {
534
+				$datetime_value = DbSafeDateTime::createFromDateTime($datetime_value);
535
+			}
536
+			EEH_DTT_Helper::setTimezone($datetime_value, $this->get_UTC_DateTimeZone());
537
+			return $datetime_value->format(
538
+				EE_Datetime_Field::mysql_timestamp_format
539
+			);
540
+		}
541
+
542
+		// if $datetime_value is empty, and ! $this->_nullable, use current_time() but set the GMT flag to true
543
+		return ! $this->_nullable
544
+			? current_time('mysql', true)
545
+			: null;
546
+	}
547
+
548
+
549
+	/**
550
+	 * This prepares the datetime for internal usage as a PHP DateTime object OR null (if nullable is
551
+	 * allowed)
552
+	 *
553
+	 * @param string $datetime_string mysql timestamp in UTC
554
+	 * @return  bool|DbSafeDateTime|null
555
+	 * @throws EE_Error
556
+	 * @throws Exception
557
+	 */
558
+	public function prepare_for_set_from_db($datetime_string)
559
+	{
560
+		// if $datetime_value is empty, and ! $this->_nullable, just use time()
561
+		if (empty($datetime_string) && $this->_nullable) {
562
+			return null;
563
+		}
564
+		// datetime strings from the db should ALWAYS be in UTC+0, so use UTC_DateTimeZone when creating
565
+		$DateTime = empty($datetime_string)
566
+			? new DbSafeDateTime(EE_Datetime_Field::now, $this->get_UTC_DateTimeZone())
567
+			: DbSafeDateTime::createFromFormat(
568
+				EE_Datetime_Field::mysql_timestamp_format,
569
+				$datetime_string,
570
+				$this->get_UTC_DateTimeZone()
571
+			);
572
+
573
+		if (! $DateTime instanceof DbSafeDateTime) {
574
+			// if still no datetime object, then let's just use now
575
+			$DateTime = new DbSafeDateTime(EE_Datetime_Field::now, $this->get_UTC_DateTimeZone());
576
+		}
577
+		// THEN apply the field's set DateTimeZone
578
+		EEH_DTT_Helper::setTimezone($DateTime, $this->_DateTimeZone);
579
+		return $DateTime;
580
+	}
581
+
582
+
583
+	/**
584
+	 * All this method does is determine if we're going to display the timezone string or not on any output.
585
+	 * To determine this we check if the set timezone offset is different than the blog's set timezone offset.
586
+	 * If so, then true.
587
+	 *
588
+	 * @return bool true for yes false for no
589
+	 * @throws Exception
590
+	 */
591
+	protected function _display_timezone(): bool
592
+	{
593
+		// first let's do a comparison of timezone strings.
594
+		// If they match then we can get out without any further calculations
595
+		$blog_string = get_option('timezone_string');
596
+		if ($blog_string === $this->_timezone_string) {
597
+			return false;
598
+		}
599
+		// now we need to calc the offset for the timezone string so we can compare with the blog offset.
600
+		$this_offset = $this->get_timezone_offset($this->_DateTimeZone);
601
+		$blog_offset = $this->get_timezone_offset($this->get_blog_DateTimeZone());
602
+		// now compare
603
+		return $blog_offset !== $this_offset;
604
+	}
605
+
606
+
607
+	/**
608
+	 * This method returns a php DateTime object for setting on the EE_Base_Class model.
609
+	 * EE passes around DateTime objects because they are MUCH easier to manipulate and deal
610
+	 * with.
611
+	 *
612
+	 * @param int|string|DateTime $date_string            This should be the incoming date string.  It's assumed to be
613
+	 *                                                    in the format that is set on the date_field (or DateTime
614
+	 *                                                    object)!
615
+	 * @return DateTime
616
+	 * @throws Exception
617
+	 * @throws Exception
618
+	 */
619
+	protected function _get_date_object($date_string)
620
+	{
621
+		// first if this is an empty date_string and nullable is allowed, just return null.
622
+		if ($this->_nullable && empty($date_string)) {
623
+			return null;
624
+		}
625
+
626
+		// if incoming date
627
+		if ($date_string instanceof DateTime) {
628
+			EEH_DTT_Helper::setTimezone($date_string, $this->_DateTimeZone);
629
+			return $date_string;
630
+		}
631
+		// if empty date_string and made it here.
632
+		// Return a datetime object for now in the given timezone.
633
+		if (empty($date_string)) {
634
+			return new DbSafeDateTime(EE_Datetime_Field::now, $this->_DateTimeZone);
635
+		}
636
+		// if $date_string is matches something that looks like a Unix timestamp let's just use it.
637
+		if (preg_match(EE_Datetime_Field::unix_timestamp_regex, $date_string)) {
638
+			try {
639
+				// This is operating under the assumption that the incoming Unix timestamp
640
+				// is an ACTUAL Unix timestamp and not the calculated one output by current_time('timestamp');
641
+				$DateTime = new DbSafeDateTime(EE_Datetime_Field::now, $this->_DateTimeZone);
642
+				$DateTime->setTimestamp($date_string);
643
+
644
+				return $DateTime;
645
+			} catch (Exception $e) {
646
+				// should be rare, but if things got fooled then let's just continue
647
+			}
648
+		}
649
+		// not a unix timestamp.  So we will use the set format on this object and set timezone to
650
+		// create the DateTime object.
651
+		$format = $this->_date_format . ' ' . $this->_time_format;
652
+		try {
653
+			$DateTime = DbSafeDateTime::createFromFormat($format, $date_string, $this->_DateTimeZone);
654
+			if (! $DateTime instanceof DbSafeDateTime) {
655
+				throw new EE_Error(
656
+					sprintf(
657
+						esc_html__('"%1$s" does not represent a valid Date Time in the format "%2$s".',
658
+							'event_espresso'),
659
+						$date_string,
660
+						$format
661
+					)
662
+				);
663
+			}
664
+		} catch (Exception $e) {
665
+			// if we made it here then likely then something went really wrong.
666
+			// Instead of throwing an exception, let's just return a DateTime object for now, in the set timezone.
667
+			$DateTime = new DbSafeDateTime(EE_Datetime_Field::now, $this->_DateTimeZone);
668
+		}
669
+
670
+		return $DateTime;
671
+	}
672
+
673
+
674
+	/**
675
+	 * get_timezone_transitions
676
+	 *
677
+	 * @param DateTimeZone $DateTimeZone
678
+	 * @param int|null     $time
679
+	 * @param bool|null    $first_only
680
+	 * @return array
681
+	 */
682
+	public function get_timezone_transitions(
683
+		DateTimeZone $DateTimeZone,
684
+		?int $time = null,
685
+		bool $first_only = true
686
+	): array {
687
+		return EEH_DTT_Helper::get_timezone_transitions($DateTimeZone, $time, $first_only);
688
+	}
689
+
690
+
691
+	/**
692
+	 * get_timezone_offset
693
+	 *
694
+	 * @param DateTimeZone $DateTimeZone
695
+	 * @param int|null     $time
696
+	 * @return mixed
697
+	 * @throws DomainException
698
+	 */
699
+	public function get_timezone_offset(DateTimeZone $DateTimeZone, ?int $time = null)
700
+	{
701
+		return EEH_DTT_Helper::get_timezone_offset($DateTimeZone, $time);
702
+	}
703
+
704
+
705
+	/**
706
+	 * This will take an incoming timezone string and return the abbreviation for that timezone
707
+	 *
708
+	 * @param string|null $timezone_string
709
+	 * @return string           abbreviation
710
+	 * @throws Exception
711
+	 */
712
+	public function get_timezone_abbrev(?string $timezone_string): string
713
+	{
714
+		$timezone_string = EEH_DTT_Helper::get_valid_timezone_string($timezone_string);
715
+		$dateTime        = new DateTime(EE_Datetime_Field::now, new DateTimeZone($timezone_string));
716
+		return $dateTime->format('T');
717
+	}
718
+
719
+
720
+	/**
721
+	 * Overrides the parent to allow for having a dynamic "now" value
722
+	 *
723
+	 * @return mixed
724
+	 */
725
+	public function get_default_value()
726
+	{
727
+		if ($this->_default_value === EE_Datetime_Field::now) {
728
+			return time();
729
+		}
730
+		return parent::get_default_value();
731
+	}
732
+
733
+
734
+	/**
735
+	 * Gets the default datetime object from the field's default time
736
+	 *
737
+	 * @return DbSafeDateTime|DateTime|null
738
+	 * @throws InvalidArgumentException
739
+	 * @throws InvalidDataTypeException
740
+	 * @throws InvalidInterfaceException*@throws Exception
741
+	 * @throws Exception
742
+	 * @since 4.9.66.p
743
+	 */
744
+	public function getDefaultDateTimeObj()
745
+	{
746
+		$default_raw = $this->get_default_value();
747
+		if ($default_raw instanceof DateTime) {
748
+			return $default_raw;
749
+		}
750
+		if (is_null($default_raw)) {
751
+			return null;
752
+		}
753
+		return new DbSafeDateTime(
754
+			$this->get_default_value(),
755
+			EEH_DTT_Helper::get_valid_timezone_string($this->get_timezone())
756
+		);
757
+	}
758
+
759
+
760
+	public function getSchemaDescription(): string
761
+	{
762
+		return sprintf(
763
+			esc_html__('%s - the value for this field is in the timezone of the site.', 'event_espresso'),
764
+			$this->get_nicename()
765
+		);
766
+	}
767 767
 }
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
 
193 193
             default:
194 194
                 return $pretty
195
-                    ? trim($this->_pretty_date_format . ' ' . $this->_pretty_time_format)
196
-                    : trim($this->_date_format . ' ' . $this->_time_format);
195
+                    ? trim($this->_pretty_date_format.' '.$this->_pretty_time_format)
196
+                    : trim($this->_date_format.' '.$this->_time_format);
197 197
         }
198 198
     }
199 199
 
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
      */
458 458
     protected function _prepare_for_display(?DateTime $DateTime, $schema = false): string
459 459
     {
460
-        if (! $DateTime instanceof DateTime) {
460
+        if ( ! $DateTime instanceof DateTime) {
461 461
             if ($this->_nullable) {
462 462
                 return '';
463 463
             }
@@ -491,13 +491,13 @@  discard block
 block discarded – undo
491 491
             if ($this->_display_timezone()) {
492 492
                 // must be explicit because schema could equal true.
493 493
                 if ($schema === 'no_html') {
494
-                    $timezone_string = ' (' . $DateTime->format('T') . ')';
494
+                    $timezone_string = ' ('.$DateTime->format('T').')';
495 495
                 } else {
496
-                    $timezone_string = ' <span class="ee_dtt_timezone_string">(' . $DateTime->format('T') . ')</span>';
496
+                    $timezone_string = ' <span class="ee_dtt_timezone_string">('.$DateTime->format('T').')</span>';
497 497
                 }
498 498
             }
499 499
 
500
-            return $DateTime->format($format_string) . $timezone_string;
500
+            return $DateTime->format($format_string).$timezone_string;
501 501
         }
502 502
         return $DateTime->format($format_string);
503 503
     }
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
     public function prepare_for_use_in_db($datetime_value): ?string
516 516
     {
517 517
         // we allow an empty value or DateTime object, but nothing else.
518
-        if (! empty($datetime_value) && ! $datetime_value instanceof DateTime) {
518
+        if ( ! empty($datetime_value) && ! $datetime_value instanceof DateTime) {
519 519
             throw new EE_Error(
520 520
                 sprintf(
521 521
                     esc_html__(
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
         }
531 531
 
532 532
         if ($datetime_value instanceof DateTime) {
533
-            if (! $datetime_value instanceof DbSafeDateTime) {
533
+            if ( ! $datetime_value instanceof DbSafeDateTime) {
534 534
                 $datetime_value = DbSafeDateTime::createFromDateTime($datetime_value);
535 535
             }
536 536
             EEH_DTT_Helper::setTimezone($datetime_value, $this->get_UTC_DateTimeZone());
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
                 $this->get_UTC_DateTimeZone()
571 571
             );
572 572
 
573
-        if (! $DateTime instanceof DbSafeDateTime) {
573
+        if ( ! $DateTime instanceof DbSafeDateTime) {
574 574
             // if still no datetime object, then let's just use now
575 575
             $DateTime = new DbSafeDateTime(EE_Datetime_Field::now, $this->get_UTC_DateTimeZone());
576 576
         }
@@ -648,10 +648,10 @@  discard block
 block discarded – undo
648 648
         }
649 649
         // not a unix timestamp.  So we will use the set format on this object and set timezone to
650 650
         // create the DateTime object.
651
-        $format = $this->_date_format . ' ' . $this->_time_format;
651
+        $format = $this->_date_format.' '.$this->_time_format;
652 652
         try {
653 653
             $DateTime = DbSafeDateTime::createFromFormat($format, $date_string, $this->_DateTimeZone);
654
-            if (! $DateTime instanceof DbSafeDateTime) {
654
+            if ( ! $DateTime instanceof DbSafeDateTime) {
655 655
                 throw new EE_Error(
656 656
                     sprintf(
657 657
                         esc_html__('"%1$s" does not represent a valid Date Time in the format "%2$s".',
Please login to merge, or discard this patch.
core/EE_Load_Textdomain.core.php 2 patches
Indentation   +123 added lines, -123 removed lines patch added patch discarded remove patch
@@ -14,127 +14,127 @@
 block discarded – undo
14 14
  */
15 15
 class EE_Load_Textdomain extends EE_Base
16 16
 {
17
-    private const REPO_BASE_URL = 'https://raw.githubusercontent.com/eventespresso/languages-ee4/master/event_espresso';
18
-
19
-
20
-    /**
21
-     * holds the current lang in WP
22
-     *
23
-     * @var string
24
-     */
25
-    public static $locale;
26
-
27
-
28
-    /**
29
-     * this takes care of retrieving a matching textdomain for event espresso for the current WPLANG from EE GitHub
30
-     * repo (if necessary) and then loading it for translations. should only be called in wp plugins_loaded callback
31
-     *
32
-     * @return void
33
-     * @throws EE_Error
34
-     * @throws InvalidArgumentException
35
-     * @throws ReflectionException
36
-     * @throws InvalidDataTypeException
37
-     * @throws InvalidInterfaceException
38
-     */
39
-    public static function load_textdomain()
40
-    {
41
-        EE_Load_Textdomain::loadTranslationsForLocale();
42
-        // now load the textdomain
43
-        if (!empty(EE_Load_Textdomain::$locale)) {
44
-            $github_mo_path = EE_LANGUAGES_SAFE_DIR . 'event_espresso-' . EE_Load_Textdomain::$locale . '.mo';
45
-            if (is_readable($github_mo_path)) {
46
-                load_plugin_textdomain('event_espresso', false, EE_LANGUAGES_SAFE_LOC);
47
-                return;
48
-            }
49
-            $glotpress_mo_path = EE_LANGUAGES_SAFE_DIR . 'event-espresso-4-' . EE_Load_Textdomain::$locale . '.mo';
50
-            if (is_readable($glotpress_mo_path)) {
51
-                load_textdomain('event_espresso', $glotpress_mo_path);
52
-                return;
53
-            }
54
-        }
55
-        load_plugin_textdomain('event_espresso', false, dirname(EE_PLUGIN_BASENAME) . '/languages/');
56
-    }
57
-
58
-
59
-    /**
60
-     * The purpose of this method is to sideload the language files for EE,
61
-     * this includes the POT file and the PO/MO files for the given WPLANG locale (if necessary).
62
-     *
63
-     * @access private
64
-     * @static
65
-     * @return void
66
-     * @throws EE_Error
67
-     * @throws InvalidArgumentException
68
-     * @throws ReflectionException
69
-     * @throws InvalidDataTypeException
70
-     * @throws InvalidInterfaceException
71
-     */
72
-    private static function loadTranslationsForLocale()
73
-    {
74
-        EE_Load_Textdomain::$locale = get_locale();
75
-        // can't download a language file if a language isn't set <taps temple>
76
-        if (empty(EE_Load_Textdomain::$locale)) {
77
-            return;
78
-        }
79
-        $loaded_text_domains = new LoadedTextDomains();
80
-
81
-        // check if language files has already been sideloaded
82
-        if ($loaded_text_domains->hasVersion(EE_Load_Textdomain::$locale, EVENT_ESPRESSO_VERSION)) {
83
-            return;
84
-        }
85
-
86
-        // clean up old text domain tracking
87
-        $LegacyTextDomainOptions = new LegacyTextDomainOptions($loaded_text_domains);
88
-        $LegacyTextDomainOptions->convertToConsolidatedFormat();
89
-
90
-        // load sideloader and sideload the .POT file as this should always be included.
91
-        $sideloader_args = array(
92
-            '_upload_to'     => EE_PLUGIN_DIR_PATH . 'languages/',
93
-            '_download_from' => EE_Load_Textdomain::REPO_BASE_URL . '.pot',
94
-            '_new_file_name' => 'event_espresso.pot',
95
-        );
96
-        /** @var EEH_Sideloader $sideloader */
97
-        $sideloader = EE_Registry::instance()->load_helper('Sideloader', $sideloader_args, false);
98
-        // sideload the .POT file only for main site of the network, or if not running Multisite.
99
-        if (is_main_site()) {
100
-            $sideloader->sideload();
101
-        }
102
-
103
-        // if locale is "en_US" then lets just get out, since Event Espresso core is already "en_US"
104
-        if (EE_Load_Textdomain::$locale === 'en_US') {
105
-            // but set option first else we'll forever be downloading the pot file
106
-            $loaded_text_domains->versionLoaded(EE_Load_Textdomain::$locale, EVENT_ESPRESSO_VERSION);
107
-            return;
108
-        }
109
-        $repo_locale_URL = EE_Load_Textdomain::REPO_BASE_URL . '-' . EE_Load_Textdomain::$locale;
110
-        $file_name_base = 'event_espresso-' . EE_Load_Textdomain::$locale;
111
-
112
-        // made it here so let's get the language files from the GitHub repo, first the .mo file
113
-        $sideloader->set_download_from("$repo_locale_URL.mo");
114
-        $sideloader->set_new_file_name("$file_name_base.mo");
115
-        $mo_loaded = $sideloader->sideload();
116
-
117
-        // now the .po file:
118
-        $sideloader->set_download_from("$repo_locale_URL.po");
119
-        $sideloader->set_new_file_name("$file_name_base.po");
120
-        $po_loaded = $sideloader->sideload();
121
-
122
-        // set option so the above only runs when EE updates.
123
-        $loaded_text_domains->versionLoaded(EE_Load_Textdomain::$locale, EVENT_ESPRESSO_VERSION);
124
-
125
-        if ($mo_loaded && $po_loaded) {
126
-            EE_Error::add_success(
127
-                sprintf(
128
-                    esc_html__(
129
-                        'Successfully downloaded the Event Espresso text domain for the "%1$s" locale.',
130
-                        'event_espresso'
131
-                    ),
132
-                    EE_Load_Textdomain::$locale
133
-                ),
134
-                __FILE__,
135
-                __FUNCTION__,
136
-                __LINE__
137
-            );
138
-        }
139
-    }
17
+	private const REPO_BASE_URL = 'https://raw.githubusercontent.com/eventespresso/languages-ee4/master/event_espresso';
18
+
19
+
20
+	/**
21
+	 * holds the current lang in WP
22
+	 *
23
+	 * @var string
24
+	 */
25
+	public static $locale;
26
+
27
+
28
+	/**
29
+	 * this takes care of retrieving a matching textdomain for event espresso for the current WPLANG from EE GitHub
30
+	 * repo (if necessary) and then loading it for translations. should only be called in wp plugins_loaded callback
31
+	 *
32
+	 * @return void
33
+	 * @throws EE_Error
34
+	 * @throws InvalidArgumentException
35
+	 * @throws ReflectionException
36
+	 * @throws InvalidDataTypeException
37
+	 * @throws InvalidInterfaceException
38
+	 */
39
+	public static function load_textdomain()
40
+	{
41
+		EE_Load_Textdomain::loadTranslationsForLocale();
42
+		// now load the textdomain
43
+		if (!empty(EE_Load_Textdomain::$locale)) {
44
+			$github_mo_path = EE_LANGUAGES_SAFE_DIR . 'event_espresso-' . EE_Load_Textdomain::$locale . '.mo';
45
+			if (is_readable($github_mo_path)) {
46
+				load_plugin_textdomain('event_espresso', false, EE_LANGUAGES_SAFE_LOC);
47
+				return;
48
+			}
49
+			$glotpress_mo_path = EE_LANGUAGES_SAFE_DIR . 'event-espresso-4-' . EE_Load_Textdomain::$locale . '.mo';
50
+			if (is_readable($glotpress_mo_path)) {
51
+				load_textdomain('event_espresso', $glotpress_mo_path);
52
+				return;
53
+			}
54
+		}
55
+		load_plugin_textdomain('event_espresso', false, dirname(EE_PLUGIN_BASENAME) . '/languages/');
56
+	}
57
+
58
+
59
+	/**
60
+	 * The purpose of this method is to sideload the language files for EE,
61
+	 * this includes the POT file and the PO/MO files for the given WPLANG locale (if necessary).
62
+	 *
63
+	 * @access private
64
+	 * @static
65
+	 * @return void
66
+	 * @throws EE_Error
67
+	 * @throws InvalidArgumentException
68
+	 * @throws ReflectionException
69
+	 * @throws InvalidDataTypeException
70
+	 * @throws InvalidInterfaceException
71
+	 */
72
+	private static function loadTranslationsForLocale()
73
+	{
74
+		EE_Load_Textdomain::$locale = get_locale();
75
+		// can't download a language file if a language isn't set <taps temple>
76
+		if (empty(EE_Load_Textdomain::$locale)) {
77
+			return;
78
+		}
79
+		$loaded_text_domains = new LoadedTextDomains();
80
+
81
+		// check if language files has already been sideloaded
82
+		if ($loaded_text_domains->hasVersion(EE_Load_Textdomain::$locale, EVENT_ESPRESSO_VERSION)) {
83
+			return;
84
+		}
85
+
86
+		// clean up old text domain tracking
87
+		$LegacyTextDomainOptions = new LegacyTextDomainOptions($loaded_text_domains);
88
+		$LegacyTextDomainOptions->convertToConsolidatedFormat();
89
+
90
+		// load sideloader and sideload the .POT file as this should always be included.
91
+		$sideloader_args = array(
92
+			'_upload_to'     => EE_PLUGIN_DIR_PATH . 'languages/',
93
+			'_download_from' => EE_Load_Textdomain::REPO_BASE_URL . '.pot',
94
+			'_new_file_name' => 'event_espresso.pot',
95
+		);
96
+		/** @var EEH_Sideloader $sideloader */
97
+		$sideloader = EE_Registry::instance()->load_helper('Sideloader', $sideloader_args, false);
98
+		// sideload the .POT file only for main site of the network, or if not running Multisite.
99
+		if (is_main_site()) {
100
+			$sideloader->sideload();
101
+		}
102
+
103
+		// if locale is "en_US" then lets just get out, since Event Espresso core is already "en_US"
104
+		if (EE_Load_Textdomain::$locale === 'en_US') {
105
+			// but set option first else we'll forever be downloading the pot file
106
+			$loaded_text_domains->versionLoaded(EE_Load_Textdomain::$locale, EVENT_ESPRESSO_VERSION);
107
+			return;
108
+		}
109
+		$repo_locale_URL = EE_Load_Textdomain::REPO_BASE_URL . '-' . EE_Load_Textdomain::$locale;
110
+		$file_name_base = 'event_espresso-' . EE_Load_Textdomain::$locale;
111
+
112
+		// made it here so let's get the language files from the GitHub repo, first the .mo file
113
+		$sideloader->set_download_from("$repo_locale_URL.mo");
114
+		$sideloader->set_new_file_name("$file_name_base.mo");
115
+		$mo_loaded = $sideloader->sideload();
116
+
117
+		// now the .po file:
118
+		$sideloader->set_download_from("$repo_locale_URL.po");
119
+		$sideloader->set_new_file_name("$file_name_base.po");
120
+		$po_loaded = $sideloader->sideload();
121
+
122
+		// set option so the above only runs when EE updates.
123
+		$loaded_text_domains->versionLoaded(EE_Load_Textdomain::$locale, EVENT_ESPRESSO_VERSION);
124
+
125
+		if ($mo_loaded && $po_loaded) {
126
+			EE_Error::add_success(
127
+				sprintf(
128
+					esc_html__(
129
+						'Successfully downloaded the Event Espresso text domain for the "%1$s" locale.',
130
+						'event_espresso'
131
+					),
132
+					EE_Load_Textdomain::$locale
133
+				),
134
+				__FILE__,
135
+				__FUNCTION__,
136
+				__LINE__
137
+			);
138
+		}
139
+	}
140 140
 }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -40,19 +40,19 @@  discard block
 block discarded – undo
40 40
     {
41 41
         EE_Load_Textdomain::loadTranslationsForLocale();
42 42
         // now load the textdomain
43
-        if (!empty(EE_Load_Textdomain::$locale)) {
44
-            $github_mo_path = EE_LANGUAGES_SAFE_DIR . 'event_espresso-' . EE_Load_Textdomain::$locale . '.mo';
43
+        if ( ! empty(EE_Load_Textdomain::$locale)) {
44
+            $github_mo_path = EE_LANGUAGES_SAFE_DIR.'event_espresso-'.EE_Load_Textdomain::$locale.'.mo';
45 45
             if (is_readable($github_mo_path)) {
46 46
                 load_plugin_textdomain('event_espresso', false, EE_LANGUAGES_SAFE_LOC);
47 47
                 return;
48 48
             }
49
-            $glotpress_mo_path = EE_LANGUAGES_SAFE_DIR . 'event-espresso-4-' . EE_Load_Textdomain::$locale . '.mo';
49
+            $glotpress_mo_path = EE_LANGUAGES_SAFE_DIR.'event-espresso-4-'.EE_Load_Textdomain::$locale.'.mo';
50 50
             if (is_readable($glotpress_mo_path)) {
51 51
                 load_textdomain('event_espresso', $glotpress_mo_path);
52 52
                 return;
53 53
             }
54 54
         }
55
-        load_plugin_textdomain('event_espresso', false, dirname(EE_PLUGIN_BASENAME) . '/languages/');
55
+        load_plugin_textdomain('event_espresso', false, dirname(EE_PLUGIN_BASENAME).'/languages/');
56 56
     }
57 57
 
58 58
 
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
 
90 90
         // load sideloader and sideload the .POT file as this should always be included.
91 91
         $sideloader_args = array(
92
-            '_upload_to'     => EE_PLUGIN_DIR_PATH . 'languages/',
93
-            '_download_from' => EE_Load_Textdomain::REPO_BASE_URL . '.pot',
92
+            '_upload_to'     => EE_PLUGIN_DIR_PATH.'languages/',
93
+            '_download_from' => EE_Load_Textdomain::REPO_BASE_URL.'.pot',
94 94
             '_new_file_name' => 'event_espresso.pot',
95 95
         );
96 96
         /** @var EEH_Sideloader $sideloader */
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
             $loaded_text_domains->versionLoaded(EE_Load_Textdomain::$locale, EVENT_ESPRESSO_VERSION);
107 107
             return;
108 108
         }
109
-        $repo_locale_URL = EE_Load_Textdomain::REPO_BASE_URL . '-' . EE_Load_Textdomain::$locale;
110
-        $file_name_base = 'event_espresso-' . EE_Load_Textdomain::$locale;
109
+        $repo_locale_URL = EE_Load_Textdomain::REPO_BASE_URL.'-'.EE_Load_Textdomain::$locale;
110
+        $file_name_base = 'event_espresso-'.EE_Load_Textdomain::$locale;
111 111
 
112 112
         // made it here so let's get the language files from the GitHub repo, first the .mo file
113 113
         $sideloader->set_download_from("$repo_locale_URL.mo");
Please login to merge, or discard this patch.