GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
Data Structures | Functions | Variables
class-gravityview-settings.php File Reference

Go to the source code of this file.

Data Structures

class  GravityView_Settings
 GravityView Settings class (get/set/license validation) using the Gravity Forms App framework. More...
 

Functions

 _load_license_handler ()
 Make sure the license handler is available. More...
 
 add_network_menu ()
 Add global Settings page for Multisite. More...
 
 app_settings_fields ()
 Specify the settings fields to be rendered on the plugin settings page. More...
 
 app_settings_icon ()
 Prevent displaying of any icon. More...
 
 app_settings_tab ()
 
 app_settings_title ()
 The Settings title. More...
 
 app_settings_uninstall_tab ()
 
 create_app_menu ()
 Add Settings link to GravityView menu. More...
 
 get_app_setting ($setting_name)
 Make protected public public. More...
 
 get_app_settings ()
 Returns the currently saved plugin settings. More...
 
 get_default_settings ()
 Get the default settings for the plugin. More...
 
 get_license_handler ()
 Allow public access to the GV_License_Handler class. More...
 
 get_posted_settings ()
 When the settings are saved, make sure the license key matches the previously activated key. More...
 
 get_required_indicator ($field)
 Gets the required indicator Gets the markup of the required indicator symbol to highlight fields that are required. More...
 
static getSetting ($key)
 Get the setting for GravityView by name. More...
 
 init_admin ()
 Run actions when initializing admin. More...
 
 init_ajax ()
 Load license handler in admin-ajax.php. More...
 
 license_key_notice ()
 Display a notice if the plugin is inactive. More...
 
 maybe_save_app_settings ()
 Check for the gravityview_edit_settings capability before saving plugin settings. More...
 
 modify_app_settings_menu_title ($setting_tabs)
 Change the settings page header title to "GravityView". More...
 
 set_field_error ($field, $error_message= '')
 Make protected public public. More...
 
 settings_edd_license ($field, $echo=true)
 Register the settings field for the EDD License field type. More...
 
 settings_save ($field, $echo=true)
 Allow customizing the Save field parameters. More...
 
 settings_submit ($field, $echo=true)
 
 single_setting_label ($field)
 The same as the parent, except added support for field descriptions . More...
 
 styles ()
 Register styles in the app admin page. More...
 
 update_app_settings ($settings)
 Updates app settings with the provided settings. More...
 

Variables

 $form = ob_get_clean()
 
 $i = 0
 
 $reasons = $this->get_uninstall_reasons()
 
padding bottom
 
scale description p description
 
padding top
 
scale description ul
 
gv form field wrapper
 

Function Documentation

_load_license_handler ( )
private

Make sure the license handler is available.

Definition at line 408 of file class-gravityview-settings.php.

add_network_menu ( )

Add global Settings page for Multisite.

Since
1.7.6
Returns
void

Definition at line 523 of file class-gravityview-settings.php.

References GravityView_Plugin\is_network_activated().

app_settings_fields ( )

Specify the settings fields to be rendered on the plugin settings page.

Returns
array
Since
1.15 Added Support Port support

Redux backward compatibility

Since
1.7.4
Runs Filter:
gravityview/settings/extension/sections Modify the GravityView settings page Extensions can tap in here to insert their own section and settings. $sections[] = array( 'title' => __( 'GravityView My Extension Settings', 'gravityview' ), 'fields' => $settings, );
Parameters
array$extension_settingsEmpty array, ready for extension settings!

Definition at line 840 of file class-gravityview-settings.php.

References $field, get_app_setting(), get_default_settings(), get_license_handler(), GRAVITYVIEW_FILE, GVCommon\has_cap(), and GravityView_Plugin\version.

app_settings_icon ( )

Prevent displaying of any icon.

Returns
string

Definition at line 567 of file class-gravityview-settings.php.

app_settings_tab ( )
app_settings_title ( )

The Settings title.

Returns
string

Definition at line 559 of file class-gravityview-settings.php.

app_settings_uninstall_tab ( )
create_app_menu ( )

Add Settings link to GravityView menu.

Returns
void

