admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('aiblhewi_nonce'), 'is_single' => is_single(), 'post_id' => get_the_ID(), 'post_title' => get_the_title(), 'post_content' => get_the_content(), 'site_name' => get_bloginfo('name'), 'options' => $options ); wp_localize_script('aiblhewi-frontend', 'aiblhewiData', $localize_data); } /** * Render the chatbot in the footer */ public function render_chatbot() { $options = get_option('aiblhewi_options'); // Get bot icon and color $bot_icon = $options['bot_icon'] ?? ''; $bot_icon_color = $options['bot_icon_color'] ?? '#ffffff'; // Get header logo $header_logo = $options['header_logo'] ?? ''; // Get theme color $theme_color = $options['theme_color'] ?? '#0073aa'; // Get welcome message $welcome_message = $options['welcome_message'] ?? 'Welcome [WebsiteName] reader, have a nice day! How can I help you?'; $welcome_message = str_replace('[WebsiteName]', get_bloginfo('name'), $welcome_message); // Check if contact is enabled $contact_enabled = $options['contact_enabled'] ?? false; ?>
<?php esc_attr_e('Chat Bot', 'ai-blog-helper'); ?>