GravityView  2.1.1
The best, easiest way to display Gravity Forms entries on your website.
Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes | Private Member Functions | Static Private Attributes
Plugin Class Reference

If this file is called directly, abort. More...

Public Member Functions

 activate ()
 Plugin activation function. More...
 
 deactivate ()
 Plugin deactivation function. More...
 
 dir ( $path='')
 Retrieve an absolute path within the Gravity Forms plugin directory. More...
 
 include_legacy_core ()
 Load more legacy core files. More...
 
 include_legacy_frontend ( $force=false)
 Include more legacy stuff. More...
 
 is_compatible ()
 Is everything compatible with this version of GravityView? More...
 
 is_compatible_future_gravityforms ()
 Is this version of GravityView compatible with the future version of Gravity Forms? More...
 
 is_compatible_future_php ()
 Is this version of GravityView compatible with the future required version of PHP? More...
 
 is_compatible_gravityforms ()
 Is this version of GravityView compatible with the current version of Gravity Forms? More...
 
 is_compatible_php ()
 Is this version of GravityView compatible with the current version of PHP? More...
 
 is_compatible_wordpress ( $version=null)
 Is this version of GravityView compatible with the current version of WordPress? More...
 
 load_license_settings ()
 
 load_textdomain ()
 Load the translations. More...
 
 register_activation_hooks ()
 Register hooks that are fired when the plugin is activated and deactivated. More...
 
 supports ( $feature)
 Feature support detection. More...
 
 uninstall ()
 Delete GravityView Views, settings, roles, caps, etc. More...
 
 url ( $path='/')
 Retrieve a URL within the Gravity Forms plugin directory. More...
 

Static Public Member Functions

static get ()
 Get the global instance of . More...
 
static is_network_activated ()
 Check whether GravityView is network activated. More...
 

Data Fields

 $settings
 
const FEATURE_GFQUERY = 'gfquery'
 
const FEATURE_JOINS = 'joins'
 
const FEATURE_REST = 'rest_api'
 

Static Public Attributes

static $min_gf_version = GV_MIN_GF_VERSION
 
static $version = GV_PLUGIN_VERSION
 

Private Member Functions

 __clone ()
 
 __construct ()
 
 __wakeup ()
 
 get_gravityforms_version ()
 Retrieve the current Gravity Forms version. More...
 
 get_php_version ()
 Retrieve the current PHP version. More...
 
 get_wordpress_version ()
 Retrieve the current WordPress version. More...
 

Static Private Attributes

static $__instance = null
 
static $future_min_gf_version = GV_FUTURE_MIN_GF_VERSION
 
static $future_min_php_version = GV_FUTURE_MIN_PHP_VERSION
 
static $min_php_version = GV_MIN_PHP_VERSION
 
static $min_wp_version = GV_MIN_WP_VERSION
 

Detailed Description

If this file is called directly, abort.

The GravityView WordPress plugin class.

Contains functionality related to GravityView being a WordPress plugin and doing WordPress pluginy things.

Accessible via gravityview()->plugin

Definition at line 17 of file class-gv-plugin.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )
private

Load translations.

Load some frontend-related legacy files.

GFAddOn-backed settings, licensing.

Definition at line 102 of file class-gv-plugin.php.

Member Function Documentation

◆ __clone()

__clone ( )
private

Definition at line 571 of file class-gv-plugin.php.

◆ __wakeup()

__wakeup ( )
private

Definition at line 573 of file class-gv-plugin.php.

◆ activate()

activate ( )

Plugin activation function.

Register the gravityview post type upon WordPress core init.

Add the entry rewrite endpoint.

Flush all URL rewrites.

Add the transient to redirect to configuration page.

Clear settings transient.

Definition at line 273 of file class-gv-plugin.php.

References GravityView_Roles_Capabilities\get_instance(), and gravityview().

◆ deactivate()

deactivate ( )

Plugin deactivation function.

Definition at line 304 of file class-gv-plugin.php.

◆ dir()

dir (   $path = '')

Retrieve an absolute path within the Gravity Forms plugin directory.

Since
2.0
Parameters
string$pathOptional. Append this extra path component.
Returns
string The absolute path to the plugin directory.

Definition at line 317 of file class-gv-plugin.php.

References GRAVITYVIEW_DIR.

◆ get()

static get ( )
static

Get the global instance of .

Returns
The global instance of GravityView Plugin.

Definition at line 94 of file class-gv-plugin.php.

◆ get_gravityforms_version()

get_gravityforms_version ( )
private

Retrieve the current Gravity Forms version.

Overridable with GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE during testing.

Returns
string|null The version of Gravity Forms or null if inactive.

Definition at line 449 of file class-gv-plugin.php.

References gravityview().

◆ get_php_version()

get_php_version ( )
private

Retrieve the current PHP version.

Overridable with GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE during testing.

Returns
string The version of PHP.

Definition at line 425 of file class-gv-plugin.php.

◆ get_wordpress_version()

get_wordpress_version ( )
private

Retrieve the current WordPress version.

Overridable with GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE during testing.

Returns
string The version of WordPress.

Definition at line 437 of file class-gv-plugin.php.

◆ include_legacy_core()

include_legacy_core ( )

