Overview

Classes

  • GF_Background_Upgrader
  • GF_Download
  • GF_Forms_Model_Legacy
  • GF_Query_Call
  • GF_Query_Column
  • GF_Query_Condition
  • GF_Query_Literal
  • GF_Query_Series
  • GF_Upgrade
  • GFAddOn
  • GFAddOnFeedsTable
  • GFAPI
  • GFFeedAddOn
  • GFPaymentAddOn
  • GFPaymentStatsTable
  • Gravity_Api

Functions

  • gapi
  • Overview
  • Class

Class GF_Upgrade

Located at class-gf-upgrade.php
Methods summary
public static
# get_instance( )
public boolean
# maybe_display_wizard( )

Determines if the installation wizard or upgrade wizard should be displayed and renders the appropriate screen.

Determines if the installation wizard or upgrade wizard should be displayed and renders the appropriate screen.

Returns

boolean
Returns true if a wizard is displayed, false otherwise?

Since

2.2
public
# maybe_upgrade( )

Decides to execute a fresh install of Gravity Forms, upgrade an existing installation, or do nothing if versions are up-to-date.

Decides to execute a fresh install of Gravity Forms, upgrade an existing installation, or do nothing if versions are up-to-date.

Since

2.2
public mixed
# is_downgrading( )

Is currently downgrading?

Is currently downgrading?

Returns

mixed

Since

2.2
public boolean
# upgrade( boolean|null $from_db_version = null, boolean $force_upgrade = false )

Performs an upgrade of Gravity Forms.

Performs an upgrade of Gravity Forms.

Parameters

$from_db_version
$force_upgrade

Returns

boolean

Since

2.2
public
# install( )

Performs initial install of Gravity Forms.

Performs initial install of Gravity Forms.

Since

2.2
public boolean
# is_upgrading( )

Checks whether an upgrade is already in progress.

Checks whether an upgrade is already in progress.

Returns

boolean

Since

2.2
public
# set_upgrade_ended( )
protected
# pre_upgrade_schema( $from_db_version )

Performs upgrade tasks needed to be done after the DB schema has been upgraded.

Performs upgrade tasks needed to be done after the DB schema has been upgraded.

Parameters

$from_db_version

Since

2.2
public
# upgrade_schema( )

Sets up the database for Gravity Forms

Sets up the database for Gravity Forms

Since

2.2
public
# get_db_schema( $table_name = null )
public
# check_table_schema( $table_name )
public
# dbDelta( $sql, $execute = true )
protected
# post_upgrade_schema( string $from_db_version, boolean $force_upgrade )

Performs upgrade tasks needed to be done after the DB schema has been upgraded.

Performs upgrade tasks needed to be done after the DB schema has been upgraded.

Parameters

$from_db_version
$force_upgrade

Since

2.2
public false
# post_background_upgrade( )

Performs any final tasks after the background upgrade tasks have finished.

Performs any final tasks after the background upgrade tasks have finished.

Returns

false
Return false to remove this final task from the queue.
public
# update_upgrade_status( $new_status )

Updates the status of the upgrade process

Updates the status of the upgrade process

Parameters

$new_status
public boolean
# gf_upgrade_block_submissions( )

Upgrade task to block submissions.

Upgrade task to block submissions.

Returns

boolean
public boolean
# gf_upgrade_release_submissions_block( )

Upgrade task to release the submissions block.

Upgrade task to release the submissions block.

Returns

boolean
public boolean
# gf_upgrade_230_migrate_forms( )

Upgrade forms to 2.3

Upgrade forms to 2.3

Returns

boolean
public boolean
# gf_upgrade_230_migrate_leads( )

Upgrade leads to 2.3

Upgrade leads to 2.3

Returns

boolean
public boolean
# gf_upgrade_230_migrate_incomplete_submissions( )

Upgrade incomplete submissions

Upgrade incomplete submissions

Returns

boolean
public boolean
# gf_upgrade_230_migrate_lead_notes( )

Upgrade lead notes to 2.3

Upgrade lead notes to 2.3

Returns

boolean
protected
# maybe_populate_keys( )

Imports Gravity Forms license keys, and reCAPTCHA keys from global variables.

Imports Gravity Forms license keys, and reCAPTCHA keys from global variables.

Since

2.2

Uses

GF_RECAPTCHA_PRIVATE_KEY
GF_RECAPTCHA_PUBLIC_KEY
GF_LICENSE_KEY
protected
# maybe_import_forms( )

Auto imports forms when Gravity Forms is installed based on GF_IMPORT_FILE constant.

Auto imports forms when Gravity Forms is installed based on GF_IMPORT_FILE constant.

Since

2.2

Uses

GF_IMPORT_FILE
GFCommon::get_base_path()
GFExport::import_file()
public
# maybe_import_theme_forms( )

