Code

< 40 %
40-60 %
> 60 %
1
<?php
2
/**
3
 * Plugin Name:       	GravityView
4
 * Plugin URI:        	https://www.gravitykit.com
5
 * Description:       	The best, easiest way to display Gravity Forms entries on your website.
6
 * Version:             2.17.1
7
 * Author:            	GravityKit
8
 * Author URI:        	https://www.gravitykit.com
9
 * Text Domain:       	gk-gravityview
10
 * License:           	GPLv2 or later
11
 * License URI: 		http://www.gnu.org/licenses/gpl-2.0.html
12
 */
13
14
/** If this file is called directly, abort. */
15
if ( ! defined( 'ABSPATH' ) ) {
16
	die;
17
}
18
19
require_once __DIR__ . '/vendor_prefixed/gravitykit/foundation/src/preflight_check.php';
20
21
if ( ! GravityKit\GravityView\Foundation\should_load( __FILE__ ) ) {
22
	return;
23
}
24
25
if ( ! GravityKit\GravityView\Foundation\meets_min_php_version_requirement( __FILE__, '7.2.0' ) ) {
26
	return;
27
}
28
29
/** Constants */
30
31
/**
32
 * The plugin version.
33
 */
34
define( 'GV_PLUGIN_VERSION', '2.17.1' );
35
36
/**
37
 * Full path to the GravityView file
38
 * @define "GRAVITYVIEW_FILE" "./gravityview.php"
39
 */
40
define( 'GRAVITYVIEW_FILE', __FILE__ );
41
42
/**
43
 * The URL to this file, with trailing slash
44
 */
45
define( 'GRAVITYVIEW_URL', plugin_dir_url( __FILE__ ) );
46
47
48
/** @define "GRAVITYVIEW_DIR" "./" The absolute path to the plugin directory, with trailing slash */
49
define( 'GRAVITYVIEW_DIR', plugin_dir_path( __FILE__ ) );
50
51
/**
52
 * GravityView requires at least this version of Gravity Forms to function properly.
53
 */
54
define( 'GV_MIN_GF_VERSION', '2.3.3.9' );
55
56
/**
57
 * GravityView will soon require at least this version of Gravity Forms to function properly.
58
 * @since 1.19.4
59
 */
60
define( 'GV_FUTURE_MIN_GF_VERSION', '2.5.0' );
61
62
/**
63
 * GravityView requires at least this version of WordPress to function properly.
64
 * @since 1.12
65
 */
66
define( 'GV_MIN_WP_VERSION', '4.7.0' );
67
68
/**
69
 * GravityView will soon require at least this version of WordPress to function properly.
70
 * @since 2.9.3
71
 */
72
define( 'GV_FUTURE_MIN_WP_VERSION', '5.3' );
73
74
/**
75
 * GravityView requires at least this version of PHP to function properly.
76
 * @since 1.12
77
 */
78
define( 'GV_MIN_PHP_VERSION', '7.2.0' );
79
80
/**
81
 * GravityView will require this version of PHP soon. False if no future PHP version changes are planned.
82
 * @since 1.19.2
83
 * @var string|false
84
 */
85
define( 'GV_FUTURE_MIN_PHP_VERSION', '7.4.0' );
86
87
/**
88
 * The future is here and now.
89
 */
90
require GRAVITYVIEW_DIR . 'future/loader.php';
91
92
add_action( 'plugins_loaded', function () {
93
	/**
94
	 * GravityView_Plugin is only used by the legacy class-gravityview-extension.php that's shipped with extensions.
95
	 *
96
	 * @TODO Remove once all extensions have been updated to use Foundation.
97
	 */
98
	final class GravityView_Plugin {
99
		const version = GV_PLUGIN_VERSION;
100
	}
101
}, 5 );
102