GravityView  2.10.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

 __clone ()
 
 __wakeup ()
 
 activate ()
 Plugin activation function. More...
 
 deactivate ()
 Plugin deactivation function. More...
 
 dir ( $path='')
 Retrieve an absolute path within the GravityView 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_future_wordpress ()
 Is this version of GravityView compatible with the future version of WordPress? 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...
 
 is_GF_25 ()
 Check whether Gravity Forms is v2.5-beta or newer. 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...
 
 relpath ( $path='')
 Retrieve a relative path to the GravityView plugin directory from the WordPress plugin directory. More...
 
 supports ( $feature)
 Feature support detection. More...
 
 uninstall ()
 Delete GravityView Views, settings, roles, caps, etc. More...
 
 url ( $path='/')
 Retrieve a URL within the GravityView 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'
 
const FEATURE_UNIONS = 'unions'
 

Static Public Attributes

static $min_gf_version = GV_MIN_GF_VERSION
 
static $version = GV_PLUGIN_VERSION
 

Private Member Functions

 __construct ()
 
 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 $future_min_wp_version = GV_FUTURE_MIN_WP_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 18 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 119 of file class-gv-plugin.php.

Member Function Documentation

◆ __clone()

__clone ( )

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

◆ __wakeup()

__wakeup ( )

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

◆ activate()

activate ( )

Plugin activation function.

Returns
void

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 327 of file class-gv-plugin.php.

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

◆ deactivate()

deactivate ( )

Plugin deactivation function.

Returns
void

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

◆ dir()

dir (   $path = '')

Retrieve an absolute path within the GravityView 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 377 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 110 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 551 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 525 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 538 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 207 of file class-gv-plugin.php.

References gravityview().

◆ 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 180 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 420 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 511 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 449 of file class-gv-plugin.php.

◆ is_compatible_future_wordpress()

is_compatible_future_wordpress ( )

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

Since
2.9.3
Returns
bool true if compatible, false otherwise

Definition at line 481 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 496 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 436 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 464 of file class-gv-plugin.php.

◆ is_GF_25()

is_GF_25 ( )

Check whether Gravity Forms is v2.5-beta or newer.

Returns
bool
Since

Definition at line 156 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 166 of file class-gv-plugin.php.

References GRAVITYVIEW_FILE.

◆ load_license_settings()

load_license_settings ( )

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

References gravityview().

◆ load_textdomain()

load_textdomain ( )

Load the translations.

Order of look-ups:

  1. /wp-content/languages/plugins/gravityview-{locale}.mo (loaded by WordPress Core)
  2. /wp-content/mu-plugins/gravityview-{locale}.mo
  3. /wp-content/mu-plugins/languages/gravityview-{locale}.mo
  4. /wp-content/plugins/gravityview/languages/gravityview-{locale}.mo
Returns
void

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

References gravityview().

◆ register_activation_hooks()

register_activation_hooks ( )

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

Returns
void

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

◆ relpath()

relpath (   $path = '')

Retrieve a relative path to the GravityView plugin directory from the WordPress plugin directory.

Since
2.2.3
Parameters
string$pathOptional. Append this extra path component.
Returns
string The relative path to the plugin directory from the plugin directory.

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

References GRAVITYVIEW_FILE.

◆ supports()

supports (   $feature)

Feature support detection.

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

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

References endswitch.

◆ uninstall()

uninstall ( )

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

Returns
void

Posts.

Meta.

Notes.

Capabilities.

Options.

Definition at line 594 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 GravityView 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 407 of file class-gv-plugin.php.

Field Documentation

◆ $__instance

$__instance = null
staticprivate

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

◆ $future_min_gf_version

$future_min_gf_version = GV_FUTURE_MIN_GF_VERSION
staticprivate

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

◆ $future_min_php_version

$future_min_php_version = GV_FUTURE_MIN_PHP_VERSION
staticprivate

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

◆ $future_min_wp_version

$future_min_wp_version = GV_FUTURE_MIN_WP_VERSION
staticprivate

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

◆ $min_gf_version

$min_gf_version = GV_MIN_GF_VERSION
static

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

◆ $min_php_version

$min_php_version = GV_MIN_PHP_VERSION
staticprivate

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

◆ $min_wp_version

$min_wp_version = GV_MIN_WP_VERSION
staticprivate

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

◆ $settings

$settings

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

◆ $version

$version = GV_PLUGIN_VERSION
static

◆ FEATURE_GFQUERY

const FEATURE_GFQUERY = 'gfquery'

◆ FEATURE_JOINS

const FEATURE_JOINS = 'joins'

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

◆ FEATURE_REST

const FEATURE_REST = 'rest_api'

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

Referenced by Core\init().

◆ FEATURE_UNIONS

const FEATURE_UNIONS = 'unions'

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


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