Skip to main content

GFSettings

Class GFSettings

Generates the Gravity Forms settings page

Source: settings.php:15

Details

  • Kind: class
  • Namespace: (global)

Properties

PropertyTypeDescription
$addon_pagesarraySettings pages associated with add-ons

Methods

MethodDescription
add_settings_page()Adds a settings page to the Gravity Forms settings.
settings_page()Determines the content displayed on the Gravity Forms settings page.
settings_uninstall_page()Displays the Gravity Forms uninstall page.
gravityforms_settings_page()Displays the main Gravity Forms settings page.
is_orbital_default()Determine whether Orbital should be the default theme.
currency_message_callback()Callback to output any additional markup after the currency select markup.
license_key_render_callback()Render the License Key Field as a callback.
license_key_validation_callback()Custom validation callback for the License Key Field.
initialize_plugin_settings()Initialize Plugin Settings fields renderer.
initialize_recaptcha_settings()Initialize reCAPTCHA Settings renderer.
settings_field_recaptcha_reset()Renders a reCAPTCHA verification field.
upgrade_license()Handles license upgrades from the Settings page.
page_header()Outputs the settings page header.
page_header_bar()Outputs the Settings header bar.
page_footer()Outputs the Settings page footer.
get_subview()Gets the Settings page subview based on the query string.
get_posted_akismet_setting()Handles the enabling/disabling of the Akismet Integration setting
enable_logging()Enable the GFLogging class.
disable_logging()Disable the GFLogging class.

Method Reference

add_settings_page()

public static function add_settings_page( $name, $handler, $icon_path='' )

Adds a settings page to the Gravity Forms settings.

Parameters

NameTypeDefaultDescription
$namestring | arrayThe settings page slug.
$handlerstring | arrayThe callback function to run for this settings page.
$icon_pathstring''The path to the icon for the settings tab. @deprecated.

Since: Unknown

Source: settings.php:56

settings_page()

public static function settings_page()

Determines the content displayed on the Gravity Forms settings page.

Returns

  • void

Since: Unknown

Source: settings.php:120

settings_uninstall_page()

public static function settings_uninstall_page()

Displays the Gravity Forms uninstall page.

Since: Unknown

Source: settings.php:164

gravityforms_settings_page()

public static function gravityforms_settings_page()

Displays the main Gravity Forms settings page.

Since: Unknown

Source: settings.php:364

is_orbital_default()

public static function is_orbital_default()

Determine whether Orbital should be the default theme.

Returns

  • bool

Since: 2.7.15

Source: settings.php:392

currency_message_callback()

public static function currency_message_callback()

Callback to output any additional markup after the currency select markup.

Returns

  • false | string

Since: 2.5

Source: settings.php:910

license_key_render_callback()

public static function license_key_render_callback( $field )

Render the License Key Field as a callback.

Callback is used so that the gform_settings_key_field filter can be retained.

Parameters

NameTypeDefaultDescription
$fieldobjectThe Field Object for the rendered input.

Returns

  • string

Since: 2.5

Source: settings.php:945

license_key_validation_callback()

public static function license_key_validation_callback( $field, $value )

Custom validation callback for the License Key Field.

Callback is used so that we can skip validation if the License Key field is null.

Parameters

NameTypeDefaultDescription
$fieldobjectThe Field Object for the rendered input.
$valuemixedThe current posted field value.

Returns

  • void

Since: 2.5

Source: settings.php:963

initialize_plugin_settings()

public static function initialize_plugin_settings()

Initialize Plugin Settings fields renderer.

Since:

  • 2.5
  • 2.10.0 (Added the background notifications setting.)

Source: settings.php:977

initialize_recaptcha_settings()

public static function initialize_recaptcha_settings()

Initialize reCAPTCHA Settings renderer.

Since: 2.5

Source: settings.php:1057

settings_field_recaptcha_reset()

public static function settings_field_recaptcha_reset( $props=[], $echo=true )

Renders a reCAPTCHA verification field.

Parameters

NameTypeDefaultDescription
$propsarray[]Field properties.
$echobooltrueOutput the field markup directly.

Returns

  • string

Since: 2.5

Source: settings.php:1219

upgrade_license()

public static function upgrade_license()

Handles license upgrades from the Settings page.

Returns

  • void

Since: Unknown

Source: settings.php:1287

public static function page_header( $title='', $message='' )

Outputs the settings page header.

Parameters

NameTypeDefaultDescription
$titlestring''Optional. The page title to be used. Defaults to an empty string.
$messagestring''Optional. The message to display in the header. Defaults to empty string.

Returns

  • void

Since: Unknown

Source: settings.php:1332

page_header_bar()

public static function page_header_bar()

Outputs the Settings header bar.

Since: 2.5

Source: settings.php:1462

public static function page_footer()

Outputs the Settings page footer.

Returns

  • void

Since: Unknown

Source: settings.php:1480

get_subview()

public static function get_subview()

Gets the Settings page subview based on the query string.

Returns

  • string — The subview.

Since: Unknown

Source: settings.php:1517

get_posted_akismet_setting()

public static function get_posted_akismet_setting()

Handles the enabling/disabling of the Akismet Integration setting

Called from GFSettings::gravityforms_settings_page

Returns

  • string — $akismet_setting '1' if turning on, '2' if turning off.

Since: Unknown

Source: settings.php:1541

enable_logging()

public static function enable_logging()

Enable the GFLogging class.

Returns

  • bool

Since: 2.4.4.2

Source: settings.php:1563

disable_logging()

public static function disable_logging()

Disable the GFLogging class.

Returns

  • bool

Since: 2.4.4.2

Source: settings.php:1600