It looks like nothing was found at this location. Maybe try one of the links below or a search?
); } /** * Add top bar before the toolbar in the Form Builder. * * @since 1.7.4 * * @param string $content Content before the toolbar. Defaults to empty string. * * @return string */ public function top_bar_content( $content ) { if ( $this->is_enabled ) { return $content; } $dismissed = get_user_meta( get_current_user_id(), 'wpforms_dismissed', true ); // Skip when top bar is dismissed. if ( ! empty( $dismissed['edu-builder-lite-connect-top-bar'] ) ) { return $content; } $toggle = wpforms_panel_field_toggle_control( [ 'control-class' => 'wpforms-setting-lite-connect-auto-save-toggle', ], 'wpforms-setting-lite-connect-enabled', '', esc_html__( 'Enable Form Entry Backups for Free', 'wpforms-lite' ), $this->is_enabled, 'disabled' ); return wpforms_render( 'education/builder/lite-connect/top-bar', [ 'toggle' => $toggle, 'is_enabled' => $this->is_enabled, ], true ); } /** * Challenge Congrats popup footer. * * @since 1.7.4 * * @param string $content Footer content. * * @return string */ public function challenge_popup_footer_content( $content ) { if ( $this->is_enabled ) { return $content; } $toggle = wpforms_panel_field_toggle_control( [ 'control-class' => 'wpforms-setting-lite-connect-auto-save-toggle', ], 'wpforms-setting-lite-connect-enabled', '', esc_html__( 'Enable Form Entry Backups for Free', 'wpforms-lite' ), $this->is_enabled, 'disabled' ); return wpforms_render( 'education/admin/lite-connect/challenge-popup-footer', [ 'toggle' => $toggle, 'is_enabled' => $this->is_enabled, ], true ); } /** * AJAX checks. * * @since 1.9.1 */ private function ajax_checks() { // Run a security check. check_ajax_referer( 'wpforms-lite-connect-toggle', 'nonce' ); // Check for permissions. if ( ! wpforms_current_user_can( wpforms_get_capability_manage_options() ) ) { wp_send_json_error( esc_html__( 'You do not have permission.', 'wpforms-lite' ) ); } } /** * AJAX action: update Lite Connect Enabled setting. * * @since 1.7.4 */ public function ajax_update_lite_connect_enabled_setting() { $this->ajax_checks(); $slug = LiteConnectClass::SETTINGS_SLUG; $settings = get_option( 'wpforms_settings', [] ); $settings[ $slug ] = ! empty( $_POST['value'] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing wpforms_update_settings( $settings ); if ( ! $settings[ $slug ] ) { wp_send_json_success( '' ); } // Reset generate key attempts counter. update_option( API::GENERATE_KEY_ATTEMPT_COUNTER_OPTION, 0 ); // We have to start requesting site keys in ajax, turning on the LC functionality. // First, the request to the API server will be sent. // Second, the server will respond to our callback URL /wpforms/auth/key/nonce, and the site key will be stored in the DB. // Third, we have to get access via a separate HTTP request. ( new LiteConnectIntegration() )->update_keys(); // First request here. wp_send_json_success( $this->get_lite_connect_entries_since_info() ); } /** * AJAX action: Finalize Lite Connect setup. * * @since 1.9.1 */ public function ajax_lite_connect_finalize() { $this->ajax_checks(); if ( $this->is_enabled ) { ( new LiteConnectIntegration() )->update_keys(); // Simulate third request. } wp_send_json_success(); } }
It looks like nothing was found at this location. Maybe try one of the links below or a search?