Skip to main content

Gravity_Forms\Gravity_Forms\Updates\GF_Auto_Updates_Handler

Class GF_Auto_Updates_Handler

Since: 2.7.2

Source: includes/updates/class-gf-auto-updates-handler.php:15

Details

  • Kind: class
  • Namespace: Gravity_Forms\Gravity_Forms\Updates

Methods

MethodDescription
wp_option_updated()Updates the background updates setting when the WordPress auto_update_plugins option is updated.
wp_option_deleted()Updates the background updates setting when the WordPress auto_update_plugins option is deleted.
gf_option_added()Updates the WordPress auto_update_plugins option when the gform_enable_background_updates option is saved for the first time.
gf_option_updated()Updates the WordPress auto_update_plugins option when the gform_enable_background_updates option is updated.
gf_option_deleted()Updates the WordPress auto_update_plugins option when the gform_enable_background_updates option is deleted.
update_gf_option()Updates the gform_enable_background_updates option.
update_wp_option()Updates the WordPress auto_update_plugins option to enable or disable automatic updates so the correct state is displayed on the plugins page.
add_gf_hooks()Adds the action hooks for the gform_enable_background_updates option.
remove_gf_hooks()Removes the action hooks for the gform_enable_background_updates option.
add_wp_hooks()Adds the action hooks for the auto_update_plugins option.
remove_wp_hooks()Removes the action hooks for the auto_update_plugins option.
activation_sync()Updates the WP auto_update_plugins option to match the background updates setting.

Method Reference

wp_option_updated()

public function wp_option_updated( $option, $value, $old_value=[] )

Updates the background updates setting when the WordPress auto_update_plugins option is updated.

Parameters

NameTypeDefaultDescription
$optionstringThe name of the option.
$valuearrayThe current value of the option.
$old_valuearray[]The previous value of the option.

Since: 2.7.2

Source: includes/updates/class-gf-auto-updates-handler.php:26

wp_option_deleted()

public function wp_option_deleted()

Updates the background updates setting when the WordPress auto_update_plugins option is deleted.

Since: 2.7.2

Source: includes/updates/class-gf-auto-updates-handler.php:53

gf_option_added()

public function gf_option_added( $option, $value )

Updates the WordPress auto_update_plugins option when the gform_enable_background_updates option is saved for the first time.

Parameters

NameTypeDefaultDescription
$optionstringThe option name.
$valuemixedThe current value of the option.

Returns

  • void

Since: 2.7.2

Source: includes/updates/class-gf-auto-updates-handler.php:67

gf_option_updated()

public function gf_option_updated( $old_value, $value )

Updates the WordPress auto_update_plugins option when the gform_enable_background_updates option is updated.

Parameters

NameTypeDefaultDescription
$old_valuemixedThe previous value of the option.
$valuemixedThe current value of the option.

Returns

  • void

Since: 2.7.2

Source: includes/updates/class-gf-auto-updates-handler.php:81

gf_option_deleted()

public function gf_option_deleted()

Updates the WordPress auto_update_plugins option when the gform_enable_background_updates option is deleted.

Since: 2.7.2

Source: includes/updates/class-gf-auto-updates-handler.php:93

update_gf_option()

public function update_gf_option( $is_enabled )

Updates the gform_enable_background_updates option.

Parameters

NameTypeDefaultDescription
$is_enabledboolIndicates if background updates are enabled for Gravity Forms.

Returns

  • void

Since: 2.7.2

Source: includes/updates/class-gf-auto-updates-handler.php:106

update_wp_option()

public function update_wp_option( $is_enabled )

Updates the WordPress auto_update_plugins option to enable or disable automatic updates so the correct state is displayed on the plugins page.

Parameters

NameTypeDefaultDescription
$is_enabledboolIndicates if background updates are enabled for Gravity Forms.

Since: 2.7.2

Source: includes/updates/class-gf-auto-updates-handler.php:119

add_gf_hooks()

public function add_gf_hooks()

Adds the action hooks for the gform_enable_background_updates option.

Returns

  • void

Since: 2.7.2

Source: includes/updates/class-gf-auto-updates-handler.php:142

remove_gf_hooks()

public function remove_gf_hooks()

Removes the action hooks for the gform_enable_background_updates option.

Returns

  • void

Since: 2.7.2

Source: includes/updates/class-gf-auto-updates-handler.php:164

add_wp_hooks()

public function add_wp_hooks()

Adds the action hooks for the auto_update_plugins option.

Returns

  • void

Since: 2.7.2

Source: includes/updates/class-gf-auto-updates-handler.php:186

remove_wp_hooks()

public function remove_wp_hooks()

Removes the action hooks for the auto_update_plugins option.

Returns

  • void

Since: 2.7.2

Source: includes/updates/class-gf-auto-updates-handler.php:208

activation_sync()

public function activation_sync()

Updates the WP auto_update_plugins option to match the background updates setting.

Returns

  • void

Since: 2.7.2

Source: includes/updates/class-gf-auto-updates-handler.php:230