GravityView  2.1.1
The best, easiest way to display Gravity Forms entries on your website.
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes
Extension Class Reference

If this file is called directly, abort. More...

Inheritance diagram for Extension:
GravityView_Extension

Public Member Functions

 __construct ()
 Generic initialization. More...
 
 add_hooks ()
 Extensions should override this hook to add their hooks. More...
 
 add_metabox_tab ()
 If Extension overrides tab_settings() and passes its own tab, add it to the tabbed settings metabox. More...
 
 admin_notice ()
 Outputs the admin notices generated by the all plugins. More...
 
 load_plugin_textdomain ()
 Load translations for the extension. More...
 
 save_post ( $post_id)
 Save extra view configuration. More...
 
 settings ()
 Register the updater for the Extension using GravityView license information. More...
 
 tooltips ( $tooltips=array())
 Add tooltips for the extension. More...
 

Static Public Member Functions

static add_notice ( $notice=array())
 Add a notice to be displayed in the admin. More...
 
static is_compatible ()
 Is this extension even compatible? More...
 

Static Public Attributes

static $is_compatible = array()
 

Protected Member Functions

 get_license ()
 Get license information from GravityView. More...
 
 is_extension_supported ()
 Check whether the extension is supported: More...
 
 tab_settings ()
 Add a tab to GravityView Edit View tabbed metabox. More...
 

Protected Attributes

 $_author = 'Katz Web Services, Inc.'
 
 $_item_id = NULL
 
 $_max_gravityview_version = null
 
 $_min_gravityview_version = '2.0-dev'
 
 $_min_php_version = '5.3'
 
 $_path = ''
 
 $_remote_update_url = 'https://gravityview.co'
 
 $_text_domain = 'gravityview'
 
 $_title = NULL
 
 $_version = NULL
 

Static Protected Attributes

static $admin_notices = array()
 

Detailed Description

If this file is called directly, abort.

The class.

An interface that most extensions would want to adhere to and inherit from.

Definition at line 14 of file class-gv-extension.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Generic initialization.

Definition at line 80 of file class-gv-extension.php.

Member Function Documentation

◆ add_hooks()

add_hooks ( )

Extensions should override this hook to add their hooks.

Returns
void

Definition at line 110 of file class-gv-extension.php.

◆ add_metabox_tab()

add_metabox_tab ( )

If Extension overrides tab_settings() and passes its own tab, add it to the tabbed settings metabox.

Since
1.8 (Extension version 1.0.7)
Returns
void

Definition at line 161 of file class-gv-extension.php.

References GravityView_Metabox_Tabs\add().

◆ add_notice()

static add_notice (   $notice = array())
static

Add a notice to be displayed in the admin.

Parameters
array$noticeArray with class and message keys. The message is not escaped.
Returns
void

Definition at line 338 of file class-gv-extension.php.

References gravityview().

◆ admin_notice()

admin_notice ( )

Outputs the admin notices generated by the all plugins.

Returns
void

Definition at line 357 of file class-gv-extension.php.

◆ get_license()

get_license ( )
protected

Get license information from GravityView.

Since
1.8 (Extension version 1.0.7)
Returns
bool|array False: class does not exist. Array: array of GV license data.

Definition at line 324 of file class-gv-extension.php.

References gravityview().

◆ is_compatible()

static is_compatible ( )
static

Is this extension even compatible?

Returns
boolean|null Is or is not. Null if unknown yet.

Definition at line 198 of file class-gv-extension.php.

References GV\get().

◆ is_extension_supported()

is_extension_supported ( )
protected

Check whether the extension is supported:

  • Checks if GravityView and Gravity Forms exist
  • Checks GravityView and Gravity Forms version numbers
  • Checks PHP version numbers
  • Sets self::$is_compatible[CLASS] to boolean value
Returns
boolean Is the extension supported?

Definition at line 212 of file class-gv-extension.php.

References gravityview().

◆ load_plugin_textdomain()

load_plugin_textdomain ( )

Load translations for the extension.

  1. Check wp-content/languages/gravityview/ folder and load using load_textdomain()
  2. Check wp-content/plugins/gravityview/languages/ folder for gravityview-[locale].mo file and load using load_textdomain()
  3. Load default file using load_plugin_textdomain() from wp-content/plugins/gravityview/languages/
Returns
void

Definition at line 247 of file class-gv-extension.php.

References gravityview().

◆ save_post()

save_post (   $post_id)

Save extra view configuration.

Parameters
int$post_idPost ID
Returns
void

Definition at line 118 of file class-gv-extension.php.

◆ settings()

settings ( )

Register the updater for the Extension using GravityView license information.

Returns
void

Definition at line 291 of file class-gv-extension.php.

References GV\get(), and gravityview().

◆ tab_settings()

tab_settings ( )
protected

Add a tab to GravityView Edit View tabbed metabox.

By overriding this method, you will add a tab to View settings

Since
1.8 (Extension version 1.0.7)
See also
https://gist.github.com/zackkatz/6cc381bcf54849f2ed41 For example of adding a metabox
Returns
array Array of metabox

Definition at line 149 of file class-gv-extension.php.

◆ tooltips()

tooltips (   $tooltips = array())

Add tooltips for the extension.

Add a tooltip with an array using the title and value keys. The title key is the H6 tag value of the tooltip; it's the headline. The value is the tooltip content, and can contain any HTML.

The tooltip key must be gv_{name_of_setting}. If the name of the setting is "example_extension_setting", the code would be:

$tooltips['gv_example_extension_setting'] = array( 'title' => 'About Example Extension Setting', 'value' => 'When you do [x] with [y], [z] happens.' );

Parameters
array$tooltipsExisting GV tooltips, with title and value keys
Returns
array Modified tooltips

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

Field Documentation

◆ $_author

$_author = 'Katz Web Services, Inc.'
protected

Definition at line 59 of file class-gv-extension.php.

◆ $_item_id

$_item_id = NULL
protected

Definition at line 29 of file class-gv-extension.php.

◆ $_max_gravityview_version

$_max_gravityview_version = null
protected

Definition at line 44 of file class-gv-extension.php.

◆ $_min_gravityview_version

$_min_gravityview_version = '2.0-dev'
protected

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

◆ $_min_php_version

$_min_php_version = '5.3'
protected

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

◆ $_path

$_path = ''
protected

Definition at line 64 of file class-gv-extension.php.

◆ $_remote_update_url

$_remote_update_url = 'https://gravityview.co'
protected

Definition at line 54 of file class-gv-extension.php.

◆ $_text_domain

$_text_domain = 'gravityview'
protected

Definition at line 34 of file class-gv-extension.php.

◆ $_title

$_title = NULL
protected

Definition at line 18 of file class-gv-extension.php.

◆ $_version

$_version = NULL
protected

Definition at line 23 of file class-gv-extension.php.

◆ $admin_notices

$admin_notices = array()
staticprotected

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

◆ $is_compatible

$is_compatible = array()
static

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


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