Completed
Push — master ( 62b222...3fdac6 )
by
unknown
07:01
created

google-calendar-events.php (2 issues)

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
 * Author:      Moonstone Media
7
 * Author URI:  https://simplecalendar.io
8
 * Version:     3.1.1
9
 * Text Domain: google-calendar-events
10
 * Domain Path: /i18n
11
 *
12
 * @copyright   2015-2016 Moonstone Media/Phil Derksen. 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 = array(
24
	'SIMPLE_CALENDAR_VERSION'   => '3.1.1',
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
);
31
foreach ( $this_plugin_constants as $constant => $value ) {
32
	if ( ! defined( $constant ) ) {
33
		define( $constant, $value );
34
	}
35
}
36
37
// Plugin requirements
38
39
include_once 'includes/wp-requirements.php';
40
41
// Check plugin requirements before loading plugin.
42
$this_plugin_checks = new SimCal_WP_Requirements( 'Simple Calendar', plugin_basename( __FILE__ ), array(
43
		'PHP'        => '5.3.3',
44
		'WordPress'  => '4.1',
45
		'Extensions' => array(
46
			'curl',
47
			'iconv',
48
			'json',
49
			'mbstring',
50
		),
51
	) );
0 ignored issues
show
This line of the multi-line function call does not seem to be indented correctly. Expected 0 spaces, but found 4.
Loading history...
52
if ( $this_plugin_checks->pass() === false ) {
0 ignored issues
show
Found "=== false". Use Yoda Condition checks, you must
Loading history...
53
	$this_plugin_checks->halt();
54
55
	return;
56
}
57
58
include_once 'vendor/autoload.php';
59
60
// Load plugin.
61
include_once 'includes/main.php';
62