Changeset 3049208
- Timestamp:
- 03/11/2024 02:52:26 PM (2 years ago)
- Location:
- whatshelp-chat-button
- Files:
-
- 4 edited
- 1 copied
-
tags/1.9 (copied) (copied from whatshelp-chat-button/trunk)
-
tags/1.9/readme.txt (modified) (2 diffs)
-
tags/1.9/whatshelp.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/whatshelp.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
whatshelp-chat-button/tags/1.9/readme.txt
r2952523 r3049208 5 5 Requires at least: 2.7 6 6 Tested up to: 6.3 7 Stable tag: 1. 8.127 Stable tag: 1.9 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 82 82 == Changelog == 83 83 84 = 1.9 = 85 Added support for short code button (created in admin panel). 86 84 87 = 1.8.12 = 85 88 Improve stability. -
whatshelp-chat-button/tags/1.9/whatshelp.php
r2952525 r3049208 3 3 * Plugin Name: Chat Button by GetButton.io (ex. WhatsHelp) 4 4 * Description: The Chat button by GetButton takes website visitor directly to the messaging app such as Facebook Messenger or WhatsApp and allows them to initiate a conversation with you. After that, both you and your customer can follow up the conversation anytime and anywhere! 5 * Version: 1. 8.125 * Version: 1.9 6 6 * Author: GetButton 7 7 * Author URI: https://getbutton.io … … 156 156 function add_whatshelp_code() 157 157 { 158 $dbval = trim(get_option('whatshelp-code')); 159 160 // if it short code, render it new way 161 preg_match('/<script.+http.+\?[a-zA-Z0-9=&]*id=([a-zA-Z0-9]+)/', $dbval, $allVarsPos); 162 if (count($allVarsPos) && isset($allVarsPos[1])) { 163 $id = $allVarsPos[1]; 164 echo "\n\n<!-- GetButton.io widget -->\n<script defer src=\"https://static.getbutton.io/widget/bundle.js?id=${id}\"></script>\n<!-- /GetButton.io widget -->\n\n"; 165 return; 166 } 167 168 // else if it long old code, render another 158 169 $err_output = 'console.warn("Getbutton: parsing code failed!"); return;'; 159 170 echo get_prefix(); 160 171 try { 161 echo get_clean_code( get_option('whatshelp-code'));172 echo get_clean_code($dbval); 162 173 } catch (\Throwable $err) { 163 174 echo $err_output; -
whatshelp-chat-button/trunk/readme.txt
r2952523 r3049208 5 5 Requires at least: 2.7 6 6 Tested up to: 6.3 7 Stable tag: 1. 8.127 Stable tag: 1.9 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 82 82 == Changelog == 83 83 84 = 1.9 = 85 Added support for short code button (created in admin panel). 86 84 87 = 1.8.12 = 85 88 Improve stability. -
whatshelp-chat-button/trunk/whatshelp.php
r2952525 r3049208 3 3 * Plugin Name: Chat Button by GetButton.io (ex. WhatsHelp) 4 4 * Description: The Chat button by GetButton takes website visitor directly to the messaging app such as Facebook Messenger or WhatsApp and allows them to initiate a conversation with you. After that, both you and your customer can follow up the conversation anytime and anywhere! 5 * Version: 1. 8.125 * Version: 1.9 6 6 * Author: GetButton 7 7 * Author URI: https://getbutton.io … … 156 156 function add_whatshelp_code() 157 157 { 158 $dbval = trim(get_option('whatshelp-code')); 159 160 // if it short code, render it new way 161 preg_match('/<script.+http.+\?[a-zA-Z0-9=&]*id=([a-zA-Z0-9]+)/', $dbval, $allVarsPos); 162 if (count($allVarsPos) && isset($allVarsPos[1])) { 163 $id = $allVarsPos[1]; 164 echo "\n\n<!-- GetButton.io widget -->\n<script defer src=\"https://static.getbutton.io/widget/bundle.js?id=${id}\"></script>\n<!-- /GetButton.io widget -->\n\n"; 165 return; 166 } 167 168 // else if it long old code, render another 158 169 $err_output = 'console.warn("Getbutton: parsing code failed!"); return;'; 159 170 echo get_prefix(); 160 171 try { 161 echo get_clean_code( get_option('whatshelp-code'));172 echo get_clean_code($dbval); 162 173 } catch (\Throwable $err) { 163 174 echo $err_output;
Note: See TracChangeset
for help on using the changeset viewer.