Load more legacy core files.

Returns
void
Since
1.8.4

Definition at line 173 of file class-gv-plugin.php.

◆ include_legacy_frontend()

include_legacy_frontend (   $force = false)

Include more legacy stuff.

Parameters
boolean$forceWhether to force the includes.
Returns
void
Runs Actions:
gravityview_include_frontend_actions Triggered after all GravityView frontend files are loaded

Nice place to insert extensions' frontend stuff

Definition at line 146 of file class-gv-plugin.php.

References gravityview().

◆ is_compatible()

is_compatible ( )

Is everything compatible with this version of GravityView?

Since
2.0
Returns
bool

Definition at line 342 of file class-gv-plugin.php.

◆ is_compatible_future_gravityforms()

is_compatible_future_gravityforms ( )

Is this version of GravityView compatible with the future version of Gravity Forms?

Since
2.0
Returns
bool true if compatible, false otherwise (or not active/installed).

Definition at line 413 of file class-gv-plugin.php.

◆ is_compatible_future_php()

is_compatible_future_php ( )

Is this version of GravityView compatible with the future required version of PHP?

Since
2.0
Returns
bool true if compatible, false otherwise.

Definition at line 369 of file class-gv-plugin.php.

◆ is_compatible_gravityforms()

is_compatible_gravityforms ( )

Is this version of GravityView compatible with the current version of Gravity Forms?

Since
2.0
Returns
bool true if compatible, false otherwise (or not active/installed).

Definition at line 400 of file class-gv-plugin.php.

◆ is_compatible_php()

is_compatible_php ( )

Is this version of GravityView compatible with the current version of PHP?

Since
2.0
Returns
bool true if compatible, false otherwise.

Definition at line 357 of file class-gv-plugin.php.

◆ is_compatible_wordpress()

is_compatible_wordpress (   $version = null)

Is this version of GravityView compatible with the current version of WordPress?

Since
2.0
Parameters
string$versionVersion to check against; otherwise uses GV_MIN_WP_VERSION
Returns
bool true if compatible, false otherwise.

Definition at line 383 of file class-gv-plugin.php.

◆ is_network_activated()

static is_network_activated ( )
static

Check whether GravityView is network activated.

Returns
bool Whether it's network activated or not.

Definition at line 135 of file class-gv-plugin.php.

◆ load_license_settings()

load_license_settings ( )

Definition at line 119 of file class-gv-plugin.php.

References gravityview().

◆ load_textdomain()

load_textdomain ( )

Load the translations.

Returns
void

Definition at line 234 of file class-gv-plugin.php.

◆ register_activation_hooks()

register_activation_hooks ( )

Register hooks that are fired when the plugin is activated and deactivated.

Returns
void

Definition at line 262 of file class-gv-plugin.php.

◆ supports()

supports (   $feature)

Feature support detection.

Parameters
string$featureFeature name. Check FEATURE_* class constants.
Returns
boolean

Definition at line 466 of file class-gv-plugin.php.

◆ uninstall()

uninstall ( )

Delete GravityView Views, settings, roles, caps, etc.

Returns
void

Posts.

Meta.

Notes.

Capabilities.

Options.

Definition at line 487 of file class-gv-plugin.php.

References GravityView_GFFormsModel\get_database_version(), and GravityView_Roles_Capabilities\get_instance().

◆ url()

url (   $path = '/')

Retrieve a URL within the Gravity Forms plugin directory.

Since
2.0
Parameters
string$pathOptional. Extra path appended to the URL.
Returns
string The URL to this plugin, with trailing slash.

Definition at line 330 of file class-gv-plugin.php.

Field Documentation

◆ $__instance

$__instance = null
staticprivate

Definition at line 64 of file class-gv-plugin.php.

◆ $future_min_gf_version

$future_min_gf_version = GV_FUTURE_MIN_GF_VERSION
staticprivate

Definition at line 59 of file class-gv-plugin.php.

◆ $future_min_php_version

$future_min_php_version = GV_FUTURE_MIN_PHP_VERSION
staticprivate

Definition at line 52 of file class-gv-plugin.php.

◆ $min_gf_version

$min_gf_version = GV_MIN_GF_VERSION
static

Definition at line 38 of file class-gv-plugin.php.

◆ $min_php_version

$min_php_version = GV_MIN_PHP_VERSION
staticprivate

Definition at line 45 of file class-gv-plugin.php.

◆ $min_wp_version

$min_wp_version = GV_MIN_WP_VERSION
staticprivate

Definition at line 31 of file class-gv-plugin.php.

◆ $settings

$settings

Definition at line 72 of file class-gv-plugin.php.

◆ $version

$version = GV_PLUGIN_VERSION
static

Definition at line 24 of file class-gv-plugin.php.

Referenced by GravityView_Support_Port\_localize_script().

◆ FEATURE_GFQUERY

const FEATURE_GFQUERY = 'gfquery'

◆ FEATURE_JOINS

const FEATURE_JOINS = 'joins'

Definition at line 82 of file class-gv-plugin.php.

◆ FEATURE_REST

const FEATURE_REST = 'rest_api'

Definition at line 87 of file class-gv-plugin.php.

Referenced by Core\init().


The documentation for this class was generated from the following file: