Version Description
- Google Analytics
- Facebook Analytics
Download this release
Release Info
Developer | bhvreddy |
Plugin | Click to Chat for WhatsApp Chat |
Version | 1.6 |
Comparing to | |
See all releases |
Code changes from version 1.5 to 1.6
- admin/admin.php +40 -1
- admin/class-ccw-admin-page-customize-styles.php +174 -17
- admin/class-ccw-admin-page.php +63 -2
- admin/commons/admin-sidebar.php +36 -0
- admin/commons/class-ht-ccw-admin-lists.php +2 -1
- admin/default-values.php +52 -3
- admin/settings_page.php +14 -12
- admin/sp_customize_styles.php +2 -2
- assets/js/app.js +91 -85
- assets/js/required/admin_app-works.js +43 -1
- assets/js/required/mdjs.js +0 -19
- click-to-chat.php +1 -1
- inc/class-ccw-add-styles-scripts.php +1 -1
- inc/class-ccw-shortcode.php +15 -3
- inc/class-ht-ccw-chat.php +85 -0
- inc/class-ht-ccw.php +1 -1
- inc/commons/styles-list-sc/sc-style-1.php +1 -1
- inc/commons/styles-list-sc/sc-style-2.php +1 -1
- inc/commons/styles-list-sc/sc-style-3.php +1 -1
- inc/commons/styles-list-sc/sc-style-4.1.php +2 -0
- inc/commons/styles-list-sc/sc-style-4.php +1 -3
- inc/commons/styles-list-sc/sc-style-5.php +1 -1
- inc/commons/styles-list-sc/sc-style-6.php +1 -1
- inc/commons/styles-list-sc/sc-style-7.php +1 -1
- inc/commons/styles-list-sc/sc-style-8.1.php +1 -1
- inc/commons/styles-list-sc/sc-style-8.php +1 -1
- inc/commons/styles-list-sc/sc-style-9.php +1 -1
- inc/commons/styles-list-sc/sc-style-99.php +3 -3
- inc/commons/styles.php +12 -9
- readme.txt +38 -15
admin/admin.php
CHANGED
@@ -28,4 +28,43 @@ require_once('class-ccw-admin-page-customize-styles.php');
|
|
28 |
// load_plugin_textdomain( 'click-to-chat-for-whatsapp', FALSE, HT_CCW_PLUGIN_BASENAME . '/languages/' );
|
29 |
// }
|
30 |
|
31 |
-
// add_action( 'plugins_loaded', 'load_ht_ccw_textdomain' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
// load_plugin_textdomain( 'click-to-chat-for-whatsapp', FALSE, HT_CCW_PLUGIN_BASENAME . '/languages/' );
|
29 |
// }
|
30 |
|
31 |
+
// add_action( 'plugins_loaded', 'load_ht_ccw_textdomain' );
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
|
36 |
+
|
37 |
+
/**
|
38 |
+
* ccw_admin_sidebar_card - by default there is no option ..
|
39 |
+
* so when no option exists .. so it not equal to 'hide'
|
40 |
+
* so in admin sidebar the card will display . .
|
41 |
+
* if clicks on hide card ..
|
42 |
+
* then an option update will happen ( create an option )
|
43 |
+
*
|
44 |
+
*/
|
45 |
+
add_action( 'wp_ajax_ccw_admin_sidebar', 'ht_ccw_admin_sidebar_ajax' );
|
46 |
+
|
47 |
+
function ht_ccw_admin_sidebar_ajax() {
|
48 |
+
|
49 |
+
$wca_card = get_option( 'ccw_admin_sidebar_card' );
|
50 |
+
|
51 |
+
// wp_localize_script can use - but this may be easy, as only one value ..
|
52 |
+
echo $wca_card;
|
53 |
+
|
54 |
+
wp_die();
|
55 |
+
}
|
56 |
+
|
57 |
+
|
58 |
+
|
59 |
+
// action - ccw_hide_admin_sidebar_card
|
60 |
+
// update the option ccw_admin_sidebar_card to hide
|
61 |
+
add_action( 'wp_ajax_ccw_hide_admin_sidebar_card', 'ht_ccw_hide_admin_sidebar_card_ajax' );
|
62 |
+
|
63 |
+
function ht_ccw_hide_admin_sidebar_card_ajax() {
|
64 |
+
|
65 |
+
$wca_card = get_option( 'ccw_admin_sidebar_card' );
|
66 |
+
|
67 |
+
update_option( 'ccw_admin_sidebar_card', 'hide' );
|
68 |
+
|
69 |
+
wp_die();
|
70 |
+
}
|
admin/class-ccw-admin-page-customize-styles.php
CHANGED
@@ -21,6 +21,9 @@ class CCW_Admin_Page_Customize_Styles {
|
|
21 |
function customize_styles() {
|
22 |
|
23 |
register_setting( 'ccw_settings_group_cs', 'ccw_options_cs' , 'ccw_options_sanitize_cs_cb' );
|
|
|
|
|
|
|
24 |
|
25 |
add_settings_section( 'ccw_settings_cs', '', array( $this, 'ccw_settings_section_cs_cb' ), 'ccw_options_settings_cs' );
|
26 |
|
@@ -34,10 +37,11 @@ class CCW_Admin_Page_Customize_Styles {
|
|
34 |
add_settings_field( 'ccw_style_8_cs', 'Style 8', array( $this, 'ccw_style_8_cb' ), 'ccw_options_settings_cs', 'ccw_settings_cs' );
|
35 |
add_settings_field( 'ccw_style_9_cs', 'Style 9', array( $this, 'ccw_style_9_cb' ), 'ccw_options_settings_cs', 'ccw_settings_cs' );
|
36 |
add_settings_field( 'ccw_style_99_own_img_cs', 'Style 99 own Image', array( $this, 'ccw_style_99_own_img_cb' ), 'ccw_options_settings_cs', 'ccw_settings_cs' );
|
37 |
-
|
38 |
-
|
39 |
add_settings_field( 'ccw_animations', 'Animations', array( $this, 'ccw_animations_cb' ), 'ccw_options_settings_cs', 'ccw_settings_cs' );
|
40 |
|
|
|
|
|
|
|
41 |
}
|
42 |
|
43 |
|
@@ -128,8 +132,6 @@ class CCW_Admin_Page_Customize_Styles {
|
|
128 |
</div>
|
129 |
</div>
|
130 |
|
131 |
-
|
132 |
-
|
133 |
</div>
|
134 |
</div>
|
135 |
</li>
|
@@ -754,19 +756,7 @@ class CCW_Admin_Page_Customize_Styles {
|
|
754 |
<p class="description"> <?php _e( 'Animations for floating styles ( 3, 4, 5, 6, 7, 8, 9 ) ' , 'click-to-chat-for-whatsapp' ) ?> - <a target="_blank" href="https://holithemes.com/whatsapp-chat/animations/"><?php _e( 'more info' , 'click-to-chat-for-whatsapp' ) ?></a> </p>
|
755 |
<br><br>
|
756 |
|
757 |
-
|
758 |
-
<!-- <div class="row">
|
759 |
-
<div class="input-field col s12">
|
760 |
-
<select name="ccw_options_cs[an_enable]" class="select-1">
|
761 |
-
<option value="1"><?php _e( 'No' , 'click-to-chat-for-whatsapp' ) ?></option>
|
762 |
-
<option value="yes" <?php echo esc_attr( $ccw_animations['an_enable'] ) == 'yes' ? 'SELECTED' : ''; ?> ><?php _e( 'Yes' , 'click-to-chat-for-whatsapp' ) ?></option>
|
763 |
-
</select>
|
764 |
-
<label><?php _e( 'Enable Animations' , 'click-to-chat-for-whatsapp' ) ?></label>
|
765 |
-
<p class="description"> <?php _e( 'Yes - to enable animations ' , 'click-to-chat-for-whatsapp' ) ?> </p>
|
766 |
-
<p class="description"> <?php _e( 'dont enable, if your are not using Animations' , 'click-to-chat-for-whatsapp' ) ?> </p>
|
767 |
-
</div>
|
768 |
-
</div> -->
|
769 |
-
|
770 |
<!-- animation on load -->
|
771 |
<div class="row">
|
772 |
<div class="col s6">
|
@@ -815,6 +805,173 @@ class CCW_Admin_Page_Customize_Styles {
|
|
815 |
|
816 |
|
817 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
818 |
function ccw_options_sanitize_cs_cb( $input ) {
|
819 |
|
820 |
if ( ! current_user_can( 'manage_options' ) ) {
|
21 |
function customize_styles() {
|
22 |
|
23 |
register_setting( 'ccw_settings_group_cs', 'ccw_options_cs' , 'ccw_options_sanitize_cs_cb' );
|
24 |
+
|
25 |
+
register_setting( 'ccw_settings_group_cs', 'ht_ccw_ga' , 'ccw_options_sanitize_cs_cb' );
|
26 |
+
register_setting( 'ccw_settings_group_cs', 'ht_ccw_fb' , 'ccw_options_sanitize_cs_cb' );
|
27 |
|
28 |
add_settings_section( 'ccw_settings_cs', '', array( $this, 'ccw_settings_section_cs_cb' ), 'ccw_options_settings_cs' );
|
29 |
|
37 |
add_settings_field( 'ccw_style_8_cs', 'Style 8', array( $this, 'ccw_style_8_cb' ), 'ccw_options_settings_cs', 'ccw_settings_cs' );
|
38 |
add_settings_field( 'ccw_style_9_cs', 'Style 9', array( $this, 'ccw_style_9_cb' ), 'ccw_options_settings_cs', 'ccw_settings_cs' );
|
39 |
add_settings_field( 'ccw_style_99_own_img_cs', 'Style 99 own Image', array( $this, 'ccw_style_99_own_img_cb' ), 'ccw_options_settings_cs', 'ccw_settings_cs' );
|
|
|
|
|
40 |
add_settings_field( 'ccw_animations', 'Animations', array( $this, 'ccw_animations_cb' ), 'ccw_options_settings_cs', 'ccw_settings_cs' );
|
41 |
|
42 |
+
add_settings_field( 'ht_ccw_ga', 'Google Analytics', array( $this, 'ht_ccw_ga_cb' ), 'ccw_options_settings_cs', 'ccw_settings_cs' );
|
43 |
+
add_settings_field( 'ht_ccw_fb', 'Facebook Analytics', array( $this, 'ht_ccw_fb_cb' ), 'ccw_options_settings_cs', 'ccw_settings_cs' );
|
44 |
+
|
45 |
}
|
46 |
|
47 |
|
132 |
</div>
|
133 |
</div>
|
134 |
|
|
|
|
|
135 |
</div>
|
136 |
</div>
|
137 |
</li>
|
756 |
<p class="description"> <?php _e( 'Animations for floating styles ( 3, 4, 5, 6, 7, 8, 9 ) ' , 'click-to-chat-for-whatsapp' ) ?> - <a target="_blank" href="https://holithemes.com/whatsapp-chat/animations/"><?php _e( 'more info' , 'click-to-chat-for-whatsapp' ) ?></a> </p>
|
757 |
<br><br>
|
758 |
|
759 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
760 |
<!-- animation on load -->
|
761 |
<div class="row">
|
762 |
<div class="col s6">
|
805 |
|
806 |
|
807 |
|
808 |
+
|
809 |
+
|
810 |
+
// Google Analytics
|
811 |
+
function ht_ccw_ga_cb() {
|
812 |
+
$ht_ccw_ga = get_option('ht_ccw_ga');
|
813 |
+
$ga_category = esc_attr( $ht_ccw_ga['ga_category'] );
|
814 |
+
$ga_action = esc_attr( $ht_ccw_ga['ga_action'] );
|
815 |
+
$ga_label = esc_attr( $ht_ccw_ga['ga_label'] );
|
816 |
+
|
817 |
+
?>
|
818 |
+
<ul class="collapsible" data-collapsible="accordion">
|
819 |
+
<li>
|
820 |
+
<div id="ga-analytics" class="collapsible-header">Google Analytics </div>
|
821 |
+
<div class="collapsible-body">
|
822 |
+
|
823 |
+
<p class="description"> <?php _e( 'Enable Google Analytics at plugin home settings' , 'click-to-chat-for-whatsapp' ) ?> - <a target="_blank" href="<?php echo admin_url( 'admin.php?page=click-to-chat' ); ?>"><?php _e( 'Click to Chat' , 'click-to-chat-for-whatsapp' ) ?></a> </p>
|
824 |
+
<p class="description"> <?php _e( 'Event Values' , 'click-to-chat-for-whatsapp' ) ?> - <a target="_blank" href="https://holithemes.com/whatsapp-chat/google-analytics/"><?php _e( 'more info' , 'click-to-chat-for-whatsapp' ) ?></a> </p>
|
825 |
+
<br><br>
|
826 |
+
|
827 |
+
<!-- Category Name -->
|
828 |
+
<div class="row">
|
829 |
+
<div class="col s6">
|
830 |
+
<p><?php _e( 'Category Name' , 'click-to-chat-for-whatsapp' ) ?></p>
|
831 |
+
</div>
|
832 |
+
<div class="input-field col s5">
|
833 |
+
<input name="ht_ccw_ga[ga_category]" value="<?php echo esc_attr( $ht_ccw_ga['ga_category'] ) ?>" type="text" class="" >
|
834 |
+
</div>
|
835 |
+
</div>
|
836 |
+
|
837 |
+
<!-- Action Name -->
|
838 |
+
<div class="row">
|
839 |
+
<div class="col s6">
|
840 |
+
<p><?php _e( 'Action Name' , 'click-to-chat-for-whatsapp' ) ?></p>
|
841 |
+
</div>
|
842 |
+
<div class="input-field col s5">
|
843 |
+
<input name="ht_ccw_ga[ga_action]" value="<?php echo esc_attr( $ht_ccw_ga['ga_action'] ) ?>" type="text" class="" >
|
844 |
+
</div>
|
845 |
+
</div>
|
846 |
+
|
847 |
+
<!-- Label Name -->
|
848 |
+
<div class="row">
|
849 |
+
<div class="col s6">
|
850 |
+
<p><?php _e( 'Label Name' , 'click-to-chat-for-whatsapp' ) ?></p>
|
851 |
+
</div>
|
852 |
+
<div class="input-field col s5">
|
853 |
+
<input name="ht_ccw_ga[ga_label]" value="<?php echo esc_attr( $ht_ccw_ga['ga_label'] ) ?>" type="text" class="" >
|
854 |
+
</div>
|
855 |
+
</div>
|
856 |
+
|
857 |
+
</div>
|
858 |
+
</div>
|
859 |
+
</li>
|
860 |
+
</ul>
|
861 |
+
|
862 |
+
<?php
|
863 |
+
}
|
864 |
+
|
865 |
+
|
866 |
+
|
867 |
+
|
868 |
+
|
869 |
+
|
870 |
+
// fb Analytics
|
871 |
+
function ht_ccw_fb_cb() {
|
872 |
+
$ht_ccw_fb = get_option('ht_ccw_fb');
|
873 |
+
$fb_event_name = esc_attr( $ht_ccw_fb['fb_event_name'] );
|
874 |
+
$p1_value = esc_attr( $ht_ccw_fb['p1_value'] );
|
875 |
+
$p2_value = esc_attr( $ht_ccw_fb['p2_value'] );
|
876 |
+
$p3_value = esc_attr( $ht_ccw_fb['p3_value'] );
|
877 |
+
$p1_name = esc_attr( $ht_ccw_fb['p1_name'] );
|
878 |
+
$p2_name = esc_attr( $ht_ccw_fb['p2_name'] );
|
879 |
+
$p3_name = esc_attr( $ht_ccw_fb['p3_name'] );
|
880 |
+
|
881 |
+
?>
|
882 |
+
<ul class="collapsible" data-collapsible="accordion">
|
883 |
+
<li>
|
884 |
+
<div id="fb-analytics" class="collapsible-header">Facebook Analytics </div>
|
885 |
+
<div class="collapsible-body">
|
886 |
+
|
887 |
+
<p class="description"> <?php _e( 'Enable Facebook Analytics at plugin home settings' , 'click-to-chat-for-whatsapp' ) ?> - <a target="_blank" href="<?php echo admin_url( 'admin.php?page=click-to-chat' ); ?>"><?php _e( 'Click to Chat' , 'click-to-chat-for-whatsapp' ) ?></a> </p>
|
888 |
+
<p class="description"> <?php _e( 'Event Parameters' , 'click-to-chat-for-whatsapp' ) ?> - <a target="_blank" href="https://holithemes.com/whatsapp-chat/facebook-analytics/"><?php _e( 'more info' , 'click-to-chat-for-whatsapp' ) ?></a> </p>
|
889 |
+
<br><br>
|
890 |
+
|
891 |
+
<!-- Event Name -->
|
892 |
+
<div class="row">
|
893 |
+
<div class="col s6">
|
894 |
+
<p><?php _e( 'Event Name' , 'click-to-chat-for-whatsapp' ) ?></p>
|
895 |
+
</div>
|
896 |
+
<div class="input-field col s5">
|
897 |
+
<input name="ht_ccw_fb[fb_event_name]" value="<?php echo esc_attr( $ht_ccw_fb['fb_event_name'] ) ?>" type="text" class="" >
|
898 |
+
</div>
|
899 |
+
</div>
|
900 |
+
|
901 |
+
<!-- Parameter 1 -->
|
902 |
+
<div class="row">
|
903 |
+
<div class="col s6">
|
904 |
+
<p><?php _e( 'Custom Parameter 1' , 'click-to-chat-for-whatsapp' ) ?></p>
|
905 |
+
</div>
|
906 |
+
<div class="input-field col s5">
|
907 |
+
|
908 |
+
<div class="input-field col">
|
909 |
+
<input name="ht_ccw_fb[p1_name]" value="<?php echo esc_attr( $ht_ccw_fb['p1_name'] ) ?>" id="p1_name" type="text" class="" >
|
910 |
+
<label for="p1_name"><?php _e( 'Name' , 'click-to-chat-for-whatsapp' ) ?>: </label>
|
911 |
+
</div>
|
912 |
+
|
913 |
+
<div class="input-field col">
|
914 |
+
<input name="ht_ccw_fb[p1_value]" value="<?php echo esc_attr( $ht_ccw_fb['p1_value'] ) ?>" id="p1_value" type="text" class="" >
|
915 |
+
<label for="p1_value"><?php _e( 'Value' , 'click-to-chat-for-whatsapp' ) ?>: </label>
|
916 |
+
</div>
|
917 |
+
|
918 |
+
</div>
|
919 |
+
</div>
|
920 |
+
|
921 |
+
|
922 |
+
<!-- Parameter 2 -->
|
923 |
+
<div class="row">
|
924 |
+
<div class="col s6">
|
925 |
+
<p><?php _e( 'Custom Parameter 2' , 'click-to-chat-for-whatsapp' ) ?></p>
|
926 |
+
</div>
|
927 |
+
<div class="input-field col s5">
|
928 |
+
|
929 |
+
<div class="input-field col">
|
930 |
+
<input name="ht_ccw_fb[p2_name]" value="<?php echo esc_attr( $ht_ccw_fb['p2_name'] ) ?>" id="p2_name" type="text" class="" >
|
931 |
+
<label for="p2_name"><?php _e( 'Name' , 'click-to-chat-for-whatsapp' ) ?>: </label>
|
932 |
+
</div>
|
933 |
+
|
934 |
+
<div class="input-field col">
|
935 |
+
<input name="ht_ccw_fb[p2_value]" value="<?php echo esc_attr( $ht_ccw_fb['p2_value'] ) ?>" id="p2_value" type="text" class="" >
|
936 |
+
<label for="p2_value"><?php _e( 'Value' , 'click-to-chat-for-whatsapp' ) ?>: </label>
|
937 |
+
</div>
|
938 |
+
|
939 |
+
</div>
|
940 |
+
</div>
|
941 |
+
|
942 |
+
|
943 |
+
<!-- Parameter 3 -->
|
944 |
+
<div class="row">
|
945 |
+
<div class="col s6">
|
946 |
+
<p><?php _e( 'Custom Parameter 3' , 'click-to-chat-for-whatsapp' ) ?></p>
|
947 |
+
</div>
|
948 |
+
<div class="input-field col s5">
|
949 |
+
|
950 |
+
<div class="input-field col">
|
951 |
+
<input name="ht_ccw_fb[p3_name]" value="<?php echo esc_attr( $ht_ccw_fb['p3_name'] ) ?>" id="p3_name" type="text" class="" >
|
952 |
+
<label for="p3_name"><?php _e( 'Name' , 'click-to-chat-for-whatsapp' ) ?>: </label>
|
953 |
+
</div>
|
954 |
+
|
955 |
+
<div class="input-field col">
|
956 |
+
<input name="ht_ccw_fb[p3_value]" value="<?php echo esc_attr( $ht_ccw_fb['p3_value'] ) ?>" id="p3_value" type="text" class="" >
|
957 |
+
<label for="p3_value"><?php _e( 'Value' , 'click-to-chat-for-whatsapp' ) ?>: </label>
|
958 |
+
</div>
|
959 |
+
|
960 |
+
</div>
|
961 |
+
</div>
|
962 |
+
|
963 |
+
</div>
|
964 |
+
</div>
|
965 |
+
</li>
|
966 |
+
</ul>
|
967 |
+
|
968 |
+
<?php
|
969 |
+
}
|
970 |
+
|
971 |
+
|
972 |
+
|
973 |
+
|
974 |
+
// sanitize
|
975 |
function ccw_options_sanitize_cs_cb( $input ) {
|
976 |
|
977 |
if ( ! current_user_can( 'manage_options' ) ) {
|
admin/class-ccw-admin-page.php
CHANGED
@@ -30,13 +30,16 @@ class CCW_Admin_Page {
|
|
30 |
add_settings_field( 'ccw_style_mobile', __( 'Style for Mobile Devices' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_style_mobile_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
31 |
add_settings_field( 'ccw_position', __( 'Position to Place' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_position_input_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
32 |
add_settings_field( 'ccw_placeholder', __( 'Text to Display' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_input_placeholder_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
|
|
|
|
|
|
|
|
33 |
add_settings_field( 'ccw_checkbox', __( 'Hide Based on post type' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_checkbox_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
34 |
add_settings_field( 'ccw_list_id_tohide', __( 'Posts, Pages Id\'s to Hide' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_list_id_tohide_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
35 |
add_settings_field( 'ccw_list_cat_tohide', __( 'Categorys to Hide' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_list_cat_tohide_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
36 |
add_settings_field( 'ccw_custom_shortcode', __( 'Shortcode name' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_custom_shortcode_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
37 |
-
|
38 |
add_settings_field( 'ccw_app_first', __( 'App First' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_app_first_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
39 |
-
|
40 |
}
|
41 |
|
42 |
|
@@ -277,6 +280,64 @@ class CCW_Admin_Page {
|
|
277 |
<?php
|
278 |
}
|
279 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
// checkboxes - based on Type of posts ..
|
281 |
function ccw_checkbox_cb() {
|
282 |
$ccw_checkbox = get_option('ccw_options');
|
30 |
add_settings_field( 'ccw_style_mobile', __( 'Style for Mobile Devices' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_style_mobile_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
31 |
add_settings_field( 'ccw_position', __( 'Position to Place' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_position_input_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
32 |
add_settings_field( 'ccw_placeholder', __( 'Text to Display' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_input_placeholder_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
33 |
+
|
34 |
+
add_settings_field( 'ccw_google_analytics', __( 'Google Analytics' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_google_analytics_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
35 |
+
add_settings_field( 'ccw_fb_analytics', __( 'Facebook Analytics' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_fb_analytics_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
36 |
+
|
37 |
add_settings_field( 'ccw_checkbox', __( 'Hide Based on post type' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_checkbox_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
38 |
add_settings_field( 'ccw_list_id_tohide', __( 'Posts, Pages Id\'s to Hide' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_list_id_tohide_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
39 |
add_settings_field( 'ccw_list_cat_tohide', __( 'Categorys to Hide' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_list_cat_tohide_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
40 |
add_settings_field( 'ccw_custom_shortcode', __( 'Shortcode name' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_custom_shortcode_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
|
|
41 |
add_settings_field( 'ccw_app_first', __( 'App First' , 'click-to-chat-for-whatsapp' ), array( $this, 'ccw_app_first_cb' ), 'ccw_options_settings', 'ccw_settings' );
|
42 |
+
|
43 |
}
|
44 |
|
45 |
|
280 |
<?php
|
281 |
}
|
282 |
|
283 |
+
|
284 |
+
// Enable Google Analytics
|
285 |
+
function ccw_google_analytics_cb() {
|
286 |
+
$ccw_google_analytics = get_option('ccw_options');
|
287 |
+
|
288 |
+
|
289 |
+
if ( isset( $ccw_google_analytics['google_analytics'] ) ) {
|
290 |
+
?>
|
291 |
+
<p>
|
292 |
+
<input name="ccw_options[google_analytics]" type="checkbox" value="1" <?php checked( $ccw_google_analytics['google_analytics'], 1 ); ?> id="google_analytics" />
|
293 |
+
<label for="google_analytics"><?php _e( 'Google Analytics' , 'whatsapp-chat-advanced' ) ?></label>
|
294 |
+
</p>
|
295 |
+
<?php
|
296 |
+
} else {
|
297 |
+
?>
|
298 |
+
<p>
|
299 |
+
<input name="ccw_options[google_analytics]" type="checkbox" value="1" id="google_analytics" />
|
300 |
+
<label for="google_analytics"><?php _e( 'Google Analytics' , 'whatsapp-chat-advanced' ) ?></label>
|
301 |
+
</p>
|
302 |
+
<?php
|
303 |
+
}
|
304 |
+
?>
|
305 |
+
|
306 |
+
<p class="description"> <?php _e( 'If Google Analytics is installed - creates an Event at there' , 'whatsapp-chat-advanced' ) ?> - <a target="_blank" href="https://www.holithemes.com/whatsapp-chat/google-analytics/"><?php _e( 'more info' , 'whatsapp-chat-advanced' ) ?></a> </p>
|
307 |
+
<p class="description"> <?php _e( 'Customize Event Values' , 'whatsapp-chat-advanced' ) ?> - <a target="_blank" href="<?php echo admin_url( 'admin.php?page=ccw-edit-styles#ga-analytics' ); ?>"><?php _e( 'Customize Styles' , 'click-to-chat-for-whatsapp' ) ?></a> </p>
|
308 |
+
<p class="description"> <?php _e( 'Using' , 'whatsapp-chat-advanced' ) ?> - <a target="_blank" href="https://www.holithemes.com/google-analytics-for-click-to-chat-for-whatsapp-plugin/"><?php _e( 'Google Tag Manager' , 'whatsapp-chat-advanced' ) ?></a> </p>
|
309 |
+
<?php
|
310 |
+
}
|
311 |
+
|
312 |
+
|
313 |
+
// Enable facebook Analytics
|
314 |
+
function ccw_fb_analytics_cb() {
|
315 |
+
$ccw_fb_analytics = get_option('ccw_options');
|
316 |
+
|
317 |
+
|
318 |
+
if ( isset( $ccw_fb_analytics['fb_analytics'] ) ) {
|
319 |
+
?>
|
320 |
+
<p>
|
321 |
+
<input name="ccw_options[fb_analytics]" type="checkbox" value="1" <?php checked( $ccw_fb_analytics['fb_analytics'], 1 ); ?> id="fb_analytics" />
|
322 |
+
<label for="fb_analytics"><?php _e( 'Facebook Analytics' , 'whatsapp-chat-advanced' ) ?></label>
|
323 |
+
</p>
|
324 |
+
<?php
|
325 |
+
} else {
|
326 |
+
?>
|
327 |
+
<p>
|
328 |
+
<input name="ccw_options[fb_analytics]" type="checkbox" value="1" id="fb_analytics" />
|
329 |
+
<label for="fb_analytics"><?php _e( 'Facebook Analytics' , 'whatsapp-chat-advanced' ) ?></label>
|
330 |
+
</p>
|
331 |
+
<?php
|
332 |
+
}
|
333 |
+
?>
|
334 |
+
<p class="description"> <?php _e( 'If Facebook Analytics is installed - creates an Event at there' , 'whatsapp-chat-advanced' ) ?> - <a target="_blank" href="https://www.holithemes.com/whatsapp-chat/facebook-analytics/"><?php _e( 'more info' , 'whatsapp-chat-advanced' ) ?></a> </p>
|
335 |
+
<p class="description"> <?php _e( 'Customize Event Values' , 'whatsapp-chat-advanced' ) ?> - <a target="_blank" href="<?php echo admin_url( 'admin.php?page=ccw-edit-styles#fb-analytics' ); ?>"><?php _e( 'Customize Styles' , 'click-to-chat-for-whatsapp' ) ?></a> </p>
|
336 |
+
<?php
|
337 |
+
}
|
338 |
+
|
339 |
+
|
340 |
+
|
341 |
// checkboxes - based on Type of posts ..
|
342 |
function ccw_checkbox_cb() {
|
343 |
$ccw_checkbox = get_option('ccw_options');
|
admin/commons/admin-sidebar.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* sidebar in admin area - plugin settings page.
|
4 |
+
*
|
5 |
+
* @uses at settings_page.php
|
6 |
+
* plan to use in sp_customize_styles.php
|
7 |
+
*
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
11 |
+
|
12 |
+
?>
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
<div class="wca-plugin">
|
17 |
+
|
18 |
+
<div class="col s10 offset-s2 offset-m3 offset-xl2">
|
19 |
+
<div class="card blue-grey darken-1" style="margin-bottom: 0;">
|
20 |
+
<div class="card-content white-text">
|
21 |
+
<span class="card-title"><?php _e( 'Click - WordPress Plugin for WhatsApp' , 'click-to-chat-for-whatsapp' ) ?></span>
|
22 |
+
<br>
|
23 |
+
<p><?php _e( 'Add your own Style' , 'click-to-chat-for-whatsapp' ) ?> </p>
|
24 |
+
<br>
|
25 |
+
<p><?php _e( 'WooCommerce' , 'click-to-chat-for-whatsapp' ) ?></p>
|
26 |
+
<br>
|
27 |
+
<p><?php _e( 'WhatsApp Chat, Group chat, Share' , 'click-to-chat-for-whatsapp' ) ?></p>
|
28 |
+
</div>
|
29 |
+
<div class="card-action">
|
30 |
+
<a target="_blank" href="https://www.holithemes.com/go/click"><?php _e( 'Click - WordPress Plugin for WhatsApp' , 'click-to-chat-for-whatsapp' ) ?></a>
|
31 |
+
</div>
|
32 |
+
</div>
|
33 |
+
<small class="admin_sidebar_hide_option" onclick="ccw_hide_admin_sidebar_card()" style="cursor: pointer;">Hide this card</small>
|
34 |
+
</div>
|
35 |
+
|
36 |
+
</div>
|
admin/commons/class-ht-ccw-admin-lists.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
|
|
4 |
*
|
5 |
*/
|
6 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* some common things in admin ..
|
4 |
+
* Animations ..
|
5 |
*
|
6 |
*/
|
7 |
|
admin/default-values.php
CHANGED
@@ -45,7 +45,7 @@ $values = array(
|
|
45 |
'list_hideon_cat' => '',
|
46 |
'shortcode' => 'chat',
|
47 |
'return_type' => 'chat', // chat or group_chat
|
48 |
-
'group_id' => '
|
49 |
|
50 |
);
|
51 |
|
@@ -164,9 +164,9 @@ $values_cs = array(
|
|
164 |
|
165 |
's9_icon_size' => '48px',
|
166 |
|
167 |
-
's99_img_height_desktop' => '',
|
168 |
's99_img_width_desktop' => '',
|
169 |
-
's99_img_height_mobile' => '',
|
170 |
's99_img_width_mobile' => '',
|
171 |
's99_desktop_img' => 'https://www.holithemes.com/whatsapp-chat/wp-content/uploads/2018/03/WhatsApp_Logo_2_desktop.jpg',
|
172 |
's99_mobile_img' => 'https://www.holithemes.com/whatsapp-chat/wp-content/uploads/2018/03/WhatsApp_Logo_2_mobile.jpg',
|
@@ -182,6 +182,55 @@ $update_values_cs = array_merge($values_cs, $db_values_cs);
|
|
182 |
update_option('ccw_options_cs', $update_values_cs);
|
183 |
|
184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
// plugin details
|
186 |
$plugin_details = array(
|
187 |
'version' => HT_CCW_VERSION,
|
45 |
'list_hideon_cat' => '',
|
46 |
'shortcode' => 'chat',
|
47 |
'return_type' => 'chat', // chat or group_chat
|
48 |
+
'group_id' => '9EHLsEsOeJk6AVtE8AvXiA',
|
49 |
|
50 |
);
|
51 |
|
164 |
|
165 |
's9_icon_size' => '48px',
|
166 |
|
167 |
+
's99_img_height_desktop' => '99px',
|
168 |
's99_img_width_desktop' => '',
|
169 |
+
's99_img_height_mobile' => '50px',
|
170 |
's99_img_width_mobile' => '',
|
171 |
's99_desktop_img' => 'https://www.holithemes.com/whatsapp-chat/wp-content/uploads/2018/03/WhatsApp_Logo_2_desktop.jpg',
|
172 |
's99_mobile_img' => 'https://www.holithemes.com/whatsapp-chat/wp-content/uploads/2018/03/WhatsApp_Logo_2_mobile.jpg',
|
182 |
update_option('ccw_options_cs', $update_values_cs);
|
183 |
|
184 |
|
185 |
+
|
186 |
+
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Google Analytics
|
190 |
+
* option - ht_ccw_ga
|
191 |
+
*/
|
192 |
+
$ccw_ga = array(
|
193 |
+
|
194 |
+
'ga_category' => 'Click to Chat for WhatsApp',
|
195 |
+
'ga_action' => 'Click',
|
196 |
+
'ga_label' => '{{url}}',
|
197 |
+
|
198 |
+
);
|
199 |
+
|
200 |
+
$db_ccw_ga = get_option( 'ht_ccw_ga', array() );
|
201 |
+
$update_ccw_ga = array_merge($ccw_ga, $db_ccw_ga);
|
202 |
+
update_option('ht_ccw_ga', $update_ccw_ga);
|
203 |
+
|
204 |
+
|
205 |
+
|
206 |
+
/**
|
207 |
+
* fb Analytics
|
208 |
+
* option - ht_ccw_fb
|
209 |
+
*/
|
210 |
+
$ccw_fb = array(
|
211 |
+
|
212 |
+
'fb_event_name' => 'Click to Chat Event',
|
213 |
+
'p1_name' => 'Category',
|
214 |
+
'p2_name' => 'Action',
|
215 |
+
'p3_name' => 'Label',
|
216 |
+
'p1_value' => 'Click to Chat',
|
217 |
+
'p2_value' => 'Click',
|
218 |
+
'p3_value' => '{{url}}',
|
219 |
+
|
220 |
+
);
|
221 |
+
|
222 |
+
$db_ccw_fb = get_option( 'ht_ccw_fb', array() );
|
223 |
+
$update_ccw_fb = array_merge($ccw_fb, $db_ccw_fb);
|
224 |
+
update_option('ht_ccw_fb', $update_ccw_fb);
|
225 |
+
|
226 |
+
|
227 |
+
|
228 |
+
|
229 |
+
|
230 |
+
|
231 |
+
|
232 |
+
|
233 |
+
|
234 |
// plugin details
|
235 |
$plugin_details = array(
|
236 |
'version' => HT_CCW_VERSION,
|
admin/settings_page.php
CHANGED
@@ -24,7 +24,10 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
24 |
<?php submit_button() ?>
|
25 |
</form>
|
26 |
</div>
|
27 |
-
<div class="col
|
|
|
|
|
|
|
28 |
</div>
|
29 |
</div>
|
30 |
|
@@ -48,7 +51,6 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
48 |
</div>
|
49 |
<div class="card-action">
|
50 |
<a target="_blank" href="https://wordpress.org/support/plugin/click-to-chat-for-whatsapp"><?php _e( '@WordPress' , 'click-to-chat-for-whatsapp' ) ?></a>
|
51 |
-
<a target="_blank" href="https://www.messenger.com/t/holithemes"><?php _e( '' , 'click-to-chat-for-whatsapp' ) ?><?php _e( 'Private' , 'click-to-chat-for-whatsapp' ) ?></a>
|
52 |
</div>
|
53 |
</div>
|
54 |
</div>
|
@@ -58,9 +60,9 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
58 |
<div class="card-content white-text">
|
59 |
<span class="card-title"><?php _e( 'Plugin Review' , 'click-to-chat-for-whatsapp' ) ?></span>
|
60 |
<br>
|
61 |
-
<p><?php _e( 'If you like the plugin,
|
62 |
<br>
|
63 |
-
<p><?php _e( '
|
64 |
</div>
|
65 |
<div class="card-action">
|
66 |
<a target="_blank" href="https://wordpress.org/support/plugin/click-to-chat-for-whatsapp/reviews/#new-post"><?php _e( '' , 'click-to-chat-for-whatsapp' ) ?>Plugin Review</a>
|
@@ -71,18 +73,18 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
71 |
</div>
|
72 |
|
73 |
<div class="row">
|
74 |
-
|
75 |
<div class="col s12 m6">
|
76 |
<div class="card blue-grey darken-1">
|
77 |
<div class="card-content white-text">
|
78 |
-
<span class="card-title"><?php _e( '
|
79 |
<br>
|
80 |
-
<p><?php _e( '
|
81 |
<br>
|
82 |
-
<p><?php _e( '
|
83 |
</div>
|
84 |
<div class="card-action">
|
85 |
-
<a target="_blank" href="https://holithemes.com/
|
86 |
</div>
|
87 |
</div>
|
88 |
</div>
|
@@ -97,9 +99,9 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
97 |
<p><?php _e( 'Post new relases, tips, tricks, much more' , 'click-to-chat-for-whatsapp' ) ?></p>
|
98 |
</div>
|
99 |
<div class="card-action">
|
100 |
-
<a target="_blank" href="https://holithemes.com/">HoliThemes</a>
|
101 |
-
<a target="_blank" href="https://www.facebook.com/holithemes/"
|
102 |
-
|
103 |
</div>
|
104 |
</div>
|
105 |
</div>
|
24 |
<?php submit_button() ?>
|
25 |
</form>
|
26 |
</div>
|
27 |
+
<div class="col s12 m12 xl6 admin_sidebar">
|
28 |
+
<div class="wca_card" style="display: none;">
|
29 |
+
<?php include_once 'commons/admin-sidebar.php'; ?>
|
30 |
+
</div>
|
31 |
</div>
|
32 |
</div>
|
33 |
|
51 |
</div>
|
52 |
<div class="card-action">
|
53 |
<a target="_blank" href="https://wordpress.org/support/plugin/click-to-chat-for-whatsapp"><?php _e( '@WordPress' , 'click-to-chat-for-whatsapp' ) ?></a>
|
|
|
54 |
</div>
|
55 |
</div>
|
56 |
</div>
|
60 |
<div class="card-content white-text">
|
61 |
<span class="card-title"><?php _e( 'Plugin Review' , 'click-to-chat-for-whatsapp' ) ?></span>
|
62 |
<br>
|
63 |
+
<p><?php _e( 'If you like the plugin, Support the Developers' , 'click-to-chat-for-whatsapp' ) ?></p>
|
64 |
<br>
|
65 |
+
<p><?php _e( 'By giving 5 Star rating' , 'click-to-chat-for-whatsapp' ) ?></p>
|
66 |
</div>
|
67 |
<div class="card-action">
|
68 |
<a target="_blank" href="https://wordpress.org/support/plugin/click-to-chat-for-whatsapp/reviews/#new-post"><?php _e( '' , 'click-to-chat-for-whatsapp' ) ?>Plugin Review</a>
|
73 |
</div>
|
74 |
|
75 |
<div class="row">
|
76 |
+
|
77 |
<div class="col s12 m6">
|
78 |
<div class="card blue-grey darken-1">
|
79 |
<div class="card-content white-text">
|
80 |
+
<span class="card-title"><?php _e( 'Click - premium plugin' , 'click-to-chat-for-whatsapp' ) ?></span>
|
81 |
<br>
|
82 |
+
<p><?php _e( 'Add your own style' , 'click-to-chat-for-whatsapp' ) ?></p>
|
83 |
<br>
|
84 |
+
<p><?php _e( 'WooCommerce' , 'click-to-chat-for-whatsapp' ) ?></p>
|
85 |
</div>
|
86 |
<div class="card-action">
|
87 |
+
<a target="_blank" href="https://www.holithemes.com/plugins/click/"><?php _e( '' , 'click-to-chat-for-whatsapp' ) ?>HoliThemes Click</a>
|
88 |
</div>
|
89 |
</div>
|
90 |
</div>
|
99 |
<p><?php _e( 'Post new relases, tips, tricks, much more' , 'click-to-chat-for-whatsapp' ) ?></p>
|
100 |
</div>
|
101 |
<div class="card-action">
|
102 |
+
<a target="_blank" href="https://www.holithemes.com/">HoliThemes</a>
|
103 |
+
<a target="_blank" href="https://www.facebook.com/holithemes/">Facebook</a>
|
104 |
+
<a target="_blank" href="https://www.youtube.com/channel/UC2Tf_WB9PWffO2B3tswWCGw/">YouTube</a>
|
105 |
</div>
|
106 |
</div>
|
107 |
</div>
|
admin/sp_customize_styles.php
CHANGED
@@ -19,14 +19,14 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
19 |
<?php settings_errors(); ?>
|
20 |
|
21 |
<div class="row">
|
22 |
-
<div class="col s12 m12
|
23 |
<form action="options.php" method="post" class="col s12">
|
24 |
<?php settings_fields( 'ccw_settings_group_cs' ); ?>
|
25 |
<?php do_settings_sections( 'ccw_options_settings_cs' ) ?>
|
26 |
<?php submit_button() ?>
|
27 |
</form>
|
28 |
</div>
|
29 |
-
<div class="col
|
30 |
</div>
|
31 |
</div>
|
32 |
|
19 |
<?php settings_errors(); ?>
|
20 |
|
21 |
<div class="row">
|
22 |
+
<div class="col s12 m12 xl7 options">
|
23 |
<form action="options.php" method="post" class="col s12">
|
24 |
<?php settings_fields( 'ccw_settings_group_cs' ); ?>
|
25 |
<?php do_settings_sections( 'ccw_options_settings_cs' ) ?>
|
26 |
<?php submit_button() ?>
|
27 |
</form>
|
28 |
</div>
|
29 |
+
<div class="col admin_sidebar">
|
30 |
</div>
|
31 |
</div>
|
32 |
|
assets/js/app.js
CHANGED
@@ -1,86 +1,3 @@
|
|
1 |
-
/******/ (function(modules) { // webpackBootstrap
|
2 |
-
/******/ // The module cache
|
3 |
-
/******/ var installedModules = {};
|
4 |
-
/******/
|
5 |
-
/******/ // The require function
|
6 |
-
/******/ function __webpack_require__(moduleId) {
|
7 |
-
/******/
|
8 |
-
/******/ // Check if module is in cache
|
9 |
-
/******/ if(installedModules[moduleId]) {
|
10 |
-
/******/ return installedModules[moduleId].exports;
|
11 |
-
/******/ }
|
12 |
-
/******/ // Create a new module (and put it into the cache)
|
13 |
-
/******/ var module = installedModules[moduleId] = {
|
14 |
-
/******/ i: moduleId,
|
15 |
-
/******/ l: false,
|
16 |
-
/******/ exports: {}
|
17 |
-
/******/ };
|
18 |
-
/******/
|
19 |
-
/******/ // Execute the module function
|
20 |
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
-
/******/
|
22 |
-
/******/ // Flag the module as loaded
|
23 |
-
/******/ module.l = true;
|
24 |
-
/******/
|
25 |
-
/******/ // Return the exports of the module
|
26 |
-
/******/ return module.exports;
|
27 |
-
/******/ }
|
28 |
-
/******/
|
29 |
-
/******/
|
30 |
-
/******/ // expose the modules object (__webpack_modules__)
|
31 |
-
/******/ __webpack_require__.m = modules;
|
32 |
-
/******/
|
33 |
-
/******/ // expose the module cache
|
34 |
-
/******/ __webpack_require__.c = installedModules;
|
35 |
-
/******/
|
36 |
-
/******/ // define getter function for harmony exports
|
37 |
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
-
/******/ Object.defineProperty(exports, name, {
|
40 |
-
/******/ configurable: false,
|
41 |
-
/******/ enumerable: true,
|
42 |
-
/******/ get: getter
|
43 |
-
/******/ });
|
44 |
-
/******/ }
|
45 |
-
/******/ };
|
46 |
-
/******/
|
47 |
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
48 |
-
/******/ __webpack_require__.n = function(module) {
|
49 |
-
/******/ var getter = module && module.__esModule ?
|
50 |
-
/******/ function getDefault() { return module['default']; } :
|
51 |
-
/******/ function getModuleExports() { return module; };
|
52 |
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
53 |
-
/******/ return getter;
|
54 |
-
/******/ };
|
55 |
-
/******/
|
56 |
-
/******/ // Object.prototype.hasOwnProperty.call
|
57 |
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
58 |
-
/******/
|
59 |
-
/******/ // __webpack_public_path__
|
60 |
-
/******/ __webpack_require__.p = "";
|
61 |
-
/******/
|
62 |
-
/******/ // Load entry module and return exports
|
63 |
-
/******/ return __webpack_require__(__webpack_require__.s = 0);
|
64 |
-
/******/ })
|
65 |
-
/************************************************************************/
|
66 |
-
/******/ ([
|
67 |
-
/* 0 */
|
68 |
-
/***/ (function(module, exports, __webpack_require__) {
|
69 |
-
|
70 |
-
"use strict";
|
71 |
-
|
72 |
-
|
73 |
-
/**
|
74 |
-
* As now load this only when animations are enable
|
75 |
-
*
|
76 |
-
* 1. to solve autop issue, when added shortcode in same line.
|
77 |
-
* 2. Animations
|
78 |
-
*
|
79 |
-
* as right now to reduce request, animations, autop issue added in same file
|
80 |
-
* if js code increases then autop issue and animation make seperate
|
81 |
-
* as animation js load when animation enable.
|
82 |
-
*/
|
83 |
-
|
84 |
// jQuery(document).ready(function ($) {
|
85 |
jQuery(document).ready(function () {
|
86 |
|
@@ -100,5 +17,94 @@ jQuery(document).ready(function () {
|
|
100 |
}
|
101 |
});
|
102 |
|
103 |
-
|
104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
// jQuery(document).ready(function ($) {
|
2 |
jQuery(document).ready(function () {
|
3 |
|
17 |
}
|
18 |
});
|
19 |
|
20 |
+
|
21 |
+
var url = window.location.href;
|
22 |
+
|
23 |
+
var google_analytics = ht_ccw_var.google_analytics;
|
24 |
+
var fb_analytics = ht_ccw_var.fb_analytics;
|
25 |
+
|
26 |
+
var title = ht_ccw_var.page_title;
|
27 |
+
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Analytics
|
31 |
+
*/
|
32 |
+
ht_ccw_clickevent();
|
33 |
+
|
34 |
+
function ht_ccw_clickevent() {
|
35 |
+
|
36 |
+
var ccw_plugin = document.querySelector('.ccw_plugin');
|
37 |
+
|
38 |
+
if ( ccw_plugin ) {
|
39 |
+
ccw_plugin.addEventListener('click', ht_ccw_clicked);
|
40 |
+
}
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
// when cliced on sytle - source ht_ccw_clickevent() click event
|
45 |
+
function ht_ccw_clicked() {
|
46 |
+
|
47 |
+
if ( 'true' == google_analytics ) {
|
48 |
+
google_analytics_event();
|
49 |
+
}
|
50 |
+
|
51 |
+
if ( 'true' == fb_analytics ) {
|
52 |
+
fb_analytics_event();
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
// google analytics - source - ht_ccw_clicked
|
58 |
+
function google_analytics_event() {
|
59 |
+
|
60 |
+
var ga_category = ht_ccw_var.ga_category.replace('{{url}}', url).replace('{{title}}', title);
|
61 |
+
var ga_action = ht_ccw_var.ga_action.replace('{{url}}', url).replace('{{title}}', title);
|
62 |
+
var ga_label = ht_ccw_var.ga_label.replace('{{url}}', url).replace('{{title}}', title);
|
63 |
+
|
64 |
+
// ga('send', 'event', 'Contact', 'Call Now Button', 'Phone');
|
65 |
+
|
66 |
+
if ("ga" in window) {
|
67 |
+
tracker = ga.getAll()[0];
|
68 |
+
if (tracker) tracker.send("event", ga_category, ga_action, ga_label );
|
69 |
+
} else if ("gtag" in window) {
|
70 |
+
gtag('event', ga_action, {
|
71 |
+
'event_category': ga_category,
|
72 |
+
'event_label': ga_label,
|
73 |
+
});
|
74 |
+
}
|
75 |
+
|
76 |
+
}
|
77 |
+
|
78 |
+
// fb analytics - source - ht_ccw_clicked
|
79 |
+
function fb_analytics_event() {
|
80 |
+
|
81 |
+
var p1_value = ht_ccw_var.p1_value.replace('{{url}}', url).replace('{{title}}', title);
|
82 |
+
var p2_value = ht_ccw_var.p2_value.replace('{{url}}', url).replace('{{title}}', title);
|
83 |
+
var p3_value = ht_ccw_var.p3_value.replace('{{url}}', url).replace('{{title}}', title);
|
84 |
+
|
85 |
+
logFb_analyticsEvent(p1_value, p2_value, p3_value)
|
86 |
+
}
|
87 |
+
|
88 |
+
|
89 |
+
/**
|
90 |
+
* fb analytics
|
91 |
+
* This function will log custom App Event
|
92 |
+
* @param {string} dynamic_name_value
|
93 |
+
* @param {string} dynamic_name_value
|
94 |
+
* @param {string} dynamic_name_value
|
95 |
+
*/
|
96 |
+
function logFb_analyticsEvent(p1_value, p2_value, p3_value) {
|
97 |
+
|
98 |
+
var p1_name = ht_ccw_var.p1_name;
|
99 |
+
var p2_name = ht_ccw_var.p2_name;
|
100 |
+
var p3_name = ht_ccw_var.p3_name;
|
101 |
+
|
102 |
+
var fb_event_name = ht_ccw_var.fb_event_name;
|
103 |
+
|
104 |
+
var params = {};
|
105 |
+
params[p1_name] = p1_value;
|
106 |
+
params[p2_name] = p2_value;
|
107 |
+
params[p3_name] = p3_value;
|
108 |
+
// if fb analytics is not installed - uncheck the fb analytics option from plugin settings
|
109 |
+
FB.AppEvents.logEvent( fb_event_name, null, params);
|
110 |
+
}
|
assets/js/required/admin_app-works.js
CHANGED
@@ -23104,4 +23104,46 @@
|
|
23104 |
|
23105 |
|
23106 |
/***/ })
|
23107 |
-
/******/ ]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23104 |
|
23105 |
|
23106 |
/***/ })
|
23107 |
+
/******/ ]);
|
23108 |
+
|
23109 |
+
|
23110 |
+
|
23111 |
+
|
23112 |
+
|
23113 |
+
// makes an ajax call
|
23114 |
+
// if ccw_admin_sidebar_card option is not set or not equal to hide
|
23115 |
+
// then show the card - set display: block
|
23116 |
+
jQuery.post(
|
23117 |
+
ajaxurl,
|
23118 |
+
{
|
23119 |
+
'action': 'ccw_admin_sidebar',
|
23120 |
+
},
|
23121 |
+
function(response){
|
23122 |
+
if ( 'hide' !== response ) {
|
23123 |
+
var wca_card = document.querySelector(".wca_card");
|
23124 |
+
if ( wca_card ) {
|
23125 |
+
wca_card.style.display = "block";
|
23126 |
+
}
|
23127 |
+
}
|
23128 |
+
}
|
23129 |
+
);
|
23130 |
+
|
23131 |
+
|
23132 |
+
// when clicked on hide card at admin sidebar
|
23133 |
+
// makes an ajax call an update / create the ccw_admin_sidebar_card option to hide
|
23134 |
+
function ccw_hide_admin_sidebar_card() {
|
23135 |
+
|
23136 |
+
jQuery.post(
|
23137 |
+
ajaxurl,
|
23138 |
+
{
|
23139 |
+
'action': 'ccw_hide_admin_sidebar_card',
|
23140 |
+
},
|
23141 |
+
);
|
23142 |
+
|
23143 |
+
var wca_card = document.querySelector(".wca_card");
|
23144 |
+
|
23145 |
+
if ( wca_card ) {
|
23146 |
+
wca_card.style.display = "none";
|
23147 |
+
}
|
23148 |
+
|
23149 |
+
}
|
assets/js/required/mdjs.js
CHANGED
@@ -82,25 +82,6 @@ __webpack_require__(4);
|
|
82 |
|
83 |
// jQuery(document).ready(function ($) {
|
84 |
jQuery(document).ready(function () {
|
85 |
-
|
86 |
-
// jQuery('.an').hover( add , remove );
|
87 |
-
|
88 |
-
// function add() {
|
89 |
-
// // jQuery(this).addClass('animated tada infinite');
|
90 |
-
// jQuery(this).addClass('animated tada');
|
91 |
-
// }
|
92 |
-
|
93 |
-
// function remove() {
|
94 |
-
// jQuery(this).removeClass('animated tada');
|
95 |
-
// }
|
96 |
-
|
97 |
-
|
98 |
-
// jQuery('.img-icon-sc').on('click', ()=>{
|
99 |
-
// // let x = num;
|
100 |
-
// // window.location.href = 'https://web.whatsapp.com/send?phone='+x+'&text=';
|
101 |
-
// // window.open('https://web.whatsapp.com/send?phone='+x+'&text=', '_blank');
|
102 |
-
// });
|
103 |
-
|
104 |
jQuery(".inline_issue").prev("p").css("display", "inline");
|
105 |
}); // import "materialize-css/dist/js/materialize";
|
106 |
|
82 |
|
83 |
// jQuery(document).ready(function ($) {
|
84 |
jQuery(document).ready(function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
jQuery(".inline_issue").prev("p").css("display", "inline");
|
86 |
}); // import "materialize-css/dist/js/materialize";
|
87 |
|
click-to-chat.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Click to Chat for WhatsApp
|
4 |
Plugin URI: https://wordpress.org/plugins/click-to-chat-for-whatsapp/
|
5 |
Description: Lets make your Web page visitor contact you through WhatsApp with a single click/tap
|
6 |
-
Version: 1.
|
7 |
Author: HoliThemes
|
8 |
Author URI: https://holithemes.com/whatsapp-chat/
|
9 |
License: GPL2
|
3 |
Plugin Name: Click to Chat for WhatsApp
|
4 |
Plugin URI: https://wordpress.org/plugins/click-to-chat-for-whatsapp/
|
5 |
Description: Lets make your Web page visitor contact you through WhatsApp with a single click/tap
|
6 |
+
Version: 1.6
|
7 |
Author: HoliThemes
|
8 |
Author URI: https://holithemes.com/whatsapp-chat/
|
9 |
License: GPL2
|
inc/class-ccw-add-styles-scripts.php
CHANGED
@@ -53,7 +53,7 @@ class CCW_Add_Styles_Scripts {
|
|
53 |
|
54 |
|
55 |
|
56 |
-
wp_enqueue_script( 'ccw_app', plugins_url( 'assets/js/app.js', HT_CCW_PLUGIN_FILE ), array ( 'jquery' ), HT_CCW_VERSION );
|
57 |
|
58 |
// only style-1 needed
|
59 |
wp_register_script( 'ccw_md_js', plugins_url( 'assets/js/required/mdjs.js', HT_CCW_PLUGIN_FILE ), array ( 'jquery' ), HT_CCW_VERSION, true );
|
53 |
|
54 |
|
55 |
|
56 |
+
wp_enqueue_script( 'ccw_app', plugins_url( 'assets/js/app.js', HT_CCW_PLUGIN_FILE ), array ( 'jquery' ), HT_CCW_VERSION, true );
|
57 |
|
58 |
// only style-1 needed
|
59 |
wp_register_script( 'ccw_md_js', plugins_url( 'assets/js/required/mdjs.js', HT_CCW_PLUGIN_FILE ), array ( 'jquery' ), HT_CCW_VERSION, true );
|
inc/class-ccw-shortcode.php
CHANGED
@@ -71,6 +71,7 @@ class CCW_Shortcode {
|
|
71 |
'home' => '', // home - to hide on experts ..
|
72 |
'hide_mobile' => '',
|
73 |
'hide_desktop' => '',
|
|
|
74 |
|
75 |
'type' => $return_type, // type= group_chat or ( chat or any thing )
|
76 |
'group_id' => $group_id, // group chat id ..
|
@@ -178,7 +179,8 @@ class CCW_Shortcode {
|
|
178 |
$img_click_link = "window.open('https://chat.whatsapp.com/$group_id', '_blank')";
|
179 |
$redirect_a = "https://chat.whatsapp.com/$group_id";
|
180 |
} else {
|
181 |
-
$
|
|
|
182 |
$img_click_link = "window.open('https://api.whatsapp.com/send?phone=$num&text=$initial_text', '_blank')";
|
183 |
$redirect_a = "https://api.whatsapp.com/send?phone=$num&text=$initial_text";
|
184 |
}
|
@@ -196,7 +198,8 @@ class CCW_Shortcode {
|
|
196 |
$img_click_link = "window.open('https://chat.whatsapp.com/$group_id', '_blank')";
|
197 |
$redirect_a = "https://chat.whatsapp.com/$group_id";
|
198 |
} else {
|
199 |
-
$
|
|
|
200 |
$img_click_link = "window.open('https://api.whatsapp.com/send?phone=$num&text=$initial_text', '_blank')";
|
201 |
$redirect_a = "https://api.whatsapp.com/send?phone=$num&text=$initial_text";
|
202 |
}
|
@@ -209,7 +212,8 @@ class CCW_Shortcode {
|
|
209 |
$img_click_link = "window.open('https://chat.whatsapp.com/$group_id', '_blank')";
|
210 |
$redirect_a = "https://chat.whatsapp.com/$group_id";
|
211 |
} else {
|
212 |
-
$
|
|
|
213 |
$img_click_link = "window.open('https://web.whatsapp.com/send?phone=$num&text=$initial_text', '_blank')";
|
214 |
$redirect_a = "https://web.whatsapp.com/send?phone=$num&text=$initial_text";
|
215 |
}
|
@@ -265,6 +269,14 @@ class CCW_Shortcode {
|
|
265 |
$css .= 'display:none;';
|
266 |
}
|
267 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
$style = $a["style"];
|
269 |
|
270 |
$o = '';
|
71 |
'home' => '', // home - to hide on experts ..
|
72 |
'hide_mobile' => '',
|
73 |
'hide_desktop' => '',
|
74 |
+
'inline_issue' => '',
|
75 |
|
76 |
'type' => $return_type, // type= group_chat or ( chat or any thing )
|
77 |
'group_id' => $group_id, // group chat id ..
|
179 |
$img_click_link = "window.open('https://chat.whatsapp.com/$group_id', '_blank')";
|
180 |
$redirect_a = "https://chat.whatsapp.com/$group_id";
|
181 |
} else {
|
182 |
+
$base_url = plugins_url( "inc/whatsapp-url.php", HT_CCW_PLUGIN_FILE );
|
183 |
+
$redirect_page = $base_url . "?num=$num&text=$initial_text&m=$is_mobile";
|
184 |
$img_click_link = "window.open('https://api.whatsapp.com/send?phone=$num&text=$initial_text', '_blank')";
|
185 |
$redirect_a = "https://api.whatsapp.com/send?phone=$num&text=$initial_text";
|
186 |
}
|
198 |
$img_click_link = "window.open('https://chat.whatsapp.com/$group_id', '_blank')";
|
199 |
$redirect_a = "https://chat.whatsapp.com/$group_id";
|
200 |
} else {
|
201 |
+
$base_url = plugins_url( "inc/whatsapp-url.php", HT_CCW_PLUGIN_FILE );
|
202 |
+
$redirect_page = $base_url . "?num=$num&text=$initial_text&m=1";
|
203 |
$img_click_link = "window.open('https://api.whatsapp.com/send?phone=$num&text=$initial_text', '_blank')";
|
204 |
$redirect_a = "https://api.whatsapp.com/send?phone=$num&text=$initial_text";
|
205 |
}
|
212 |
$img_click_link = "window.open('https://chat.whatsapp.com/$group_id', '_blank')";
|
213 |
$redirect_a = "https://chat.whatsapp.com/$group_id";
|
214 |
} else {
|
215 |
+
$base_url = plugins_url( "inc/whatsapp-url.php", HT_CCW_PLUGIN_FILE );
|
216 |
+
$redirect_page = $base_url . "?num=$num&text=$initial_text&m=0";
|
217 |
$img_click_link = "window.open('https://web.whatsapp.com/send?phone=$num&text=$initial_text', '_blank')";
|
218 |
$redirect_a = "https://web.whatsapp.com/send?phone=$num&text=$initial_text";
|
219 |
}
|
269 |
$css .= 'display:none;';
|
270 |
}
|
271 |
|
272 |
+
|
273 |
+
// to fix inline issue ..
|
274 |
+
$inline_issue = '';
|
275 |
+
if ( 'true' == $a["inline_issue"] ) {
|
276 |
+
// adds inline_issue class name
|
277 |
+
$inline_issue = 'inline_issue';
|
278 |
+
}
|
279 |
+
|
280 |
$style = $a["style"];
|
281 |
|
282 |
$o = '';
|
inc/class-ht-ccw-chat.php
CHANGED
@@ -55,6 +55,91 @@ class HT_CCW_Chat {
|
|
55 |
|
56 |
// $style = $values['style'];
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
if( 1 == $enable ) {
|
59 |
return;
|
60 |
}
|
55 |
|
56 |
// $style = $values['style'];
|
57 |
|
58 |
+
|
59 |
+
// Analytics
|
60 |
+
$google_analytics = '';
|
61 |
+
$ga_category = '';
|
62 |
+
$ga_action = '';
|
63 |
+
$ga_label = '';
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
+
if ( isset( $values['google_analytics'] ) ) {
|
68 |
+
$google_analytics = 'true';
|
69 |
+
|
70 |
+
$ht_ccw_ga = get_option( 'ht_ccw_ga' );
|
71 |
+
|
72 |
+
$ga_category = $ht_ccw_ga['ga_category'];
|
73 |
+
$ga_action = $ht_ccw_ga['ga_action'];
|
74 |
+
$ga_label = $ht_ccw_ga['ga_label'];
|
75 |
+
|
76 |
+
}
|
77 |
+
|
78 |
+
|
79 |
+
$fb_analytics = '';
|
80 |
+
$fb_event_name = '';
|
81 |
+
$p1_value = '';
|
82 |
+
$p2_value = '';
|
83 |
+
$p3_value = '';
|
84 |
+
$p1_name = '';
|
85 |
+
$p2_name = '';
|
86 |
+
$p3_name = '';
|
87 |
+
|
88 |
+
if ( isset( $values['fb_analytics'] ) ) {
|
89 |
+
$fb_analytics = 'true';
|
90 |
+
|
91 |
+
$ht_ccw_fb = get_option( 'ht_ccw_fb' );
|
92 |
+
|
93 |
+
$fb_event_name = $ht_ccw_fb['fb_event_name'];
|
94 |
+
$p1_value = $ht_ccw_fb['p1_value'];
|
95 |
+
$p2_value = $ht_ccw_fb['p2_value'];
|
96 |
+
$p3_value = $ht_ccw_fb['p3_value'];
|
97 |
+
$p1_name = $ht_ccw_fb['p1_name'];
|
98 |
+
$p2_name = $ht_ccw_fb['p2_name'];
|
99 |
+
$p3_name = $ht_ccw_fb['p3_name'];
|
100 |
+
}
|
101 |
+
|
102 |
+
$page_title = esc_html( get_the_title() );
|
103 |
+
|
104 |
+
/**
|
105 |
+
* pass values to JavaScript
|
106 |
+
*
|
107 |
+
* @var string google_analytics - is enable
|
108 |
+
* @var string fb_analytics - is enable
|
109 |
+
*
|
110 |
+
*/
|
111 |
+
$ht_ccw_var = array(
|
112 |
+
'page_title' => $page_title,
|
113 |
+
|
114 |
+
|
115 |
+
'google_analytics' => $google_analytics,
|
116 |
+
'ga_category' => $ga_category,
|
117 |
+
'ga_action' => $ga_action,
|
118 |
+
'ga_label' => $ga_label,
|
119 |
+
|
120 |
+
|
121 |
+
'fb_analytics' => $fb_analytics,
|
122 |
+
|
123 |
+
'fb_event_name' => $fb_event_name,
|
124 |
+
'p1_value' => $p1_value,
|
125 |
+
'p2_value' => $p2_value,
|
126 |
+
'p3_value' => $p3_value,
|
127 |
+
'p1_name' => $p1_name,
|
128 |
+
'p2_name' => $p2_name,
|
129 |
+
'p3_name' => $p3_name,
|
130 |
+
|
131 |
+
);
|
132 |
+
|
133 |
+
// push values to $ht_ccw_var
|
134 |
+
// if ( 'php' == $device_based_on ) {
|
135 |
+
// $ht_ccw_var['php_ismobile'] = '2';
|
136 |
+
// }
|
137 |
+
|
138 |
+
wp_localize_script( 'ccw_app', 'ht_ccw_var', $ht_ccw_var );
|
139 |
+
|
140 |
+
|
141 |
+
|
142 |
+
// enable
|
143 |
if( 1 == $enable ) {
|
144 |
return;
|
145 |
}
|
inc/class-ht-ccw.php
CHANGED
@@ -33,7 +33,7 @@ class HT_CCW {
|
|
33 |
* if this changed dont forgot to change in plugin header content
|
34 |
* click-to-chat.php - Version
|
35 |
*/
|
36 |
-
private $version = '1.
|
37 |
|
38 |
|
39 |
/**
|
33 |
* if this changed dont forgot to change in plugin header content
|
34 |
* click-to-chat.php - Version
|
35 |
*/
|
36 |
+
private $version = '1.6';
|
37 |
|
38 |
|
39 |
/**
|
inc/commons/styles-list-sc/sc-style-1.php
CHANGED
@@ -35,7 +35,7 @@ $label = "color: $s1_text_color;";
|
|
35 |
$button = "background-color: $s1_submit_btn_color; color: $s1_submit_btn_text_and_icon_color";
|
36 |
$button_i = "color: $s1_submit_btn_text_and_icon_color";
|
37 |
|
38 |
-
$o .= '<form name="form" target="_blank" action="'.$redirect_page.'" method="post" class="ccw_plugin sc_item" style=" '.$css.' width: '.$s1_width.' ">';
|
39 |
$o .= wp_nonce_field( 'ccw_style_1_verify' );
|
40 |
// $o .= '<input type="hidden" name="action" value="ccw_style_1">';
|
41 |
$o .= '<div class="input-field">';
|
35 |
$button = "background-color: $s1_submit_btn_color; color: $s1_submit_btn_text_and_icon_color";
|
36 |
$button_i = "color: $s1_submit_btn_text_and_icon_color";
|
37 |
|
38 |
+
$o .= '<form name="form" target="_blank" action="'.$redirect_page.'" method="post" class="ccw_plugin sc_item '.$inline_issue.' " style=" '.$css.' width: '.$s1_width.' ">';
|
39 |
$o .= wp_nonce_field( 'ccw_style_1_verify' );
|
40 |
// $o .= '<input type="hidden" name="action" value="ccw_style_1">';
|
41 |
$o .= '<div class="input-field">';
|
inc/commons/styles-list-sc/sc-style-2.php
CHANGED
@@ -16,6 +16,6 @@ $s2_decoration_onhover = $s2_decoration_onhover;
|
|
16 |
$input_onhover = "this.style.color= '$s2_text_color_onhover', this.style.textDecoration= '$s2_decoration_onhover'; ";
|
17 |
$input_onhover_out = "this.style.color= '$s2_text_color', this.style.textDecoration= '$s2_decoration'; ";
|
18 |
|
19 |
-
$o .= '<div class="ccw_plugin inline style2-sc sc_item" style=" '.$css.' " >';
|
20 |
$o .= '<a class="nofocus ccw-analytics" data-ccw="style-2-sc" href="'.$redirect_a.'" target="_blank" style=" color:'.$s2_text_color.'; text-decoration: '.$s2_decoration.'; " onmouseover= " '.$input_onhover.' " onmouseout= " '.$input_onhover_out.' " >'.$a["val"].'</a>';
|
21 |
$o .= '</div>';
|
16 |
$input_onhover = "this.style.color= '$s2_text_color_onhover', this.style.textDecoration= '$s2_decoration_onhover'; ";
|
17 |
$input_onhover_out = "this.style.color= '$s2_text_color', this.style.textDecoration= '$s2_decoration'; ";
|
18 |
|
19 |
+
$o .= '<div class="ccw_plugin inline style2-sc sc_item '.$inline_issue.' " style=" '.$css.' " >';
|
20 |
$o .= '<a class="nofocus ccw-analytics" data-ccw="style-2-sc" href="'.$redirect_a.'" target="_blank" style=" color:'.$s2_text_color.'; text-decoration: '.$s2_decoration.'; " onmouseover= " '.$input_onhover.' " onmouseout= " '.$input_onhover_out.' " >'.$a["val"].'</a>';
|
21 |
$o .= '</div>';
|
inc/commons/styles-list-sc/sc-style-3.php
CHANGED
@@ -10,6 +10,6 @@ $img_link = plugins_url("./assets/img/whatsapp-logo.$s3_icon_type", HT_CCW_PLUGI
|
|
10 |
|
11 |
$s3_icon_size = $s3_icon_size;
|
12 |
|
13 |
-
$o .= '<div class="ccw_plugin">';
|
14 |
$o .= '<img class="img-icon-sc sc_item pointer style-3-sc ccw-analytics" data-ccw="style-3-sc" src="'.$img_link.'" alt="WhatsApp chat" onclick="'.$img_click_link.'" style="height: '.$s3_icon_size.'; '.$css.' " >';
|
15 |
$o .= '</div>';
|
10 |
|
11 |
$s3_icon_size = $s3_icon_size;
|
12 |
|
13 |
+
$o .= '<div class="ccw_plugin '.$inline_issue.' ">';
|
14 |
$o .= '<img class="img-icon-sc sc_item pointer style-3-sc ccw-analytics" data-ccw="style-3-sc" src="'.$img_link.'" alt="WhatsApp chat" onclick="'.$img_click_link.'" style="height: '.$s3_icon_size.'; '.$css.' " >';
|
15 |
$o .= '</div>';
|
inc/commons/styles-list-sc/sc-style-4.1.php
CHANGED
@@ -10,6 +10,8 @@ $s4_background_color = $a['s4_background_color'];
|
|
10 |
$s4_text_color = $s4_text_color;
|
11 |
$s4_background_color = $s4_background_color;
|
12 |
|
|
|
|
|
13 |
$o .= '<div class="ccw_plugin inline_issue sc_item" style=" '.$css.' " >';
|
14 |
$o .= '<div class="chip pointer ccw-analytics" data-ccw="style-4-1-sc" style=" color: '.$s4_text_color.'; background-color: '.$s4_background_color.' " onclick="'.$img_click_link.'">';
|
15 |
$o .= '<img class="ccw-analytics" data-ccw="style-4-1-sc" src="'.$img_link_s4.'" alt="WhatsApp chat">'.$a["val"].'';
|
10 |
$s4_text_color = $s4_text_color;
|
11 |
$s4_background_color = $s4_background_color;
|
12 |
|
13 |
+
$img_link_s4 = plugins_url("./assets/img/whatsapp-logo-32x32.png", HT_CCW_PLUGIN_FILE );
|
14 |
+
|
15 |
$o .= '<div class="ccw_plugin inline_issue sc_item" style=" '.$css.' " >';
|
16 |
$o .= '<div class="chip pointer ccw-analytics" data-ccw="style-4-1-sc" style=" color: '.$s4_text_color.'; background-color: '.$s4_background_color.' " onclick="'.$img_click_link.'">';
|
17 |
$o .= '<img class="ccw-analytics" data-ccw="style-4-1-sc" src="'.$img_link_s4.'" alt="WhatsApp chat">'.$a["val"].'';
|
inc/commons/styles-list-sc/sc-style-4.php
CHANGED
@@ -11,11 +11,9 @@ $s4_background_color = $a['s4_background_color'];
|
|
11 |
$s4_text_color = $s4_text_color;
|
12 |
$s4_background_color = $s4_background_color;
|
13 |
|
14 |
-
// chip style - not changed to svg image
|
15 |
-
// $img_link_s4 = plugins_url("./assets/img/whatsapp-logo.png", HT_CCW_PLUGIN_FILE );
|
16 |
$img_link_s4 = plugins_url("./assets/img/whatsapp-logo-32x32.png", HT_CCW_PLUGIN_FILE );
|
17 |
|
18 |
-
$o .= '<div class="ccw_plugin sc_item" style=" '.$css.' " >';
|
19 |
$o .= '<div class="chip pointer ccw-analytics" data-ccw="style-4-sc" style=" color: '.$s4_text_color.'; background-color: '.$s4_background_color.' " onclick="'.$img_click_link.'">';
|
20 |
$o .= '<img class="ccw-analytics" data-ccw="style-4-sc" src="'.$img_link_s4.'" alt="Contact Person" >'.$a["val"].'';
|
21 |
$o .= '</div>';
|
11 |
$s4_text_color = $s4_text_color;
|
12 |
$s4_background_color = $s4_background_color;
|
13 |
|
|
|
|
|
14 |
$img_link_s4 = plugins_url("./assets/img/whatsapp-logo-32x32.png", HT_CCW_PLUGIN_FILE );
|
15 |
|
16 |
+
$o .= '<div class="ccw_plugin sc_item '.$inline_issue.' " style=" '.$css.' " >';
|
17 |
$o .= '<div class="chip pointer ccw-analytics" data-ccw="style-4-sc" style=" color: '.$s4_text_color.'; background-color: '.$s4_background_color.' " onclick="'.$img_click_link.'">';
|
18 |
$o .= '<img class="ccw-analytics" data-ccw="style-4-sc" src="'.$img_link_s4.'" alt="Contact Person" >'.$a["val"].'';
|
19 |
$o .= '</div>';
|
inc/commons/styles-list-sc/sc-style-5.php
CHANGED
@@ -13,7 +13,7 @@ $s5_icon_size = $s5_icon_size;
|
|
13 |
$input_onhover = "this.style.color= '$s5_hover_color'; ";
|
14 |
$input_onhover_out = "this.style.color= '$s5_color'; ";
|
15 |
|
16 |
-
$o .= '<div class="ccw_plugin sc_item pointer" style=" '.$css.' color: '.$s5_color.'; " onclick="'.$img_click_link.'" onmouseover= " '.$input_onhover.' " onmouseout= " '.$input_onhover_out.' " >';
|
17 |
$o .= '<span class="icon icon-whatsapp2 icon-2 ccw-analytics" data-ccw="style-5-sc" style=" font-size: '.$s5_icon_size.'; "></span>';
|
18 |
// $o .= '<a target="_blank" class="nofocus icon icon-whatsapp2 icon-2 no_a_underline ccw-analytics" href="'.$redirect_a.'" >';
|
19 |
// $o .= '</a>';
|
13 |
$input_onhover = "this.style.color= '$s5_hover_color'; ";
|
14 |
$input_onhover_out = "this.style.color= '$s5_color'; ";
|
15 |
|
16 |
+
$o .= '<div class="ccw_plugin sc_item pointer '.$inline_issue.' " style=" '.$css.' color: '.$s5_color.'; " onclick="'.$img_click_link.'" onmouseover= " '.$input_onhover.' " onmouseout= " '.$input_onhover_out.' " >';
|
17 |
$o .= '<span class="icon icon-whatsapp2 icon-2 ccw-analytics" data-ccw="style-5-sc" style=" font-size: '.$s5_icon_size.'; "></span>';
|
18 |
// $o .= '<a target="_blank" class="nofocus icon icon-whatsapp2 icon-2 no_a_underline ccw-analytics" href="'.$redirect_a.'" >';
|
19 |
// $o .= '</a>';
|
inc/commons/styles-list-sc/sc-style-6.php
CHANGED
@@ -24,7 +24,7 @@ $s6_line_height = $s6_line_height;
|
|
24 |
$input_onhover = "this.style.backgroundColor= '$s6_circle_background_hover_color', this.style.color= '$s6_hover_color'; ";
|
25 |
$input_onhover_out = "this.style.backgroundColor= '$s6_circle_background_color', this.style.color= '$s6_color'; ";
|
26 |
|
27 |
-
$o .= '<div class="ccw_plugin">';
|
28 |
$o .= '<div style=" background-color: '.$s6_circle_background_color.'; color: '.$s6_color.'; height: '.$s6_circle_height.'; width: '.$s6_circle_width.'; line-height: '.$s6_line_height.'; '.$css.' " class="btn_only_style_div_circle_sc inline-block pointer ccw-analytics" onclick="'.$img_click_link.'" onmouseover= " '.$input_onhover.' " onmouseout= " '.$input_onhover_out.' " >';
|
29 |
$o .= '<span class="btn_only_style icon icon-whatsapp2 ccw-analytics" data-ccw="style-6-sc" style= "font-size: '.$s6_icon_size.' " ></span>';
|
30 |
$o .= '</div>';
|
24 |
$input_onhover = "this.style.backgroundColor= '$s6_circle_background_hover_color', this.style.color= '$s6_hover_color'; ";
|
25 |
$input_onhover_out = "this.style.backgroundColor= '$s6_circle_background_color', this.style.color= '$s6_color'; ";
|
26 |
|
27 |
+
$o .= '<div class="ccw_plugin '.$inline_issue.' ">';
|
28 |
$o .= '<div style=" background-color: '.$s6_circle_background_color.'; color: '.$s6_color.'; height: '.$s6_circle_height.'; width: '.$s6_circle_width.'; line-height: '.$s6_line_height.'; '.$css.' " class="btn_only_style_div_circle_sc inline-block pointer ccw-analytics" onclick="'.$img_click_link.'" onmouseover= " '.$input_onhover.' " onmouseout= " '.$input_onhover_out.' " >';
|
29 |
$o .= '<span class="btn_only_style icon icon-whatsapp2 ccw-analytics" data-ccw="style-6-sc" style= "font-size: '.$s6_icon_size.' " ></span>';
|
30 |
$o .= '</div>';
|
inc/commons/styles-list-sc/sc-style-7.php
CHANGED
@@ -24,7 +24,7 @@ $s7_line_height = $s7_line_height;
|
|
24 |
$input_onhover = "this.style.backgroundColor= '$s7_box_background_hover_color', this.style.color= '$s7_hover_color'; ";
|
25 |
$input_onhover_out = "this.style.backgroundColor= '$s7_box_background_color', this.style.color= '$s7_color'; ";
|
26 |
|
27 |
-
$o .= '<div class="ccw_plugin">';
|
28 |
$o .= '<div style="background-color: '.$s7_box_background_color.'; color: '.$s7_color.'; height: '.$s7_box_height.'; width: '.$s7_box_width.'; line-height: '.$s7_line_height.'; '.$css.' " class="btn_only_style_div inline-block pointer ccw-analytics" data-ccw="style-7-sc" onclick="'.$img_click_link.'" onmouseover= " '.$input_onhover.' " onmouseout= " '.$input_onhover_out.' " >';
|
29 |
$o .= '<span class="btn_only_style icon icon-whatsapp2 ccw-analytics" style= "font-size: '.$s7_icon_size.' " ></span>';
|
30 |
$o .= '</div>';
|
24 |
$input_onhover = "this.style.backgroundColor= '$s7_box_background_hover_color', this.style.color= '$s7_hover_color'; ";
|
25 |
$input_onhover_out = "this.style.backgroundColor= '$s7_box_background_color', this.style.color= '$s7_color'; ";
|
26 |
|
27 |
+
$o .= '<div class="ccw_plugin '.$inline_issue.' ">';
|
28 |
$o .= '<div style="background-color: '.$s7_box_background_color.'; color: '.$s7_color.'; height: '.$s7_box_height.'; width: '.$s7_box_width.'; line-height: '.$s7_line_height.'; '.$css.' " class="btn_only_style_div inline-block pointer ccw-analytics" data-ccw="style-7-sc" onclick="'.$img_click_link.'" onmouseover= " '.$input_onhover.' " onmouseout= " '.$input_onhover_out.' " >';
|
29 |
$o .= '<span class="btn_only_style icon icon-whatsapp2 ccw-analytics" style= "font-size: '.$s7_icon_size.' " ></span>';
|
30 |
$o .= '</div>';
|
inc/commons/styles-list-sc/sc-style-8.1.php
CHANGED
@@ -23,7 +23,7 @@ $s8_1_width = $s8_1_width;
|
|
23 |
$input_onhover = "this.style.backgroundColor= '$s8_background_color_onhover', this.childNodes[1].style.color= '$s8_text_color_onhover' ; ";
|
24 |
$input_onhover_out = "this.style.backgroundColor= '$s8_background_color', this.childNodes[1].style.color= '$s8_text_color' ; ";
|
25 |
|
26 |
-
$o .= '<div class="ccw_plugin sc_item" style=" '.$css.' " >';
|
27 |
$o .= '<a style="background-color: '.$s8_background_color.'; width: '.$s8_1_width.' " target="_blank" href="'.$redirect_a.'" class="btn ccw-analytics" onmouseover= " '.$input_onhover.' " onmouseout= " '.$input_onhover_out.' " > ';
|
28 |
$o .= '<span style="color: '.$s8_text_color.';" class="ccw-s8-span-sc ccw-analytics" data-ccw="style-8-1-sc" id="ccw-s8-icon-sc" >'.$a["val"].'</span>';
|
29 |
$o .= '</a>';
|
23 |
$input_onhover = "this.style.backgroundColor= '$s8_background_color_onhover', this.childNodes[1].style.color= '$s8_text_color_onhover' ; ";
|
24 |
$input_onhover_out = "this.style.backgroundColor= '$s8_background_color', this.childNodes[1].style.color= '$s8_text_color' ; ";
|
25 |
|
26 |
+
$o .= '<div class="ccw_plugin sc_item '.$inline_issue.' " style=" '.$css.' " >';
|
27 |
$o .= '<a style="background-color: '.$s8_background_color.'; width: '.$s8_1_width.' " target="_blank" href="'.$redirect_a.'" class="btn ccw-analytics" onmouseover= " '.$input_onhover.' " onmouseout= " '.$input_onhover_out.' " > ';
|
28 |
$o .= '<span style="color: '.$s8_text_color.';" class="ccw-s8-span-sc ccw-analytics" data-ccw="style-8-1-sc" id="ccw-s8-icon-sc" >'.$a["val"].'</span>';
|
29 |
$o .= '</a>';
|
inc/commons/styles-list-sc/sc-style-8.php
CHANGED
@@ -25,7 +25,7 @@ $s8_icon_float = $s8_icon_float;
|
|
25 |
$input_onhover = "this.style.backgroundColor= '$s8_background_color_onhover', this.childNodes[1].style.color= '$s8_icon_color_onhover', this.childNodes[2].style.color= '$s8_text_color_onhover' ; ";
|
26 |
$input_onhover_out = "this.style.backgroundColor= '$s8_background_color', this.childNodes[1].style.color= '$s8_icon_color', this.childNodes[2].style.color= '$s8_text_color' ; ";
|
27 |
|
28 |
-
$o .= '<div class="ccw_plugin sc_item" style=" '.$css.' " >';
|
29 |
$o .= '<a style="background-color: '.$s8_background_color.';" target="_blank" href="'.$redirect_a.'" class="btn ccw-analytics" data-ccw="style-8-sc" onmouseover= " '.$input_onhover.' " onmouseout= " '.$input_onhover_out.' " > ';
|
30 |
$o .= '<i class="material-icons '.$s8_icon_float.' icon icon-whatsapp2 ccw-s8-icon-sc ccw-analytics" data-ccw="style-8" style="color: '.$s8_icon_color.';" ></i>';
|
31 |
$o .= '<span style="color: '.$s8_text_color.';" class="ccw-s8-span-sc ccw-analytics" data-ccw="style-8-sc" id="ccw-s8-icon-sc" >'.$a["val"].'</span>';
|
25 |
$input_onhover = "this.style.backgroundColor= '$s8_background_color_onhover', this.childNodes[1].style.color= '$s8_icon_color_onhover', this.childNodes[2].style.color= '$s8_text_color_onhover' ; ";
|
26 |
$input_onhover_out = "this.style.backgroundColor= '$s8_background_color', this.childNodes[1].style.color= '$s8_icon_color', this.childNodes[2].style.color= '$s8_text_color' ; ";
|
27 |
|
28 |
+
$o .= '<div class="ccw_plugin sc_item '.$inline_issue.' " style=" '.$css.' " >';
|
29 |
$o .= '<a style="background-color: '.$s8_background_color.';" target="_blank" href="'.$redirect_a.'" class="btn ccw-analytics" data-ccw="style-8-sc" onmouseover= " '.$input_onhover.' " onmouseout= " '.$input_onhover_out.' " > ';
|
30 |
$o .= '<i class="material-icons '.$s8_icon_float.' icon icon-whatsapp2 ccw-s8-icon-sc ccw-analytics" data-ccw="style-8" style="color: '.$s8_icon_color.';" ></i>';
|
31 |
$o .= '<span style="color: '.$s8_text_color.';" class="ccw-s8-span-sc ccw-analytics" data-ccw="style-8-sc" id="ccw-s8-icon-sc" >'.$a["val"].'</span>';
|
inc/commons/styles-list-sc/sc-style-9.php
CHANGED
@@ -7,6 +7,6 @@ $s9_icon_size = $a['s9_icon_size'];
|
|
7 |
|
8 |
$s9_icon_size = $s9_icon_size;
|
9 |
|
10 |
-
$o .= '<div class="ccw_plugin">';
|
11 |
$o .= '<img class="img-icon-sc sc_item pointer style-3-sc ccw-analytics" data-ccw="style-9-sc" src="'.$img_link_s9.'" alt="WhatsApp chat" onclick="'.$img_click_link.'" style="height: '.$s9_icon_size.'; '.$css.' " >';
|
12 |
$o .= '</div>';
|
7 |
|
8 |
$s9_icon_size = $s9_icon_size;
|
9 |
|
10 |
+
$o .= '<div class="ccw_plugin '.$inline_issue.' ">';
|
11 |
$o .= '<img class="img-icon-sc sc_item pointer style-3-sc ccw-analytics" data-ccw="style-9-sc" src="'.$img_link_s9.'" alt="WhatsApp chat" onclick="'.$img_click_link.'" style="height: '.$s9_icon_size.'; '.$css.' " >';
|
12 |
$o .= '</div>';
|
inc/commons/styles-list-sc/sc-style-99.php
CHANGED
@@ -14,7 +14,7 @@ $s99_mobile_img = $a['s99_mobile_img'];
|
|
14 |
$img_css = "";
|
15 |
|
16 |
if( 1 == $is_mobile ) {
|
17 |
-
$own_image = $
|
18 |
|
19 |
if ( '' !== $s99_img_height_mobile ) {
|
20 |
$img_css .= "height: $s99_img_height_mobile; ";
|
@@ -23,7 +23,7 @@ if( 1 == $is_mobile ) {
|
|
23 |
$img_css .= "width: $s99_img_width_mobile; ";
|
24 |
}
|
25 |
} else {
|
26 |
-
$own_image = $
|
27 |
|
28 |
if ( '' !== $s99_img_height_desktop ) {
|
29 |
$img_css .= "height: $s99_img_height_desktop; ";
|
@@ -35,6 +35,6 @@ if( 1 == $is_mobile ) {
|
|
35 |
}
|
36 |
|
37 |
|
38 |
-
$o .= '<div class="ccw_plugin pointer" style='.$css.'>';
|
39 |
$o .= '<img class="own-img-sc inline ccw-analytics" id="style-99-sc" data-ccw="style-99-sc-own-image" style=" '.$img_css.' " src=" '.$own_image.' " onclick="'.$img_click_link.'" alt="WhatsApp chat">';
|
40 |
$o .= '</div>';
|
14 |
$img_css = "";
|
15 |
|
16 |
if( 1 == $is_mobile ) {
|
17 |
+
$own_image = $s99_mobile_img;
|
18 |
|
19 |
if ( '' !== $s99_img_height_mobile ) {
|
20 |
$img_css .= "height: $s99_img_height_mobile; ";
|
23 |
$img_css .= "width: $s99_img_width_mobile; ";
|
24 |
}
|
25 |
} else {
|
26 |
+
$own_image = $s99_desktop_img;
|
27 |
|
28 |
if ( '' !== $s99_img_height_desktop ) {
|
29 |
$img_css .= "height: $s99_img_height_desktop; ";
|
35 |
}
|
36 |
|
37 |
|
38 |
+
$o .= '<div class="ccw_plugin pointer '.$inline_issue.' " style='.$css.'>';
|
39 |
$o .= '<img class="own-img-sc inline ccw-analytics" id="style-99-sc" data-ccw="style-99-sc-own-image" style=" '.$img_css.' " src=" '.$own_image.' " onclick="'.$img_click_link.'" alt="WhatsApp chat">';
|
40 |
$o .= '</div>';
|
inc/commons/styles.php
CHANGED
@@ -35,11 +35,11 @@ $an_on_hover = esc_attr( $ccw_options_cs['an_on_hover'] );
|
|
35 |
|
36 |
|
37 |
|
38 |
-
|
39 |
-
*
|
40 |
-
*
|
41 |
-
*
|
42 |
-
*/
|
43 |
$redirect = "";
|
44 |
|
45 |
if( 1 == $is_mobile ) {
|
@@ -53,7 +53,8 @@ if( 1 == $is_mobile ) {
|
|
53 |
$redirect = "window.open('https://chat.whatsapp.com/$group_id', '_blank')";
|
54 |
$redirect_a = "https://chat.whatsapp.com/$group_id";
|
55 |
} else {
|
56 |
-
$
|
|
|
57 |
$redirect = "window.open('https://api.whatsapp.com/send?phone=$num&text=$initial_text', '_blank')";
|
58 |
$redirect_a = "https://api.whatsapp.com/send?phone=$num&text=$initial_text";
|
59 |
}
|
@@ -71,7 +72,9 @@ if( 1 == $is_mobile ) {
|
|
71 |
$redirect = "window.open('https://chat.whatsapp.com/$group_id', '_blank')";
|
72 |
$redirect_a = "https://chat.whatsapp.com/$group_id";
|
73 |
} else {
|
74 |
-
|
|
|
|
|
75 |
$redirect = "window.open('https://api.whatsapp.com/send?phone=$num&text=$initial_text', '_blank')";
|
76 |
$redirect_a = "https://api.whatsapp.com/send?phone=$num&text=$initial_text";
|
77 |
}
|
@@ -85,7 +88,8 @@ if( 1 == $is_mobile ) {
|
|
85 |
$redirect = "window.open('https://chat.whatsapp.com/$group_id', '_blank')";
|
86 |
$redirect_a = "https://chat.whatsapp.com/$group_id";
|
87 |
} else {
|
88 |
-
$
|
|
|
89 |
$redirect = "window.open('https://web.whatsapp.com/send?phone=$num&text=$initial_text', '_blank')";
|
90 |
$redirect_a = "https://web.whatsapp.com/send?phone=$num&text=$initial_text";
|
91 |
}
|
@@ -96,7 +100,6 @@ if( 1 == $is_mobile ) {
|
|
96 |
}
|
97 |
|
98 |
|
99 |
-
// for style-1 .. . .
|
100 |
if ( isset ( $_POST['subject'] ) ) {
|
101 |
$num = $values['number'];
|
102 |
$subject = $_POST['subject'];
|
35 |
|
36 |
|
37 |
|
38 |
+
/**
|
39 |
+
* $redirect - redirect link for onclick attribute - window.open - direct link - using window.open
|
40 |
+
* $redirect_page - ( use only for style -1 ) page where redirect url there .. whatsapp-url whatsapp-url-group file ..
|
41 |
+
* $redirect_a - full url - for 'a' tags - direct link - instead of calling another file using redirect_page
|
42 |
+
*/
|
43 |
$redirect = "";
|
44 |
|
45 |
if( 1 == $is_mobile ) {
|
53 |
$redirect = "window.open('https://chat.whatsapp.com/$group_id', '_blank')";
|
54 |
$redirect_a = "https://chat.whatsapp.com/$group_id";
|
55 |
} else {
|
56 |
+
$base_url = plugins_url( "inc/whatsapp-url.php", HT_CCW_PLUGIN_FILE );
|
57 |
+
$redirect_page = $base_url . "?num=$num&text=$initial_text&m=$is_mobile";
|
58 |
$redirect = "window.open('https://api.whatsapp.com/send?phone=$num&text=$initial_text', '_blank')";
|
59 |
$redirect_a = "https://api.whatsapp.com/send?phone=$num&text=$initial_text";
|
60 |
}
|
72 |
$redirect = "window.open('https://chat.whatsapp.com/$group_id', '_blank')";
|
73 |
$redirect_a = "https://chat.whatsapp.com/$group_id";
|
74 |
} else {
|
75 |
+
// an issue addin another url in plugin_url - in {{url}} https:// - one / is missing is
|
76 |
+
$base_url = plugins_url( "inc/whatsapp-url.php", HT_CCW_PLUGIN_FILE );
|
77 |
+
$redirect_page = $base_url . "?num=$num&text=$initial_text&m=1";
|
78 |
$redirect = "window.open('https://api.whatsapp.com/send?phone=$num&text=$initial_text', '_blank')";
|
79 |
$redirect_a = "https://api.whatsapp.com/send?phone=$num&text=$initial_text";
|
80 |
}
|
88 |
$redirect = "window.open('https://chat.whatsapp.com/$group_id', '_blank')";
|
89 |
$redirect_a = "https://chat.whatsapp.com/$group_id";
|
90 |
} else {
|
91 |
+
$base_url = plugins_url( "inc/whatsapp-url.php", HT_CCW_PLUGIN_FILE );
|
92 |
+
$redirect_page = $base_url . "?num=$num&text=$initial_text&m=0";
|
93 |
$redirect = "window.open('https://web.whatsapp.com/send?phone=$num&text=$initial_text', '_blank')";
|
94 |
$redirect_a = "https://web.whatsapp.com/send?phone=$num&text=$initial_text";
|
95 |
}
|
100 |
}
|
101 |
|
102 |
|
|
|
103 |
if ( isset ( $_POST['subject'] ) ) {
|
104 |
$num = $values['number'];
|
105 |
$subject = $_POST['subject'];
|
readme.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
=== Click to Chat for WhatsApp Chat ===
|
2 |
Requires at least: 4.6
|
3 |
-
Tested up to: 4.9.
|
4 |
Requires PHP: 5.6
|
5 |
Contributors: holithemes
|
6 |
Stable tag: trunk
|
@@ -13,7 +13,8 @@ Let's make your Web page visitors Contact you through WhatsApp chat with a singl
|
|
13 |
== Description ==
|
14 |
Let's make your Web page visitors Contact you through WhatsApp chat with a single Click ( WhatsApp Chat Plugin WordPress )
|
15 |
|
16 |
-
[Documentation, Demo, Examples](https://holithemes.com/whatsapp-chat/)
|
|
|
17 |
|
18 |
= Nine Styles + own Image =
|
19 |
|
@@ -28,8 +29,32 @@ Let's make your Web page visitors Contact you through WhatsApp chat with a singl
|
|
28 |
1. **Style-9:** WhatsApp logo - green square
|
29 |
1. **Style - 99:** Own Image / GIF - URL
|
30 |
|
|
|
|
|
|
|
|
|
31 |
[Google Analytics for Click to Chat for WhatsApp Plugin using Google Tag Manager](https://www.holithemes.com/google-analytics-for-click-to-chat-for-whatsapp-plugin/)
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
= When user clicks an item: =
|
34 |
|
35 |
If website loads on a Mobile device and if WhatsApp is installed on that device, it will directly navigate to WhatsApp App.
|
@@ -42,8 +67,8 @@ To add Web page URL in Pre-filled message add {{url}} placeholder - [pre-filled
|
|
42 |
|
43 |
= Shortcodes: =
|
44 |
|
45 |
-
|
46 |
-
By default, Shortcodes take value from what saved in your plugin settings pages,
|
47 |
|
48 |
**[chat]**
|
49 |
|
@@ -59,6 +84,9 @@ By default, Shortcodes take value from what saved in your plugin settings pages,
|
|
59 |
|
60 |
Add a text or HTML widget in widget area, and then add shortcode with in that widget
|
61 |
|
|
|
|
|
|
|
62 |
|
63 |
== screenshots ==
|
64 |
|
@@ -106,8 +134,13 @@ Add a text or HTML widget in widget area, and then add shortcode with in that wi
|
|
106 |
|
107 |
== Changelog ==
|
108 |
|
|
|
|
|
|
|
|
|
109 |
= silent release =
|
110 |
* App First option to fix cache issue
|
|
|
111 |
|
112 |
= 1.5 =
|
113 |
* Initial message - {{url}} placeholder
|
@@ -137,14 +170,4 @@ Add a text or HTML widget in widget area, and then add shortcode with in that wi
|
|
137 |
* convert plugin to bit of OOP style
|
138 |
|
139 |
= 1.0 =
|
140 |
-
* Initial release.
|
141 |
-
|
142 |
-
|
143 |
-
== WhatsApp icon, logo image ==
|
144 |
-
WhatsApp logo with file name whatsapp-logo.png
|
145 |
-
with in assets/img is downloaded from https://www.whatsappbrand.com/
|
146 |
-
whatsapp_logo.svg, whatsapp-icon-square.svg are converted to svg images
|
147 |
-
origin source from whatsappbrand.com
|
148 |
-
( used in style 3, 4, 9 )
|
149 |
-
and an icon which used in style - 5, 6, 7, 8.
|
150 |
-
you can use that icon, logo under WhatsApp licenses.
|
1 |
=== Click to Chat for WhatsApp Chat ===
|
2 |
Requires at least: 4.6
|
3 |
+
Tested up to: 4.9.7
|
4 |
Requires PHP: 5.6
|
5 |
Contributors: holithemes
|
6 |
Stable tag: trunk
|
13 |
== Description ==
|
14 |
Let's make your Web page visitors Contact you through WhatsApp chat with a single Click ( WhatsApp Chat Plugin WordPress )
|
15 |
|
16 |
+
[Documentation, Demo, Examples](https://www.holithemes.com/whatsapp-chat/)
|
17 |
+
|
18 |
|
19 |
= Nine Styles + own Image =
|
20 |
|
29 |
1. **Style-9:** WhatsApp logo - green square
|
30 |
1. **Style - 99:** Own Image / GIF - URL
|
31 |
|
32 |
+
[Google Analytics](https://www.holithemes.com/whatsapp-chat/google-analytics/)
|
33 |
+
|
34 |
+
[Facebook Analytics](https://www.holithemes.com/whatsapp-chat/facebook-analytics/)
|
35 |
+
|
36 |
[Google Analytics for Click to Chat for WhatsApp Plugin using Google Tag Manager](https://www.holithemes.com/google-analytics-for-click-to-chat-for-whatsapp-plugin/)
|
37 |
|
38 |
+
|
39 |
+
= Features =
|
40 |
+
|
41 |
+
* WhatsApp Chat
|
42 |
+
* WhatsApp Group Chat
|
43 |
+
* Nine pre-configured Styles
|
44 |
+
* Add Own Image or GIF
|
45 |
+
* Animations
|
46 |
+
* Floating style can position at any place on screen
|
47 |
+
( At any pixel, not limited to fixed positions )
|
48 |
+
* Hide Styles based on Post type, Post ID, Categories, Device Type
|
49 |
+
* Pre-filled Message ( Includes Placeholder to add Web page URL )
|
50 |
+
* Customize the shortcode name
|
51 |
+
* Shortcodes - with inline content, floating style, Widget Area
|
52 |
+
* Shortcode supports WhatsApp Chat or WhatsApp Group Chat
|
53 |
+
* Google Analytics - with custom event values
|
54 |
+
* Google Analytics using Google Tag Manager
|
55 |
+
* Facebook Analytics - with custom event name, custom parameter name and value
|
56 |
+
|
57 |
+
|
58 |
= When user clicks an item: =
|
59 |
|
60 |
If website loads on a Mobile device and if WhatsApp is installed on that device, it will directly navigate to WhatsApp App.
|
67 |
|
68 |
= Shortcodes: =
|
69 |
|
70 |
+
Add styles within line of the post content
|
71 |
+
By default, Shortcodes take value from what saved in your plugin settings pages, can customize using attributes within shortcode
|
72 |
|
73 |
**[chat]**
|
74 |
|
84 |
|
85 |
Add a text or HTML widget in widget area, and then add shortcode with in that widget
|
86 |
|
87 |
+
= Premium Plugin =
|
88 |
+
[HoliThemes Click - WordPress plugin for WhatsApp](https://www.holithemes.com/go/click/)
|
89 |
+
`WooCommerce, Add own Image, own style, Chat, Group Chat, Share, more features .. `
|
90 |
|
91 |
== screenshots ==
|
92 |
|
134 |
|
135 |
== Changelog ==
|
136 |
|
137 |
+
= 1.6 =
|
138 |
+
* Google Analytics
|
139 |
+
* Facebook Analytics
|
140 |
+
|
141 |
= silent release =
|
142 |
* App First option to fix cache issue
|
143 |
+
* shortcodes new attribute
|
144 |
|
145 |
= 1.5 =
|
146 |
* Initial message - {{url}} placeholder
|
170 |
* convert plugin to bit of OOP style
|
171 |
|
172 |
= 1.0 =
|
173 |
+
* Initial release.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|