' . sprintf(
/* translators: %s: Google AI Studio Link */
esc_html__('Get your free key from %s.', 'aiy-sales-chat'),
'Google AI Studio'
) . '
';
}
public function display_location_callback()
{
$option = get_option('wpaic_display_location', 'all');
?>
',
esc_attr(get_option('wpaic_chat_title', 'Sales Assistant')),
esc_attr__('Sales Assistant', 'aiy-sales-chat')
);
}
public function contact_info_callback()
{
printf(
'',
esc_textarea(get_option('wpaic_contact_info'))
);
print '
' . esc_html__('Add contact details or extra instructions for the AI here. Use bullet points or new lines.', 'aiy-sales-chat') . '
';
}
public function brand_color_callback()
{
printf(
'',
esc_attr(get_option('wpaic_brand_color', '#007bff'))
);
}
public function welcome_message_callback()
{
printf(
'',
esc_attr(get_option('wpaic_welcome_message', 'Hi! How can I help you today?'))
);
}
public function render_welcome_message_field()
{
$value = get_option('wpaic_welcome_message', 'Hi! How can I help you today?');
echo '';
}
public function render_bot_avatar_url_field()
{
$value = get_option('wpaic_bot_avatar_url', '');
echo '';
echo '
' . esc_html__('Enter the full URL of your assistant\'s avatar image.', 'aiy-sales-chat') . '
';
}
public function render_copy_trigger_enabled_field()
{
$value = get_option('wpaic_copy_trigger_enabled', '1');
echo '';
echo ' ' . esc_html__('Activate sales trigger when user copies text', 'aiy-sales-chat');
}
public function render_exit_intent_enabled_field()
{
$value = get_option('wpaic_exit_intent_enabled', '0');
echo '';
echo ' ' . esc_html__('Activate trigger when mouse leaves window (Desktop)', 'aiy-sales-chat');
}
public function render_time_trigger_enabled_field()
{
$value = get_option('wpaic_time_trigger_enabled', '0');
echo '';
echo ' ' . esc_html__('Activate trigger after 30 seconds of inactivity', 'aiy-sales-chat');
}
public function render_add_to_cart_enabled_field()
{
$value = get_option('wpaic_add_to_cart_enabled', '0');
echo '';
echo ' ' . esc_html__('Allow AI to suggest "Add to Cart" buttons', 'aiy-sales-chat');
}
public function render_copy_trigger_text_field()
{
$default = "I noticed you copied the text. Are you comparing {product_name}? Let's chat about the best deal right here!";
$value = get_option('wpaic_copy_trigger_text', $default);
echo '';
echo '
' . sprintf(
/* translators: %s: placeholder code */
esc_html__('Use %s as a placeholder for the product title.', 'aiy-sales-chat'),
'{product_name}'
) . '
';
}
public function footer_text_callback()
{
$default = 'Powered by Beke';
$value = get_option('wpaic_footer_text', $default);
echo '';
echo '
' . esc_html__('Text to display at the bottom of the chat widget.', 'aiy-sales-chat') . '