GravityView  2.5
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 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_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...
 
 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

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

Member Function Documentation

◆ __clone()

__clone ( )
private

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

◆ __wakeup()

__wakeup ( )
private

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

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

◆ deactivate()

deactivate ( )

Plugin deactivation function.

Definition at line 339 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 352 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 99 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 500 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 476 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 488 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 181 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 154 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 393 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 464 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 420 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 451 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 408 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 434 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 140 of file class-gv-plugin.php.

References GRAVITYVIEW_FILE.

◆ load_license_settings()

load_license_settings ( )

Definition at line 124 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 251 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 293 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 365 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 517 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 540 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 381 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 92 of file class-gv-plugin.php.

Referenced by Core\init().

◆ FEATURE_UNIONS

const FEATURE_UNIONS = 'unions'

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


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