| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Simple Calendar |
| 4 |
* Plugin URI: https://simplecalendar.io |
| 5 |
* Description: Add Google Calendar events to your WordPress site in minutes. Beautiful calendar displays. Fully responsive. |
| 6 |
* Author: Simple Calendar |
| 7 |
* Author URI: https://simplecalendar.io |
| 8 |
* Version: 4.2.0 |
| 9 |
* Text Domain: google-calendar-events |
| 10 |
* Domain Path: /i18n |
| 11 |
* |
| 12 |
* @copyright 2013-2023 Xtendify Technologies. All rights reserved. |
| 13 |
*/ |
| 14 |
|
| 15 |
// Exit if accessed directly. |
| 16 |
if (!defined('ABSPATH')) { |
| 17 |
exit(); |
| 18 |
} |
| 19 |
|
| 20 |
// Plugin constants. |
| 21 |
$this_plugin_path = trailingslashit(dirname(__FILE__)); |
| 22 |
$this_plugin_dir = plugin_dir_url(__FILE__); |
| 23 |
$this_plugin_constants = [ |
| 24 |
'SIMPLE_CALENDAR_VERSION' => '4.2.0', |
| 25 |
'SIMPLE_CALENDAR_MAIN_FILE' => __FILE__, |
| 26 |
'SIMPLE_CALENDAR_URL' => $this_plugin_dir, |
| 27 |
'SIMPLE_CALENDAR_ASSETS' => $this_plugin_dir . 'assets/', |
| 28 |
'SIMPLE_CALENDAR_PATH' => $this_plugin_path, |
| 29 |
'SIMPLE_CALENDAR_INC' => $this_plugin_path . 'includes/', |
| 30 |
'SIMPLE_CALENDAR_OAUTH_HELPER_AUTH_DOMAIN' => 'https://auth.simplecalendar.io/', |
| 31 |
]; |
| 32 |
foreach ($this_plugin_constants as $constant => $value) { |
| 33 |
if (!defined($constant)) { |
| 34 |
define($constant, $value); |
| 35 |
} |
| 36 |
} |
| 37 |
|
| 38 |
// Plugin requirements |
| 39 |
|
| 40 |
include_once 'includes/wp-requirements.php'; |
| 41 |
|
| 42 |
// Check plugin requirements before loading plugin. |
| 43 |
$this_plugin_checks = new SimCal_WP_Requirements('Simple Calendar', plugin_basename(__FILE__), [ |
| 44 |
'PHP' => '7.3', |
| 45 |
'WordPress' => '4.2', |
| 46 |
'Extensions' => ['curl', 'iconv', 'json', 'mbstring'], |
| 47 |
]); |
| 48 |
if ($this_plugin_checks->pass() === false) { |
| 49 |
$this_plugin_checks->halt(); |
| 50 |
|
| 51 |
return; |
| 52 |
} |
| 53 |
|
| 54 |
include_once 'third-party/vendor/autoload.php'; |
| 55 |
|
| 56 |
// Load plugin. |
| 57 |
include_once 'includes/main.php'; |
| 58 |
|