Changeset 3442197
- Timestamp:
- 01/19/2026 04:43:40 AM (3 months ago)
- Location:
- click-to-chat-for-whatsapp
- Files:
-
- 269 added
- 9 edited
-
tags/4.36 (added)
-
tags/4.36/click-to-chat.php (added)
-
tags/4.36/common (added)
-
tags/4.36/common/class-ht-ctc-switch.php (added)
-
tags/4.36/index.php (added)
-
tags/4.36/new (added)
-
tags/4.36/new/admin (added)
-
tags/4.36/new/admin/admin.php (added)
-
tags/4.36/new/admin/admin_assets (added)
-
tags/4.36/new/admin/admin_assets/css (added)
-
tags/4.36/new/admin/admin_assets/css/admin-rtl.css (added)
-
tags/4.36/new/admin/admin_assets/css/admin.css (added)
-
tags/4.36/new/admin/admin_assets/css/dev (added)
-
tags/4.36/new/admin/admin_assets/css/dev/admin.dev.css (added)
-
tags/4.36/new/admin/admin_assets/css/dev/materialize.dev.css (added)
-
tags/4.36/new/admin/admin_assets/css/materialize.min.css (added)
-
tags/4.36/new/admin/admin_assets/intl (added)
-
tags/4.36/new/admin/admin_assets/intl/css (added)
-
tags/4.36/new/admin/admin_assets/intl/css/intlTelInput.css (added)
-
tags/4.36/new/admin/admin_assets/intl/css/intlTelInput.min.css (added)
-
tags/4.36/new/admin/admin_assets/intl/img (added)
-
tags/4.36/new/admin/admin_assets/intl/img/flags.png (added)
-
tags/4.36/new/admin/admin_assets/intl/img/flags.webp (added)
-
tags/4.36/new/admin/admin_assets/intl/img/flags@2x.png (added)
-
tags/4.36/new/admin/admin_assets/intl/img/flags@2x.webp (added)
-
tags/4.36/new/admin/admin_assets/intl/img/globe.png (added)
-
tags/4.36/new/admin/admin_assets/intl/img/globe.webp (added)
-
tags/4.36/new/admin/admin_assets/intl/img/globe@2x.png (added)
-
tags/4.36/new/admin/admin_assets/intl/img/globe@2x.webp (added)
-
tags/4.36/new/admin/admin_assets/intl/img/globe_light.png (added)
-
tags/4.36/new/admin/admin_assets/intl/img/globe_light.webp (added)
-
tags/4.36/new/admin/admin_assets/intl/img/globe_light@2x.png (added)
-
tags/4.36/new/admin/admin_assets/intl/img/globe_light@2x.webp (added)
-
tags/4.36/new/admin/admin_assets/intl/js (added)
-
tags/4.36/new/admin/admin_assets/intl/js/intlTelInput.js (added)
-
tags/4.36/new/admin/admin_assets/intl/js/intlTelInput.min.js (added)
-
tags/4.36/new/admin/admin_assets/intl/js/utils.js (added)
-
tags/4.36/new/admin/admin_assets/js (added)
-
tags/4.36/new/admin/admin_assets/js/admin.js (added)
-
tags/4.36/new/admin/admin_assets/js/dev (added)
-
tags/4.36/new/admin/admin_assets/js/dev/admin.dev.js (added)
-
tags/4.36/new/admin/admin_assets/js/dev/greetings.dev.js (added)
-
tags/4.36/new/admin/admin_assets/js/greetings.js (added)
-
tags/4.36/new/admin/admin_assets/js/materialize.min.js (added)
-
tags/4.36/new/admin/admin_commons (added)
-
tags/4.36/new/admin/admin_commons/admin-device-settings.php (added)
-
tags/4.36/new/admin/admin_commons/admin-show-hide.php (added)
-
tags/4.36/new/admin/admin_commons/admin-sidebar-content.php (added)
-
tags/4.36/new/admin/admin_commons/class-ht-ctc-admin-hooks.php (added)
-
tags/4.36/new/admin/admin_commons/class-ht-ctc-metabox.php (added)
-
tags/4.36/new/admin/admin_commons/ht-ctc-admin-formatting.php (added)
-
tags/4.36/new/admin/admin_demo (added)
-
tags/4.36/new/admin/admin_demo/admin-demo-animations.css (added)
-
tags/4.36/new/admin/admin_demo/admin-demo.css (added)
-
tags/4.36/new/admin/admin_demo/admin-demo.js (added)
-
tags/4.36/new/admin/admin_demo/class-ht-ctc-admin-demo.php (added)
-
tags/4.36/new/admin/admin_demo/dev (added)
-
tags/4.36/new/admin/admin_demo/dev/admin-demo-animations.dev.css (added)
-
tags/4.36/new/admin/admin_demo/dev/admin-demo.dev.css (added)
-
tags/4.36/new/admin/admin_demo/dev/admin-demo.dev.js (added)
-
tags/4.36/new/admin/class-ht-ctc-admin-customize-styles.php (added)
-
tags/4.36/new/admin/class-ht-ctc-admin-greetings-page.php (added)
-
tags/4.36/new/admin/class-ht-ctc-admin-group-page.php (added)
-
tags/4.36/new/admin/class-ht-ctc-admin-main-page.php (added)
-
tags/4.36/new/admin/class-ht-ctc-admin-other-settings.php (added)
-
tags/4.36/new/admin/class-ht-ctc-admin-scripts.php (added)
-
tags/4.36/new/admin/class-ht-ctc-admin-share-page.php (added)
-
tags/4.36/new/admin/components (added)
-
tags/4.36/new/admin/components/checkbox.php (added)
-
tags/4.36/new/admin/components/collapsible_end.php (added)
-
tags/4.36/new/admin/components/collapsible_start.php (added)
-
tags/4.36/new/admin/components/color.php (added)
-
tags/4.36/new/admin/components/content.php (added)
-
tags/4.36/new/admin/components/count.php (added)
-
tags/4.36/new/admin/components/editor.php (added)
-
tags/4.36/new/admin/components/editor_lite.php (added)
-
tags/4.36/new/admin/components/element_details_end.php (added)
-
tags/4.36/new/admin/components/element_details_start.php (added)
-
tags/4.36/new/admin/components/empty.php (added)
-
tags/4.36/new/admin/components/g_header_image.php (added)
-
tags/4.36/new/admin/components/h_field.php (added)
-
tags/4.36/new/admin/components/heading.php (added)
-
tags/4.36/new/admin/components/list (added)
-
tags/4.36/new/admin/components/list/ht-ctc-admin-list-page.php (added)
-
tags/4.36/new/admin/components/number.php (added)
-
tags/4.36/new/admin/components/select.php (added)
-
tags/4.36/new/admin/components/space.php (added)
-
tags/4.36/new/admin/components/text.php (added)
-
tags/4.36/new/admin/components/textarea.php (added)
-
tags/4.36/new/admin/db (added)
-
tags/4.36/new/admin/db/class-ht-ctc-db.php (added)
-
tags/4.36/new/admin/db/class-ht-ctc-db2.php (added)
-
tags/4.36/new/admin/db/class-ht-ctc-update-db-backup.php (added)
-
tags/4.36/new/admin/db/class-ht-ctc-update-db.php (added)
-
tags/4.36/new/admin/db/defaults (added)
-
tags/4.36/new/admin/db/defaults/class-ht-ctc-defaults-greetings.php (added)
-
tags/4.36/new/admin/db/defaults/class-ht-ctc-defaults.php (added)
-
tags/4.36/new/admin/feedback (added)
-
tags/4.36/new/admin/feedback/class-ht-ctc-admin-deactivate-feedback.php (added)
-
tags/4.36/new/admin/feedback/feedback.css (added)
-
tags/4.36/new/admin/feedback/feedback.js (added)
-
tags/4.36/new/class-ht-ctc.php (added)
-
tags/4.36/new/inc (added)
-
tags/4.36/new/inc/api (added)
-
tags/4.36/new/inc/api/class-ht-ctc-rest-api.php (added)
-
tags/4.36/new/inc/assets (added)
-
tags/4.36/new/inc/assets/css (added)
-
tags/4.36/new/inc/assets/css/dev (added)
-
tags/4.36/new/inc/assets/css/dev/main.dev.css (added)
-
tags/4.36/new/inc/assets/css/font.css (added)
-
tags/4.36/new/inc/assets/css/main.css (added)
-
tags/4.36/new/inc/assets/css/mdstyle8.css (added)
-
tags/4.36/new/inc/assets/fonts (added)
-
tags/4.36/new/inc/assets/fonts/ccw.eot (added)
-
tags/4.36/new/inc/assets/fonts/ccw.svg (added)
-
tags/4.36/new/inc/assets/fonts/ccw.ttf (added)
-
tags/4.36/new/inc/assets/fonts/ccw.woff (added)
-
tags/4.36/new/inc/assets/img (added)
-
tags/4.36/new/inc/assets/img/ht-ctc-svg-images.php (added)
-
tags/4.36/new/inc/assets/img/new_style8.jpg (added)
-
tags/4.36/new/inc/assets/img/wa_bg.png (added)
-
tags/4.36/new/inc/assets/img/whatsapp-icon-square.svg (added)
-
tags/4.36/new/inc/assets/img/whatsapp-logo-32x32.png (added)
-
tags/4.36/new/inc/assets/img/whatsapp-logo.svg (added)
-
tags/4.36/new/inc/assets/js (added)
-
tags/4.36/new/inc/assets/js/app.js (added)
-
tags/4.36/new/inc/assets/js/bc (added)
-
tags/4.36/new/inc/assets/js/bc/3-33.app.dev.js (added)
-
tags/4.36/new/inc/assets/js/bc/app.js (added)
-
tags/4.36/new/inc/assets/js/dev (added)
-
tags/4.36/new/inc/assets/js/dev/app.dev.js (added)
-
tags/4.36/new/inc/assets/js/dev/group.dev.js (added)
-
tags/4.36/new/inc/assets/js/dev/share.dev.js (added)
-
tags/4.36/new/inc/assets/js/dev/woo.dev.js (added)
-
tags/4.36/new/inc/assets/js/group.js (added)
-
tags/4.36/new/inc/assets/js/share.js (added)
-
tags/4.36/new/inc/assets/js/woo.js (added)
-
tags/4.36/new/inc/chat (added)
-
tags/4.36/new/inc/chat/class-ht-ctc-chat-shortcode.php (added)
-
tags/4.36/new/inc/chat/class-ht-ctc-chat.php (added)
-
tags/4.36/new/inc/class-ht-ctc-main.php (added)
-
tags/4.36/new/inc/class-ht-ctc-register.php (added)
-
tags/4.36/new/inc/commons (added)
-
tags/4.36/new/inc/commons/class-ht-ctc-animations.php (added)
-
tags/4.36/new/inc/commons/class-ht-ctc-formatting.php (added)
-
tags/4.36/new/inc/commons/class-ht-ctc-hooks.php (added)
-
tags/4.36/new/inc/commons/class-ht-ctc-ismobile.php (added)
-
tags/4.36/new/inc/commons/class-ht-ctc-scripts.php (added)
-
tags/4.36/new/inc/commons/class-ht-ctc-security.php (added)
-
tags/4.36/new/inc/commons/class-ht-ctc-settings-data.php (added)
-
tags/4.36/new/inc/commons/class-ht-ctc-values.php (added)
-
tags/4.36/new/inc/commons/ht-ctc-formatting.php (added)
-
tags/4.36/new/inc/commons/position-to-place.php (added)
-
tags/4.36/new/inc/commons/show-hide.php (added)
-
tags/4.36/new/inc/greetings (added)
-
tags/4.36/new/inc/greetings/class-ht-ctc-chat-greetings.php (added)
-
tags/4.36/new/inc/greetings/greetings-1.php (added)
-
tags/4.36/new/inc/greetings/greetings-2.php (added)
-
tags/4.36/new/inc/greetings/greetings_styles (added)
-
tags/4.36/new/inc/greetings/greetings_styles/g-cta-1.php (added)
-
tags/4.36/new/inc/greetings/greetings_styles/g-cta-7_1.php (added)
-
tags/4.36/new/inc/greetings/greetings_styles/opt-in.php (added)
-
tags/4.36/new/inc/group (added)
-
tags/4.36/new/inc/group/class-ht-ctc-group-shortcode.php (added)
-
tags/4.36/new/inc/group/class-ht-ctc-group.php (added)
-
tags/4.36/new/inc/share (added)
-
tags/4.36/new/inc/share/class-ht-ctc-share-shortcode.php (added)
-
tags/4.36/new/inc/share/class-ht-ctc-share.php (added)
-
tags/4.36/new/inc/styles (added)
-
tags/4.36/new/inc/styles-shortcode (added)
-
tags/4.36/new/inc/styles-shortcode/sc-style-1.php (added)
-
tags/4.36/new/inc/styles-shortcode/sc-style-2.php (added)
-
tags/4.36/new/inc/styles-shortcode/sc-style-3.php (added)
-
tags/4.36/new/inc/styles-shortcode/sc-style-3_1.php (added)
-
tags/4.36/new/inc/styles-shortcode/sc-style-4.php (added)
-
tags/4.36/new/inc/styles-shortcode/sc-style-5.php (added)
-
tags/4.36/new/inc/styles-shortcode/sc-style-6.php (added)
-
tags/4.36/new/inc/styles-shortcode/sc-style-7.php (added)
-
tags/4.36/new/inc/styles-shortcode/sc-style-7_1.php (added)
-
tags/4.36/new/inc/styles-shortcode/sc-style-8.php (added)
-
tags/4.36/new/inc/styles-shortcode/sc-style-99.php (added)
-
tags/4.36/new/inc/styles/style-1.php (added)
-
tags/4.36/new/inc/styles/style-2.php (added)
-
tags/4.36/new/inc/styles/style-3.php (added)
-
tags/4.36/new/inc/styles/style-3_1.php (added)
-
tags/4.36/new/inc/styles/style-4.php (added)
-
tags/4.36/new/inc/styles/style-5.php (added)
-
tags/4.36/new/inc/styles/style-6.php (added)
-
tags/4.36/new/inc/styles/style-7.php (added)
-
tags/4.36/new/inc/styles/style-7_1.php (added)
-
tags/4.36/new/inc/styles/style-8.php (added)
-
tags/4.36/new/inc/styles/style-99.php (added)
-
tags/4.36/new/tools (added)
-
tags/4.36/new/tools/woo (added)
-
tags/4.36/new/tools/woo/class-ht-ctc-woo.php (added)
-
tags/4.36/new/tools/woo/ht-ctc-woo.php (added)
-
tags/4.36/new/tools/woo/woo-admin (added)
-
tags/4.36/new/tools/woo/woo-admin/class-ht-ctc-admin-woo-page.php (added)
-
tags/4.36/new/tools/woo/woo-single-styles (added)
-
tags/4.36/new/tools/woo/woo-single-styles/woo-style-1.php (added)
-
tags/4.36/new/tools/woo/woo-single-styles/woo-style-2.php (added)
-
tags/4.36/new/tools/woo/woo-single-styles/woo-style-3.php (added)
-
tags/4.36/new/tools/woo/woo-single-styles/woo-style-3_1.php (added)
-
tags/4.36/new/tools/woo/woo-single-styles/woo-style-4.php (added)
-
tags/4.36/new/tools/woo/woo-single-styles/woo-style-5.php (added)
-
tags/4.36/new/tools/woo/woo-single-styles/woo-style-6.php (added)
-
tags/4.36/new/tools/woo/woo-single-styles/woo-style-7.php (added)
-
tags/4.36/new/tools/woo/woo-single-styles/woo-style-7_1.php (added)
-
tags/4.36/new/tools/woo/woo-single-styles/woo-style-8.php (added)
-
tags/4.36/new/tools/woo/woo-single-styles/woo-style-99.php (added)
-
tags/4.36/prev (added)
-
tags/4.36/prev/admin (added)
-
tags/4.36/prev/admin/admin.php (added)
-
tags/4.36/prev/admin/class-ccw-add-styles-scripts-admin.php (added)
-
tags/4.36/prev/admin/class-ccw-admin-menu.php (added)
-
tags/4.36/prev/admin/class-ccw-admin-page-customize-styles.php (added)
-
tags/4.36/prev/admin/class-ccw-admin-page.php (added)
-
tags/4.36/prev/admin/commons (added)
-
tags/4.36/prev/admin/commons/class-ht-ccw-admin-lists.php (added)
-
tags/4.36/prev/admin/default-values.php (added)
-
tags/4.36/prev/admin/settings_page.php (added)
-
tags/4.36/prev/admin/sp_customize_styles.php (added)
-
tags/4.36/prev/assets (added)
-
tags/4.36/prev/assets/css (added)
-
tags/4.36/prev/assets/css/admin_main.css (added)
-
tags/4.36/prev/assets/css/mainstyles.css (added)
-
tags/4.36/prev/assets/fonts (added)
-
tags/4.36/prev/assets/fonts/ccw.eot (added)
-
tags/4.36/prev/assets/fonts/ccw.svg (added)
-
tags/4.36/prev/assets/fonts/ccw.ttf (added)
-
tags/4.36/prev/assets/fonts/ccw.woff (added)
-
tags/4.36/prev/assets/js (added)
-
tags/4.36/prev/assets/js/admin_app.js (added)
-
tags/4.36/prev/assets/js/app.js (added)
-
tags/4.36/prev/inc (added)
-
tags/4.36/prev/inc/class-ccw-add-styles-scripts.php (added)
-
tags/4.36/prev/inc/class-ccw-shortcode.php (added)
-
tags/4.36/prev/inc/class-ht-ccw-chat.php (added)
-
tags/4.36/prev/inc/class-ht-ccw-register.php (added)
-
tags/4.36/prev/inc/class-ht-ccw.php (added)
-
tags/4.36/prev/inc/commons (added)
-
tags/4.36/prev/inc/commons/class-ht-ccw-ismobile.php (added)
-
tags/4.36/prev/inc/commons/class-ht-ccw-variables.php (added)
-
tags/4.36/prev/inc/commons/styles-list (added)
-
tags/4.36/prev/inc/commons/styles-list-sc (added)
-
tags/4.36/prev/inc/commons/styles-list-sc/sc-style-1.php (added)
-
tags/4.36/prev/inc/commons/styles-list-sc/sc-style-2.php (added)
-
tags/4.36/prev/inc/commons/styles-list-sc/sc-style-3.php (added)
-
tags/4.36/prev/inc/commons/styles-list-sc/sc-style-4.php (added)
-
tags/4.36/prev/inc/commons/styles-list-sc/sc-style-5.php (added)
-
tags/4.36/prev/inc/commons/styles-list-sc/sc-style-6.php (added)
-
tags/4.36/prev/inc/commons/styles-list-sc/sc-style-7.php (added)
-
tags/4.36/prev/inc/commons/styles-list-sc/sc-style-8.1.php (added)
-
tags/4.36/prev/inc/commons/styles-list-sc/sc-style-8.php (added)
-
tags/4.36/prev/inc/commons/styles-list-sc/sc-style-9.php (added)
-
tags/4.36/prev/inc/commons/styles-list-sc/sc-style-99.php (added)
-
tags/4.36/prev/inc/commons/styles-list/style-0.php (added)
-
tags/4.36/prev/inc/commons/styles-list/style-1.php (added)
-
tags/4.36/prev/inc/commons/styles-list/style-2.php (added)
-
tags/4.36/prev/inc/commons/styles-list/style-3.php (added)
-
tags/4.36/prev/inc/commons/styles-list/style-4.php (added)
-
tags/4.36/prev/inc/commons/styles-list/style-5.php (added)
-
tags/4.36/prev/inc/commons/styles-list/style-6.php (added)
-
tags/4.36/prev/inc/commons/styles-list/style-7.php (added)
-
tags/4.36/prev/inc/commons/styles-list/style-8.php (added)
-
tags/4.36/prev/inc/commons/styles-list/style-9.php (added)
-
tags/4.36/prev/inc/commons/styles-list/style-99.php (added)
-
tags/4.36/prev/inc/commons/styles.php (added)
-
tags/4.36/readme.txt (added)
-
trunk/click-to-chat.php (modified) (2 diffs)
-
trunk/new/admin/class-ht-ctc-admin-other-settings.php (modified) (5 diffs)
-
trunk/new/admin/db/class-ht-ctc-db.php (modified) (3 diffs)
-
trunk/new/admin/db/class-ht-ctc-update-db.php (modified) (3 diffs)
-
trunk/new/inc/assets/js/dev/app.dev.js (modified) (4 diffs)
-
trunk/new/inc/chat/class-ht-ctc-chat.php (modified) (3 diffs)
-
trunk/new/inc/commons/class-ht-ctc-security.php (modified) (2 diffs)
-
trunk/new/inc/commons/class-ht-ctc-settings-data.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
click-to-chat-for-whatsapp/trunk/click-to-chat.php
r3429029 r3442197 8 8 * Plugin URI: https://wordpress.org/plugins/click-to-chat-for-whatsapp/ 9 9 * Description: Lets make your Web page visitors contact you through WhatsApp with a single click/tap 10 * Version: 4.3 510 * Version: 4.36 11 11 * Author: HoliThemes 12 12 * Author URI: https://holithemes.com/plugins/click-to-chat/ … … 22 22 // ctc - Version - update version at readme 'Stable tag'. 23 23 if ( ! defined( 'HT_CTC_VERSION' ) ) { 24 define( 'HT_CTC_VERSION', '4.3 5' );24 define( 'HT_CTC_VERSION', '4.36' ); 25 25 } 26 26 -
click-to-chat-for-whatsapp/trunk/new/admin/class-ht-ctc-admin-other-settings.php
r3420906 r3442197 141 141 </div> 142 142 <div class="collapsible-body"> 143 144 <?php 145 146 /** 147 * Parms_saved - hidden input filed. 148 * adds to db. while user save changes. useful to identify user saved the params. (especially if user deletes all params - fallback values adds only if parms_saved not exits. (backward compatible)) 149 * 150 * @since 3.31 151 * 152 * before 3.31 google_analytics, ga4 checkbox exists. and now it become one g_an checkbox and value of g_an is ga4 by default(new installs). and for upgrades it will be ga/ga4. updated at class ht-ctc-update-db.php 153 */ 154 ?> 155 <input name="<?php echo esc_attr( $dbrow ); ?>[parms_saved]" value="after_3_31" type="hidden" class="hide"> 156 <input name="<?php echo esc_attr( $dbrow ); ?>[parms_saved_2]" value="after_4_34" type="hidden" class="hide"> 157 158 159 160 <?php 161 143 <?php 162 144 // Google Analytics 163 145 $g_an_value = ( isset( $options['g_an'] ) ) ? esc_attr( $options['g_an'] ) : 'ga4'; … … 186 168 </p> 187 169 <?php 188 189 /**190 * Updated analytics.191 * new: settings for event name, type, params.192 *193 * @since 3.31194 */195 196 // g_an_params not exits. (and user not yet saved/clear the params.) backward compatible.197 if ( ! isset( $options['g_an_params'] ) && ! isset( $options['parms_saved'] ) ) {198 199 if ( 'ga' === $g_an_value ) {200 // if only ga is set.201 $options['g_an_params'] = array(202 'g_an_param_1',203 'g_an_param_2',204 );205 206 $options['g_an_param_1'] = array(207 'key' => 'event_category',208 'value' => 'Click to Chat for WhatsApp',209 );210 211 $options['g_an_param_2'] = array(212 'key' => 'event_label',213 'value' => '{title}, {url}',214 );215 216 } else {217 // ga4 or ..218 $options['g_an_params'] = array(219 'g_an_param_1',220 'g_an_param_2',221 'g_an_param_3',222 );223 224 $options['g_an_param_1'] = array(225 'key' => 'number',226 'value' => '{number}',227 );228 229 $options['g_an_param_2'] = array(230 'key' => 'title',231 'value' => '{title}',232 );233 234 $options['g_an_param_3'] = array(235 'key' => 'url',236 'value' => '{url}',237 );238 }239 }240 241 170 $g_an_event_name = ( isset( $options['g_an_event_name'] ) ) ? esc_attr( $options['g_an_event_name'] ) : 'click to chat'; 242 171 // list of all g_an params.. … … 407 336 </p> 408 337 <?php 409 // parms_saved_2 not exits. (and user not yet saved/clear the params.) backward compatible.410 if ( ! isset( $options['gtm_params'] ) && ! isset( $options['parms_saved_2'] ) ) {411 $options['gtm_params'] = array(412 'gtm_param_1',413 'gtm_param_2',414 'gtm_param_3',415 'gtm_param_4',416 'gtm_param_5',417 );418 419 $options['gtm_param_1'] = array(420 'key' => 'type',421 'value' => 'chat',422 );423 424 $options['gtm_param_2'] = array(425 'key' => 'number',426 'value' => '{number}',427 );428 429 $options['gtm_param_3'] = array(430 'key' => 'title',431 'value' => '{title}',432 );433 434 $options['gtm_param_4'] = array(435 'key' => 'url',436 'value' => '{url}',437 );438 439 $options['gtm_param_5'] = array(440 'key' => 'ref',441 'value' => 'dataLayer push',442 );443 444 }445 446 338 $gtm_event_name = ( isset( $options['gtm_event_name'] ) ) ? esc_attr( $options['gtm_event_name'] ) : 'Click to Chat'; 447 339 $gtm_params = ( isset( $options['gtm_params'] ) && is_array( $options['gtm_params'] ) ) ? array_map( 'esc_attr', $options['gtm_params'] ) : ''; … … 544 436 </ul> 545 437 546 547 <?php 548 549 /** 550 * Meta Pixel 551 * updated: 3.31 (able to change event name, type, edit/add params) 552 */ 553 438 <?php 554 439 $fb_pixel_checkbox = ( isset( $options['fb_pixel'] ) ) ? esc_attr( $options['fb_pixel'] ) : ''; 555 556 ?> 440 ?> 441 557 442 <ul class="collapsible col_pixel coll_active" data-coll_active="col_pixel" id="col_pixel"> 558 443 <li class=""> … … 571 456 </p> 572 457 <?php 573 574 // if params not exits. (and user not yet saved/clear the params.)575 if ( ! isset( $options['pixel_params'] ) && ! isset( $options['parms_saved'] ) ) {576 577 $options['pixel_params'] = array(578 'pixel_param_1',579 'pixel_param_2',580 'pixel_param_3',581 'pixel_param_4',582 );583 584 $options['pixel_param_1'] = array(585 'key' => 'Category',586 'value' => 'Click to Chat for WhatsApp',587 );588 589 $options['pixel_param_2'] = array(590 'key' => 'ID',591 'value' => '{number}',592 );593 594 $options['pixel_param_3'] = array(595 'key' => 'Title',596 'value' => '{title}',597 );598 599 $options['pixel_param_4'] = array(600 'key' => 'URL',601 'value' => '{url}',602 );603 604 }605 606 458 $pixel_event_type = ( isset( $options['pixel_event_type'] ) ) ? esc_attr( $options['pixel_event_type'] ) : 'trackCustom'; 607 459 $pixel_custom_event_name = ( isset( $options['pixel_custom_event_name'] ) ) ? esc_attr( $options['pixel_custom_event_name'] ) : 'Click to Chat by HoliThemes'; -
click-to-chat-for-whatsapp/trunk/new/admin/db/class-ht-ctc-db.php
r3420906 r3442197 93 93 $values['g_an_event_name'] = 'click to chat'; 94 94 95 // google analytics params 96 $values['g_an_params'] = array( 97 'g_an_param_1', 98 'g_an_param_2', 99 'g_an_param_3', 100 ); 101 102 $values['g_an_param_1'] = array( 103 'key' => 'number', 104 'value' => '{number}', 105 ); 106 107 $values['g_an_param_2'] = array( 108 'key' => 'title', 109 'value' => '{title}', 110 ); 111 112 $values['g_an_param_3'] = array( 113 'key' => 'url', 114 'value' => '{url}', 115 ); 116 95 117 $values['gtm'] = '1'; 96 118 $values['gtm_event_name'] = 'Click to Chat'; 119 120 // gtm params 121 $values['gtm_params'] = array( 122 'gtm_param_1', 123 'gtm_param_2', 124 'gtm_param_3', 125 'gtm_param_4', 126 'gtm_param_5', 127 ); 128 129 $values['gtm_param_1'] = array( 130 'key' => 'type', 131 'value' => 'chat', 132 ); 133 134 $values['gtm_param_2'] = array( 135 'key' => 'number', 136 'value' => '{number}', 137 ); 138 139 $values['gtm_param_3'] = array( 140 'key' => 'title', 141 'value' => '{title}', 142 ); 143 144 $values['gtm_param_4'] = array( 145 'key' => 'url', 146 'value' => '{url}', 147 ); 148 149 $values['gtm_param_5'] = array( 150 'key' => 'ref', 151 'value' => 'dataLayer push', 152 ); 97 153 98 154 $values['fb_pixel'] = '1'; … … 100 156 $values['pixel_custom_event_name'] = 'Click to Chat by HoliThemes'; 101 157 $values['pixel_standard_event_name'] = 'Lead'; 158 159 // pixel params 160 $values['pixel_params'] = array( 161 'pixel_param_1', 162 'pixel_param_2', 163 'pixel_param_3', 164 'pixel_param_4', 165 ); 166 167 $values['pixel_param_1'] = array( 168 'key' => 'Category', 169 'value' => 'Click to Chat for WhatsApp', 170 ); 171 172 $values['pixel_param_2'] = array( 173 'key' => 'ID', 174 'value' => '{number}', 175 ); 176 177 $values['pixel_param_3'] = array( 178 'key' => 'Title', 179 'value' => '{title}', 180 ); 181 182 $values['pixel_param_4'] = array( 183 'key' => 'URL', 184 'value' => '{url}', 185 ); 186 102 187 } 103 188 … … 240 325 'v4_3' => $time, 241 326 'v4_34' => $time, 327 'v4_36' => $time, 242 328 ); 243 329 -
click-to-chat-for-whatsapp/trunk/new/admin/db/class-ht-ctc-update-db.php
r3429029 r3442197 82 82 $this->v4_34_update(); 83 83 } 84 85 /** 86 * V4.36: if not yet updated to v4.36 or above 87 */ 88 if ( ! isset( $ht_ctc_plugin_details['v4_36'] ) ) { 89 $this->v4_36_update(); 90 } 84 91 } 85 92 } … … 90 97 */ 91 98 99 100 101 /** 102 * Updating to v4.36 or above 103 * 104 * 4.36 changes. 105 * Google Analytics params, gtm params, pixel params are added to db. when upgrades. 106 * 107 * google analytis setting for parameters added in approx. v3.31. 108 */ 109 public function v4_36_update() { 110 111 $os = get_option( 'ht_ctc_othersettings', array() ); 112 113 // Ensure $os is an array to prevent errors. 114 if ( ! is_array( $os ) ) { 115 $os = array(); 116 } 117 118 $new_data = array(); // hold new structure data 119 120 /** 121 * Migration Logic: 122 * We check if the parameters exist in the DB. 123 * We also check 'parms_saved' (for GA/Pixel) and 'parms_saved_2' (for GTM). 124 * 125 * 'parms_saved'/'parms_saved_2' are hidden fields saved when the user submits the settings form. 126 * If these flags exist, it means the user has explicitly saved the settings at some point. 127 * In that case, we TRUST the database (even if params are empty, the user might have deleted them intentionally). 128 * 129 * If these flags DO NOT exist, it means the user is likely running on default settings (runtime defaults). 130 * In this case, we populate the DB with those defaults to maintain behavior now that runtime generation is removed. 131 */ 132 133 // 1. Google Analytics Params 134 // Check if params are missing AND user hasn't actively saved settings before (backward compatibility). 135 // isset check is safe because $os is guaranteed strictly to be an array above. 136 if ( ! isset( $os['g_an_params'] ) && ! isset( $os['parms_saved'] ) ) { 137 138 $g_an_value = ( isset( $os['g_an'] ) ) ? esc_attr( $os['g_an'] ) : 'ga4'; 139 140 if ( 'ga' === $g_an_value ) { 141 // Legacy Google Analytics (Universal Analytics) defaults 142 $new_data['g_an_params'] = array( 143 'g_an_param_1', 144 'g_an_param_2', 145 ); 146 147 $new_data['g_an_param_1'] = array( 148 'key' => 'event_category', 149 'value' => 'Click to Chat for WhatsApp', 150 ); 151 152 $new_data['g_an_param_2'] = array( 153 'key' => 'event_label', 154 'value' => '{title}, {url}', 155 ); 156 157 } else { 158 // GA4 defaults 159 $new_data['g_an_params'] = array( 160 'g_an_param_1', 161 'g_an_param_2', 162 'g_an_param_3', 163 ); 164 165 $new_data['g_an_param_1'] = array( 166 'key' => 'number', 167 'value' => '{number}', 168 ); 169 170 $new_data['g_an_param_2'] = array( 171 'key' => 'title', 172 'value' => '{title}', 173 ); 174 175 $new_data['g_an_param_3'] = array( 176 'key' => 'url', 177 'value' => '{url}', 178 ); 179 } 180 } 181 182 // 2. GTM (Google Tag Manager) Params 183 // Check if params are missing AND 'parms_saved_2' flag does not exist. 184 if ( ! isset( $os['gtm_params'] ) && ! isset( $os['parms_saved_2'] ) ) { 185 186 $new_data['gtm_params'] = array( 187 'gtm_param_1', 188 'gtm_param_2', 189 'gtm_param_3', 190 'gtm_param_4', 191 'gtm_param_5', 192 ); 193 194 $new_data['gtm_param_1'] = array( 195 'key' => 'type', 196 'value' => 'chat', 197 ); 198 199 $new_data['gtm_param_2'] = array( 200 'key' => 'number', 201 'value' => '{number}', 202 ); 203 204 $new_data['gtm_param_3'] = array( 205 'key' => 'title', 206 'value' => '{title}', 207 ); 208 209 $new_data['gtm_param_4'] = array( 210 'key' => 'url', 211 'value' => '{url}', 212 ); 213 214 $new_data['gtm_param_5'] = array( 215 'key' => 'ref', 216 'value' => 'dataLayer push', 217 ); 218 219 } 220 221 // 3. Meta Pixel Params 222 // Check if params are missing AND user hasn't actively saved settings before. 223 if ( ! isset( $os['pixel_params'] ) && ! isset( $os['parms_saved'] ) ) { 224 225 $new_data['pixel_params'] = array( 226 'pixel_param_1', 227 'pixel_param_2', 228 'pixel_param_3', 229 'pixel_param_4', 230 ); 231 232 $new_data['pixel_param_1'] = array( 233 'key' => 'Category', 234 'value' => 'Click to Chat for WhatsApp', 235 ); 236 237 $new_data['pixel_param_2'] = array( 238 'key' => 'ID', 239 'value' => '{number}', 240 ); 241 242 $new_data['pixel_param_3'] = array( 243 'key' => 'Title', 244 'value' => '{title}', 245 ); 246 247 $new_data['pixel_param_4'] = array( 248 'key' => 'URL', 249 'value' => '{url}', 250 ); 251 252 } 253 254 if ( ! is_array( $new_data ) ) { 255 $new_data = array(); 256 } 257 258 // Merge defaults ($new_data) with existing options ($os). 259 // Existing keys in $os will overwrite $new_data, preserving user settings if they exist. 260 $update_othersettings = array_merge( $new_data, $os ); 261 262 update_option( 'ht_ctc_othersettings', $update_othersettings ); 263 } 92 264 93 265 … … 247 419 $group = get_option( 'ht_ctc_group', array() ); 248 420 $update_group = array_merge( $n, $group ); 249 update_option( 'ht_ctc_group', $update_ chat);421 update_option( 'ht_ctc_group', $update_group ); 250 422 251 423 $share = get_option( 'ht_ctc_share', array() ); 252 424 $update_share = array_merge( $n, $share ); 253 update_option( 'ht_ctc_share', $update_ chat);425 update_option( 'ht_ctc_share', $update_share ); 254 426 } 255 427 -
click-to-chat-for-whatsapp/trunk/new/inc/assets/js/dev/app.dev.js
r3429029 r3442197 1513 1513 1514 1514 // Create basic event info 1515 var ga_par ms = new Map();1516 const getGaParamsObject = () => Object.fromEntries( ga_par ms );1515 var ga_params = new Map(); 1516 const getGaParamsObject = () => Object.fromEntries( ga_params ); 1517 1517 var ga_category = 'Click to Chat for WhatsApp'; 1518 1518 var ga_action = 'chat: ' + id; … … 1566 1566 console.log( parameterKey ); 1567 1567 console.log( parameterValue ); 1568 ga_par ms.set( parameterKey, parameterValue );1568 ga_params.set( parameterKey, parameterValue ); 1569 1569 } ); 1570 1570 } 1571 console.log( 'ga_par ms' );1571 console.log( 'ga_params' ); 1572 1572 console.log( getGaParamsObject() ); 1573 1573 … … 1613 1613 // Only allow certain tag ID formats 1614 1614 if ( tag_id.startsWith( 'G-' ) || tag_id.startsWith( 'GT-' ) ) { 1615 ga_par ms.set( 'send_to', tag_id );1615 ga_params.set( 'send_to', tag_id ); 1616 1616 1617 1617 console.log( 'gtag event - send_to: ' + tag_id ); 1618 1618 console.log( 'g_event_name: ' + g_event_name ); 1619 console.log( 'ga_par ms: ' );1619 console.log( 'ga_params: ' ); 1620 1620 console.log( getGaParamsObject() ); 1621 1621 … … 1730 1730 'g_event_name: ' + 1731 1731 g_event_name ); 1732 console.log( 'ga_par ms: ' );1732 console.log( 'ga_params: ' ); 1733 1733 console.log( getGaParamsObject() ); 1734 1734 gtag( 'event', g_event_name, getGaParamsObject() ); -
click-to-chat-for-whatsapp/trunk/new/inc/chat/class-ht-ctc-chat.php
r3429029 r3442197 584 584 } 585 585 } 586 } elseif ( ! isset( $othersettings['parms_saved'] ) ) {587 588 // If user not yet saved the params. (backward compatibility)589 if ( 'ga' === $g_an_value ) {590 $values['g_an_params'] = array(591 'g_an_param_1',592 'g_an_param_2',593 );594 595 $values['g_an_param_1'] = array(596 'key' => 'event_category',597 'value' => 'Click to Chat for WhatsApp',598 );599 600 $values['g_an_param_2'] = array(601 'key' => 'event_label',602 'value' => '{title}, {url}',603 );604 } else {605 $values['g_an_params'] = array(606 'g_an_param_1',607 'g_an_param_2',608 'g_an_param_3',609 );610 $values['g_an_param_1'] = array(611 'key' => 'number',612 'value' => '{number}',613 );614 $values['g_an_param_2'] = array(615 'key' => 'title',616 'value' => '{title}',617 );618 $values['g_an_param_3'] = array(619 'key' => 'url',620 'value' => '{url}',621 );622 }623 586 } 624 587 … … 639 602 } 640 603 } 641 } elseif ( ! isset( $othersettings['parms_saved'] ) ) {642 $values['pixel_params'] = array(643 'pixel_param_1',644 'pixel_param_2',645 'pixel_param_3',646 'pixel_param_4',647 );648 649 $values['pixel_param_1'] = array(650 'key' => 'Category',651 'value' => 'Click to Chat for WhatsApp',652 );653 654 $values['pixel_param_2'] = array(655 'key' => 'ID',656 'value' => '{number}',657 );658 659 $values['pixel_param_3'] = array(660 'key' => 'Title',661 'value' => '{title}',662 );663 664 $values['pixel_param_4'] = array(665 'key' => 'URL',666 'value' => '{url}',667 );668 604 } 669 605 … … 684 620 } 685 621 } 686 } elseif ( ! isset( $othersettings['gtm_params'] ) && ! isset( $othersettings['parms_saved_2'] ) ) {687 $values['gtm_params'] = array(688 'gtm_param_1',689 'gtm_param_2',690 'gtm_param_3',691 'gtm_param_4',692 'gtm_param_5',693 );694 $values['gtm_param_1'] = array(695 'key' => 'type',696 'value' => 'chat',697 );698 $values['gtm_param_2'] = array(699 'key' => 'number',700 'value' => '{number}',701 );702 $values['gtm_param_3'] = array(703 'key' => 'title',704 'value' => '{title}',705 );706 $values['gtm_param_4'] = array(707 'key' => 'url',708 'value' => '{url}',709 );710 $values['gtm_param_5'] = array(711 'key' => 'ref',712 'value' => 'dataLayer push',713 );714 622 } 715 623 -
click-to-chat-for-whatsapp/trunk/new/inc/commons/class-ht-ctc-security.php
r3369409 r3442197 30 30 $referer = isset( $_SERVER['HTTP_REFERER'] ) ? esc_url_raw( wp_unslash( $_SERVER['HTTP_REFERER'] ) ) : ''; 31 31 32 // Referer check 33 if ( strpos( $referer, $site_url ) === false ) { 32 // Referer checks should only run when a header is present. 33 // A growing number of browsers/extensions block the Referer header for privacy. 34 if ( $referer && strpos( $referer, $site_url ) === false ) { 34 35 return new WP_REST_Response( array( 'error' => 'Invalid referer' ), 403 ); 35 36 } 36 37 37 // Nonce check (optional, only if frontend sends it) 38 // Nonce check: 39 // 1. Allow optional/missing nonce for public caching compatibility (Settings are public data). 40 // 2. If a nonce IS provided (e.g. from app.js), verify it strictly to prevent spoofing. 38 41 $nonce = $request->get_header( 'x_wp_nonce' ); 42 if ( empty( $nonce ) ) { 43 $nonce = $request->get_param( '_wpnonce' ); 44 } 39 45 40 // ht_ctc_nonce 41 if ( ! wp_verify_nonce( $nonce, 'wp_rest' ) ) { 46 if ( $nonce && ! wp_verify_nonce( $nonce, 'wp_rest' ) ) { 42 47 return new WP_REST_Response( array( 'error' => 'Invalid nonce' ), 403 ); 43 48 } … … 45 50 // Optional: Bounce or User-Agent logic (custom abuse logic) 46 51 $user_agent = isset( $_SERVER['HTTP_USER_AGENT'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : ''; 47 if ( empty( $user_agent )) {52 if ( '' === $user_agent ) { 48 53 return new WP_REST_Response( array( 'error' => 'Invalid user agent' ), 403 ); 49 54 } -
click-to-chat-for-whatsapp/trunk/new/inc/commons/class-ht-ctc-settings-data.php
r3369409 r3442197 311 311 } 312 312 } 313 } elseif ( ! isset( $othersettings['parms_saved'] ) ) {314 // if user not yet saved the params. (backward compatibility)315 if ( 'ga' === $g_an_value ) {316 $values['g_an_params'] = array(317 'g_an_param_1',318 'g_an_param_2',319 );320 321 $values['g_an_param_1'] = array(322 'key' => 'event_category',323 'value' => 'Click to Chat for WhatsApp',324 );325 326 $values['g_an_param_2'] = array(327 'key' => 'event_label',328 'value' => '{title}, {url}',329 );330 } else {331 $values['g_an_params'] = array(332 'g_an_param_1',333 'g_an_param_2',334 'g_an_param_3',335 );336 $values['g_an_param_1'] = array(337 'key' => 'number',338 'value' => '{number}',339 );340 $values['g_an_param_2'] = array(341 'key' => 'title',342 'value' => '{title}',343 );344 $values['g_an_param_3'] = array(345 'key' => 'url',346 'value' => '{url}',347 );348 }349 313 } 350 314 … … 365 329 } 366 330 } 367 } elseif ( ! isset( $othersettings['parms_saved'] ) ) {368 $values['pixel_params'] = array(369 'pixel_param_1',370 'pixel_param_2',371 'pixel_param_3',372 'pixel_param_4',373 );374 375 $values['pixel_param_1'] = array(376 'key' => 'Category',377 'value' => 'Click to Chat for WhatsApp',378 );379 380 $values['pixel_param_2'] = array(381 'key' => 'ID',382 'value' => '{number}',383 );384 385 $values['pixel_param_3'] = array(386 'key' => 'Title',387 'value' => '{title}',388 );389 390 $values['pixel_param_4'] = array(391 'key' => 'URL',392 'value' => '{url}',393 );394 331 } 395 332 -
click-to-chat-for-whatsapp/trunk/readme.txt
r3429029 r3442197 4 4 Requires PHP: 5.6 5 5 Contributors: HoliThemes 6 Stable tag: 4.3 56 Stable tag: 4.36 7 7 Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, WooCommerce WhatsApp 8 8 License: GPLv2 or later … … 542 542 == Changelog == 543 543 544 = 4.36 = 545 * Enhancement: Google Analytics feature. 546 544 547 = 4.35 = 545 548 * Enhancement: Custom CSS feature. … … 562 565 * Fix: Shortcode style-1 added icon 563 566 564 = 4.30 =565 * Enhancement: Google Analytics feature.566 567 = 4.29 =568 * Settings to load JavaScript files as Normal, Async, or Defer for improved performance.569 570 = 4.28 =571 * Fix: The Custom Element feature now works correctly even when the 'ctc_chat' class is added dynamically.572 573 = 4.27 =574 * app.js file now loads asynchronously and deferred to improve page load performance.575 576 = 4.26 =577 * Custom URL feature is now available in this main plugin. We can add WhatsApp Chanel URL in the plugin settings to open WhatsApp Channel.578 * Enhancement: Page level settings design.579 580 = 4.25 =581 * Fix: Greeting dialog modal not displaying correctly due to z-index issues when certain background elements were present.582 583 = 4.24 =584 * Fixed: Page-level settings now work correctly on the WooCommerce Shop page.585 * Improved: Better visual styling for the base widget.586 587 = 4.23 =588 🚨 Important Update589 * ✨ New Feature: Greetings Dialog can now appear as a modal for better visibility and UX.590 * 🛠️ Fix: Resolved an issue where the Greetings Dialog was not displaying correctly when the base widget was positioned at the top.591 * 🛠️ Fix: On iPhone Chrome, the Share feature now opens WhatsApp correctly without opening a new tab.592 * 🔧 Improvement: When a WhatsApp number is not set, the admin notice is now displayed using a more reliable and secure method — instead of using JS .html().593 594 = 4.22 =595 * The Custom Image widget now automatically uses the image file name as the alt attribute596 * Settings to disable page-level settings.597 598 = 4.21 =599 * Fix: Resolved issue where phone numbers with +1888 prefix were not being saved in settings.600 601 = 4.20 =602 * New: Added {{price}} variable for WooCommerce product pages to display price with currency symbol, thousand separator, and decimal separator.603 * Fix: Resolved conflict with some themes caused by animation class name.604 605 = 4.19 =606 * Fix: PHP Error. Thanks, Malae, for reporting it!607 608 = 4.18 =609 * Fix: Resolved an issue where the Style-5 profile image was displaying above the greetings dialog on mobile devices.610 * Fix: Corrected the border alignment in Style-5.611 * Enhancement: Admin Demo for better usability612 613 = 4.17 =614 * Fix: Display Widget as an Add to Cart like button is not working on the WooCommerce single product page, Archive list.615 616 = 4.16 =617 * Added 'Alt' attribute value for greetings header image618 * Fix: Style-7, Style-7 Extend hover effects not working.619 620 = 4.15 =621 * Fix: Page-level settings not working properly.622 * Fix: Alignment issues at admin setting pages623 624 = 4.14 =625 * Enhancement: Show or hide the admin demo.626 627 = 4.13 =628 * Fix: Alignment issues at admin setting pages629 630 = 4.12.1 =631 * Fix: Hover effects for Style-7 Extend632 * Fix: Dual lines issue for Style-8 with large call to action text633 634 = 4.12 =635 * Fix: Custom CSS Code block not allowing quotes at front end636 637 = 4.11 =638 * New: Custom CSS Code block.639 640 = 4.10 =641 * Fix: Page level display settings for WooCommerce single product page642 643 = 4.9 =644 * Fix: Display based on device not working as expected on iPad Pro645 646 567 [Changelog](https://holithemes.com/plugins/click-to-chat/changelog/)
Note: See TracChangeset
for help on using the changeset viewer.