Imports theme-specific forms, if needed.

Imports theme-specific forms, if needed.

Since

Unknown

Uses

GF_THEME_IMPORT_FILE
GFExport::import_file()
GFCommon::get_base_path()
public string|null
# get_wp_option( string $option_name )

Gets the value of an option directly from the wp_options table. This is useful for double checking the value of autoload options returned by get_option().

Gets the value of an option directly from the wp_options table. This is useful for double checking the value of autoload options returned by get_option().

The result is cached by wpdb so this is only really useful once per request.

Parameters

$option_name
The option to find.

Returns

string|null
The option value, if found.

Since

Unknown
protected
# post_upgrade_schema_2047( )

Upgrade routine from gravity forms version 2.0.4.7 and below

Upgrade routine from gravity forms version 2.0.4.7 and below

public array
# dbdelta_fix_case( array $cqueries )

Fixes case for database queries.

Fixes case for database queries.

Parameters

$cqueries
Queries to be fixed.

Returns

array
$queries Queries after processing.

Since

Unknown
public
# drop_index( string $table, string $index )

Drops a table index.

Drops a table index.

Parameters

$table
The table that the index will be dropped from.
$index
The index to be dropped.

Since

Unknown
public boolean|WP_Error
# validate_upgrade( null $do_upgrade, string $hook_extra )

Validates that Gravity Forms is doing the database upgrade, and has permissions to do so.

Validates that Gravity Forms is doing the database upgrade, and has permissions to do so.

Parameters

$do_upgrade
Not used.
$hook_extra
The plugin triggering the upgrade.

Returns

boolean|WP_Error
True if successful. Otherwise WP_Error object.

Since

Unknown
public boolean
# has_database_permission( string & $error )

Checks if Gravity Forms has permissions to make changes to the database.

Checks if Gravity Forms has permissions to make changes to the database.

Parameters

$error
Error, if there was a problem somewhere.

Returns

boolean
$has_permissions True if permissions are fine. False otherwise.

Since

Unknown

Used-by

GFForms::validate_upgrade()
public array|null
# get_versions( )

Returns the version numbers for the codebase, the current

Returns the version numbers for the codebase, the current

Returns

array|null
public
# flush_versions( )

Flushes cached versions.

Flushes cached versions.

public boolean
# requires_install( )

Returns true if Gravity Forms need to be installed. False otherwise.

Returns true if Gravity Forms need to be installed. False otherwise.

Returns

boolean

Since

2.2
public boolean
# requires_upgrade( )

Returns true if Gravity Forms need to be upgraded. False otherwise.

Returns true if Gravity Forms need to be upgraded. False otherwise.

Returns

boolean

Since

2.2
public boolean
# requires_install_wizard( )

Returns true if the install wizard should be displayed. False otherwise.

Returns true if the install wizard should be displayed. False otherwise.

Returns

boolean

Since

2.2
public boolean
# requires_upgrade_wizard( )

Returns true if the upgrade wizard should be displayed. False otherwise.

Returns true if the upgrade wizard should be displayed. False otherwise.

Returns

boolean

Since

2.2
public
# update_db_version( string $version = null )

Update DB version to current.

Update DB version to current.

Parameters

$version

Since

2.2
public
# maybe_clear_previous_upgrade( )

Checks whether the previous upgrade can be cleared and then clears it.

Checks whether the previous upgrade can be cleared and then clears it.

Since

2.3
public
# clear_previous_upgrade( )

Clears the previous upgrade.

Clears the previous upgrade.

Since

2.3
public boolean
# clear_upgrade_lock( )

Clears the upgrade lock.

Clears the upgrade lock.

Returns

boolean
False if value was not updated and true if value was updated.

Since

2.3
public array|null
# get_upgrade_lock( )

Returns the upgrade lock.

Returns the upgrade lock.

Returns

array|null

Since

2.3
public boolean
# set_submissions_block( )

Blocks submissions.

Blocks submissions.

Returns

boolean
False if value was not updated and true if value was updated.

Since

2.3
public boolean
# clear_submissions_block( )

Clears the submissions block.

Clears the submissions block.

Returns

boolean
False if value was not updated and true if value was updated.

Since

2.3
public string|null
# get_submissions_block( )

Returns the timestamp of the submissions block or null if not locked.

Returns the timestamp of the submissions block or null if not locked.

Returns

string|null

Since

2.3
public
# add_post_upgrade_admin_notices( )

Adds dismissible admin notices.

Adds dismissible admin notices.

Since

2.3
public array
# get_min_addon_requirements( )

Returns an array of add-ons with the minimum version required for this version of Gravity Forms.

Returns an array of add-ons with the minimum version required for this version of Gravity Forms.

Returns

array

Since

2.3
Gravity Forms API API documentation generated by ApiGen