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

Ex-GF Addon Settings class that's been stripped of GF functionality. More...

Inheritance diagram for Plugin_Settings:
GravityView_Settings

Public Member Functions

 __construct ()
 
 add_settings ( $plugins_data)
 Adds GravityView settings to Foundation. More...
 
 all ()
 Returns all settings. More...
 
 defaults ()
 Returns default settings. More...
 
 get ( $key, $default=null)
 Returns setting by its name. More...
 
 get_app_setting ( $setting_name)
 Returns a setting. More...
 
 get_app_settings ()
 Returns all settings. More...
 
 get_gravitykit_setting ( $setting, $default=null)
 Returns a GravityKit general setting. More...
 
 maybe_save_app_settings ()
 Check for the gravityview_edit_settings capability before saving plugin settings. More...
 
 migrate_legacy_settings ()
 Migrates GravityView <2.16 settings to the new settings framework. More...
 
 set ( $settings, $value=null)
 Sets a subset of settings. More...
 
 update ( $settings)
 Updates settings. More...
 
 update_app_settings ( $settings)
 Updates app settings with the provided settings. More...
 

Static Public Member Functions

static getSetting ( $key)
 Returns setting by its name. More...
 

Data Fields

padding __pad0__: .5em .75em
 
margin __pad1__: .1em
 
number scale label
 
const SETTINGS_PLUGIN_ID = 'gravityview'
 
font size: 1.2em
 

Private Member Functions

 _get_uninstall_reasons ()
 Reimplement elsewhere. More...
 
 _uninstall_form ()
 Reimplement elsewhere. More...
 
 _uninstall_warning_message ()
 

Private Attributes

 $_foundation_settings
 
 $_plugin_settings = []
 

Detailed Description

Ex-GF Addon Settings class that's been stripped of GF functionality.

Serves as a wrapper for Foundation Settings while also providing old getter/setter methods for backward compatibility.

Definition at line 14 of file class-gv-settings-plugin.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Definition at line 35 of file class-gv-settings-plugin.php.

Member Function Documentation

◆ _get_uninstall_reasons()

_get_uninstall_reasons ( )
private

Reimplement elsewhere.

Definition at line 352 of file class-gv-settings-plugin.php.

References GV\$reasons.

◆ _uninstall_form()

_uninstall_form ( )
private

Reimplement elsewhere.

Definition at line 380 of file class-gv-settings-plugin.php.

References $user.

◆ _uninstall_warning_message()

_uninstall_warning_message ( )
private

Definition at line 342 of file class-gv-settings-plugin.php.

◆ add_settings()

add_settings (   $plugins_data)

Adds GravityView settings to Foundation.

Since
2.16
Parameters
array$plugins_dataPlugins data
Returns
array $plugins_data

Override whether to show GravityView settings.

Since
1.7.6
Parameters
bool$show_settingsDefault: true

Definition at line 212 of file class-gv-settings-plugin.php.

References $settings.

◆ all()

all ( )

Returns all settings.

Returns
array The settings.

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

◆ defaults()

defaults ( )

Returns default settings.

Returns
array The defaults.
Runs Filter:
gravityview/settings/default Filter default global settings.
Parameters
[in,out]arrayThe defaults.

Definition at line 189 of file class-gv-settings-plugin.php.

◆ get()

get (   $key,
  $default = null 
)

Returns setting by its name.

Parameters
string$keyThe setting key.
string$default(optional) A default if not found.
Returns
mixed The setting value.

Definition at line 66 of file class-gv-settings-plugin.php.

◆ get_app_setting()

get_app_setting (   $setting_name)

Returns a setting.

Parameters
string$setting_nameThe setting key.
Returns
mixed The setting or null

Definition at line 54 of file class-gv-settings-plugin.php.

◆ get_app_settings()

get_app_settings ( )

Returns all settings.

Returns
array The settings.

Definition at line 90 of file class-gv-settings-plugin.php.

◆ get_gravitykit_setting()

get_gravitykit_setting (   $setting,
  $default = null 
)

Returns a GravityKit general setting.

Parameters
string$settingSetting value.
mixed | null$default(optional) A default value if setting is not set. Defaults to null.
Returns
mixed

Definition at line 178 of file class-gv-settings-plugin.php.

◆ getSetting()

static getSetting (   $key)
static

Returns setting by its name.

Parameters
string$keyOption key to fetch
Returns
mixed

Definition at line 78 of file class-gv-settings-plugin.php.

References gravityview().

◆ maybe_save_app_settings()

maybe_save_app_settings ( )

Check for the gravityview_edit_settings capability before saving plugin settings.

Gravity Forms says you're able to edit if you're able to view settings. GravityView allows two different permissions.

Since
1.15
Returns
void

Definition at line 328 of file class-gv-settings-plugin.php.

References GVCommon\has_cap().

◆ migrate_legacy_settings()

migrate_legacy_settings ( )

Migrates GravityView <2.16 settings to the new settings framework.

Some of those settings are now part of the GravityKit general settings, and some are part of the GravityView plugin settings.

Returns
array The settings.

Definition at line 122 of file class-gv-settings-plugin.php.

References gravityview().

◆ set()

set (   $settings,
  $value = null 
)

Sets a subset of settings.

Parameters
array|stringAn array of settings to update, or string (key) and $value to update one setting.
mixed$valueA value if $settings is string (key). Default: null.

Definition at line 292 of file class-gv-settings-plugin.php.

References $settings, and $value.

◆ update()

update (   $settings)

Updates settings.

Parameters
array$settingsThe settings array.
Returns
boolean False if value was not updated and true if value was updated.

Definition at line 309 of file class-gv-settings-plugin.php.

References $settings.

◆ update_app_settings()

update_app_settings (   $settings)

Updates app settings with the provided settings.

Same as the GFAddon, except it returns the value from update_option()

Parameters
array$settings- App settings to be saved
Returns
boolean False if value was not updated and true if value was updated.

Definition at line 282 of file class-gv-settings-plugin.php.

References $settings.

Field Documentation

◆ $_foundation_settings

$_foundation_settings
private

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

◆ $_plugin_settings

$_plugin_settings = []
private

Definition at line 33 of file class-gv-settings-plugin.php.

◆ __pad0__

padding __pad0__

Definition at line 392 of file class-gv-settings-plugin.php.

◆ __pad1__

margin __pad1__

Definition at line 393 of file class-gv-settings-plugin.php.

◆ label

number scale label
Initial value:
{
border: 1px solid #cccccc

Definition at line 390 of file class-gv-settings-plugin.php.

◆ SETTINGS_PLUGIN_ID

const SETTINGS_PLUGIN_ID = 'gravityview'

Definition at line 15 of file class-gv-settings-plugin.php.

◆ size

font size

Definition at line 397 of file class-gv-settings-plugin.php.


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