GravityView  1.19.4
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 ( )

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

References add_hooks().

Member Function Documentation

_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 184 of file class-gravityview-compatibility.php.

References $notices, and GVCommon\has_cap().

add_fallback_shortcode ( )
private
Since
1.12
Returns
bool

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

Referenced by add_hooks().

add_hooks ( )

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

References add_fallback_shortcode().

Referenced by __construct().

static check_gf_directory ( )
staticprivate

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

Returns
void

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

static check_gravityforms ( )
static

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

Since
1.12

public

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 280 of file class-gravityview-compatibility.php.

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

Referenced by GravityView_Admin\check_gravityforms().

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 210 of file class-gravityview-compatibility.php.

References gravityview(), GV_FUTURE_MIN_PHP_VERSION, GV_MIN_PHP_VERSION, and GravityView_Plugin\version.

static check_wordpress ( )
static

Is WordPress compatible?

Since
1.12
Returns
boolean

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

References gravityview(), and GV_MIN_WP_VERSION.

static get_notices ( )
static

Get admin notices.

Since
1.12
Returns
array

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

static get_plugin_status (   $location = '')
static

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

public

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 390 of file class-gravityview-compatibility.php.

References getInstance().

Referenced by GravityView_Admin\get_plugin_status().

static getInstance ( )
static
Returns
GravityView_Compatibility

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

Referenced by get_plugin_status().

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.

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\__construct(), GravityView_Post_Types\__construct(), GravityView_Admin_Metaboxes\__construct(), GravityView_Plugin\__construct(), GravityView_Post_Types\init_post_types(), and GravityView_Extension\is_extension_supported().

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 124 of file class-gravityview-compatibility.php.

References gravityview().

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 140 of file class-gravityview-compatibility.php.

References gravityview().

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 108 of file class-gravityview-compatibility.php.

References gravityview().

Field Documentation

$instance = null
static

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

$notices = array()
staticprivate
$valid_gravity_forms = false
static

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

$valid_php = false
static

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

$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: