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

Handle GravityView compatibility notices and fallback shortcodes. More...

Public Member Functions

 __construct ()
 
 _shortcode_gf_notice ( $atts=array(), $content=null, $shortcode='gravityview')
 
 add_hooks ()
 
 insert_admin_notices ( $notices=array())
 Add the compatibility notices to the other admin notices. More...
 

Static Public Member Functions

static check_gravityforms ()
 Check if Gravity Forms plugin is active and show notice if not. More...
 
static check_php ()
 Is the version of PHP compatible? More...
 
static check_wordpress ()
 Is WordPress compatible? More...
 
static get_notices ()
 Get admin notices. More...
 
static get_plugin_status ( $location='')
 Check if specified plugin is active, inactive or not installed. More...
 
static getInstance ()
 
static is_valid ()
 Is everything compatible with this version of GravityView? More...
 

Static Public Attributes

static $instance = null
 
static $valid_gravity_forms = false
 
static $valid_php = false
 
static $valid_wordpress = false
 

Private Member Functions

 add_fallback_shortcode ()
 

Static Private Member Functions

static check_gf_directory ()
 Check for potential conflicts and let users know about common issues. More...
 
static is_valid_gravity_forms ()
 
static is_valid_php ()
 
static is_valid_wordpress ()
 Is the version of WordPress compatible? More...
 

Static Private Attributes

static $notices = array()
 

Detailed Description

Handle GravityView compatibility notices and fallback shortcodes.

Since
1.12

Definition at line 18 of file class-gravityview-compatibility.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Definition at line 45 of file class-gravityview-compatibility.php.

References add_hooks().

Member Function Documentation

◆ _shortcode_gf_notice()

_shortcode_gf_notice (   $atts = array(),
  $content = null,
  $shortcode = 'gravityview' 
)
Since
1.9.2 in gravityview.php
1.12
Parameters
array$atts
null$content
string$shortcode
Returns
null|string NULL returned if user can't activate plugins. Notice shown with a warning that GF isn't supported.

Definition at line 168 of file class-gravityview-compatibility.php.

References $notices, and GVCommon\has_cap().

◆ add_fallback_shortcode()

add_fallback_shortcode ( )
private
Since
1.12
Returns
bool

Definition at line 136 of file class-gravityview-compatibility.php.

Referenced by add_hooks().

◆ add_hooks()

add_hooks ( )

Definition at line 58 of file class-gravityview-compatibility.php.

References add_fallback_shortcode().

Referenced by __construct().

◆ check_gf_directory()

static check_gf_directory ( )
staticprivate

Check for potential conflicts and let users know about common issues.

Returns
void

Definition at line 374 of file class-gravityview-compatibility.php.

◆ check_gravityforms()

static check_gravityforms ( )
static

Check if Gravity Forms plugin is active and show notice if not.

Since
1.12
Returns
boolean True: checks have been passed; GV is fine to run; False: checks have failed, don't continue loading

The plugin is activated and yet somehow GFCommon didn't get picked up... OR It's the Network Admin and we just don't know whether the sites have GF activated themselves.

Definition at line 271 of file class-gravityview-compatibility.php.

References $class, $title, gravityview(), GV_FUTURE_MIN_GF_VERSION, and GV_MIN_GF_VERSION.

Referenced by GravityView_Admin\check_gravityforms().

◆ check_php()

static check_php ( )
static

Is the version of PHP compatible?

Since
1.12
1.19.2 Shows a notice if it's compatible with future PHP version requirements
Returns
boolean

Definition at line 194 of file class-gravityview-compatibility.php.

References gravityview(), GV_FUTURE_MIN_PHP_VERSION, GV_MIN_PHP_VERSION, and GV_PLUGIN_VERSION.

◆ check_wordpress()

static check_wordpress ( )
static

Is WordPress compatible?

Since
1.12
Returns
boolean

Definition at line 231 of file class-gravityview-compatibility.php.

References gravityview(), GV_FUTURE_MIN_WP_VERSION, GV_MIN_WP_VERSION, and GV_PLUGIN_VERSION.

◆ get_notices()

static get_notices ( )
static

Get admin notices.

Since
1.12
Returns
array

Definition at line 154 of file class-gravityview-compatibility.php.

◆ get_plugin_status()

static get_plugin_status (   $location = '')
static

Check if specified plugin is active, inactive or not installed.

Parameters
string$location(default: '')
Returns
boolean|string True: plugin is active; False: plugin file doesn't exist at path; 'inactive' it's inactive

Definition at line 395 of file class-gravityview-compatibility.php.

References getInstance().

Referenced by GravityView_Admin\get_plugin_status().

◆ getInstance()

static getInstance ( )
static
Returns
GravityView_Compatibility

Definition at line 78 of file class-gravityview-compatibility.php.

Referenced by get_plugin_status().

◆ insert_admin_notices()

insert_admin_notices (   $notices = array())

Add the compatibility notices to the other admin notices.

Parameters
array$notices
Returns
array

Definition at line 71 of file class-gravityview-compatibility.php.

References $notices.

◆ is_valid()

static is_valid ( )
static

Is everything compatible with this version of GravityView?

See also
::is_compatible() accessible via gravityview()->plugin->is_compatible()
Returns
bool

Definition at line 93 of file class-gravityview-compatibility.php.

References gravityview().

Referenced by GravityView_Admin_Metaboxes\__construct().

◆ is_valid_gravity_forms()

static is_valid_gravity_forms ( )
staticprivate
Since
1.12
See also
::is_compatible_gravityforms() accessible via gravityview()->plugin->is_compatible_gravityforms()
Returns
bool

Definition at line 116 of file class-gravityview-compatibility.php.

References gravityview().

◆ is_valid_php()

static is_valid_php ( )
staticprivate
Since
1.12
See also
::is_compatible_php() accessible via gravityview()->plugin->is_compatible_php()
Returns
bool

Definition at line 128 of file class-gravityview-compatibility.php.

References gravityview().

◆ is_valid_wordpress()

static is_valid_wordpress ( )
staticprivate

Is the version of WordPress compatible?

Since
1.12
See also
::is_compatible_wordpress() accessible via gravityview()->plugin->is_compatible_wordpress()

Definition at line 104 of file class-gravityview-compatibility.php.

References gravityview().

Field Documentation

◆ $instance

$instance = null
static

Definition at line 23 of file class-gravityview-compatibility.php.

◆ $notices

$notices = array()
staticprivate

◆ $valid_gravity_forms

$valid_gravity_forms = false
static

Definition at line 28 of file class-gravityview-compatibility.php.

◆ $valid_php

$valid_php = false
static

Definition at line 38 of file class-gravityview-compatibility.php.

◆ $valid_wordpress

$valid_wordpress = false
static

Definition at line 33 of file class-gravityview-compatibility.php.


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