id = 'ai'; $this->label = esc_html__( 'OpenAI', 'ai-contact-form' ); parent::__construct(); } /** * Get settings array. * * @return array */ public function get_settings() { $settings = apply_filters( 'everest_forms_ai_settings', array( array( 'title' => esc_html__( 'OpenAI', 'ai-contact-form' ), 'type' => 'title', /* translators: %1$s - Ai docs url */ 'desc' => sprintf( __( '
Everest Forms AI offers Chatbot functionality, Email Prompt assistance, and the capability for field analysis.
Get detailed documentation on integrating OpenAI.
', 'ai-contact-form' ), 'https://docs.everestforms.net/docs/ai/' ), 'id' => 'everest_forms_ai_options', ), array( 'title' => esc_html__( 'OpenAI API Key', 'ai-contact-form' ), 'type' => 'text', /* translators: %1$s - Google API docs url */ 'desc' => sprintf( esc_html__( 'Please enter your API key of OpenAI. Learn More', 'ai-contact-form' ), esc_url( 'https://docs.everestforms.net/docs/ai/' ) ), 'id' => 'everest_forms_ai_api_key', 'default' => '', 'desc_tip' => true, ), array( 'type' => 'sectionend', 'id' => 'everest_forms_ai_options', ), ) ); return apply_filters( 'everest_forms_get_settings_' . $this->id, $settings ); } /** * Save settings. */ public function save() { $settings = $this->get_settings(); \EVF_Admin_Settings::save_fields( $settings ); } }