GravityView  2.10.1
The best, easiest way to display Gravity Forms entries on your website.
gravityview.php
Go to the documentation of this file.
1 <?php
2 /**
3  * Plugin Name: GravityView
4  * Plugin URI: https://gravityview.co
5  * Description: The best, easiest way to display Gravity Forms entries on your website.
6  * Version: 2.10.2.2
7  * Author: GravityView
8  * Author URI: https://gravityview.co
9  * Text Domain: gravityview
10  * License: GPLv2 or later
11  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12  * Domain Path: /languages
13  */
14 
15 /** If this file is called directly, abort. */
16 if ( ! defined( 'ABSPATH' ) ) {
17  die;
18 }
19 
20 /** Constants */
21 
22 /**
23  * The plugin version.
24  */
25 define( 'GV_PLUGIN_VERSION', '2.10.2.2' );
26 
27 /**
28  * Full path to the GravityView file
29  * @define "GRAVITYVIEW_FILE" "./gravityview.php"
30  */
31 define( 'GRAVITYVIEW_FILE', __FILE__ );
32 
33 /**
34  * The URL to this file, with trailing slash
35  */
36 define( 'GRAVITYVIEW_URL', plugin_dir_url( __FILE__ ) );
37 
38 
39 /** @define "GRAVITYVIEW_DIR" "./" The absolute path to the plugin directory, with trailing slash */
40 define( 'GRAVITYVIEW_DIR', plugin_dir_path( __FILE__ ) );
41 
42 /**
43  * GravityView requires at least this version of Gravity Forms to function properly.
44  */
45 define( 'GV_MIN_GF_VERSION', '2.3' );
46 
47 /**
48  * GravityView will soon require at least this version of Gravity Forms to function properly.
49  * @since 1.19.4
50  */
51 define( 'GV_FUTURE_MIN_GF_VERSION', '2.4' );
52 
53 /**
54  * GravityView requires at least this version of WordPress to function properly.
55  * @since 1.12
56  */
57 define( 'GV_MIN_WP_VERSION', '4.7.0' );
58 
59 /**
60  * GravityView will soon require at least this version of WordPress to function properly.
61  * @since 2.9.3
62  */
63 define( 'GV_FUTURE_MIN_WP_VERSION', '4.9.16' );
64 
65 /**
66  * GravityView requires at least this version of PHP to function properly.
67  * @since 1.12
68  */
69 define( 'GV_MIN_PHP_VERSION', '5.3.0' );
70 
71 /**
72  * GravityView will require this version of PHP soon. False if no future PHP version changes are planned.
73  * @since 1.19.2
74  * @var string|false
75  */
76 define( 'GV_FUTURE_MIN_PHP_VERSION', '5.6.30' );
77 
78 /**
79  * The future is here and now.
80  */
81 require GRAVITYVIEW_DIR . 'future/loader.php';
82 
83 /**
84  * GravityView_Plugin main class.
85  *
86  * @deprecated see `gravityview()->plugin` and `\GV\Plugin`
87  */
88 final class GravityView_Plugin {
89 
90  /**
91  * @deprecated Use \GV\Plugin::$version
92  */
94 
95  private static $instance;
96 
97  /**
98  * Singleton instance
99  *
100  * @deprecated See \GV\Plugin
101  *
102  * @return GravityView_Plugin GravityView_Plugin object
103  */
104  public static function getInstance() {
105  if ( empty( self::$instance ) ) {
106  self::$instance = new self;
107  }
108 
109  return self::$instance;
110  }
111 
112  /**
113  * @deprecated See \GV\Plugin
114  */
115  private function __construct() {
116  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
117  }
118 
119  /**
120  * Include global plugin files
121  *
122  * @deprecated Use gravityview()->plugin->include_legacy_core
123  *
124  * @since 1.12
125  */
126  public function include_files() {
127  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
128  gravityview()->plugin->include_legacy_core();
129  }
130 
131  /**
132  * Check whether GravityView is network activated
133  *
134  * @deprecated See \GV\Plugin
135  *
136  * @since 1.7.6
137  * @return bool
138  */
139  public static function is_network_activated() {
140  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
141  return gravityview()->plugin->is_network_activated();
142  }
143 
144 
145  /**
146  * Plugin activate function.
147  *
148  * @static
149  * @return void
150  */
151  public static function activate() {
152  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
153  }
154 
155 
156  /**
157  * Plugin deactivate function.
158  *
159  * @deprecated see \GV\Plugin::deactivate()
160  * @return void
161  */
162  public static function deactivate() {
163  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
164  }
165 
166  /**
167  * Include the extension class
168  *
169  * @deprecated The extension framework is included by default now.
170  *
171  * @since 1.5.1
172  * @return void
173  */
174  public static function include_extension_framework() {
175  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
176  }
177 
178  /**
179  * Load GravityView_Widget class
180  *
181  * @deprecated The widget class is loaded elsewhere in legacy core.
182  *
183  * @since 1.7.5.1
184  */
185  public static function include_widget_class() {
186  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
187  }
188 
189 
190  /**
191  * Loads the plugin's translated strings.
192  *
193  * @deprecated Use \GV\Plugin::load_textdomain()
194  *
195  * @return void
196  */
197  public function load_plugin_textdomain() {
198  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
199  gravityview()->plugin->load_textdomain();
200  }
201 
202  /**
203  * Check if is_admin(), and make sure not DOING_AJAX
204  * @since 1.7.5
205  * @deprecated
206  * @see \GV\Frontend_Request::is_admin via gravityview()->request->is_admin()
207  * @return bool
208  */
209  public static function is_admin() {
210  gravityview()->log->notice( '\GravityView_Plugin::is_admin() is deprecated. Use \GV\Request::is_admin() instead.' );
211  return gravityview()->request->is_admin();
212  }
213 
214  /**
215  * Function to launch frontend objects
216  *
217  * @since 1.17 Added $force param
218  *
219  *
220  * @param bool $force Whether to force loading
221  *
222  * @return void
223  */
224  public function frontend_actions( $force = false ) {
225  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
226  gravityview()->plugin->include_legacy_frontend( $force );
227  }
228 
229  /**
230  * Helper function to define the default widget areas.
231  *
232  * @deprecated Moved to GravityView_Widget::get_default_widget_areas()
233  *
234  * @return array definition for default widget areas
235  */
236  public static function get_default_widget_areas() {
238  }
239 
240  /** DEBUG */
241 
242  /**
243  * Logs messages using Gravity Forms logging add-on
244  * @param string $message log message
245  * @param mixed $data Additional data to display
246  * @deprecated use gravityview()->log
247  * @return void
248  */
249  public static function log_debug( $message, $data = null ){
250  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
251  gravityview()->log->debug( $message, $data );
252  }
253 
254  /**
255  * Logs messages using Gravity Forms logging add-on
256  * @param string $message log message
257  * @deprecated use gravityview()->log
258  * @return void
259  */
260  public static function log_error( $message, $data = null ){
261  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
262  gravityview()->log->error( $message, $data );
263  }
264 } // end class GravityView_Plugin
const GRAVITYVIEW_DIR
"GRAVITYVIEW_DIR" "./" The absolute path to the plugin directory, with trailing slash ...
Definition: gravityview.php:40
static deactivate()
Plugin deactivate function.
The future is here and now.
Definition: gravityview.php:88
include_files()
Include global plugin files.
static activate()
Plugin activate function.
static log_error( $message, $data=null)
Logs messages using Gravity Forms logging add-on.
static include_extension_framework()
Include the extension class.
load_plugin_textdomain()
Loads the plugin&#39;s translated strings.
static get_default_widget_areas()
Default widget areas.
gravityview()
Definition: _stubs.php:26
static get_default_widget_areas()
Helper function to define the default widget areas.
frontend_actions( $force=false)
Function to launch frontend objects.
const GV_PLUGIN_VERSION(! defined( 'ABSPATH'))
Plugin Name: GravityView Plugin URI: https://gravityview.co Description: The best, easiest way to display Gravity Forms entries on your website.
Definition: gravityview.php:25
static log_debug( $message, $data=null)
DEBUG.
static is_admin()
Check if is_admin(), and make sure not DOING_AJAX.
static is_network_activated()
Check whether GravityView is network activated.
static getInstance()
Singleton instance.
static include_widget_class()
Load GravityView_Widget class.