function wplc_activate() { wplc_handle_db(); if (!get_option("WPLC_SETTINGS")) { $wplc_alt_text = __("Please click \\'Start Chat\\' to initiate a chat with an agent", "wplivechat"); add_option('WPLC_SETTINGS', array("wplc_settings_align" => "2", "wplc_settings_enabled" => "1", "wplc_settings_fill" => "ed832f", "wplc_settings_font" => "FFFFFF", "wplc_require_user_info" => '1', "wplc_loggedin_user_info" => '1', "wplc_user_alternative_text" => $wplc_alt_text, "wplc_enabled_on_mobile" => '1', "wplc_display_name" => '1', "wplc_record_ip_address" => '1')); } add_option("WPLC_HIDE_CHAT", "true"); add_option("WPLC_FIRST_TIME", true); }
function wplc_activate() { wplc_handle_db(); if (!get_option("WPLC_SETTINGS")) { $wplc_alt_text = __("Please click \\'Start Chat\\' to initiate a chat with an agent", "wplivechat"); add_option('WPLC_SETTINGS', array("wplc_settings_align" => "2", "wplc_settings_enabled" => "1", "wplc_settings_fill" => "ed832f", "wplc_settings_font" => "FFFFFF", "wplc_settings_color1" => "ED832F", "wplc_settings_color2" => "FFFFFF", "wplc_settings_color3" => "EEEEEE", "wplc_settings_color4" => "666666", "wplc_theme" => "theme-default", "wplc_newtheme" => "theme-2", "wplc_require_user_info" => '1', "wplc_loggedin_user_info" => '1', "wplc_user_alternative_text" => $wplc_alt_text, "wplc_enabled_on_mobile" => '1', "wplc_display_name" => '1', "wplc_record_ip_address" => '1', "wplc_pro_fst1" => __("Questions?", "wplivechat"), "wplc_pro_fst2" => __("Chat with us", "wplivechat"), "wplc_pro_fst3" => __("Start live chat", "wplivechat"), "wplc_pro_sst1" => __("Start Chat", "wplivechat"), "wplc_pro_sst2" => __("Connecting. Please be patient...", "wplivechat"), "wplc_pro_tst1" => __("Reactivating your previous chat...", "wplivechat"), "wplc_pro_na" => __("Chat offline. Leave a message", "wplivechat"), "wplc_pro_intro" => __("Hello. Please input your details so that I may help you.", "wplivechat"), "wplc_pro_offline1" => __("We are currently offline. Please leave a message and we'll get back to you shortly.", "wplivechat"), "wplc_pro_offline2" => __("Sending message...", "wplivechat"), "wplc_pro_offline3" => __("Thank you for your message. We will be in contact soon.", "wplivechat"), "wplc_user_enter" => __("Press ENTER to send your message", "wplivechat"), "wplc_user_welcome_chat" => __("Welcome. How may I help you?", "wplivechat"))); } $admins = get_role('administrator'); $admins->add_cap('wplc_ma_agent'); $uid = get_current_user_id(); update_user_meta($uid, 'wplc_ma_agent', 1); update_user_meta($uid, "wplc_chat_agent_online", time()); add_option("WPLC_HIDE_CHAT", "true"); add_option("WPLC_FIRST_TIME", true); }