'Welcome', 'business' => 'Business', 'assistant' => 'Assistant', 'teach' => 'Your answers', 'live' => 'Go live', 'done' => 'Done', ); } add_filter( 'admin_body_class', function ( $classes ) { $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null; if ( $screen && cwp_ai_is_admin_screen( $screen->id ) && cwp_ai_current_tab() === 'setup' ) { $classes .= ' cwp-wz-screen'; } return $classes; } ); /** * Prints the setup wizard. */ function cwp_ai_render_wizard() { $steps = cwp_ai_wizard_steps(); $widget = cwp_ai_widget_config(); $themes = cwp_ai_themes(); $host = (string) wp_parse_url( home_url( '/' ), PHP_URL_HOST ); $port = wp_parse_url( home_url( '/' ), PHP_URL_PORT ); $quick = array( 'agent-f', 'agent-m', 'robot', 'developer', 'pro-f', 'cat', 'astronaut' ); $labels = cwp_ai_mascots(); $chars = cwp_ai_characters(); $previews = array(); foreach ( array_keys( $labels ) as $m ) { $previews[ $m ] = cwp_ai_mascot_preview( $m, '#6366f1', '#a855f7' ); } $state = array( 'connected' => true, 'business' => array( 'name' => cwp_ai_business_name(), 'domain' => $host . ( $port ? ':' . $port : '' ), 'email' => cwp_ai_or( get_option( 'cwp_ai_website_email', '' ), get_option( 'admin_email' ) ), 'phone' => get_option( 'cwp_ai_website_phone', '' ), ), 'assistant' => array( 'name' => $widget['brand']['name'] ?? '', 'tagline' => $widget['brand']['tagline'] ?? '', 'greeting' => $widget['teaser']['message'] ?? '', 'type' => ( $widget['brand']['avatarType'] ?? '' ) === 'emoji' ? 'emoji' : 'mascot', 'emoji' => $widget['brand']['avatarEmoji'] ?? '', 'mascot' => $widget['brand']['avatarMascot'] ?? 'robot', 'theme' => $widget['theme'] ?? 'indigo', 'colorMode' => $widget['colorMode'] ?? 'auto', ), 'live' => array( 'enabled' => get_option( 'cwp_ai_enabled', '1' ) === '1', 'visibility' => get_option( 'cwp_ai_visibility', 'admins' ), 'pages' => cwp_ai_page_rules(), ), 'qa' => array( 'used' => cwp_ai_knowledge()->count(), ), 'draft' => (array) json_decode( (string) get_user_meta( get_current_user_id(), 'cwp_ai_wizard_draft', true ), true ), ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only step switch. $start = isset( $_GET['step'] ) ? sanitize_key( wp_unslash( $_GET['step'] ) ) : ''; if ( ! isset( $steps[ $start ] ) ) { $start = 'welcome'; } ?>
A few simple questions and it is ready to answer your visitors, day and night. You can change anything later.
Your assistant uses these when it talks to visitors. When it has no answer, it gives them your email.
Give it a name and a face. Watch the preview change as you type.
Your assistant answers only from the questions and answers you add here. If it does not know, it says so and offers your contact form.
One question and its answer per row, separated by a comma, semicolon or tab. A header row is optional.
Try it yourself first, or switch it on for every visitor now. You can change this any time.
Want it only on certain pages? Choose them under Settings.
Here is what is set up. Open your site to see it in action.