GFForms
Class GFForms
Handles the loading of Gravity Forms and other core functionality
Source: gravityforms.php:233
Details
- Kind:
class - Namespace:
(global)
Properties
| Property | Type | Description |
|---|---|---|
$version | string | The version number. |
$background_upgrader | GF_Background_Upgrader | Handles background upgrade tasks. |
Methods
| Method | Description |
|---|---|
loaded() | Runs after Gravity Forms is loaded. |
register_services() | Register services and providers. |
get_service_container() | Get the Service Container for the plugin. |
has_members_plugin() | Determines if the 3rd party Members plugin is active. |
init() | Initializes Gravity Forms. |
init_preview() | Initialize any settings needed for the Preview functionality. |
screen_options_filters() | Show and save screen options on GF list pages. |
add_entry_list_filter() | Add the appropriate filter if necessary on the entry list page. |
initialize_admin_settings() | Initialize all of the admin settings based on the current admin page. |
load_first() | Ensures that Gravity Forms is loaded first. |
deactivation_hook() | Performs Gravity Forms deactivation tasks. |
activation_hook() | Performs Gravity Forms activation tasks. |
set_logging_supported() | Add Gravity Forms to the plugins that support logging. |
get_wp_option() | Gets the value of an option from the wp_options table. |
maybe_process_form() | Determines if a form should be processed, and passes it off to processing. |
process_exterior_pages() | Processes pages that are not loaded directly within WordPress |
check_update() | Checks for Gravity Forms updates. |
add_security_files() | Adds index and htaccess files to the upload root for security. |
no_conflict_mode_style() | Defines styles needed for "no conflict mode" |
no_conflict_mode_script() | Defines scripts needed for "no conflict mode". |
premium_update_push() | Integration with ManageWP. |
premium_update() | Integration with ManageWP. |
validate_upgrade() | Validates that Gravity Forms is doing the database upgrade, and has permissions to do so. |
install_translations() | Download and install translations from TranslationsPress. |
update_translations() | Download and install translations from TranslationsPress when a user updates the site language setting. |
install_addon_translations() | Download translations when an add-on is installed; before it is activated. |
user_has_cap() | Determines if a user has a particular capability. |
members_register_cap_group() | Register the Gravity Forms capabilities group with the Members plugin. |
members_register_caps() | Register the capabilities and their human readable labels with the Members plugin. |
filter_ure_capabilities_groups_tree() | Register Gravity Forms capabilities group with User Role Editor plugin. |
filter_ure_custom_capability_groups() | Register Gravity Forms capabilities with Gravity Forms group in User Role Editor plugin. |
check_upload_folder() | Tests if the upload folder is writable and displays an error message if not. |
is_gravity_ajax_action() | Checks if a Gravity Forms AJAX action is being performed. |
get_page_query_arg() | Returns the lowercase value of the string-based page query argument. |
is_gravity_page() | Determines if the current page is part of Gravity Forms. |
create_menu() | Creates the "Forms" left nav. |
get_admin_icon_b64() | Gets the admin icon for the Forms menu item |
get_admin_icon_svg() | Returns the admin icon in SVG format. |
get_parent_menu() | Returns the parent menu item. |
modify_admin_title() | Modifies the page title when on Gravity Forms settings pages. |
parse_shortcode() | Parses Gravity Forms shortcode attributes and displays the form. |
include_addon_framework() | Includes the add-on framework. |
include_feed_addon_framework() | Includes the feed class for the add-on framework. |
include_payment_addon_framework() | Includes the payment class for te add-on framework. |
include_gravity_api() | Includes the Gravity API |
ajax_parse_request() | Triggers parsing of AJAX requests and outputs the response. |
get_ajax_form_response() | Parses the ajax submission and returns the response. |
page_supports_add_form_button() | Determines if the "Add Form" button should be added to the page. |
add_form_button() | Creates the "Add Form" button. |
add_mce_popup() | Displays the popup to insert a form to a post/page. |
plugin_settings_link() | Creates the Settings link within the Plugins page. |
plugin_row() | Displays messages for the Gravity Forms listing on the Plugins page. |
maybe_display_update_notification() | Display Gravity Forms and add-ons update notifications if needed. |
get_status_messages() | Retrieves the status messages that are needed based on license type or if |
in_plugin_update_message() | Hooks into in_plugin_update_message-gravityforms/gravityforms.php and displays an update message specifically for Gravity Forms 2.3. |
display_changelog() | Displays current version details on Plugins page |
ajax_display_changelog() | Get changelog with admin-ajax.php in GFForms::maybe_display_update_notification(). |
get_changelog() | Gets the changelog for the newest version |
dashboard_setup() | Registers the dashboard widget. |
dashboard() | Displays the dashboard UI. |
dashboard_update_message() | Displays the update message on the dashboard. |
dashboard_dismiss_upgrade() | Dismisses the dashboard update message. |
get_local_dev_base_url() | Gets a local HRM-ready dev URL for scripts. |
register_scripts() | Registers Gravity Forms scripts. |
init_hook_vars() | Initialize all the actions and filters needed to output the JS hooks code. |
maybe_prepend_hooks_js_script() | Determines if context requires the hooks javascript to be written to the page and prepends |
load_hooks_with_actions() | Add various actions to manually output the JS hooks code. |
load_hooks_with_inline_script() | Use wp_add_inline_script to output the hooks JS programmatically. |
localize_hook_vars() | Localize the JS hook vars we need for addAction, etc, taking into account context. |
enqueue_admin_scripts() | Enqueues registered Gravity Forms scripts. |
get_page() | Gets current page name. |
get_form() | Gets the form. |
new_form() | Runs when the Forms menu item is clicked. |
enqueue_scripts() | Enqueues scripts |
print_form_scripts() | Prints form scripts. |
forms_page() | Displays the Forms page |
settings_page() | Runs the Gravity Forms settings page. |
system_status() | Runs the Gravity Forms system status page. |
add_settings_page() | Adds pages to the Gravity Forms Settings page |
help_page() | Displays the help page |
export_page() | Displays the Gravity Forms Export page |
ajax_process_export() | Target for the wp_ajax_gf_process_export ajax action requested from the export entries page. |
ajax_download_export() | Target for the wp_ajax_gf_download_export ajax action requested from the export entries page. |
ajax_dismiss_message() | Target for the wp_ajax_gf_dismiss_message ajax action requested from the Gravity Forms admin pages. |
ajax_disable_logging() | Target for the wp_ajax_gf_disable_logging AJAX action requested from WordPress admin pages. |
ajax_force_upgrade() | Target for the wp_ajax_gf_force_upgrade ajax action requested from the System Status page. |
addons_page() | Runs the add-ons page |
get_addon_info() | Gets all add-on information. |
get_addon_nonces() | Creates nonces for add-on installation pages. |
start_export() | Begins exports. |
get_post_category_options() | Get all post categories as option configs. |
get_post_category_values() | Gets the post categories. |
get_address_rule_value_options() | Get the address rule options for conditional logic. |
get_address_rule_values_select() | Gets and displays the rules for an address field, depending on the address type. |
get_notification_post_category_values() | Gets post categories for display in Notifications. |
all_leads_page() | Fires off the entries page. |
form_list_page() | Gets the Form List page. |
forms() | Handles the view when accessing specific forms |
get() | Obtains $_GET values or values from an array. |
post() | Obtains $_POST values. |
resend_notifications() | Resends failed notifications |
captcha_image() | Gets the CAPTCHA image for the form editor and displays it. |
update_form_active() | Updates the form status (active/inactive). |
update_notification_active() | Updates the notification status (active/inactive). |
update_confirmation_active() | Updates the confirmation status (active/inactive). |
update_lead_property() | Updates the entry properties. |
update_lead_status() | Updates the entry status. |
upgrade_license() | Runs the license upgrade. |
save_form() | Saves the form in the form editor. |
add_field() | Adds fields in the form editor. |
duplicate_field() | Duplicates fields in the form editor. |
delete_field() | Deletes fields in the form editor. |
ajax_get_form() | Retrieves the form with complete meta in the form editor. |
change_input_type() | Changes the input type in the form editor. |
refresh_field_preview() | Refreshes the field preview. |
delete_custom_choice() | Deletes custom choices from radio/checkbox/select/etc fields. |
save_custom_choice() | Saves custom choices from radio/checkbox/select/etc fields. |
delete_file() | Deletes a file from the entry detail view. |
select_export_form() | Gets the form export data. |
save_form_title() | Saves the form title. |
delete_confirmation() | Deletes a form confirmation. |
save_new_form() | Saves a new form. |
check_background_tasks() | Used to check that background tasks are working. |
form_switcher() | Displays the form switcher dropdown. |
get_form_switcher_subview_attr() | Returns the subview attribute to be used in the form switcher. |
admin_header() | Displays header for admin settings pages. |
admin_footer() | Displays footer for admin settings pages. |
add_admin_body_class() | Add a special body class when within the wp-admin area. |
top_toolbar() | Displays the top toolbar within Gravity Forms pages. |
sort_menu_items() | Sorts menu items according to priority key. |
format_toolbar_menu_items() | Formats the menu items for display in the Gravity Forms toolbar. |
get_toolbar_menu_items() | Gets the menu items to be displayed within the toolbar. |
toolbar_sub_menu_items() | Builds the sub-menu items within the Gravity Forms toolbar. |
get_form_settings_sub_menu_items() | Gets the form settings sub-menu items. |
admin_bar() | Modifies the top WordPress toolbar to add Gravity Forms menu items. |
maybe_auto_update() | Determines if automatic updating should be processed. |
should_update_to_version() | Determines if the current version should update to the offered version. |
is_auto_update_disabled() | Checks if automatic updates are disabled. |
auto_update_message() | Filter the auto-update message on the plugins page. |
auto_update_debug_message() | Filter the auto-update message on the Site Health page. |
is_gf_or_addon() | Check if a plugin is Gravity Forms or an offical add-on. |
handle_ajax_do_shortcode() | Output a shortcode. |
action_print_media_templates() | Displays the shortcode editor. |
get_view() | Gets the view and loads the appropriate template. |
modify_tiny_mce_4() | Modifies the TinyMCE editor styling. |
get_shortcodes() | Gets the available shortcode attributes. |
enqueue_form_scripts() | Enqueues scripts needed to display the form. |
maybe_display_wizard() | Displays the installation wizard or upgrade wizard when appropriate. |
maybe_display_logging_notice() | Display admin notice when logging is enabled. |
set_screen_options() | Sets the screen options for the entry list. |
show_screen_options() | Returns the markup for the screen options for the entry list. |
load_screen_options() | Loads the screen options for the entry detail page. |
cron() | Daily cron task. Target for the gravityforms_cron action. |
delete_old_export_files() | Deletes all entry export files from the server that haven't been claimed within 24 hours. |
delete_old_log_files() | Deletes any log files that are older than one month. |
load_admin_bar_styles() | Hooked into the 'admin_head' action. |
get_image_sizes() | Retrieve a list of the image sizes to be registered. |
register_image_sizes() | Add Gravity Forms image sizes. |
preload_webfonts() | Preload the webfonts we use as font-face directives to avoid FOUT. |
setup() | |
setup_database() | |
init_background_upgrader() | Creates an instance of GF_Background_Upgrader and stores it in GFForms::$background_upgrader |
action_admin_notices() | Target for the admin_notices action. |
register_data_exporter() | Registers the Gravity Forms data exporter. |
register_data_eraser() | Registers the Gravity Forms data eraser. |
data_exporter() | Callback for the WordPress data exporter. |
data_eraser() | Callback for the WordPress data eraser. |
init_buffer() | Initialize an ob_start() buffer with a callback to ensure our hooks JS has output on the page. |
ensure_hook_js_output() | Callback to fire when ob_flush() is called. Allows us to ensure that our Hooks JS has been output on the page, |
get_installed_plugins() | Get information about all installed plugins. |
Method Reference
loaded()
public static function loaded()
Runs after Gravity Forms is loaded.
Initializes add-ons.
Returns
void
Since: Unknown
Source: gravityforms.php:275
register_services()
public static function register_services()
Register services and providers.
Returns
void
Since: 2.5.11
Source: gravityforms.php:306
get_service_container()
public static function get_service_container()
Get the Service Container for the plugin.
Returns
Since: 2.5.11
Source: gravityforms.php:349
has_members_plugin()
public static function has_members_plugin( $deprecated=null )
Determines if the 3rd party Members plugin is active.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$deprecated | null | null | No longer used. Previously the minimum version number of Members plugin to check for. |
Returns
boolean— True if the Members plugin is active. False otherwise.
Since:
2.4.13(Removed Members v1 support.)Unknown
Source: gravityforms.php:401
init()
public static function init()
Initializes Gravity Forms.
Returns
void
Since:
Unknown2.6.9(Moved background upgrader and feed processor init to \Gravity_Forms\Gravity_Forms\Async\GF_Background_Process_Service_Provider().)
Source: gravityforms.php:413
init_preview()
public static function init_preview()
Initialize any settings needed for the Preview functionality.
Returns
void
Since: 2.5
Source: gravityforms.php:659
screen_options_filters()
public static function screen_options_filters()
Show and save screen options on GF list pages.
Returns
void
Since: 2.5
Source: gravityforms.php:686
add_entry_list_filter()
public static function add_entry_list_filter()
Add the appropriate filter if necessary on the entry list page.
Returns
void
Since: 2.5
Source: gravityforms.php:713
initialize_admin_settings()
public static function initialize_admin_settings()
Initialize all of the admin settings based on the current admin page.
Returns
void
Since: 2.5
Source: gravityforms.php:734
load_first()
public static function load_first()
Ensures that Gravity Forms is loaded first.
Returns
void
Since: Unknown
Source: gravityforms.php:795
deactivation_hook()
public static function deactivation_hook()
Performs Gravity Forms deactivation tasks.
Returns
void
Since:
Unknown2.9.24(Updated to delete the multifile upload page slug, so it will be regenerated on the next activation.)
Source: gravityforms.php:814
activation_hook()
public static function activation_hook()
Performs Gravity Forms activation tasks.
Since:
2.32.6.9(Moved background upgrader init to \Gravity_Forms\Gravity_Forms\Async\GF_Background_Process_Service_Provider().)
Source: gravityforms.php:826
set_logging_supported()
public static function set_logging_supported( $plugins )
Add Gravity Forms to the plugins that support logging.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$plugins | array | Existing plugins that support logging. |
Returns
array— $plugins Supported plugins.
Since: Unknown
Source: gravityforms.php:841
get_wp_option()
public static function get_wp_option( $option_name )
Gets the value of an option from the wp_options table.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$option_name | string | The option to find. |
Returns
string— The option value, if found.
Since: Unknown
Source: gravityforms.php:860
maybe_process_form()
public static function maybe_process_form()
Determines if a form should be processed, and passes it off to processing.
Returns
void
Since: Unknown
Source: gravityforms.php:879
process_exterior_pages()
public static function process_exterior_pages()
Processes pages that are not loaded directly within WordPress
Returns
void
Since: Unknown
Source: gravityforms.php:908
check_update()
public static function check_update( $update_plugins_option )
Checks for Gravity Forms updates.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$update_plugins_option | GFAutoUpgrade | The GFAutoUpgrade object. |
Returns
- GFAutoUpgrade — The GFAutoUpgrade object.
Since: Unknown
Source: gravityforms.php:962
add_security_files()
public static function add_security_files()
Adds index and htaccess files to the upload root for security.
Returns
void
Since: Unknown
Source: gravityforms.php:978
no_conflict_mode_style()
public static function no_conflict_mode_style()
Defines styles needed for "no conflict mode"
Since: Unknown
Source: gravityforms.php:1094
no_conflict_mode_script()
public static function no_conflict_mode_script()
Defines scripts needed for "no conflict mode".
Since: Unknown
Source: gravityforms.php:1142
premium_update_push()
public static function premium_update_push( $premium_update )
Integration with ManageWP.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$premium_update | array | ManageWP update array. |
Returns
array— $premium_update
Since: Unknown
Source: gravityforms.php:1378
premium_update()
public static function premium_update( $premium_update )
Integration with ManageWP.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$premium_update | array | ManageWP update array. |
Returns
array— $premium_update.
Since: Unknown
Source: gravityforms.php:1406
validate_upgrade()
public static function validate_upgrade( $do_upgrade, $hook_extra )
Validates that Gravity Forms is doing the database upgrade, and has permissions to do so.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$do_upgrade | null | Not used. | |
$hook_extra | string | The plugin triggering the upgrade. |
Returns
bool| WP_Error — True if successful. Otherwise WP_Error object.
Since: Unknown
Source: gravityforms.php:1436
install_translations()
public static function install_translations( $new_language='', $slug='gravityforms' )
Download and install translations from TranslationsPress.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$new_language | string | '' | The new site language, only set if user is updating their language settings. |
$slug | string | 'gravityforms' | The plugin or add-on slug the translations are to be installed for. |
Since:
2.52.5.6(Added the $slug param.)
Source: gravityforms.php:1450
update_translations()
public static function update_translations( $old_language, $new_language )
Download and install translations from TranslationsPress when a user updates the site language setting.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$old_language | string | The language before the user changed their language setting. | |
$new_language | string | The new language after the user changed their language setting. |
Since: 2.5
Source: gravityforms.php:1462
install_addon_translations()
public static function install_addon_translations( $upgrader_object, $hook_extra )
Download translations when an add-on is installed; before it is activated.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$upgrader_object | object | WP_Upgrader Instance. | |
$hook_extra | array | Item update data. |
Since: 2.5
Source: gravityforms.php:1489
user_has_cap()
public static function user_has_cap( $all_caps, $cap, $args, $user=null )
Determines if a user has a particular capability.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$all_caps | array | All capabilities. | |
$cap | array | Required capability. Stored in the [0] key. | |
$args | array | Not used. | |
$user | WP_User | null | The relevant user. |
Returns
array— $all_caps All capabilities.
Since: Unknown
Source: gravityforms.php:1538
members_register_cap_group()
public static function members_register_cap_group()
Register the Gravity Forms capabilities group with the Members plugin.
Since: 2.4
Source: gravityforms.php:1580
members_register_caps()
public static function members_register_caps()
Register the capabilities and their human readable labels with the Members plugin.
Since: 2.4
Source: gravityforms.php:1599
filter_ure_capabilities_groups_tree()
public static function filter_ure_capabilities_groups_tree( $groups=[] )
Register Gravity Forms capabilities group with User Role Editor plugin.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$groups | array | [] | Existing capabilities groups. |
Returns
array
Since: 2.4
Source: gravityforms.php:1643
filter_ure_custom_capability_groups()
public static function filter_ure_custom_capability_groups( $groups=[], $cap_id='' )
Register Gravity Forms capabilities with Gravity Forms group in User Role Editor plugin.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$groups | array | [] | Current capability groups. |
$cap_id | string | '' | Capability identifier. |
Returns
array
Since: 2.4
Source: gravityforms.php:1665
check_upload_folder()
public static function check_upload_folder()
Tests if the upload folder is writable and displays an error message if not.
Returns
void
Since: Unknown
Source: gravityforms.php:1687
is_gravity_ajax_action()
public static function is_gravity_ajax_action()
Checks if a Gravity Forms AJAX action is being performed.
Returns
bool— True if performing a Gravity Forms AJAX request. False, otherwise.
Since: Unknown
Source: gravityforms.php:1703
get_page_query_arg()
public static function get_page_query_arg()
Returns the lowercase value of the string-based page query argument.
Returns
string
Since: 2.9.1
Source: gravityforms.php:1756
is_gravity_page()
public static function is_gravity_page()
Determines if the current page is part of Gravity Forms.
Returns true if the current page is one of Gravity Forms page or first-party add-on page. False otherwise.
Returns
bool
Since: Unknown
Source: gravityforms.php:1775
create_menu()
public static function create_menu()
Creates the "Forms" left nav.
WordPress generates the page hook suffix and screen ID by passing the translated menu title through sanitize_title(). Screen options and metabox preferences are stored using the screen ID therefore:
- The page suffix or screen ID should never be hard-coded. Use get_current_screen()->id.
- The page suffix and screen ID must never change. e.g. When an update for Gravity Forms is available an icon will be added to the the menu title. The HTML for the icon will be stripped entirely by sanitize_title() because the number 1 is encoded.
Returns
void
Since: Unknown
Source: gravityforms.php:1800
get_admin_icon_b64()
public static function get_admin_icon_b64( $color=false )
Gets the admin icon for the Forms menu item
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$color | bool | string | false | The hex color if changing the color of the icon. Defaults to false. |
Returns
string— Base64 encoded icon string.
Since:
Unknown2.5(Updated the logo icon.)
Source: gravityforms.php:1887
get_admin_icon_svg()
public static function get_admin_icon_svg( $color='#999999' )
Returns the admin icon in SVG format.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$color | string | '#999999' | The hex color if changing the color of the icon. Defaults to #999999. |
Returns
string
Since:
Unknown2.5(Updated the logo icon.)
Source: gravityforms.php:1913
get_parent_menu()
public static function get_parent_menu( $addon_menus )
Returns the parent menu item.
It needs to be the same as the first sub-menu (otherwise WP will duplicate the main menu as a sub-menu).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$addon_menus | array | Contains the add-on menu items. |
Returns
array— $parent The parent menu array.
Since: Unknown
Source: gravityforms.php:1931
modify_admin_title()
public static function modify_admin_title( $admin_title, $title )
Modifies the page title when on Gravity Forms settings pages.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$admin_title | string | The current admin title | |
$title | string | Not used. |
Returns
string— The modified admin title.
Since: Unknown
Source: gravityforms.php:1972
parse_shortcode()
public static function parse_shortcode( $attributes, $content=null )
Parses Gravity Forms shortcode attributes and displays the form.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$attributes | array | The shortcode attributes. | |
$content | null | null | Defines the content of the shortcode. Defaults to null. |
Returns
mixed|string|void
Since: Unknown
Source: gravityforms.php:2201
include_addon_framework()
public static function include_addon_framework()
Includes the add-on framework.
Since: Unknown
Source: gravityforms.php:2286
include_feed_addon_framework()
public static function include_feed_addon_framework()
Includes the feed class for the add-on framework.
Since: Unknown
Source: gravityforms.php:2296
include_payment_addon_framework()
public static function include_payment_addon_framework()
Includes the payment class for te add-on framework.
Since: Unknown
Source: gravityforms.php:2306
include_gravity_api()
public static function include_gravity_api()
Includes the Gravity API
Since: Unknown
Source: gravityforms.php:2316
ajax_parse_request()
public static function ajax_parse_request( $wp )
Triggers parsing of AJAX requests and outputs the response.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$wp | null | Not used. |
Since: Unknown
Source: gravityforms.php:2331
get_ajax_form_response()
public static function get_ajax_form_response()
Parses the ajax submission and returns the response.
Returns
mixed|string|void| WP_Error
Since: 2.4.18
Source: gravityforms.php:2344
page_supports_add_form_button()
public static function page_supports_add_form_button()
Determines if the "Add Form" button should be added to the page.
Returns
boolean— $display_add_form_button True if the page is supported. False otherwise.
Since: Unknown
Source: gravityforms.php:2380
add_form_button()
public static function add_form_button()
Creates the "Add Form" button.
Since: Unknown
Source: gravityforms.php:2406
add_mce_popup()
public static function add_mce_popup()
Displays the popup to insert a form to a post/page.
Since: Unknown
Source: gravityforms.php:2443
plugin_settings_link()
public static function plugin_settings_link( $links, $file )
Creates the Settings link within the Plugins page.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$links | array | Links associated with the plugin. | |
$file | string | The plugin filename. |
Returns
array— $links Links associated with the plugin, after the Settings link is added.
Since: Unknown
Source: gravityforms.php:2495
plugin_row()
public static function plugin_row( $plugin_name, $plugin_data )
Displays messages for the Gravity Forms listing on the Plugins page.
Displays if the key is invalid or an update is available.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$plugin_name | string | The plugin filename. Immediately overwritten. | |
$plugin_data | array | An array of plugin data. |
Since:
Unknown2.4.15(Update to improve multisite updates.)
Source: gravityforms.php:2517
maybe_display_update_notification()
public static function maybe_display_update_notification( $plugin_name, $plugin_data, $slug='', $version='' )
Display Gravity Forms and add-ons update notifications if needed.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$plugin_name | string | The plugin filename. Immediately overwritten. | |
$plugin_data | array | An array of plugin data. | |
$slug | string | '' | The add-on slug. |
$version | string | '' | The add-on version. |
Since: 2.4.15
Source: gravityforms.php:2551
get_status_messages()
public static function get_status_messages( $plugin_name, $plugin_data, $slug='', $version='' )
Retrieves the status messages that are needed based on license type or if
an update is available. Updates only apply to the Sysetm Settings Updates page, WP handles the Plugins page update messages.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$plugin_name | string | The plugin filename. | |
$plugin_data | array | The WP plugin header data. | |
$slug | string | '' | The plugin slug |
$version | string | '' | The current version of the plugin. |
Returns
array— The status messages.
Source: gravityforms.php:2593
in_plugin_update_message()
public static function in_plugin_update_message( $args, $response )
Hooks into in_plugin_update_message-gravityforms/gravityforms.php and displays an update message specifically for Gravity Forms 2.3.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$args | |||
$response |
Source: gravityforms.php:2729
display_changelog()
public static function display_changelog()
Displays current version details on Plugins page
Since: Unknown
Source: gravityforms.php:2771
ajax_display_changelog()
public static function ajax_display_changelog()
Get changelog with admin-ajax.php in GFForms::maybe_display_update_notification().
Since: 2.4.15
Source: gravityforms.php:2787
get_changelog()
public static function get_changelog()
Gets the changelog for the newest version
Returns
string— $page_text The changelog. Error message if there's an issue.
Since: Unknown
Source: gravityforms.php:2801
dashboard_setup()
public static function dashboard_setup()
Registers the dashboard widget.
Since: Unknown
Source: gravityforms.php:2840
dashboard()
public static function dashboard()
Displays the dashboard UI.
Since: Unknown
Source: gravityforms.php:2860
dashboard_update_message()
public static function dashboard_update_message()
Displays the update message on the dashboard.
Since: Unknown
Source: gravityforms.php:2932
dashboard_dismiss_upgrade()
public static function dashboard_dismiss_upgrade()
Dismisses the dashboard update message.
Since: Unknown
Source: gravityforms.php:2971
get_local_dev_base_url()
public static function get_local_dev_base_url()
Gets a local HRM-ready dev URL for scripts.
Returns
string
Since: 2.6
Source: gravityforms.php:2992
register_scripts()
public static function register_scripts()
Registers Gravity Forms scripts.
If SCRIPT_DEBUG constant is set, uses the un-minified version.
Since: Unknown
Source: gravityforms.php:3025
init_hook_vars()
public static function init_hook_vars()
Initialize all the actions and filters needed to output the JS hooks code.
Since: 2.5.2
Source: gravityforms.php:3141
maybe_prepend_hooks_js_script()
public static function maybe_prepend_hooks_js_script( $form_string )
Determines if context requires the hooks javascript to be written to the page and prepends
it to the form string if so
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_string | string String containing the form markup. |
Returns
string— Returns the original form string, or the form string prepended with the hooks scripts.
Since: 2.5.14
Source: gravityforms.php:3170
load_hooks_with_actions()
public static function load_hooks_with_actions()
Add various actions to manually output the JS hooks code.
Since: 2.5.2
Source: gravityforms.php:3204
load_hooks_with_inline_script()
public static function load_hooks_with_inline_script()
Use wp_add_inline_script to output the hooks JS programmatically.
Since: 2.5.2
Source: gravityforms.php:3217
localize_hook_vars()
public static function localize_hook_vars()
Localize the JS hook vars we need for addAction, etc, taking into account context.
Since: 2.5.3
Source: gravityforms.php:3237
enqueue_admin_scripts()
public static function enqueue_admin_scripts( $hook )
Enqueues registered Gravity Forms scripts.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$hook | null | Not used. |
Since: Unknown
Source: gravityforms.php:3277
get_page()
public static function get_page()
Gets current page name.
Returns
bool|string— Page name or false. Page names: new_form form_list form_editor form_settings confirmation notification_list notification_new notification_edit entry_list entry_detail entry_detail_edit settings addons export_entry export_form import_form updates
Since: Unknown
Source: gravityforms.php:3536
get_form()
public static function get_form( $form_id, $display_title=true, $display_description=true, $force_display=false, $field_values=null, $ajax=false, $tabindex=0, $theme=null, $style_settings=null )
Gets the form.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_id | |||
$display_title | true | ||
$display_description | true | ||
$force_display | false | ||
$field_values | null | ||
$ajax | false | ||
$tabindex | 0 | ||
$theme | null | ||
$style_settings | null |
Since: Unknown
Source: gravityforms.php:3643
new_form()
public static function new_form()
Runs when the Forms menu item is clicked.
Checks to see if the installation wizard should be displayed instead.
Since: Unknown
Source: gravityforms.php:3657
enqueue_scripts()
public static function enqueue_scripts()
Enqueues scripts
Since: Unknown
Source: gravityforms.php:3674
print_form_scripts()
public static function print_form_scripts( $form, $ajax )
Prints form scripts.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | |||
$ajax |
Since: Unknown
Source: gravityforms.php:3695
forms_page()
public static function forms_page( $form_id )
Displays the Forms page
Passes everything off to GFFormDetail::forms_page
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_id |
Since: Unknown
Source: gravityforms.php:3710
settings_page()
public static function settings_page()
Runs the Gravity Forms settings page.
Checks to see if the installation wizard should be displayed.
Since: Unknown
Source: gravityforms.php:3728
system_status()
public static function system_status()
Runs the Gravity Forms system status page.
Since: 2.2
Source: gravityforms.php:3746
add_settings_page()
public static function add_settings_page( $name, $handle='', $icon_path='' )
Adds pages to the Gravity Forms Settings page
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$name | |||
$handle | '' | ||
$icon_path | '' |
Since: Unknown
Source: gravityforms.php:3762
help_page()
public static function help_page()
Displays the help page
Since: Unknown
Source: gravityforms.php:3775
export_page()
public static function export_page()
Displays the Gravity Forms Export page
Since: Unknown
Source: gravityforms.php:3789
ajax_process_export()
public static function ajax_process_export()
Target for the wp_ajax_gf_process_export ajax action requested from the export entries page.
Since: 2.0.0
Source: gravityforms.php:3808
ajax_download_export()
public static function ajax_download_export()
Target for the wp_ajax_gf_download_export ajax action requested from the export entries page.
Since: 2.0.0
Source: gravityforms.php:3823
ajax_dismiss_message()
public static function ajax_dismiss_message()
Target for the wp_ajax_gf_dismiss_message ajax action requested from the Gravity Forms admin pages.
Since: 2.0.0
Source: gravityforms.php:3837
ajax_disable_logging()
public static function ajax_disable_logging()
Target for the wp_ajax_gf_disable_logging AJAX action requested from WordPress admin pages.
Since: 2.2.4.2
Source: gravityforms.php:3857
ajax_force_upgrade()
public static function ajax_force_upgrade()
Target for the wp_ajax_gf_force_upgrade ajax action requested from the System Status page.
Outputs a JSON string with the status and then triggers the background upgrader usually handled by the cron healthcheck.
Since: 2.3.0.4
Source: gravityforms.php:3885
addons_page()
public static function addons_page()
Runs the add-ons page
If the display wizard needs to be displayed, do that instead.
Since: Unknown
Source: gravityforms.php:3932
get_addon_info()
public static function get_addon_info( $api, $action, $args )
Gets all add-on information.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$api | string | The API URL. | |
$action | string | The action needed. Determines the view. | |
$args | object | Additional arguments sent to the API |
Returns
bool|object— API object if successful. False if error.
Since: Unknown
Source: gravityforms.php:3988
get_addon_nonces()
public static function get_addon_nonces()
Creates nonces for add-on installation pages.
Returns
array|bool— $nonces The nonces if the API response is fine. Otherwise, false.
Since: Unknown
Source: gravityforms.php:4019
start_export()
public static function start_export()
Begins exports.
Since: Unknown
Source: gravityforms.php:4044
get_post_category_options()
public static function get_post_category_options()
Get all post categories as option configs.
Returns
array
Since: 2.5
Source: gravityforms.php:4056
get_post_category_values()
public static function get_post_category_values()
Gets the post categories.
Since: Unknown
Source: gravityforms.php:4083
get_address_rule_value_options()
public static function get_address_rule_value_options( $form_id )
Get the address rule options for conditional logic.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_id |
Returns
array— Array of options.
Since: 2.5
Source: gravityforms.php:4097
get_address_rule_values_select()
public static function get_address_rule_values_select()
Gets and displays the rules for an address field, depending on the address type.
Since: Unknown
Source: gravityforms.php:4122
get_notification_post_category_values()
public static function get_notification_post_category_values()
Gets post categories for display in Notifications.
Since: Unknown
Source: gravityforms.php:4159
all_leads_page()
public static function all_leads_page()
Fires off the entries page.
Checks if the installation wizard is needed. If so, does that instead.
Since: Unknown
Source: gravityforms.php:4176
form_list_page()
public static function form_list_page()
Gets the Form List page.
Since: Unknown
Source: gravityforms.php:4216
forms()
public static function forms()
Handles the view when accessing specific forms
If needed, displays the installation wizard instead.
Since: Unknown
Source: gravityforms.php:4237
get()
public static function get( $name, $array=null )
Obtains $_GET values or values from an array.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$name | string | The ID of a specific value. | |
$array | array | null | An optional array to search through. Defaults to null. |
Returns
string— The value. Empty if not found.
Since: Unknown
Source: gravityforms.php:4292
post()
public static function post( $name, $do_stripslashes=true )
Obtains $_POST values.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$name | string | The ID of the value to obtain | |
$do_stripslashes | bool | true | If stripslashes_deep should be run on the result. Defaults to true. |
Returns
string— The value. Empty if not found.
Since: Unknown
Source: gravityforms.php:4319
resend_notifications()
public static function resend_notifications()
Resends failed notifications
Since:
Unknown2.10.0(Updated to use GFAPI::send_notification().)
Source: gravityforms.php:4334
captcha_image()
public static function captcha_image()
Gets the CAPTCHA image for the form editor and displays it.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4474
update_form_active()
public static function update_form_active()
Updates the form status (active/inactive).
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4508
update_notification_active()
public static function update_notification_active()
Updates the notification status (active/inactive).
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4528
update_confirmation_active()
public static function update_confirmation_active()
Updates the confirmation status (active/inactive).
Called via AJAX.
Since:
UnknownGFFormsModel::update_confirmation_active()
Source: gravityforms.php:4548
update_lead_property()
public static function update_lead_property()
Updates the entry properties.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4568
update_lead_status()
public static function update_lead_status()
Updates the entry status.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4588
upgrade_license()
public static function upgrade_license()
Runs the license upgrade.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4659
save_form()
public static function save_form()
Saves the form in the form editor.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4675
add_field()
public static function add_field()
Adds fields in the form editor.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4690
duplicate_field()
public static function duplicate_field()
Duplicates fields in the form editor.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4705
delete_field()
public static function delete_field()
Deletes fields in the form editor.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4720
ajax_get_form()
public static function ajax_get_form()
Retrieves the form with complete meta in the form editor.
Called via AJAX.
Since: 2.9.9
Source: gravityforms.php:4735
change_input_type()
public static function change_input_type()
Changes the input type in the form editor.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4750
refresh_field_preview()
public static function refresh_field_preview()
Refreshes the field preview.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4765
delete_custom_choice()
public static function delete_custom_choice()
Deletes custom choices from radio/checkbox/select/etc fields.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4780
save_custom_choice()
public static function save_custom_choice()
Saves custom choices from radio/checkbox/select/etc fields.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4795
delete_file()
public static function delete_file()
Deletes a file from the entry detail view.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4810
select_export_form()
public static function select_export_form()
Gets the form export data.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4835
save_form_title()
public static function save_form_title()
Saves the form title.
Called via AJAX.
Since: 2.0.2.5
Source: gravityforms.php:4903
delete_confirmation()
public static function delete_confirmation()
Deletes a form confirmation.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4918
save_new_form()
public static function save_new_form()
Saves a new form.
Called via AJAX.
Since: Unknown
Source: gravityforms.php:4934
check_background_tasks()
public static function check_background_tasks()
Used to check that background tasks are working.
Since: 2.3
Source: gravityforms.php:4944
form_switcher()
public static function form_switcher( $title='', $form_id='' )
Displays the form switcher dropdown.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$title | string | '' | The form title. |
$form_id | string | '' | The form ID. |
Since:
Unknown2.9.6(Updated to list only the recent forms.)
Source: gravityforms.php:4959
get_form_switcher_subview_attr()
public static function get_form_switcher_subview_attr( $form_id )
Returns the subview attribute to be used in the form switcher.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_id | int | The form ID. |
Returns
string— The subview attribute.
Since: 2.9.6
Source: gravityforms.php:5145
admin_header()
public static function admin_header( $tabs=[], $toolbar=true )
Displays header for admin settings pages.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$tabs | array | [] | |
$toolbar | bool | true |
Since: 2.5
Source: gravityforms.php:5171
admin_footer()
public static function admin_footer()
Displays footer for admin settings pages.
Since: 2.5
Source: gravityforms.php:5261
add_admin_body_class()
public static function add_admin_body_class( $body_classes )
Add a special body class when within the wp-admin area.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$body_classes | string | The current body classes. |
Returns
string
Since: 2.5
Source: gravityforms.php:5277
top_toolbar()
public static function top_toolbar()
Displays the top toolbar within Gravity Forms pages.
Since: Unknown
Source: gravityforms.php:5302
sort_menu_items()
public static function sort_menu_items( &$menu_items )
Sorts menu items according to priority key.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
&$menu_items | array | Contains the menu items to be displayed |
Since: 2.5
Source: gravityforms.php:5366
format_toolbar_menu_items()
public static function format_toolbar_menu_items( $menu_items, $compact=false )
Formats the menu items for display in the Gravity Forms toolbar.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$menu_items | array | Contains the menu items to be displayed | |
$compact | bool | false | If true, uses the compact labels. Defaults to false. |
Returns
string— $output The formatted toolbar menu items
Since: Unknown
Source: gravityforms.php:5389
get_toolbar_menu_items()
public static function get_toolbar_menu_items( $form_id, $compact=false )
Gets the menu items to be displayed within the toolbar.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_id | string | The form ID. | |
$compact | bool | false | True if the compact label should be used. Defaults to false. |
Returns
array— $menu_items The menu items to be displayed.
Since: Unknown
Source: gravityforms.php:5482
toolbar_sub_menu_items()
public static function toolbar_sub_menu_items( $menu_items, $compact=false )
Builds the sub-menu items within the Gravity Forms toolbar.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$menu_items | array | The menu items to be built | |
$compact | bool | false | True if the compact label should be used. False otherwise. |
Returns
string— $sub_menu_items_string The menu item HTML
Since: Unknown
Source: gravityforms.php:5560
get_form_settings_sub_menu_items()
public static function get_form_settings_sub_menu_items( $form_id )
Gets the form settings sub-menu items.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_id | string | The form ID. |
Returns
array— $sub_menu_items The sub-menu items.
Since: Unknown
Source: gravityforms.php:5600
admin_bar()
public static function admin_bar()
Modifies the top WordPress toolbar to add Gravity Forms menu items.
Since: Unknown
Source: gravityforms.php:5701
maybe_auto_update()
public static function maybe_auto_update( $update, $item, $slug='gravityforms', $current_version=null )
Determines if automatic updating should be processed.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$update | bool | null | Whether to update. | |
$item | object | The update offer object. | |
$slug | string | 'gravityforms' | The plugin or add-on slug. Optional. Defaults to gravityforms. |
$current_version | string | null | The current version. Optional. Defaults to the Gravity Forms version. |
Returns
bool|null
Since:
Unknown2.9.24(Added the optional $slug and $current_version params.)
Source: gravityforms.php:5861
should_update_to_version()
public static function should_update_to_version( $offered_version, $current_version=null )
Determines if the current version should update to the offered version.
Minor and patch versions should only be installed automatically when the major version component of the offered version is the same as the current version.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$offered_version | string | The version number to be compared against the installed version number. | |
$current_version | null | string | null | The current version number. If null, the installed Gravity Forms version number will be used. |
Returns
bool
Since:
2.4.232.9.24(Added the optional $current_ver param,)
Source: gravityforms.php:5920
is_auto_update_disabled()
public static function is_auto_update_disabled( $enabled=null, $slug='gravityforms' )
Checks if automatic updates are disabled.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$enabled | bool | null | null | Indicates if auto updates are enabled. |
$slug | string | 'gravityforms' | The plugin or add-on slug. Optional. Default is 'gravityforms'. |
Returns
bool— True if auto update is disabled. False otherwise.
Since:
Unknown2.7.2(Added the optional $enabled param.)
Source: gravityforms.php:5949
auto_update_message()
public static function auto_update_message( $html, $plugin_file, $plugin_data )
Filter the auto-update message on the plugins page.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$html | string | HTML of the auto-update message. | |
$plugin_file | string | Plugin file. | |
$plugin_data | array | Plugin details. |
Returns
string|void
Since: Unknown
Source: gravityforms.php:5988
auto_update_debug_message()
public static function auto_update_debug_message( $auto_updates_string, $plugin_path, $plugin, $enabled )
Filter the auto-update message on the Site Health page.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$auto_updates_string | string | Text of auto-update message. | |
$plugin_path | string | Plugin path. | |
$plugin | array | Plugin details. | |
$enabled | bool | Whether auto-updates are enabled. |
Returns
string|void
Since: 2.4.20.2
Source: gravityforms.php:6015
is_gf_or_addon()
public static function is_gf_or_addon( $plugin_uri )
Check if a plugin is Gravity Forms or an offical add-on.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$plugin_uri | string | The URI of the plugin as found in the plugin header. |
Returns
bool
Since: 2.4.20.2
Source: gravityforms.php:6039
handle_ajax_do_shortcode()
public static function handle_ajax_do_shortcode()
Output a shortcode.
Called via AJAX. Used for displaying the shortcode in the TinyMCE editor.
Since: Unknown
Source: gravityforms.php:6073
action_print_media_templates()
public static function action_print_media_templates()
Displays the shortcode editor.
Returns
void
Since: Unknown
Source: gravityforms.php:6123
get_view()
public static function get_view( $template )
Gets the view and loads the appropriate template.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$template | string | The template to be loaded. |
Returns
mixed— The contents of the template file.
Since: Unknown
Source: gravityforms.php:6140
modify_tiny_mce_4()
public static function modify_tiny_mce_4( $init )
Modifies the TinyMCE editor styling.
Called from the tiny_mce_before_init filter
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$init | array | Init data passed from the tiny_mce_before_init filter. |
Returns
array— $init Data after filtering.
Since: Unknown
Source: gravityforms.php:6172
get_shortcodes()
public static function get_shortcodes()
Gets the available shortcode attributes.
Returns
array— $shortcodes Shortcode attributes.
Since: Unknown
Source: gravityforms.php:6213
enqueue_form_scripts()
public static function enqueue_form_scripts( $form_id, $is_ajax=false )
Enqueues scripts needed to display the form.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_id | string | The displayed form ID. | |
$is_ajax | bool | false | True if form uses AJAX. False otherwise. |
Since: Unknown
Source: gravityforms.php:6337
maybe_display_wizard()
public static function maybe_display_wizard()
Displays the installation wizard or upgrade wizard when appropriate.
Returns
bool— Was a wizard displayed?
Since: 2.2
Source: gravityforms.php:6356
maybe_display_logging_notice()
public static function maybe_display_logging_notice()
Display admin notice when logging is enabled.
Since: 2.4
Source: gravityforms.php:6367
set_screen_options()
public static function set_screen_options( $status, $option, $value )
Sets the screen options for the entry list.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$status | bool | int | Screen option value. Not used. Defaults to false. | |
$option | string | The option to check. | |
$value | int | The number of rows to display per page. |
Returns
array— $return The filtered data
Since: 2.0
Source: gravityforms.php:6431
show_screen_options()
public static function show_screen_options( $status, $args )
Returns the markup for the screen options for the entry list.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$status | string | The current screen settings | |
$args | WP_Screen | WP_Screen object |
Returns
string— $return The filtered screen settings
Since: 2.0
Source: gravityforms.php:6462
load_screen_options()
public static function load_screen_options()
Loads the screen options for the entry detail page.
Since: 2.0
Source: gravityforms.php:6487
cron()
public static function cron()
Daily cron task. Target for the gravityforms_cron action.
- Performs self-healing
- Adds empty index files
- Deletes unclaimed export files.
- Deleted old log files.
- Deletes orphaned entry rows from the lead table.
Since: 2.0.0
Source: gravityforms.php:6517
delete_old_export_files()
public static function delete_old_export_files()
Deletes all entry export files from the server that haven't been claimed within 24 hours.
Since: 2.0.0
Source: gravityforms.php:6548
delete_old_log_files()
public static function delete_old_log_files()
Deletes any log files that are older than one month.
Since: 2.0.0
Source: gravityforms.php:6580
load_admin_bar_styles()
public static function load_admin_bar_styles()
Hooked into the 'admin_head' action.
Outputs the styles for the Forms Toolbar menu. Outputs gf vars if required.
Since: 2.0.1.2
Source: gravityforms.php:6615
get_image_sizes()
public static function get_image_sizes()
Retrieve a list of the image sizes to be registered.
Returns
array— $image_sizes The array of image sizes with their respective attributes.
Since: 2.9.2
Source: gravityforms.php:6670
register_image_sizes()
public static function register_image_sizes()
Add Gravity Forms image sizes.
Returns
void
Since: 2.9
Source: gravityforms.php:6706
preload_webfonts()
public static function preload_webfonts()
Preload the webfonts we use as font-face directives to avoid FOUT.
Returns
void
Since: 2.5
Source: gravityforms.php:6742
setup()
public static function setup( $force_setup=false )
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$force_setup | false |
Deprecated: 3.0.0.0
Source: gravityforms.php:6762
setup_database()
public static function setup_database()
Deprecated: 3.0.0.0
Source: gravityforms.php:6778
init_background_upgrader()
public static function init_background_upgrader()
Creates an instance of GF_Background_Upgrader and stores it in GFForms::$background_upgrader
Since: 2.3
Source: gravityforms.php:6789
action_admin_notices()
public static function action_admin_notices()
Target for the admin_notices action.
Since: 2.3 (Displays site-side dismissible notices.)
Source: gravityforms.php:6803
register_data_exporter()
public static function register_data_exporter( $exporters )
Registers the Gravity Forms data exporter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$exporters | array |
Returns
array
Since: 2.4
Source: gravityforms.php:6816
register_data_eraser()
public static function register_data_eraser( $erasers )
Registers the Gravity Forms data eraser.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$erasers | array |
Returns
array
Since: 2.4
Source: gravityforms.php:6833
data_exporter()
public static function data_exporter( $email_address, $page=1 )
Callback for the WordPress data exporter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$email_address | string | ||
$page | int | 1 |
Returns
array
Since: 2.4
Source: gravityforms.php:6851
data_eraser()
public static function data_eraser( $email_address, $page=1 )
Callback for the WordPress data eraser.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$email_address | string | ||
$page | int | 1 |
Returns
array
Since: 2.4
Source: gravityforms.php:6868
init_buffer()
public static function init_buffer()
Initialize an ob_start() buffer with a callback to ensure our hooks JS has output on the page.
Returns
void
Since: 2.5.3
Source: gravityforms.php:6882
ensure_hook_js_output()
public static function ensure_hook_js_output( $content )
Callback to fire when ob_flush() is called. Allows us to ensure that our Hooks JS has been output on the page,
even in heavily-cached or concatenated environments.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$content | string | The buffer content. |
Returns
string
Since: 2.5.3
Source: gravityforms.php:6911
get_installed_plugins()
public static function get_installed_plugins()
Get information about all installed plugins.
The returned array is keyed by the plugin slug (directory name) and contains plugin name, version, path, and whether it is active.
Returns
array— Array of plugin information.
Since: 2.9.23
Source: gravityforms.php:6928