Completed
Push — master ( a00b53...3dc4d8 )
by
unknown
21:18
created

google-calendar-events.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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
 * Version:     3.0.13
7
 * Author:      Moonstone Media
8
 * Author URI:  https://simplecalendar.io
9
 * Text Domain: google-calendar-events
10
 * Domain Path: /i18n
11
 *
12
 * @package     SimpleCalendar
13
 * @copyright   2015 Moonstone Media/Phil Derksen. All rights reserved.
14
 */
15
16
// Exit if accessed directly.
17
if ( ! defined( 'ABSPATH' ) ) {
18
	exit;
19
}
20
21
// Composer fallback for PHP < 5.3.0.
22
if ( version_compare( PHP_VERSION, '5.3.0' ) === -1 ) {
23
	include_once 'vendor/autoload_52.php';
24
} else {
25
	include_once 'vendor/autoload.php';
26
}
27
28
// Plugin constants.
29
$this_plugin_path      = trailingslashit( dirname( __FILE__ ) );
30
$this_plugin_dir       = plugin_dir_url( __FILE__ );
31
$this_plugin_constants = array(
32
	'SIMPLE_CALENDAR_VERSION'   => '3.0.13',
33
	'SIMPLE_CALENDAR_MAIN_FILE' => __FILE__,
34
	'SIMPLE_CALENDAR_URL'       => $this_plugin_dir,
35
	'SIMPLE_CALENDAR_ASSETS'    => $this_plugin_dir . 'assets/',
36
	'SIMPLE_CALENDAR_PATH'      => $this_plugin_path,
37
	'SIMPLE_CALENDAR_INC'       => $this_plugin_path . 'includes/',
38
);
39
foreach ( $this_plugin_constants as $constant => $value ) {
40
	if ( ! defined( $constant ) ) {
41
		define( $constant, $value );
42
	}
43
}
44
45
// Plugin requirements
46
47
include_once 'includes/wp-requirements.php';
48
49
// Check plugin requirements before loading plugin.
50
$this_plugin_checks = new SimCal_WP_Requirements( 'Simple Calendar', plugin_basename( __FILE__ ), array(
51
		'PHP'        => '5.3.3',
52
		'WordPress'  => '4.0.0',
53
		'Extensions' => array(
54
			'curl',
55
			'iconv',
56
			'json',
57
			'mbstring',
58
		),
59
	) );
60
if ( $this_plugin_checks->pass() === false ) {
0 ignored issues
show
Found "=== false". Use Yoda Condition checks, you must
Loading history...
61
	$this_plugin_checks->halt();
62
63
	return;
64
}
65
66
// Load plugin.
67
include_once 'includes/main.php';
68