Completed
Push — master ( afae5e...fce50c )
by
unknown
03:06
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.11
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.11',
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
// Check plugin requirements before loading plugin.
46
$this_plugin_checks = new WP_Requirements(
47
	'Simple Calendar',
48
	plugin_basename( __FILE__ ),
49
	array(
50
		'PHP'       => '5.3.3',
51
		'WordPress' => '4.0.0',
52
		'Extensions' => array(
53
			'curl',
54
			'mbstring',
55
		)
56
	)
57
);
58
if ( $this_plugin_checks->pass() === false ) {
0 ignored issues
show
Found "=== false". Use Yoda Condition checks, you must
Loading history...
59
	$this_plugin_checks->halt();
60
	return;
61
}
62
63
// Load plugin.
64
include_once 'includes/main.php';
65