If not multisite, always show. If multisite and the plugin is network activated, show; we need to register the submenu page for the Network Admin settings to work. If multisite and not network admin, we don't want the settings to show.

Since
1.7.6

Override whether to show the Settings menu on a per-blog basis.

Since
1.7.6
Parameters
bool$hide_if_network_activatedDefault: true

Definition at line 533 of file class-gravityview-settings.php.

References GravityView_Plugin\is_network_activated().

get_app_setting (   $setting_name)

Make protected public public.

Backward compatibility with Redux

Definition at line 584 of file class-gravityview-settings.php.

Referenced by app_settings_fields().

get_app_settings ( )

Returns the currently saved plugin settings.

Different from GFAddon in two ways:

  1. Makes protected method public
  2. Use default settings if the original settings don't exist

public

Returns
array

Definition at line 611 of file class-gravityview-settings.php.

References get_default_settings().

get_default_settings ( )
private

Get the default settings for the plugin.

Merges previous settings created when using the Redux Framework

Returns
array Settings with defaults set

Definition at line 764 of file class-gravityview-settings.php.

Referenced by app_settings_fields(), and get_app_settings().

get_license_handler ( )

Allow public access to the GV_License_Handler class.

Since
1.7.4
Returns
GV_License_Handler

Definition at line 666 of file class-gravityview-settings.php.

References GravityView_Settings\$License_Handler.

Referenced by app_settings_fields().

get_posted_settings ( )

When the settings are saved, make sure the license key matches the previously activated key.

Returns
array settings from parent::get_posted_settings(), with license_key_response and license_key_status potentially unset

Definition at line 805 of file class-gravityview-settings.php.

get_required_indicator (   $field)

Gets the required indicator Gets the markup of the required indicator symbol to highlight fields that are required.

Parameters
$field- The field meta.
Returns
string - Returns markup of the required indicator symbol

Definition at line 832 of file class-gravityview-settings.php.

static getSetting (   $key)
static
init_admin ( )

Run actions when initializing admin.

Triggers the license key notice

Returns
void
Since
1.7.6

Definition at line 370 of file class-gravityview-settings.php.

init_ajax ( )

Load license handler in admin-ajax.php.

Definition at line 401 of file class-gravityview-settings.php.

license_key_notice ( )

Display a notice if the plugin is inactive.

Returns
void

I wanted to remove the period from after the buttons in the string, but didn't want to mess up the translation strings for the translators.

Since
1.17

PhpMissingBreakStatementInspection

Definition at line 423 of file class-gravityview-settings.php.

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 787 of file class-gravityview-settings.php.

References GVCommon\has_cap().

modify_app_settings_menu_title (   $setting_tabs)

Change the settings page header title to "GravityView".

Parameters
$setting_tabs
Returns
array

Definition at line 391 of file class-gravityview-settings.php.

set_field_error (   $field,
  $error_message = '' 
)

Make protected public public.

Definition at line 634 of file class-gravityview-settings.php.

References $field.

settings_edd_license (   $field,
  $echo = true 
)
protected

Register the settings field for the EDD License field type.

Parameters
array$field
bool$echoWhether to echo the
Returns
string

Definition at line 645 of file class-gravityview-settings.php.

References $field.

settings_save (   $field,
  $echo = true 
)

Allow customizing the Save field parameters.

Parameters
array$field
bool$echo
Returns
string

Definition at line 718 of file class-gravityview-settings.php.

References $field, $output, app_settings_uninstall_tab(), and settings_submit().

settings_submit (   $field,
  $echo = true 
)

Definition at line 678 of file class-gravityview-settings.php.

References $attributes, $field, $html, $name, and $value.

Referenced by settings_save().

single_setting_label (   $field)

The same as the parent, except added support for field descriptions .

Parameters
$fieldarray

Definition at line 746 of file class-gravityview-settings.php.

References $field.

styles ( )

Register styles in the app admin page.

Returns
array

Definition at line 497 of file class-gravityview-settings.php.

References GRAVITYVIEW_FILE, and GravityView_Plugin\version.

update_app_settings (   $settings)

Updates app settings with the provided settings.

