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 +16 -82 1.0.561.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.56
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.56';
59 + return '1.0.38';
60 60 }
61 61
62 62 /**
63 63 * Requirements Array
@@ -116,12 +116,13 @@
116 116 * @since 1.0
117 117 * @return void
118 118 */
119 119 public function load_text_domain() {
120 - $locale = apply_filters( 'timetics_plugin_locale', get_user_locale(), 'timetics' );
120 + $locale = apply_filters( 'plugin_locale', get_user_locale(), 'timetics' );
121 121
122 122 unload_textdomain( 'timetics' );
123 123 load_textdomain( 'timetics', WP_LANG_DIR . '/timetics/timetics-' . $locale . '.mo' );
124 + load_plugin_textdomain( 'timetics', false, self::get_plugin_dir() . 'languages/' );
124 125 }
125 126
126 127 /**
127 128 * Initialize Plugin Modules
@@ -225,58 +226,19 @@
225 226 if (file_exists(plugin_dir_path( __FILE__ ) . '/vendor/autoload.php')) {
226 227 require_once plugin_dir_path( __FILE__ ) . '/vendor/autoload.php';
227 228 }
228 229
229 - if (class_exists('UninstallerForm\UninstallerForm') && is_callable(['\UninstallerForm\UninstallerForm', 'init'])) {
230 -
231 - $reflection = new ReflectionMethod('\UninstallerForm\UninstallerForm', 'init');
232 -
233 - // Maximum number of parameters allowed
234 - $totalParams = $reflection->getNumberOfParameters();
235 -
236 - if($totalParams === 6) {
237 - add_filter( 'rest_request_before_callbacks', function( $response, $handler, $request ) {
238 - if ( $request->get_route() === '/timetics/v1/feedback' ) {
239 - $params = $request->get_json_params();
240 -
241 - if ( empty( $params['email'] ) ) {
242 - $params['email'] = get_option( 'admin_email' );
243 - $request->set_body( wp_json_encode( $params ) );
244 - }
245 - }
246 - return $response;
247 - }, 10, 3 );
248 -
249 - \UninstallerForm\UninstallerForm::init(
250 - 'Timetics', // Plugin name
251 - 'timetics', // Plugin Slug
252 - __FILE__,
253 - 'timetics', // Text Domain Name
254 - 'timetics-feedback-modal', // plugins-admin-script-handler
255 - 'https://arraytics.com/?fluentcrm=1&route=contact&hash=13cce8a6-c038-4997-91e7-4a2326cc1124'
256 - );
257 - } else {
258 - add_filter( 'rest_request_before_callbacks', function( $response, $handler, $request ) {
259 - if ( $request->get_route() === '/timetics/v1/feedback' ) {
260 - $params = $request->get_json_params();
261 -
262 - if ( empty( $params['email'] ) ) {
263 - $params['email'] = get_option( 'admin_email' );
264 - $request->set_body( wp_json_encode( $params ) );
265 - }
266 - }
267 - return $response;
268 - }, 10, 3 );
269 -
270 - \UninstallerForm\UninstallerForm::init(
271 - 'Timetics', // Plugin name
272 - 'timetics', // Plugin Slug
273 - __FILE__,
274 - 'timetics', // Text Domain Name
275 - 'timetics-feedback-modal'
276 - );
277 - }
278 - }
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 + }
279 241 }
280 242
281 243 /**
282 244 * Called Only Once While Activation
@@ -355,34 +317,6 @@
355 317 public static function get_plugin_dir() {
356 318 return trailingslashit( plugin_dir_path( self::get_plugin_file() ) );
357 319 }
358 320 }
359 -
360 -/**
361 - * Add a "Go Pro" action link on the Plugins page.
362 - * Hidden when the pro plugin already exists.
363 - */
364 -if ( ! function_exists( 'timetics_add_go_pro_action_link' ) ) {
365 - function timetics_add_go_pro_action_link( $links ) {
366 - if ( ! function_exists( 'get_plugins' ) ) {
367 - require_once ABSPATH . 'wp-admin/includes/plugin.php';
368 - }
369 -
370 - foreach ( get_plugins() as $plugin ) {
371 - if ( isset( $plugin['TextDomain'] ) && 'timetics-pro' === $plugin['TextDomain'] ) {
372 - return $links;
373 - }
374 - }
375 -
376 - $go_pro = sprintf(
377 - '<a href="%1$s" target="_blank" rel="noopener noreferrer" style="color:#e8364c;font-weight:600;">%2$s</a>',
378 - esc_url( 'https://arraytics.com/timetics/pricing/' ),
379 - esc_html__( 'Go Pro', 'timetics' )
380 - );
381 -
382 - $links[] = $go_pro;
383 - return $links;
384 - }
385 -}
386 -add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'timetics_add_go_pro_action_link' );
387 321
388 322 Timetics::get_instance();