| @@ -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.62 | |
| 7 | + * Version: 1.0.49 | |
| 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.62'; | |
| 59 | + return '1.0.49'; | |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | 63 | * Requirements Array |
| @@ -116,31 +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 | - // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- WordPress core localization hook. | |
| 122 | - $locale = apply_filters( 'plugin_locale', $locale, 'timetics' ); | |
| 123 | - $locale = apply_filters( 'timetics_plugin_locale', $locale, 'timetics' ); | |
| 120 | + $locale = apply_filters( 'plugin_locale', get_user_locale(), 'timetics' ); | |
| 124 | 121 | |
| 125 | - $mofile = 'timetics-' . $locale . '.mo'; | |
| 126 | - | |
| 127 | - // Loco "Custom" location. | |
| 128 | - if ( file_exists( WP_LANG_DIR . '/loco/plugins/' . $mofile ) ) { | |
| 129 | - load_textdomain( 'timetics', WP_LANG_DIR . '/loco/plugins/' . $mofile ); | |
| 130 | - } | |
| 131 | - | |
| 132 | - // Loco "System" location. | |
| 133 | - if ( file_exists( WP_LANG_DIR . '/plugins/' . $mofile ) ) { | |
| 134 | - load_textdomain( 'timetics', WP_LANG_DIR . '/plugins/' . $mofile ); | |
| 135 | - } | |
| 136 | - | |
| 137 | - // Bundled translations remain available while WordPress loads language | |
| 138 | - // packs for this text domain automatically. | |
| 139 | - $bundled_mofile = plugin_dir_path( __FILE__ ) . 'languages/' . $mofile; | |
| 140 | - if ( file_exists( $bundled_mofile ) ) { | |
| 141 | - load_textdomain( 'timetics', $bundled_mofile ); | |
| 142 | - } | |
| 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/' ); | |
| 143 | 125 | } |
| 144 | 126 | |
| 145 | 127 | /** |
| 146 | 128 | * Initialize Plugin Modules |
| @@ -156,8 +138,9 @@ | ||
| 156 | 138 | |
| 157 | 139 | // block for showing banner. |
| 158 | 140 | require_once plugin_dir_path( __FILE__ ) . '/utils/notice/notice.php'; |
| 159 | 141 | require_once plugin_dir_path( __FILE__ ) . '/utils/banner/banner.php'; |
| 142 | + require_once plugin_dir_path( __FILE__ ) . '/utils/pro-awareness/pro-awareness.php'; | |
| 160 | 143 | |
| 161 | 144 | // Include the bootstrap file if not loaded. |
| 162 | 145 | if ( ! class_exists( 'Timetics\Bootstrap' ) ) { |
| 163 | 146 | require_once self::get_plugin_dir() . 'bootstrap.php'; |
| @@ -165,8 +148,11 @@ | ||
| 165 | 148 | |
| 166 | 149 | // init notice class. |
| 167 | 150 | \Oxaim\Libs\Notice::init(); |
| 168 | 151 | |
| 152 | + // init pro menu class. | |
| 153 | + \Wpmet\Libs\Pro_Awareness::init(); | |
| 154 | + | |
| 169 | 155 | // Initialize the bootstraper if exists. |
| 170 | 156 | if ( class_exists( 'Timetics\Bootstrap' ) ) { |
| 171 | 157 | |
| 172 | 158 | // Initialize all modules through plugins_loaded. |
| @@ -310,11 +296,8 @@ | ||
| 310 | 296 | |
| 311 | 297 | // Create new woocommerce product category for timetics meeting |
| 312 | 298 | timetics_add_woocommerce_product_cat(); |
| 313 | 299 | |
| 314 | - // Force rewrite-rule flush on activation; the maybe_flush_rules guard handles subsequent upgrades. | |
| 315 | - delete_option( 'timetics_rewrite_version' ); | |
| 316 | - | |
| 317 | 300 | // Update option for onboard settings. |
| 318 | 301 | $timetics_onboard_setup = get_option( 'timetics_onboard_setup' ); |
| 319 | 302 | |
| 320 | 303 | $timetics_demo_data = get_option( 'timetics_demo_data' ); |
| @@ -373,34 +356,6 @@ | ||
| 373 | 356 | public static function get_plugin_dir() { |
| 374 | 357 | return trailingslashit( plugin_dir_path( self::get_plugin_file() ) ); |
| 375 | 358 | } |
| 376 | 359 | } |
| 377 | - | |
| 378 | -/** | |
| 379 | - * Add a "Go Pro" action link on the Plugins page. | |
| 380 | - * Hidden when the pro plugin already exists. | |
| 381 | - */ | |
| 382 | -if ( ! function_exists( 'timetics_add_go_pro_action_link' ) ) { | |
| 383 | - function timetics_add_go_pro_action_link( $links ) { | |
| 384 | - if ( ! function_exists( 'get_plugins' ) ) { | |
| 385 | - require_once ABSPATH . 'wp-admin/includes/plugin.php'; | |
| 386 | - } | |
| 387 | - | |
| 388 | - foreach ( get_plugins() as $plugin ) { | |
| 389 | - if ( isset( $plugin['TextDomain'] ) && 'timetics-pro' === $plugin['TextDomain'] ) { | |
| 390 | - return $links; | |
| 391 | - } | |
| 392 | - } | |
| 393 | - | |
| 394 | - $go_pro = sprintf( | |
| 395 | - '<a href="%1$s" target="_blank" rel="noopener noreferrer" style="color:#e8364c;font-weight:600;">%2$s</a>', | |
| 396 | - esc_url( 'https://arraytics.com/timetics/pricing/' ), | |
| 397 | - esc_html__( 'Go Pro', 'timetics' ) | |
| 398 | - ); | |
| 399 | - | |
| 400 | - $links[] = $go_pro; | |
| 401 | - return $links; | |
| 402 | - } | |
| 403 | -} | |
| 404 | -add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'timetics_add_go_pro_action_link' ); | |
| 405 | 360 | |
| 406 | 361 | Timetics::get_instance(); |