Same as the GVAddon, 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 625 of file class-gravityview-settings.php.

Variable Documentation

return $form = ob_get_clean()

Definition at line 311 of file class-gravityview-settings.php.

Referenced by GravityView_Field_List\_filter_field_label(), GravityView_Field\_filter_gform_custom_merge_tags(), GravityView_Field\_filter_gform_replace_merge_tags(), GravityView_Field_Time\_get_time_format_for_field(), GravityView_frontend\_override_sorting_id_by_field_type(), GravityView_frontend\add_columns_sort_links(), GravityView_Admin_Views\add_custom_column_content(), GravityView_Plugin_Hooks_Gravity_Forms_Quiz\add_form_fields(), GravityView_Field_List\add_form_fields(), GravityView_Field_Address\add_hooks(), GravityView_Edit_Entry_User_Registration\add_hooks(), GravityView_Admin_Views\add_view_dropdown(), GravityView_Plugin_Hooks_Gravity_Forms_Signature\after_edit_entry(), GravityView_Entry_Approval\after_submission(), GravityView_Entry_Approval\after_update_entry_update_approved_meta(), GravityView_Recent_Entries_Widget\ajax_get_view_merge_tag_data(), GVCommon\check_entry_display(), GravityView_Ajax\create_preset_form(), GravityView_Field_Is_Approved\custom_merge_tags(), GravityView_Cache\entry_created(), GravityView_Cache\entry_updated(), GravityView_Field_Post_Image\explode_value(), GravityView_API\field_class(), GravityView_API\field_html_attr_id(), GravityView_API\field_label(), GravityView_Field_Password\field_label(), GravityView_API\field_value(), GravityView_Admin_ApproveEntries\filter_links_entry_list(), GravityView_Admin_ApproveEntries\get_approved_column(), GravityView_Entry_Approval\get_approved_column_input_label(), GravityView_Admin_Views\get_available_fields(), GravityView_Ajax\get_available_fields_html(), GravityView_Field_Address\get_choices_state(), GravityView_Admin_Views\get_connected_form_links(), GravityView_Admin_Views\get_entry_default_fields(), GVCommon\get_field(), GVCommon\get_field_label(), GVCommon\get_field_type(), GravityView_Admin\get_floaty(), GVCommon\get_form_fields(), GVCommon\get_form_from_entry_id(), GravityView_GFFormsModel\get_post_field_images(), GravityView_GFFormsModel\get_post_fields(), GravityView_Migrate\get_search_fields(), GravityView_Widget_Search\get_search_filter_details(), GravityView_Widget_Search\get_searchable_fields(), GravityView_Ajax\get_sortable_fields(), gravityview_get_field(), gravityview_get_field_label(), gravityview_get_field_type(), gravityview_get_form_fields(), gravityview_is_single_entry(), gv_class(), GVCommon\has_product_field(), GravityView_Field\is_choice_value_enabled(), GVCommon\is_field_numeric(), GravityView_frontend\is_field_sortable(), GravityView_Field_Notes\maybe_send_entry_notes(), GravityView_Ajax\pre_get_form_fields(), GravityView_Widget_Search\prepare_field_filter(), GravityView_Admin_Views\render_active_areas(), GravityView_Admin_Views\render_available_fields(), GravityView_Admin_Metaboxes\render_merge_tags_scripts(), GravityView_Merge_Tags\replace_get_variables(), GravityView_Merge_Tags\replace_gv_merge_tags(), GravityView_API\replace_variables(), GravityView_Merge_Tags\replace_variables(), GravityView_Field_Post_Category\set_post_categories(), GravityView_Field_Custom\show_field_in_edit_entry(), GravityView_Entry_Approval\update_approved_meta(), and GravityView_Recent_Entries_Widget\widget().

$i = 0
$reasons = $this->get_uninstall_reasons()
padding bottom

Definition at line 208 of file class-gravityview-settings.php.

scale description p description
padding top
scale description ul
gv form field wrapper
Initial value:
{
margin-top: 30px

Definition at line 214 of file class-gravityview-settings.php.

Referenced by GravityView_Welcome\getting_started_screen().