GravityView  2.17
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...
 
 add_to_gravitykit_admin_menu ( $foundation)
 Adds "All Views" and "New View" as submenus to the GravityKit menu. More...
 
 deactivate ()
 Plugin deactivation function. More...
 
 dir ( $path='')
 Retrieve an absolute path within the GravityView plugin directory. More...
 
 get_link_to_all_views ()
 Returns the URL to the "New View" page. More...
 
 get_link_to_new_view ()
 Returns the URL to the "All Views" page. 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_settings ()
 
 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...
 
 setup_gravitykit_admin_menu_redirects ()
 Redirects GravityKit's GravityView submenu pages to the appropriate custom post endpoints. 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 ALL_VIEWS_SLUG = 'gravityview_all_views'
 
const FEATURE_GFQUERY = 'gfquery'
 
const FEATURE_JOINS = 'joins'
 
const FEATURE_REST = 'rest_api'
 
const FEATURE_UNIONS = 'unions'
 
const NEW_VIEW_SLUG = 'gravityview_new_view'
 

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

Constructor & Destructor Documentation

◆ __construct()

__construct ( )
private

Load some frontend-related legacy files.

GFAddOn-backed settings

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

Member Function Documentation

◆ __clone()

__clone ( )

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

◆ __wakeup()

__wakeup ( )

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

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

◆ add_to_gravitykit_admin_menu()

add_to_gravitykit_admin_menu (   $foundation)

Adds "All Views" and "New View" as submenus to the GravityKit menu.

Since
2.16
Parameters
GravityKitFoundation$foundationFoundation instance.
Returns
void

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

References GVCommon\has_cap().

◆ deactivate()

deactivate ( )

Plugin deactivation function.

Returns
void

Definition at line 324 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 338 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 116 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 512 of file class-gv-plugin.php.

References gravityview().

◆ get_link_to_all_views()

get_link_to_all_views ( )

Returns the URL to the "New View" page.

Since
$ver$
Returns
string

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

◆ get_link_to_new_view()

get_link_to_new_view ( )

Returns the URL to the "All Views" page.

Since
$ver$
Returns
string

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

◆ 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 486 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 499 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 381 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 472 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 410 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 442 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 457 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 397 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 425 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_settings()

load_settings ( )

Definition at line 142 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 276 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 352 of file class-gv-plugin.php.

References GRAVITYVIEW_FILE.

◆ setup_gravitykit_admin_menu_redirects()

setup_gravitykit_admin_menu_redirects ( )

Redirects GravityKit's GravityView submenu pages to the appropriate custom post endpoints.

Since
2.16
Returns
void

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

References GVCommon\has_cap().

◆ supports()

supports (   $feature)

Feature support detection.

Parameters
string$featureFeature name. Check FEATURE_* class constants.
Returns
boolean
Runs Filter:
gravityview/supports Overrides whether GravityView supports a feature.
Since
2.0
Parameters
boolean | null$supportsWhether the feature is supported. Default: null.

Definition at line 531 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 562 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 368 of file class-gv-plugin.php.

Field Documentation

◆ $__instance

$__instance = null
staticprivate

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

◆ $future_min_gf_version

$future_min_gf_version = GV_FUTURE_MIN_GF_VERSION
staticprivate

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

◆ $future_min_php_version

$future_min_php_version = GV_FUTURE_MIN_PHP_VERSION
staticprivate

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

◆ $future_min_wp_version

$future_min_wp_version = GV_FUTURE_MIN_WP_VERSION
staticprivate

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

◆ $min_gf_version

$min_gf_version = GV_MIN_GF_VERSION
static

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

◆ $min_php_version

$min_php_version = GV_MIN_PHP_VERSION
staticprivate

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

◆ $min_wp_version

$min_wp_version = GV_MIN_WP_VERSION
staticprivate

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

◆ $settings

$settings

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

◆ $version

$version = GV_PLUGIN_VERSION
static

◆ ALL_VIEWS_SLUG

const ALL_VIEWS_SLUG = 'gravityview_all_views'

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

◆ FEATURE_GFQUERY

const FEATURE_GFQUERY = 'gfquery'

◆ FEATURE_JOINS

const FEATURE_JOINS = 'joins'

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

◆ FEATURE_REST

const FEATURE_REST = 'rest_api'

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

Referenced by Core\init().

◆ FEATURE_UNIONS

const FEATURE_UNIONS = 'unions'

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

◆ NEW_VIEW_SLUG

const NEW_VIEW_SLUG = 'gravityview_new_view'

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


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