PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.38
Timetics – Appointment Booking Calendar & Scheduling v1.0.38
1.0.61 1.0.60 1.0.59 1.0.58 1.0.57 1.0.56 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.24 All 62 releases
← All changes | timetics.php +18 -101 1.0.601.0.38 View file →
@@ -1,11 +1,11 @@
1 1 <?php
2 2
3 3 /**
4 - * Plugin Name: Timetics - Appointment Booking Calendar & Scheduling System
4 + * Plugin Name: Timetics
5 5 * Plugin URI: https://arraytics.com/timetics/
6 6 * Description: Schedule, Appointment and Seat Booking plugin.
7 - * Version: 1.0.60
7 + * Version: 1.0.38
8 8 * Requires at least: 5.2
9 9 * Requires PHP: 7.3
10 10 * Author: Arraytics
11 11 * Author URI: https://arraytics.com/
@@ -55,9 +55,9 @@
55 55 *
56 56 * @return string
57 57 */
58 58 public static function get_version() {
59 - return '1.0.60';
59 + return '1.0.38';
60 60 }
61 61
62 62 /**
63 63 * Requirements Array
@@ -116,26 +116,13 @@
116 116 * @since 1.0
117 117 * @return void
118 118 */
119 119 public function load_text_domain() {
120 - $locale = determine_locale();
121 - $locale = apply_filters( 'plugin_locale', $locale, 'timetics' );
122 - $locale = apply_filters( 'timetics_plugin_locale', $locale, 'timetics' );
120 + $locale = apply_filters( 'plugin_locale', get_user_locale(), 'timetics' );
123 121
124 - $mofile = 'timetics-' . $locale . '.mo';
125 -
126 - // Loco "Custom" location.
127 - if ( file_exists( WP_LANG_DIR . '/loco/plugins/' . $mofile ) ) {
128 - load_textdomain( 'timetics', WP_LANG_DIR . '/loco/plugins/' . $mofile );
129 - }
130 -
131 - // Loco "System" location.
132 - if ( file_exists( WP_LANG_DIR . '/plugins/' . $mofile ) ) {
133 - load_textdomain( 'timetics', WP_LANG_DIR . '/plugins/' . $mofile );
134 - }
135 -
136 - // Loco "Author" location (plugin's own /languages/).
137 - load_plugin_textdomain( 'timetics', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
122 + unload_textdomain( 'timetics' );
123 + load_textdomain( 'timetics', WP_LANG_DIR . '/timetics/timetics-' . $locale . '.mo' );
124 + load_plugin_textdomain( 'timetics', false, self::get_plugin_dir() . 'languages/' );
138 125 }
139 126
140 127 /**
141 128 * Initialize Plugin Modules
@@ -239,58 +226,19 @@
239 226 if (file_exists(plugin_dir_path( __FILE__ ) . '/vendor/autoload.php')) {
240 227 require_once plugin_dir_path( __FILE__ ) . '/vendor/autoload.php';
241 228 }
242 229
243 - if (class_exists('UninstallerForm\UninstallerForm') && is_callable(['\UninstallerForm\UninstallerForm', 'init'])) {
244 -
245 - $reflection = new ReflectionMethod('\UninstallerForm\UninstallerForm', 'init');
246 -
247 - // Maximum number of parameters allowed
248 - $totalParams = $reflection->getNumberOfParameters();
249 -
250 - if($totalParams === 6) {
251 - add_filter( 'rest_request_before_callbacks', function( $response, $handler, $request ) {
252 - if ( $request->get_route() === '/timetics/v1/feedback' ) {
253 - $params = $request->get_json_params();
254 -
255 - if ( empty( $params['email'] ) ) {
256 - $params['email'] = get_option( 'admin_email' );
257 - $request->set_body( wp_json_encode( $params ) );
258 - }
259 - }
260 - return $response;
261 - }, 10, 3 );
262 -
263 - \UninstallerForm\UninstallerForm::init(
264 - 'Timetics', // Plugin name
265 - 'timetics', // Plugin Slug
266 - __FILE__,
267 - 'timetics', // Text Domain Name
268 - 'timetics-feedback-modal', // plugins-admin-script-handler
269 - 'https://arraytics.com/?fluentcrm=1&route=contact&hash=13cce8a6-c038-4997-91e7-4a2326cc1124'
270 - );
271 - } else {
272 - add_filter( 'rest_request_before_callbacks', function( $response, $handler, $request ) {
273 - if ( $request->get_route() === '/timetics/v1/feedback' ) {
274 - $params = $request->get_json_params();
275 -
276 - if ( empty( $params['email'] ) ) {
277 - $params['email'] = get_option( 'admin_email' );
278 - $request->set_body( wp_json_encode( $params ) );
279 - }
280 - }
281 - return $response;
282 - }, 10, 3 );
283 -
284 - \UninstallerForm\UninstallerForm::init(
285 - 'Timetics', // Plugin name
286 - 'timetics', // Plugin Slug
287 - __FILE__,
288 - 'timetics', // Text Domain Name
289 - 'timetics-feedback-modal'
290 - );
291 - }
292 - }
230 + if ( class_exists( 'UninstallerForm\UninstallerForm' ) ) {
231 + $uninstaller_form = new \UninstallerForm\UninstallerForm();
232 + $uninstaller_form->init(
233 + 'Timetics', // Plugin name
234 + 'timetics', // Plugin Slug
235 + __FILE__,
236 + 'timetics', // Text Domain Name
237 + 'timetics-feedback-modal', // plugins-admin-script-handler
238 + 'https://arraytics.com/?fluentcrm=1&route=contact&hash=13cce8a6-c038-4997-91e7-4a2326cc1124'
239 + );
240 + }
293 241 }
294 242
295 243 /**
296 244 * Called Only Once While Activation
@@ -309,11 +257,8 @@
309 257
310 258 // Create new woocommerce product category for timetics meeting
311 259 timetics_add_woocommerce_product_cat();
312 260
313 - // Force rewrite-rule flush on activation; the maybe_flush_rules guard handles subsequent upgrades.
314 - delete_option( 'timetics_rewrite_version' );
315 -
316 261 // Update option for onboard settings.
317 262 $timetics_onboard_setup = get_option( 'timetics_onboard_setup' );
318 263
319 264 $timetics_demo_data = get_option( 'timetics_demo_data' );
@@ -372,34 +317,6 @@
372 317 public static function get_plugin_dir() {
373 318 return trailingslashit( plugin_dir_path( self::get_plugin_file() ) );
374 319 }
375 320 }
376 -
377 -/**
378 - * Add a "Go Pro" action link on the Plugins page.
379 - * Hidden when the pro plugin already exists.
380 - */
381 -if ( ! function_exists( 'timetics_add_go_pro_action_link' ) ) {
382 - function timetics_add_go_pro_action_link( $links ) {
383 - if ( ! function_exists( 'get_plugins' ) ) {
384 - require_once ABSPATH . 'wp-admin/includes/plugin.php';
385 - }
386 -
387 - foreach ( get_plugins() as $plugin ) {
388 - if ( isset( $plugin['TextDomain'] ) && 'timetics-pro' === $plugin['TextDomain'] ) {
389 - return $links;
390 - }
391 - }
392 -
393 - $go_pro = sprintf(
394 - '<a href="%1$s" target="_blank" rel="noopener noreferrer" style="color:#e8364c;font-weight:600;">%2$s</a>',
395 - esc_url( 'https://arraytics.com/timetics/pricing/' ),
396 - esc_html__( 'Go Pro', 'timetics' )
397 - );
398 -
399 - $links[] = $go_pro;
400 - return $links;
401 - }
402 -}
403 -add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'timetics_add_go_pro_action_link' );
404 321
405 322 Timetics::get_instance();