GravityView  2.1.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.1.1
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.1.1' );
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.1' );
46 
47 /**
48  * GravityView requires at least this version of WordPress to function properly.
49  * @since 1.12
50  */
51 define( 'GV_MIN_WP_VERSION', '4.4' );
52 
53 /**
54  * GravityView requires at least this version of PHP to function properly.
55  * @since 1.12
56  */
57 define( 'GV_MIN_PHP_VERSION', '5.3.0' );
58 
59 /**
60  * GravityView will require this version of PHP soon. False if no future PHP version changes are planned.
61  * @since 1.19.2
62  * @var string|false
63  */
64 define( 'GV_FUTURE_MIN_PHP_VERSION', '5.4' );
65 
66 /**
67  * GravityView will soon require at least this version of Gravity Forms to function properly.
68  * @since 1.19.4
69  */
70 define( 'GV_FUTURE_MIN_GF_VERSION', '2.3.0' );
71 
72 /**
73  * The future is here and now.
74  */
75 require GRAVITYVIEW_DIR . 'future/loader.php';
76 
77 /**
78  * GravityView_Plugin main class.
79  *
80  * @deprecated see `gravityview()->plugin` and `\GV\Plugin`
81  */
82 final class GravityView_Plugin {
83 
84  /**
85  * @deprecated Use \GV\Plugin::$version
86  */
88 
89  private static $instance;
90 
91  /**
92  * Singleton instance
93  *
94  * @deprecated See \GV\Plugin
95  *
96  * @return GravityView_Plugin GravityView_Plugin object
97  */
98  public static function getInstance() {
99  if ( empty( self::$instance ) ) {
100  self::$instance = new self;
101  }
102 
103  return self::$instance;
104  }
105 
106  /**
107  * @deprecated See \GV\Plugin
108  */
109  private function __construct() {
110  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
111  }
112 
113  /**
114  * Include global plugin files
115  *
116  * @deprecated Use gravityview()->plugin->include_legacy_core
117  *
118  * @since 1.12
119  */
120  public function include_files() {
121  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
122  gravityview()->plugin->include_legacy_core();
123  }
124 
125  /**
126  * Check whether GravityView is network activated
127  *
128  * @deprecated See \GV\Plugin
129  *
130  * @since 1.7.6
131  * @return bool
132  */
133  public static function is_network_activated() {
134  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
135  return gravityview()->plugin->is_network_activated();
136  }
137 
138 
139  /**
140  * Plugin activate function.
141  *
142  * @access public
143  * @static
144  * @return void
145  */
146  public static function activate() {
147  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
148  }
149 
150 
151  /**
152  * Plugin deactivate function.
153  *
154  * @access public
155  * @deprecated see \GV\Plugin::deactivate()
156  * @return void
157  */
158  public static function deactivate() {
159  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
160  }
161 
162  /**
163  * Include the extension class
164  *
165  * @deprecated The extension framework is included by default now.
166  *
167  * @since 1.5.1
168  * @return void
169  */
170  public static function include_extension_framework() {
171  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
172  }
173 
174  /**
175  * Load GravityView_Widget class
176  *
177  * @deprecated The widget class is loaded elsewhere in legacy core.
178  *
179  * @since 1.7.5.1
180  */
181  public static function include_widget_class() {
182  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
183  }
184 
185 
186  /**
187  * Loads the plugin's translated strings.
188  *
189  * @deprecated Use \GV\Plugin::load_textdomain()
190  *
191  * @access public
192  * @return void
193  */
194  public function load_plugin_textdomain() {
195  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
196  gravityview()->plugin->load_textdomain();
197  }
198 
199  /**
200  * Check if is_admin(), and make sure not DOING_AJAX
201  * @since 1.7.5
202  * @deprecated
203  * @see \GV\Frontend_Request::is_admin via gravityview()->request->is_admin()
204  * @return bool
205  */
206  public static function is_admin() {
207  gravityview()->log->notice( '\GravityView_Plugin::is_admin() is deprecated. Use \GV\Request::is_admin() instead.' );
208  return gravityview()->request->is_admin();
209  }
210 
211  /**
212  * Function to launch frontend objects
213  *
214  * @since 1.17 Added $force param
215  *
216  * @access public
217  *
218  * @param bool $force Whether to force loading
219  *
220  * @return void
221  */
222  public function frontend_actions( $force = false ) {
223  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
224  gravityview()->plugin->include_legacy_frontend( $force );
225  }
226 
227  /**
228  * Helper function to define the default widget areas.
229  *
230  * @deprecated Moved to GravityView_Widget::get_default_widget_areas()
231  *
232  * @return array definition for default widget areas
233  */
234  public static function get_default_widget_areas() {
236  }
237 
238  /** DEBUG */
239 
240  /**
241  * Logs messages using Gravity Forms logging add-on
242  * @param string $message log message
243  * @param mixed $data Additional data to display
244  * @deprecated use gravityview()->log
245  * @return void
246  */
247  public static function log_debug( $message, $data = null ){
248  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
249  gravityview()->log->debug( $message, $data );
250  }
251 
252  /**
253  * Logs messages using Gravity Forms logging add-on
254  * @param string $message log message
255  * @deprecated use gravityview()->log
256  * @return void
257  */
258  public static function log_error( $message, $data = null ){
259  gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
260  gravityview()->log->error( $message, $data );
261  }
262 } // 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:82
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.
Definition: gravityview.php:98
static include_widget_class()
Load GravityView_Widget class.