background_updates == '' ) { // First run. $this->background_updates = 'enabled'; }; ?>

background_updates == 'disabled' && empty( $this->accept_terms ) ) { $this->set_field_validation_result( 'accept_terms', esc_html__( 'Please accept the terms.', 'gravityflow' ) ); $valid = false; } return $valid; } /** * Returns the summary content. * * @param bool $echo Indicates if the summary should be echoed. * * @return string */ function summary( $echo = true ) { $html = $this->background_updates !== 'disabled' ? esc_html__( 'Enabled', 'gravityflow' ) . ' ' : esc_html__( 'Disabled', 'gravityflow' ) . ' ' ; if ( $echo ) { echo $html; } return $html; } /** * Configures the plugin settings with the value of the background_updates setting. */ function install() { $gravityflow = gravity_flow(); $settings = $gravityflow->get_app_settings(); $settings['background_updates'] = $this->background_updates !== 'disabled'; gravity_flow()->update_app_settings( $settings ); } }