WD Google Analytics - Version 1.0.9

Version Description

Added: Option to select the time of the day for scheduled emails
Changed: Save authenticate code with enter button
Changed: Select permissions for user groups in a pop-up (Settings page)
Fixed: minor bugs

Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 WD Google Analytics
Version 1.0.9
Comparing to
See all releases

Code changes from version 1.0.8 to 1.0.9

admin/pages/custom_reports.php CHANGED
@@ -2,7 +2,7 @@
2
  This section lets add and manage custom reports.
3
  <a style="color: #00A0D2; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-google-analytics/custom-reports.html">Read more in User Guide.</a>
4
  </div>
5
- <img style="margin-top:10px" src="<?php echo GAWD_URL . '/assets/freePages/custom_reports.png';?>"/>
6
 
7
 
8
 
2
  This section lets add and manage custom reports.
3
  <a style="color: #00A0D2; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-google-analytics/custom-reports.html">Read more in User Guide.</a>
4
  </div>
5
+ <img class="gawd_pro_img" style="margin-top:10px" src="<?php echo GAWD_URL . '/assets/freePages/custom_reports.png';?>"/>
6
 
7
 
8
 
admin/pages/dashboard.php CHANGED
@@ -604,7 +604,7 @@ if($current_user != 1 && isset($saved_user_menues[$current_user])){
604
  <div class='clear'></div>
605
  </div>
606
  <div class="gawd_email_row">
607
- <div class="gawd_email_frequency" data-hint="Send email report Once or set its frequency to Daily, Weekly or Monthly.">Frequency</div>
608
  <div class="gawd_email_input_frequency" id="gawd_email_period">
609
  <select name="gawd_email_period">
610
  <option value="once">Once</option>
@@ -642,7 +642,15 @@ if($current_user != 1 && isset($saved_user_menues[$current_user])){
642
  <input type="hidden" name="gawd_email_week_day" id="gawd_email_week_day_hidden" >
643
  </div>
644
  <div class='clear'></div>
645
- </div>
 
 
 
 
 
 
 
 
646
  <div class="gawd_email_row gawd_email_message_label" data-hint="Compose email content to be sent with your report.">
647
  Additional Message
648
  </div>
@@ -673,18 +681,5 @@ if($current_user != 1 && isset($saved_user_menues[$current_user])){
673
  <input id="second_data_sum" class="" type="hidden" value="">
674
  <input id="second_start_date" class="" type="hidden" value="">
675
  <input id="second_end_date" class="" type="hidden" value="">
676
- <div class="gawd_pro_popup_overlay">
677
- </div>
678
- <div class="gawd_pro_popup">
679
- <div class="close_btn_cont">
680
- <div href="#" class="gawd_pro_popup_btn"></div>
681
- </div>
682
- <h3>Hi There!</h3>
683
- <div class="img_wrap">
684
- <img src="<?php echo GAWD_URL . '/assets/Report_icon.png';?>"/>
685
- </div>
686
- <div class="gawd_pro_text">These reports are available in the pro version.</div>
687
- <div style="font-size:16px;margin-bottom:20px">Check out our Demo to see these amazing reports in action. </div>
688
- <span style="display: inline-block; margin-right: 15px;"><a id="gawd_buy_now" class="gawd_pro_buttons" target="_blank" href="https://web-dorado.com/products/wordpress-google-analytics-plugin.html">Buy Now</a></span>
689
- <span style="display: inline-block;"><a id="gawd_try_demo" class="gawd_pro_buttons" target="_blank" href="http://wpdemo.web-dorado.com/wp-admin/admin.php?page=gawd_reports">Try Demo</a></span>
690
- </div>
604
  <div class='clear'></div>
605
  </div>
606
  <div class="gawd_email_row">
607
+ <div class="gawd_email_frequency load_tooltip" data-hint="Send email report Once or set its frequency to Daily, Weekly or Monthly.">Frequency</div>
608
  <div class="gawd_email_input_frequency" id="gawd_email_period">
609
  <select name="gawd_email_period">
610
  <option value="once">Once</option>
642
  <input type="hidden" name="gawd_email_week_day" id="gawd_email_week_day_hidden" >
643
  </div>
644
  <div class='clear'></div>
645
+ </div>
646
+ <div class="gawd_email_row gawd_email_time_row">
647
+ <div class="gawd_email_time load_tooltip" data-hint="Select the time, when you would like to receive this email.">Time</div>
648
+ <div class="gawd_email_input_time" id="gawd_email_time">
649
+ <input type="text" name="gawd_email_time_input" id="gawd_email_time_input" value="<?php echo date('H:i');?>"/>
650
+ </div>
651
+
652
+ <div class='clear'></div>
653
+ </div>
654
  <div class="gawd_email_row gawd_email_message_label" data-hint="Compose email content to be sent with your report.">
655
  Additional Message
656
  </div>
681
  <input id="second_data_sum" class="" type="hidden" value="">
682
  <input id="second_start_date" class="" type="hidden" value="">
683
  <input id="second_end_date" class="" type="hidden" value="">
684
+
685
+
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/pages/settings.php CHANGED
@@ -25,12 +25,12 @@ if (!is_array($filters)) {
25
  $filters = array();
26
  }
27
 
28
- $gawd_permissions = isset($gawd_settings['gawd_permissions']) ? $gawd_settings['gawd_permissions'] : array();
29
  $gawd_excluded_users = isset($gawd_settings['gawd_excluded_users']) ? $gawd_settings['gawd_excluded_users'] : array();
30
  $gawd_excluded_roles = isset($gawd_settings['gawd_excluded_roles']) ? $gawd_settings['gawd_excluded_roles'] : array();
31
- $gawd_backend_roles = isset($gawd_settings['gawd_backend_roles']) ? $gawd_settings['gawd_backend_roles'] : array();
32
- $gawd_frontend_roles = isset($gawd_settings['gawd_frontend_roles']) ? $gawd_settings['gawd_frontend_roles'] : array();
33
- $gawd_post_page_roles = isset($gawd_settings['gawd_post_page_roles']) ? $gawd_settings['gawd_post_page_roles'] : array();
34
  $gawd_file_formats = isset($gawd_settings['gawd_file_formats']) ? $gawd_settings['gawd_file_formats'] : '';
35
  $enable_hover_tooltip = isset($gawd_settings['enable_hover_tooltip']) ? $gawd_settings['enable_hover_tooltip'] : 'on';
36
  $exclude_events = isset($gawd_settings['exclude_events']) ? $gawd_settings['exclude_events'] : '';
@@ -38,7 +38,30 @@ $enable_cross_domain = isset($gawd_settings['enable_cross_domain']) ? $gawd_sett
38
  $default_date = isset($gawd_settings['default_date']) ? $gawd_settings['default_date'] : '';
39
  $default_date_format = isset($gawd_settings['default_date_format']) ? $gawd_settings['default_date_format'] : '';
40
  $post_page_chart = isset($gawd_settings['post_page_chart']) ? $gawd_settings['post_page_chart'] : '';
41
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  ?>
43
 
44
  <div id="gawd_body">
@@ -118,10 +141,10 @@ $post_page_chart = isset($gawd_settings['post_page_chart']) ? $gawd_settings['po
118
  </div>
119
  </div>
120
  <div class="gawd_alerts">
121
- <img style="margin-top:10px" src="<?php echo GAWD_URL . '/assets/freePages/alerts.png';?>"/>
122
  </div>
123
  <div class="gawd_pushover">
124
- <img style="margin-top:10px" src="<?php echo GAWD_URL . '/assets/freePages/pushovers.png';?>"/>
125
  </div>
126
  <div class="gawd_filters">
127
  <div class="gawd_goal_row">
@@ -409,34 +432,20 @@ $post_page_chart = isset($gawd_settings['post_page_chart']) ? $gawd_settings['po
409
  <div class="gawd_goal_row">
410
  <div class="gawd_goal_label">Back end plugin permissions</div>
411
  <div class="checkbox_wrap">
412
- <?php
413
- $roles = new WP_Roles();
414
- $settings_label_count = 0;
415
- foreach($roles->role_names as $key => $name){
416
- $settings_label_count++;
417
- if($name == 'Administrator'){
418
- $key = 'manage_options';
419
- }
420
- elseif($name == 'Editor'){
421
- $key = 'moderate_comments';
422
- }
423
- elseif($name == 'Author'){
424
- $key = 'publish_posts';
425
- }
426
- elseif($name == 'Contributor'){
427
- $key = 'edit_posts';
428
- }
429
- else{
430
- $key = 'read';
431
  }
432
- ?>
433
- <div class="setting_time_wrap time_wrap">
434
- <input id="inp<?php echo $settings_label_count;?>"<?php echo $key == 'manage_options' ? 'disabled' : '';?> class="gawd_perm" type="checkbox" name="gawd_permissions[]" <?php echo in_array($key,$gawd_permissions) || $key == 'manage_options' ? 'checked' : '';?> value="<?php echo $key;?>"/>
435
- <label for="inp<?php echo $settings_label_count;?>"><?php echo $name;?></label>
436
- </div>
437
- <?php
438
- }
439
- ?>
440
  <div class='clear'></div>
441
  </div>
442
  <div class="gawd_info" title="Select user roles to permit access to WD Google Analytics plugin. Only Administrator users can view it by default."></div>
@@ -445,18 +454,20 @@ $post_page_chart = isset($gawd_settings['post_page_chart']) ? $gawd_settings['po
445
  <div class="gawd_goal_row">
446
  <div class="gawd_goal_label">Dashboard overview permissions</div>
447
  <div class="checkbox_wrap">
448
- <?php $roles = new WP_Roles();
449
- $inp_id = 0;
450
- foreach($roles->role_names as $key => $name){
451
- $inp_id++;
452
- ?>
453
- <div class="time_wrap">
454
- <input id="dashboard_overview_permissions<?php echo $inp_id;?>" <?php echo $key == 'administrator' ? 'disabled' : '';?> class="gawd_perm" type="checkbox" name="gawd_backend_roles[]" <?php echo in_array($key,$gawd_backend_roles) || $key == 'administrator' ? 'checked' : '';?> value="<?php echo $key;?>"/>
455
- <label for="dashboard_overview_permissions<?php echo $inp_id;?>"><?php echo $name;?></label>
456
- </div>
457
- <?php
458
- }
459
- ?>
 
 
460
  <div class='clear'></div>
461
  </div>
462
  <div class="gawd_info" title="Select user roles, which will have access to view WordPress Dashboard report."></div>
@@ -465,18 +476,20 @@ $post_page_chart = isset($gawd_settings['post_page_chart']) ? $gawd_settings['po
465
  <div class="gawd_goal_row">
466
  <div class="gawd_goal_label">Post/Page report permissions</div>
467
  <div class="checkbox_wrap">
468
- <?php $roles = new WP_Roles();
469
- $inp_id = 0;
470
- foreach($roles->role_names as $key => $name){
471
- $inp_id++;
472
- ?>
473
- <div class="time_wrap">
474
- <input id="gawd_post_page_roles<?php echo $inp_id?>" <?php echo $key == 'administrator' ? 'disabled' : '';?> class="gawd_perm" type="checkbox" name="gawd_post_page_roles[]" <?php echo in_array($key,$gawd_post_page_roles) || $key == 'administrator' ? 'checked' : '';?> value="<?php echo $key;?>"/>
475
- <label for="gawd_post_page_roles<?php echo $inp_id?>"><?php echo $name;?></label>
476
- </div>
477
- <?php
478
- }
479
- ?>
 
 
480
  <div class='clear'></div>
481
  </div>
482
  <div class="gawd_info" title="Select user roles, which will have access to view reports from frontend of your website."></div>
@@ -485,18 +498,20 @@ $post_page_chart = isset($gawd_settings['post_page_chart']) ? $gawd_settings['po
485
  <div class="gawd_goal_row">
486
  <div class="gawd_goal_label">Frontend report permissions</div>
487
  <div class="checkbox_wrap">
488
- <?php $roles = new WP_Roles();
489
- $inp_id = 0;
490
- foreach($roles->role_names as $key => $name){
491
- $inp_id++;
492
- ?>
493
- <div class="time_wrap">
494
- <input id="frontend_report_permissions<?php echo $inp_id?>" <?php echo $key == 'administrator' ? 'disabled' : '';?> class="gawd_perm" type="checkbox" name="gawd_frontend_roles[]" <?php echo in_array($key,$gawd_frontend_roles) || $key == 'administrator' ? 'checked' : '';?> value="<?php echo $key;?>"/>
495
- <label for="frontend_report_permissions<?php echo $inp_id?>"><?php echo $name;?></label>
496
- </div>
497
- <?php
498
- }
499
- ?>
 
 
500
  <div class='clear'></div>
501
  </div>
502
  <div class="gawd_info" title="Select user roles, which will have access to view reports from frontend of your website."></div>
@@ -545,6 +560,22 @@ $post_page_chart = isset($gawd_settings['post_page_chart']) ? $gawd_settings['po
545
  <input type='hidden' name="settings_submit" id="gawd_settings_submit"/>
546
  <input type='hidden' name="gawd_settings_logout" id="gawd_settings_logout_val"/>
547
  <?php wp_nonce_field('gawd_save_form', 'gawd_save_form_fild'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
548
  </form>
549
  </div>
550
 
@@ -552,5 +583,161 @@ $post_page_chart = isset($gawd_settings['post_page_chart']) ? $gawd_settings['po
552
  </div>
553
 
554
  <script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
555
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
556
  </script>
25
  $filters = array();
26
  }
27
 
28
+ $gawd_permissions = isset($gawd_settings['gawd_permissions']) ? implode(',',$gawd_settings['gawd_permissions']) : 'manage_options';
29
  $gawd_excluded_users = isset($gawd_settings['gawd_excluded_users']) ? $gawd_settings['gawd_excluded_users'] : array();
30
  $gawd_excluded_roles = isset($gawd_settings['gawd_excluded_roles']) ? $gawd_settings['gawd_excluded_roles'] : array();
31
+ $gawd_backend_roles = isset($gawd_settings['gawd_backend_roles']) ? implode(',',$gawd_settings['gawd_backend_roles']) : 'administrator';
32
+ $gawd_frontend_roles = isset($gawd_settings['gawd_frontend_roles']) ? implode(',',$gawd_settings['gawd_frontend_roles']) : 'administrator';
33
+ $gawd_post_page_roles = isset($gawd_settings['gawd_post_page_roles']) ? implode(',',$gawd_settings['gawd_post_page_roles']) : 'administrator';
34
  $gawd_file_formats = isset($gawd_settings['gawd_file_formats']) ? $gawd_settings['gawd_file_formats'] : '';
35
  $enable_hover_tooltip = isset($gawd_settings['enable_hover_tooltip']) ? $gawd_settings['enable_hover_tooltip'] : 'on';
36
  $exclude_events = isset($gawd_settings['exclude_events']) ? $gawd_settings['exclude_events'] : '';
38
  $default_date = isset($gawd_settings['default_date']) ? $gawd_settings['default_date'] : '';
39
  $default_date_format = isset($gawd_settings['default_date_format']) ? $gawd_settings['default_date_format'] : '';
40
  $post_page_chart = isset($gawd_settings['post_page_chart']) ? $gawd_settings['post_page_chart'] : '';
41
+ $roles = new WP_Roles();
42
+ $roles_changed = array();
43
+ $_roles_changed = array();
44
+ foreach($roles->role_names as $key => $name){
45
+ $_roles_changed['role_names'][$name] = $key;
46
+ }
47
+ foreach($roles->role_names as $key => $name){
48
+ if($name == 'Administrator'){
49
+ $key = 'manage_options';
50
+ }
51
+ elseif($name == 'Editor'){
52
+ $key = 'moderate_comments';
53
+ }
54
+ elseif($name == 'Author'){
55
+ $key = 'publish_posts';
56
+ }
57
+ elseif($name == 'Contributor'){
58
+ $key = 'edit_posts';
59
+ }
60
+ else{
61
+ $key = 'read';
62
+ }
63
+ $roles_changed['role_names'][$name] = $key;
64
+ }
65
  ?>
66
 
67
  <div id="gawd_body">
141
  </div>
142
  </div>
143
  <div class="gawd_alerts">
144
+ <img class="gawd_pro_img" data-attr="alerts" style="margin-top:10px" src="<?php echo GAWD_URL . '/assets/freePages/alerts.png';?>"/>
145
  </div>
146
  <div class="gawd_pushover">
147
+ <img class="gawd_pro_img" data-attr="pushovers" style="margin-top:10px" src="<?php echo GAWD_URL . '/assets/freePages/pushovers.png';?>"/>
148
  </div>
149
  <div class="gawd_filters">
150
  <div class="gawd_goal_row">
432
  <div class="gawd_goal_row">
433
  <div class="gawd_goal_label">Back end plugin permissions</div>
434
  <div class="checkbox_wrap">
435
+ <div class="time_wrap gawd_permissions"><span data-attribute="manage_options" class="gawd_permission">Administrator</span></div>
436
+ <?php
437
+ if($gawd_permissions != ''){
438
+ foreach(array_intersect($roles_changed['role_names'], explode(',',$gawd_permissions)) as $key => $_roles){
439
+ if($key == 'Administrator'){
440
+ continue;
441
+ }
442
+ ?>
443
+ <div class="time_wrap gawd_permissions"><span data-attribute="<?php echo $_roles;?>" class="gawd_permission"><?php echo $key;?></span><span class="remove_gawd_permission gawd_remove">X</span></div>
444
+ <?php
445
+ }
 
 
 
 
 
 
 
 
446
  }
447
+ ?>
448
+ <input type="button" id="open_gawd_permissions" class="gawd_chose_btn button_gawd" value="Choose"/>
 
 
 
 
 
 
449
  <div class='clear'></div>
450
  </div>
451
  <div class="gawd_info" title="Select user roles to permit access to WD Google Analytics plugin. Only Administrator users can view it by default."></div>
454
  <div class="gawd_goal_row">
455
  <div class="gawd_goal_label">Dashboard overview permissions</div>
456
  <div class="checkbox_wrap">
457
+ <div class="time_wrap dashboard_report_permissions"><span data-attribute="administrator" class="dashboard_report_permission">Administrator</span></div>
458
+ <?php
459
+ if($gawd_backend_roles != ''){
460
+ foreach(array_intersect($_roles_changed['role_names'],explode(',',$gawd_backend_roles)) as $key => $roles){
461
+ if($roles == 'administrator'){
462
+ continue;
463
+ }
464
+ ?>
465
+ <div class="time_wrap dashboard_report_permissions"><span data-attribute="<?php echo $roles;?>" class="dashboard_report_permission"><?php echo $key;?></span><span class="remove_dashboard_report_permission gawd_remove">X</span></div>
466
+ <?php
467
+ }
468
+ }
469
+ ?>
470
+ <input type="button" id="open_dashboard_report_permissions" class="gawd_chose_btn button_gawd" value="Choose"/>
471
  <div class='clear'></div>
472
  </div>
473
  <div class="gawd_info" title="Select user roles, which will have access to view WordPress Dashboard report."></div>
476
  <div class="gawd_goal_row">
477
  <div class="gawd_goal_label">Post/Page report permissions</div>
478
  <div class="checkbox_wrap">
479
+ <div class="time_wrap gawd_post_page_roles"><span data-attribute="administrator" class="gawd_post_page_role">Administrator</span></div>
480
+ <?php
481
+ if($gawd_post_page_roles != ''){
482
+ foreach(array_intersect($_roles_changed['role_names'],explode(',',$gawd_post_page_roles)) as $key => $roles){
483
+ if($roles == 'administrator'){
484
+ continue;
485
+ }
486
+ ?>
487
+ <div class="time_wrap gawd_post_page_roles"><span data-attribute="<?php echo $roles;?>" class="gawd_post_page_role"><?php echo $key;?></span><span class="remove_post_page_role gawd_remove">X</span></div>
488
+ <?php
489
+ }
490
+ }
491
+ ?>
492
+ <input type="button" id="post_page_report_permissions" class="gawd_chose_btn button_gawd" value="Choose"/>
493
  <div class='clear'></div>
494
  </div>
495
  <div class="gawd_info" title="Select user roles, which will have access to view reports from frontend of your website."></div>
498
  <div class="gawd_goal_row">
499
  <div class="gawd_goal_label">Frontend report permissions</div>
500
  <div class="checkbox_wrap">
501
+ <div class="time_wrap frontend_report_roles"><span data-attribute="administrator" class="frontend_report_role">Administrator</span></div>
502
+ <?php
503
+ if($gawd_frontend_roles != ''){
504
+ foreach(array_intersect($_roles_changed['role_names'],explode(',',$gawd_frontend_roles)) as $key => $roles){
505
+ if($roles == 'administrator'){
506
+ continue;
507
+ }
508
+ ?>
509
+ <div class="time_wrap frontend_report_roles"><span data-attribute="<?php echo $roles;?>" class="frontend_report_role"><?php echo $key;?></span><span class="remove_frontend_report_role gawd_remove">X</span></div>
510
+ <?php
511
+ }
512
+ }
513
+ ?>
514
+ <input type="button" id="open_frontend_report_permissions" class="gawd_chose_btn button_gawd" value="Choose"/>
515
  <div class='clear'></div>
516
  </div>
517
  <div class="gawd_info" title="Select user roles, which will have access to view reports from frontend of your website."></div>
560
  <input type='hidden' name="settings_submit" id="gawd_settings_submit"/>
561
  <input type='hidden' name="gawd_settings_logout" id="gawd_settings_logout_val"/>
562
  <?php wp_nonce_field('gawd_save_form', 'gawd_save_form_fild'); ?>
563
+
564
+ <div class="gawd_permissions_popup_overlay"></div>
565
+ <div class="gawd_permissions_popup">
566
+ <div class="close_btn_cont">
567
+ <div class="gawd_permission_popup_btn">X</div>
568
+ </div>
569
+ <div class="gawd_permissions_popup_content">
570
+ </div>
571
+ <div class="add_btn_cont">
572
+ <input type="button" class="button_gawd" id="add_roles" value="Add"/>
573
+ </div>
574
+ </div>
575
+ <input type='hidden' name="gawd_backend_roles" id="gawd_backend_roles" value="<?php echo $gawd_backend_roles;?>"/>
576
+ <input type='hidden' name="gawd_frontend_roles" id="gawd_frontend_roles" value="<?php echo $gawd_frontend_roles;?>"/>
577
+ <input type='hidden' name="gawd_post_page_roles" id="gawd_post_page_roles" value="<?php echo $gawd_post_page_roles;?>"/>
578
+ <input type='hidden' name="gawd_permissions" id="gawd_permissions" value="<?php echo $gawd_permissions;?>"/>
579
  </form>
580
  </div>
581
 
583
  </div>
584
 
585
  <script>
586
+ jQuery('.gawd_chose_btn').on('click', function(){
587
+ permissions_popup_content(jQuery(this).attr('id'))
588
+ });
589
+
590
+ function permissions_popup_content(id){
591
+ if(id != "open_gawd_permissions"){
592
+ var roles = <?php echo json_encode(new WP_Roles());?>;
593
+ }
594
+ else{
595
+ var roles = <?php echo json_encode($roles_changed);?>;
596
+ }
597
+ var inp_id = 0;
598
+ var html = '';
599
+ var popup_overlay = 'gawd_permissions_popup_overlay';
600
+ var popup_body = 'gawd_permissions_popup';
601
+ var popup_btn = 'gawd_permission_popup_btn';
602
+ var add_role = 'add_roles';
603
+ var permissions_array = '';
604
+ jQuery("." + popup_body).fadeIn('fast');
605
+ jQuery("." + popup_overlay).fadeIn('fast');
606
+
607
+ if(id == "open_dashboard_report_permissions"){
608
+ permissions_array = 'gawd_backend_roles[]';
609
+ var permissions_for = 'gawd_backend_roles';
610
+ var open_popup_btn = 'open_dashboard_report_permissions';
611
+ var removed_roles = 'dashboard_report_permissions';
612
+ var remove_role = 'remove_dashboard_report_permission';
613
+ var role_value = 'dashboard_report_permission';
614
+ }
615
+ else if(id == "open_frontend_report_permissions"){
616
+ permissions_array = 'gawd_frontend_roles[]';
617
+ var permissions_for = 'frontend_report_permissions';
618
+ var open_popup_btn = 'open_frontend_report_permissions';
619
+ var removed_roles = 'frontend_report_roles';
620
+ var remove_role = 'remove_frontend_report_role';
621
+ var role_value = 'frontend_report_role';
622
+ }
623
+ else if(id == "post_page_report_permissions"){
624
+ permissions_array = 'gawd_post_page_roles[]';
625
+ var permissions_for = 'gawd_post_page_roles';
626
+ var open_popup_btn = 'post_page_report_permissions';
627
+ var removed_roles = 'gawd_post_page_roles';
628
+ var remove_role = 'remove_post_page_role';
629
+ var role_value = 'gawd_post_page_role';
630
+ }
631
+ else if(id == "open_gawd_permissions"){
632
+ permissions_array = 'gawd_permissions[]';
633
+ var permissions_for = 'gawd_post_page_roles';
634
+ var open_popup_btn = 'open_gawd_permissions';
635
+ var removed_roles = 'gawd_permissions';
636
+ var remove_role = 'remove_gawd_permission';
637
+ var role_value = 'gawd_permission';
638
+ }
639
+ var check = [];
640
+ if(id == "open_gawd_permissions"){
641
+ jQuery("." + role_value).each(function(){
642
+ check.push(jQuery(this).html());
643
+ })
644
+ }
645
+ else{
646
+ jQuery("." + role_value).each(function(){
647
+ check.push(jQuery(this).data('attribute'));
648
+ });
649
+ }
650
+ html += '<table border="1" class="gawd_table" id="'+ id +'_table">';
651
+ html += '<tr><th>Name</th><th>Action</th></tr>';
652
+ for(key in roles.role_names){
653
+ inp_id++;
654
+ var disabled = key == "administrator" || key == 'Administrator' ? "disabled" : "";
655
+ var checked = check.indexOf(key) > -1 || key == 'administrator' ? 'checked' : '';
656
+ var value = id == 'open_gawd_permissions' ? roles.role_names[key] : key
657
+ var name = id != 'open_gawd_permissions' ? roles.role_names[key] : key
658
+ html += '<tr><td><label for="' + permissions_for + inp_id +'">' + name + '</label></td>';
659
+ html += '<td><input id="' + permissions_for+inp_id + '"' + disabled +' class="gawd_perm" type="checkbox"' + checked + ' value="' + value + '"/></td></tr>';
660
+ }
661
+ html += '</table>';
662
+ jQuery('.gawd_permissions_popup_content').html(html);
663
+ jQuery('.gawd_perm').on('click',function(){
664
+ if(jQuery(this).attr('checked') == 'checked'){
665
+ jQuery(this).closest('tr').prevAll().find(".gawd_perm").attr('checked',true);
666
+ }
667
+ })
668
+ popup_overlay = "." + popup_overlay;
669
+ popup_btn = "." + popup_btn;
670
+ popup_body = "." + popup_body;
671
+ open_popup_btn = "#" + open_popup_btn;
672
+ add_role = "#" + add_role;
673
+ jQuery(popup_overlay + ', ' + popup_btn).on('click', function () {
674
+ jQuery(popup_body).fadeOut('fast');
675
+ jQuery(popup_overlay).fadeOut('fast');
676
+ });
677
+ jQuery(add_role).unbind( "click" );
678
+ jQuery(add_role).on('click', function (event) {
679
+ event.preventDefault();
680
+ jQuery(popup_body).fadeOut('fast');
681
+ jQuery(popup_overlay).fadeOut('fast');
682
+ var span ='';
683
+ var display_name = "";
684
+ var value = [];
685
+ jQuery( "#" + id + "_table input[type='checkbox']:checked").each(function () {
686
+ value.push(jQuery(this).val());
687
+ display_name = jQuery(this).closest('tr').find('label').html();
688
+ jQuery("." + removed_roles).remove();
689
+ span += '<div class="time_wrap ' + removed_roles + '"><span data-attribute="' + jQuery(this).val() + '" class="' + role_value + '">' + display_name + '</span>';
690
+ if(display_name.toLowerCase() != 'administrator'){
691
+ span += '<span class="' + remove_role + '">X</span>'
692
+ }
693
+ span += '</div>';
694
+ });
695
+
696
+ jQuery('#' + permissions_array.replace('[]','')).val(value.join());
697
+ jQuery(open_popup_btn).before(span);
698
+ jQuery("." + remove_role).on('click', function () {
699
+ var find = jQuery(this).closest('.time_wrap').find("." + role_value).html();
700
+ jQuery(this).closest('div').remove();
701
 
702
+ jQuery(popup_body + " .gawd_table input[type='checkbox']:checked").each(function () {
703
+ if(jQuery(this).val() == find){
704
+ jQuery(this).removeAttr('checked');
705
+ }
706
+ });
707
+ var value = [];
708
+ jQuery("." + role_value).each(function () {
709
+ value.push(jQuery(this).attr('data-attribute'));
710
+ });
711
+ jQuery('#' + permissions_array.replace('[]','')).val(value.join());
712
+ })
713
+ })
714
+
715
+ jQuery("." + removed_roles).on('click', function () {
716
+ var find = jQuery(this).closest('.time_wrap').find(role_value).html();
717
+ jQuery(this).closest('div').remove();
718
+
719
+ jQuery(popup_body + " .gawd_table input[type='checkbox']:checked").each(function () {
720
+ if(jQuery(this).val() == find){
721
+ jQuery(this).removeAttr('checked');
722
+ }
723
+ });
724
+ var value = [];
725
+ jQuery("." + role_value).each(function () {
726
+ value.push(jQuery(this).attr('data-attribute'));
727
+ });
728
+ jQuery('#' + permissions_array.replace('[]','')).val(value.join());
729
+ })
730
+ }
731
+ jQuery(".gawd_remove").on('click', function () {
732
+ var id = jQuery(this).closest('.time_wrap').attr('class').split(' ')[1];
733
+ jQuery(this).closest('div').remove();
734
+ var value = [];
735
+ jQuery('.' + id.substring(0, id.length-1)).each(function () {
736
+ value.push(jQuery(this).attr('data-attribute'));
737
+ });
738
+ if(id == 'dashboard_report_permissions'){
739
+ id = 'gawd_backend_roles';
740
+ }
741
+ jQuery('#' + id).val(value.join());
742
+ })
743
  </script>
admin/pages/tracking.php CHANGED
@@ -120,7 +120,7 @@ $domain = GAWD::get_domain(esc_html(get_option('siteurl')));
120
  <div class="clear"></div>
121
  </div>
122
  <div style="margin-top:25px">
123
- <img src="<?php echo GAWD_URL.'/assets/freePages/custom_dimensions.png';?>"/>
124
  </div>
125
  </div>
126
  <input name="gawd_custom_dimension_id" type="hidden" value="<?php echo count($existing_custom_dimensions);?>"/>
@@ -172,7 +172,7 @@ $domain = GAWD::get_domain(esc_html(get_option('siteurl')));
172
  <div class="clear"></div>
173
  </div>
174
  <div class="gawd_exclude_tracking">
175
- <img src="<?php echo GAWD_URL.'/assets/freePages/exclude_tracking.png';?>"/>
176
  </div>
177
  <input type='hidden' name="settings_submit" id="settings_submit"/>
178
  <div class="gawd_submit"><input type="submit" name="settings_submit" class="button_gawd" value="SAVE"/></div>
120
  <div class="clear"></div>
121
  </div>
122
  <div style="margin-top:25px">
123
+ <img class="gawd_pro_img" data-attr="custom dimensions" src="<?php echo GAWD_URL.'/assets/freePages/custom_dimensions.png';?>"/>
124
  </div>
125
  </div>
126
  <input name="gawd_custom_dimension_id" type="hidden" value="<?php echo count($existing_custom_dimensions);?>"/>
172
  <div class="clear"></div>
173
  </div>
174
  <div class="gawd_exclude_tracking">
175
+ <img class="gawd_pro_img" data-attr="exclude options" src="<?php echo GAWD_URL.'/assets/freePages/exclude_tracking.png';?>"/>
176
  </div>
177
  <input type='hidden' name="settings_submit" id="settings_submit"/>
178
  <div class="gawd_submit"><input type="submit" name="settings_submit" class="button_gawd" value="SAVE"/></div>
gawd_class.php CHANGED
@@ -53,7 +53,7 @@ class GAWD {
53
  add_action( 'wp_head', array( $this, 'gawd_tracking_code' ), 99 );
54
  include_once(GAWD_DIR . '/include/gawd-notices-class.php');
55
 
56
- add_action( 'admin_notices', array( $this, 'check_property_delete' ));
57
 
58
  $gawd_settings = get_option( 'gawd_settings' );
59
  $gawd_post_page_roles = isset( $gawd_settings['gawd_post_page_roles'] ) ? $gawd_settings['gawd_post_page_roles'] : array();
@@ -68,7 +68,7 @@ class GAWD {
68
  add_action( 'manage_pages_custom_column', array( $this, 'gawd_add_icons' ), 10, 2 );
69
  add_action( 'load-post.php', array( $this, 'gawd_add_custom_box' ) );
70
  }
71
- $gawd_frontend_roles = isset( $gawd_settings['gawd_frontend_roles'] ) ? $gawd_settings['gawd_frontend_roles'] : array();
72
  if ( ( isset( $gawd_settings['gawd_tracking_enable'] ) && $gawd_settings['gawd_tracking_enable'] == 'on' ) && ( in_array( $roles, $gawd_frontend_roles ) || current_user_can( 'manage_options' ) ) ) {
73
  add_action( 'wp_enqueue_scripts', array( $this, 'gawd_front_scripts' ) );
74
  add_action( 'admin_bar_menu', array( $this, 'report_adminbar' ), 999 );
@@ -374,6 +374,7 @@ class GAWD {
374
  $email_period = isset( $_REQUEST["gawd_email_period"] ) ? sanitize_text_field( $_REQUEST["gawd_email_period"] ) : '';
375
  $week_day = isset( $_REQUEST["gawd_email_week_day"] ) ? sanitize_text_field( $_REQUEST["gawd_email_week_day"] ) : '';
376
  $month_day = isset( $_REQUEST["gawd_email_month_day"] ) ? sanitize_text_field( $_REQUEST["gawd_email_month_day"] ) : '';
 
377
  $emails = array();
378
  $invalid_email = false;
379
  $email_to = explode( ',', $email_to );
@@ -414,13 +415,13 @@ class GAWD {
414
  } else {
415
  if ( $email_period == 'gawd_weekly' ) {
416
  $period_day = $week_day;
417
- $timestamp = strtotime( 'this ' . $period_day );
418
  } elseif ( $email_period == 'gawd_monthly' ) {
419
  $period_day = $month_day;
420
- $timestamp = strtotime( date( 'Y-m-' . $period_day ) );
421
  } else {
422
  $period_day = '';
423
- $timestamp = time();
424
  }
425
  $saved_email = get_option( 'gawd_email' );
426
  if ( $saved_email ) {
@@ -430,12 +431,13 @@ class GAWD {
430
  'metric' => $metric,
431
  'metric_compare' => $metric_compare,
432
  'dimension' => $dimension,
433
- 'creation_date' => date( 'Y-m-d' ),
434
  'emails' => $email_to,
435
  'email_from' => $email_from,
436
  'email_subject' => $gawd_email_subject,
437
  'email_body' => $gawd_email_body,
438
  'period_day' => $period_day,
 
439
  'img' => $img,
440
  'tab_name' => $tab_name,
441
  'view_id' => $view_id,
@@ -451,12 +453,13 @@ class GAWD {
451
  'metric' => $metric,
452
  'metric_compare' => $metric_compare,
453
  'dimension' => $dimension,
454
- 'creation_date' => date( 'Y-m-d' ),
455
  'emails' => $email_to,
456
  'email_from' => $email_from,
457
  'email_subject' => $gawd_email_subject,
458
  'email_body' => $gawd_email_body,
459
  'period_day' => $period_day,
 
460
  'img' => $img,
461
  'tab_name' => $tab_name,
462
  'view_id' => $view_id,
@@ -610,6 +613,7 @@ class GAWD {
610
  wp_enqueue_script( 'jquery-ui-tooltip' );
611
  wp_enqueue_script( 'gawd_paging', GAWD_URL . '/inc/js/paging.js', false, GAWD_VERSION );
612
  wp_enqueue_script( 'jquery.cookie', GAWD_URL . '/inc/js/jquery.cookie.js', false, GAWD_VERSION );
 
613
  wp_enqueue_style( 'admin_css', GAWD_URL . '/inc/css/gawd_admin.css', false, GAWD_VERSION );
614
  wp_enqueue_style( 'gawd_licensing', GAWD_URL . '/inc/css/gawd_licensing.css', false, GAWD_VERSION );
615
  wp_enqueue_style( 'gawd_featured', GAWD_URL . '/featured/style.css', array(), GAWD_VERSION );
@@ -639,6 +643,7 @@ class GAWD {
639
  wp_enqueue_script( 'gawd_grid', GAWD_URL . '/inc/js/jquery.jqGrid.min.js', array( 'jquery' ), GAWD_VERSION );
640
  wp_enqueue_script( 'gawd_grid_locale', GAWD_URL . '/inc/js/grid.locale-en.js', array( 'jquery' ), GAWD_VERSION );
641
  wp_enqueue_script( 'date-js', GAWD_URL . '/inc/js/date.js', array( 'jquery' ), GAWD_VERSION );
 
642
  wp_enqueue_script( 'admin_js', GAWD_URL . '/inc/js/gawd_admin.js', array( 'jquery' ), GAWD_VERSION );
643
  wp_enqueue_script( 'chosen.jquery.js', GAWD_URL . '/inc/js/chosen.jquery.js', array( 'jquery' ), GAWD_VERSION );
644
  wp_enqueue_script( 'bootstrap_js', GAWD_URL . '/inc/js/bootstrap_js.js', array( 'jquery' ), GAWD_VERSION );
@@ -685,7 +690,8 @@ class GAWD {
685
  $gawd_permissions = isset( $gawd_settings['gawd_permissions'] ) ? $gawd_settings['gawd_permissions'] : array();
686
  if ( empty( $gawd_permissions ) ) {
687
  $permission = 'manage_options';
688
- } else {
 
689
  if ( in_array( 'manage_options', $gawd_permissions ) ) {
690
  $permission = 'manage_options';
691
  }
@@ -698,7 +704,14 @@ class GAWD {
698
  if ( in_array( 'edit_posts', $gawd_permissions ) ) {
699
  $permission = 'edit_posts';
700
  }
 
 
 
 
701
  }
 
 
 
702
  add_menu_page(
703
  __( 'Analytics', 'gawd' ), //$page_title
704
  __( 'Analytics', 'gawd' ), //$menu_title
@@ -1350,7 +1363,7 @@ class GAWD {
1350
  }
1351
  if ( ! isset( $gawd_user_data['refresh_token'] ) || ( $gawd_user_data['refresh_token'] == '' ) ) {
1352
  echo '<div class="gawd_auth_wrap"><p class="auth_description">Click <b>Authenticate</b> button and login to your Google account. A window asking for relevant permissions will appear. Click <b>Allow</b> and copy the authentication code from the text input.</p><div id="gawd_auth_url" onclick="gawd_auth_popup(' . GAWD_google_client::create_authentication_url() . ',800,400)" style="cursor: pointer;"><div class="gawd_auth_button">AUTHENTICATE</div><div class="clear"></div></div>';
1353
- echo '<div id="gawd_auth_code"><form id="gawd_auth_code_paste" action="" method="post">
1354
  <p style="margin:0;color: #444;">Paste the authentication code from the popup to this input.</p>
1355
  <input id="gawd_token" type="text">';
1356
  wp_nonce_field( "gawd_save_form", "gawd_save_form_fild" );
@@ -1549,7 +1562,7 @@ class GAWD {
1549
  }
1550
  $gawd_show_in_dashboard = isset( $_POST['gawd_show_in_dashboard'] ) ? sanitize_text_field( $_POST['gawd_show_in_dashboard'] ) : '';
1551
 
1552
- $gawd_permissions = isset( $_POST['gawd_permissions'] ) ? $_POST['gawd_permissions'] : array();
1553
  $gawd_own_project = isset( $_POST['gawd_own_project'] ) ? sanitize_text_field( $_POST['gawd_own_project'] ) : '';
1554
  $site_speed_rate = isset( $_POST['site_speed_rate'] ) ? intval( $_POST['site_speed_rate'] ) : '1';
1555
  $post_page_chart = isset( $_POST['post_page_chart'] ) ? sanitize_text_field( $_POST['post_page_chart'] ) : '';
@@ -1558,9 +1571,9 @@ class GAWD {
1558
  $default_date = isset( $_POST['default_date'] ) ? $_POST['default_date'] : 'last_7_days';
1559
  $default_date_format = isset( $_POST['default_date_format'] ) ? $_POST['default_date_format'] : 'ymd_with_week';
1560
  $enable_hover_tooltip = isset( $_POST['enable_hover_tooltip'] ) ? $_POST['enable_hover_tooltip'] : '';
1561
- $gawd_backend_roles = isset( $_POST['gawd_backend_roles'] ) ? ( $_POST['gawd_backend_roles'] ) : array();
1562
- $gawd_frontend_roles = isset( $_POST['gawd_frontend_roles'] ) ? ( $_POST['gawd_frontend_roles'] ) : array();
1563
- $gawd_post_page_roles = isset( $_POST['gawd_post_page_roles'] ) ? ( $_POST['gawd_post_page_roles'] ) : array();
1564
  $exclude_events = isset( $_POST['exclude_events'] ) ? sanitize_text_field( $_POST['exclude_events'] ) : array();
1565
  $gawd_settings_exist = get_option( 'gawd_settings' );
1566
  $gawd_settings_exist['gawd_show_in_dashboard'] = $gawd_show_in_dashboard;
@@ -1639,12 +1652,12 @@ class GAWD {
1639
  $gawd_user_data['gawd_id'] = $property['defaultProfileId'];
1640
  update_option( 'gawd_user_data', $gawd_user_data );
1641
  }
1642
- if ( $this->manage_ua_code_selection_tracking() != 'done' ) {
1643
  $redirect_url = admin_url() . 'admin.php?page=gawd_tracking';
1644
 
1645
  //echo '<script>window.location.href="'.$redirect_url.'";</script>';
1646
  return;
1647
- }
1648
  $gawd_settings = get_option( 'gawd_settings' );
1649
 
1650
  if ( $add_dimension_value == 'add_dimension_Logged_in' ) {
@@ -1949,7 +1962,6 @@ class GAWD {
1949
  $gawd_settings = get_option( 'gawd_settings' );
1950
  $gawd_backend_roles = isset( $gawd_settings['gawd_backend_roles'] ) ? $gawd_settings['gawd_backend_roles'] : array();
1951
  $roles = $this->get_current_user_role();
1952
-
1953
  if ( isset( $gawd_settings['gawd_show_in_dashboard'] ) && $gawd_settings['gawd_show_in_dashboard'] == 'on' ) {
1954
  if ( in_array( $roles, $gawd_backend_roles ) || current_user_can( 'manage_options' ) ) {
1955
  wp_add_dashboard_widget( 'wd_dashboard_widget', 'WD Google Analytics', array(
53
  add_action( 'wp_head', array( $this, 'gawd_tracking_code' ), 99 );
54
  include_once(GAWD_DIR . '/include/gawd-notices-class.php');
55
 
56
+ add_action( 'admin_notices', array( $this, 'check_property_delete' ),9999);
57
 
58
  $gawd_settings = get_option( 'gawd_settings' );
59
  $gawd_post_page_roles = isset( $gawd_settings['gawd_post_page_roles'] ) ? $gawd_settings['gawd_post_page_roles'] : array();
68
  add_action( 'manage_pages_custom_column', array( $this, 'gawd_add_icons' ), 10, 2 );
69
  add_action( 'load-post.php', array( $this, 'gawd_add_custom_box' ) );
70
  }
71
+ $gawd_frontend_roles = isset( $gawd_settings['gawd_frontend_roles'] ) ? $gawd_settings['gawd_frontend_roles'] : array();
72
  if ( ( isset( $gawd_settings['gawd_tracking_enable'] ) && $gawd_settings['gawd_tracking_enable'] == 'on' ) && ( in_array( $roles, $gawd_frontend_roles ) || current_user_can( 'manage_options' ) ) ) {
73
  add_action( 'wp_enqueue_scripts', array( $this, 'gawd_front_scripts' ) );
74
  add_action( 'admin_bar_menu', array( $this, 'report_adminbar' ), 999 );
374
  $email_period = isset( $_REQUEST["gawd_email_period"] ) ? sanitize_text_field( $_REQUEST["gawd_email_period"] ) : '';
375
  $week_day = isset( $_REQUEST["gawd_email_week_day"] ) ? sanitize_text_field( $_REQUEST["gawd_email_week_day"] ) : '';
376
  $month_day = isset( $_REQUEST["gawd_email_month_day"] ) ? sanitize_text_field( $_REQUEST["gawd_email_month_day"] ) : '';
377
+ $email_time = isset( $_REQUEST["email_time"] ) ? sanitize_text_field( $_REQUEST["email_time"] ) : '';
378
  $emails = array();
379
  $invalid_email = false;
380
  $email_to = explode( ',', $email_to );
415
  } else {
416
  if ( $email_period == 'gawd_weekly' ) {
417
  $period_day = $week_day;
418
+ $timestamp = strtotime( 'this ' . $period_day . ' ' . $email_time );
419
  } elseif ( $email_period == 'gawd_monthly' ) {
420
  $period_day = $month_day;
421
+ $timestamp = strtotime( date( 'Y-m-' . $period_day . ' ' . $email_time ) );
422
  } else {
423
  $period_day = '';
424
+ $timestamp = strtotime( date( 'Y-m-d ' . $email_time ) );
425
  }
426
  $saved_email = get_option( 'gawd_email' );
427
  if ( $saved_email ) {
431
  'metric' => $metric,
432
  'metric_compare' => $metric_compare,
433
  'dimension' => $dimension,
434
+ 'creation_date' => date( 'Y-m-d' ) .' '. $email_time,
435
  'emails' => $email_to,
436
  'email_from' => $email_from,
437
  'email_subject' => $gawd_email_subject,
438
  'email_body' => $gawd_email_body,
439
  'period_day' => $period_day,
440
+ 'period_time' => $email_time,
441
  'img' => $img,
442
  'tab_name' => $tab_name,
443
  'view_id' => $view_id,
453
  'metric' => $metric,
454
  'metric_compare' => $metric_compare,
455
  'dimension' => $dimension,
456
+ 'creation_date' => date( 'Y-m-d' ) .' '. $email_time,
457
  'emails' => $email_to,
458
  'email_from' => $email_from,
459
  'email_subject' => $gawd_email_subject,
460
  'email_body' => $gawd_email_body,
461
  'period_day' => $period_day,
462
+ 'period_time' => $email_time,
463
  'img' => $img,
464
  'tab_name' => $tab_name,
465
  'view_id' => $view_id,
613
  wp_enqueue_script( 'jquery-ui-tooltip' );
614
  wp_enqueue_script( 'gawd_paging', GAWD_URL . '/inc/js/paging.js', false, GAWD_VERSION );
615
  wp_enqueue_script( 'jquery.cookie', GAWD_URL . '/inc/js/jquery.cookie.js', false, GAWD_VERSION );
616
+ wp_enqueue_style( 'timepicker_css', GAWD_URL . '/inc/css/jquery.timepicker.css', false, GAWD_VERSION );
617
  wp_enqueue_style( 'admin_css', GAWD_URL . '/inc/css/gawd_admin.css', false, GAWD_VERSION );
618
  wp_enqueue_style( 'gawd_licensing', GAWD_URL . '/inc/css/gawd_licensing.css', false, GAWD_VERSION );
619
  wp_enqueue_style( 'gawd_featured', GAWD_URL . '/featured/style.css', array(), GAWD_VERSION );
643
  wp_enqueue_script( 'gawd_grid', GAWD_URL . '/inc/js/jquery.jqGrid.min.js', array( 'jquery' ), GAWD_VERSION );
644
  wp_enqueue_script( 'gawd_grid_locale', GAWD_URL . '/inc/js/grid.locale-en.js', array( 'jquery' ), GAWD_VERSION );
645
  wp_enqueue_script( 'date-js', GAWD_URL . '/inc/js/date.js', array( 'jquery' ), GAWD_VERSION );
646
+ wp_enqueue_script( 'timepicker_js', GAWD_URL . '/inc/js/jquery.timepicker.min.js', array( 'jquery' ), GAWD_VERSION );
647
  wp_enqueue_script( 'admin_js', GAWD_URL . '/inc/js/gawd_admin.js', array( 'jquery' ), GAWD_VERSION );
648
  wp_enqueue_script( 'chosen.jquery.js', GAWD_URL . '/inc/js/chosen.jquery.js', array( 'jquery' ), GAWD_VERSION );
649
  wp_enqueue_script( 'bootstrap_js', GAWD_URL . '/inc/js/bootstrap_js.js', array( 'jquery' ), GAWD_VERSION );
690
  $gawd_permissions = isset( $gawd_settings['gawd_permissions'] ) ? $gawd_settings['gawd_permissions'] : array();
691
  if ( empty( $gawd_permissions ) ) {
692
  $permission = 'manage_options';
693
+ }
694
+ else {
695
  if ( in_array( 'manage_options', $gawd_permissions ) ) {
696
  $permission = 'manage_options';
697
  }
704
  if ( in_array( 'edit_posts', $gawd_permissions ) ) {
705
  $permission = 'edit_posts';
706
  }
707
+ if(in_array( 'read', $gawd_permissions ) ) {
708
+ $permission = 'read';
709
+ }
710
+
711
  }
712
+
713
+
714
+
715
  add_menu_page(
716
  __( 'Analytics', 'gawd' ), //$page_title
717
  __( 'Analytics', 'gawd' ), //$menu_title
1363
  }
1364
  if ( ! isset( $gawd_user_data['refresh_token'] ) || ( $gawd_user_data['refresh_token'] == '' ) ) {
1365
  echo '<div class="gawd_auth_wrap"><p class="auth_description">Click <b>Authenticate</b> button and login to your Google account. A window asking for relevant permissions will appear. Click <b>Allow</b> and copy the authentication code from the text input.</p><div id="gawd_auth_url" onclick="gawd_auth_popup(' . GAWD_google_client::create_authentication_url() . ',800,400)" style="cursor: pointer;"><div class="gawd_auth_button">AUTHENTICATE</div><div class="clear"></div></div>';
1366
+ echo '<div id="gawd_auth_code"><form id="gawd_auth_code_paste" action="" method="post" onSubmit="return false;">
1367
  <p style="margin:0;color: #444;">Paste the authentication code from the popup to this input.</p>
1368
  <input id="gawd_token" type="text">';
1369
  wp_nonce_field( "gawd_save_form", "gawd_save_form_fild" );
1562
  }
1563
  $gawd_show_in_dashboard = isset( $_POST['gawd_show_in_dashboard'] ) ? sanitize_text_field( $_POST['gawd_show_in_dashboard'] ) : '';
1564
 
1565
+ $gawd_permissions = isset( $_POST['gawd_permissions'] ) ? explode(',', $_POST['gawd_permissions']) : array('manage_options');
1566
  $gawd_own_project = isset( $_POST['gawd_own_project'] ) ? sanitize_text_field( $_POST['gawd_own_project'] ) : '';
1567
  $site_speed_rate = isset( $_POST['site_speed_rate'] ) ? intval( $_POST['site_speed_rate'] ) : '1';
1568
  $post_page_chart = isset( $_POST['post_page_chart'] ) ? sanitize_text_field( $_POST['post_page_chart'] ) : '';
1571
  $default_date = isset( $_POST['default_date'] ) ? $_POST['default_date'] : 'last_7_days';
1572
  $default_date_format = isset( $_POST['default_date_format'] ) ? $_POST['default_date_format'] : 'ymd_with_week';
1573
  $enable_hover_tooltip = isset( $_POST['enable_hover_tooltip'] ) ? $_POST['enable_hover_tooltip'] : '';
1574
+ $gawd_backend_roles = isset( $_POST['gawd_backend_roles'] ) ? explode(',', $_POST['gawd_backend_roles'] ) : array('administrator');
1575
+ $gawd_frontend_roles = isset( $_POST['gawd_frontend_roles'] ) ? explode(',', $_POST['gawd_frontend_roles'] ) : array('administrator');
1576
+ $gawd_post_page_roles = isset( $_POST['gawd_post_page_roles'] ) ? explode(',', $_POST['gawd_post_page_roles'] ) : array('administrator');
1577
  $exclude_events = isset( $_POST['exclude_events'] ) ? sanitize_text_field( $_POST['exclude_events'] ) : array();
1578
  $gawd_settings_exist = get_option( 'gawd_settings' );
1579
  $gawd_settings_exist['gawd_show_in_dashboard'] = $gawd_show_in_dashboard;
1652
  $gawd_user_data['gawd_id'] = $property['defaultProfileId'];
1653
  update_option( 'gawd_user_data', $gawd_user_data );
1654
  }
1655
+ if ( $this->manage_ua_code_selection_tracking() != 'done' ) {
1656
  $redirect_url = admin_url() . 'admin.php?page=gawd_tracking';
1657
 
1658
  //echo '<script>window.location.href="'.$redirect_url.'";</script>';
1659
  return;
1660
+ }
1661
  $gawd_settings = get_option( 'gawd_settings' );
1662
 
1663
  if ( $add_dimension_value == 'add_dimension_Logged_in' ) {
1962
  $gawd_settings = get_option( 'gawd_settings' );
1963
  $gawd_backend_roles = isset( $gawd_settings['gawd_backend_roles'] ) ? $gawd_settings['gawd_backend_roles'] : array();
1964
  $roles = $this->get_current_user_role();
 
1965
  if ( isset( $gawd_settings['gawd_show_in_dashboard'] ) && $gawd_settings['gawd_show_in_dashboard'] == 'on' ) {
1966
  if ( in_array( $roles, $gawd_backend_roles ) || current_user_can( 'manage_options' ) ) {
1967
  wp_add_dashboard_widget( 'wd_dashboard_widget', 'WD Google Analytics', array(
google-analytics-wd.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Google Analytics
5
  * Plugin URI: https://web-dorado.com/products/wordpress-google-analytics-plugin.html
6
  * Description: Google Analytics WD is a user-friendly all in one plugin, which allows to manage and monitor your website analytics from WordPress dashboard.
7
- * Version: 1.0.8
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -26,7 +26,7 @@ if (!defined('GAWD_INC')) {
26
  }
27
 
28
  if (!defined('GAWD_VERSION')) {
29
- define('GAWD_VERSION', '1.0.8');
30
  }
31
 
32
  require_once( 'gawd_class.php' );
4
  * Plugin Name: Google Analytics
5
  * Plugin URI: https://web-dorado.com/products/wordpress-google-analytics-plugin.html
6
  * Description: Google Analytics WD is a user-friendly all in one plugin, which allows to manage and monitor your website analytics from WordPress dashboard.
7
+ * Version: 1.0.9
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
26
  }
27
 
28
  if (!defined('GAWD_VERSION')) {
29
+ define('GAWD_VERSION', '1.0.9');
30
  }
31
 
32
  require_once( 'gawd_class.php' );
inc/css/gawd_admin.css CHANGED
@@ -20,7 +20,7 @@
20
  .gawd_auth_wrap #gawd_auth_url, .gawd_auth_wrap #gawd_auth_code{
21
  width:initial
22
  }
23
- #gawd_page_title{
24
  margin: 0 0 20px;
25
  color:#6da2c3
26
  }
@@ -307,7 +307,7 @@
307
  margin:auto;
308
  background-color: white;
309
  width: 42%;
310
- height: 58%;
311
  z-index: 99999;
312
  padding: 20px;
313
  overflow:auto
@@ -425,12 +425,12 @@
425
  border: 1px solid #C7C7C7;
426
  margin-top: -1px;
427
  }
428
- .button_gawd{
429
  background-color:#7DB5D8;
430
  color:#fff;
431
  font-size: 13px;
432
  line-height: 24px;
433
- width:60px;
434
  height: 26px;
435
  margin: 0;
436
  padding: 0 10px 1px;
@@ -739,7 +739,7 @@
739
  width:22%;
740
  text-align:left;
741
  }
742
- .gawd_email_attachemnt, .gawd_email_frequency, .gawd_email_type {
743
  background-color: #E7E7E7;
744
  border: 1px solid #C7C7C7;
745
  float:left;
@@ -747,7 +747,7 @@
747
  padding:5px;
748
  text-align:left;
749
  }
750
- .gawd_email_input{
751
  float:left;
752
  width:73%
753
  }
@@ -755,12 +755,12 @@
755
  width:100%;
756
  padding:5px 4px
757
  }
758
- .gawd_email_input_attachment, .gawd_email_input_frequency{
759
  float:left;
760
  width:22%;
761
  margin-right: 24px;
762
  }
763
- .gawd_email_input_attachment select, .gawd_email_input_frequency select{
764
  width:100%;
765
  padding:0;
766
  height:30px
@@ -1789,7 +1789,7 @@ Original highlight.js style (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
1789
  text-decoration: none;
1790
  position: fixed;
1791
  right: 27%;
1792
- top: 16%;
1793
  display: none;
1794
  z-index: 999999;
1795
  }
@@ -2544,4 +2544,77 @@ th.ui-th-column div{
2544
  color: #fff;
2545
  background-color: rgba(125,181,216,0.8);
2546
  border:1px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2547
  }
20
  .gawd_auth_wrap #gawd_auth_url, .gawd_auth_wrap #gawd_auth_code{
21
  width:initial
22
  }
23
+ #gawd_page_title{
24
  margin: 0 0 20px;
25
  color:#6da2c3
26
  }
307
  margin:auto;
308
  background-color: white;
309
  width: 42%;
310
+ height: 65%;
311
  z-index: 99999;
312
  padding: 20px;
313
  overflow:auto
425
  border: 1px solid #C7C7C7;
426
  margin-top: -1px;
427
  }
428
+ .button_gawd{
429
  background-color:#7DB5D8;
430
  color:#fff;
431
  font-size: 13px;
432
  line-height: 24px;
433
+ width:65px;
434
  height: 26px;
435
  margin: 0;
436
  padding: 0 10px 1px;
739
  width:22%;
740
  text-align:left;
741
  }
742
+ .gawd_email_attachemnt, .gawd_email_frequency, .gawd_email_type, .gawd_email_time {
743
  background-color: #E7E7E7;
744
  border: 1px solid #C7C7C7;
745
  float:left;
747
  padding:5px;
748
  text-align:left;
749
  }
750
+ .gawd_email_input, .gawd_email_input_time{
751
  float:left;
752
  width:73%
753
  }
755
  width:100%;
756
  padding:5px 4px
757
  }
758
+ .gawd_email_input_attachment, .gawd_email_input_frequency, .gawd_email_input_time{
759
  float:left;
760
  width:22%;
761
  margin-right: 24px;
762
  }
763
+ .gawd_email_input_attachment select, .gawd_email_input_frequency select, .gawd_email_input_time input{
764
  width:100%;
765
  padding:0;
766
  height:30px
1789
  text-decoration: none;
1790
  position: fixed;
1791
  right: 27%;
1792
+ top: 14%;
1793
  display: none;
1794
  z-index: 999999;
1795
  }
2544
  color: #fff;
2545
  background-color: rgba(125,181,216,0.8);
2546
  border:1px;
2547
+ }
2548
+
2549
+ .gawd_email_time_row{
2550
+ display:none
2551
+ }
2552
+ .gawd_exclude_users_popup_overlay, .gawd_exclude_roles_popup_overlay, .gawd_permissions_popup_overlay{
2553
+ display: none;
2554
+ background-color: rgba(0, 0, 0, 0.4);
2555
+ position: fixed;
2556
+ top: 0;
2557
+ left: 0;
2558
+ width: 100%;
2559
+ height: 100%;
2560
+ z-index: 99998;
2561
+ }
2562
+
2563
+ .gawd_exclude_users_popup, .gawd_exclude_roles_popup, .gawd_permissions_popup{
2564
+ display: none;
2565
+ text-align: center;
2566
+ position: fixed;
2567
+ top: 0;
2568
+ left: 0;
2569
+ right:0;
2570
+ bottom:0;
2571
+ margin:auto;
2572
+ background-color: white;
2573
+ width: 42%;
2574
+ height: 50%;
2575
+ z-index: 99999;
2576
+ padding: 20px;
2577
+ overflow:auto
2578
+ }
2579
+ .close_btn_cont{
2580
+ position: relative;
2581
+ }
2582
+ .gawd_exclude_users_popup_btn, .gawd_exclude_roles_popup_btn, .gawd_permission_popup_btn {
2583
+ -webkit-border-radius: 60;
2584
+ border-radius: 60px;
2585
+ font-family: Arial;
2586
+ color: #ffffff;
2587
+ font-size: 12px;
2588
+ background: #9ec9e3;
2589
+ padding: 3px 8px;
2590
+ text-decoration: none;
2591
+ position: absolute;
2592
+ right: -18px;
2593
+ top: -18px;
2594
+ z-index: 999999;
2595
+ cursor:pointer
2596
+ }
2597
+ .remove_excluded_user, .remove_excluded_role, .remove_dashboard_report_permission, .remove_post_page_role, .remove_gawd_permission, .remove_frontend_report_role{
2598
+ -webkit-border-radius: 60;
2599
+ border-radius: 60px;
2600
+ font-family: Arial;
2601
+ color: #ffffff;
2602
+ font-size: 9px;
2603
+ background: #E3E3E3;
2604
+ padding: 3px 5px;
2605
+ text-decoration: none;
2606
+ cursor: pointer;
2607
+ margin-left: 4px;
2608
+ }
2609
+ .gawd_exclude_users_popup table , .gawd_exclude_roles_popup table, .gawd_permissions_popup table{
2610
+ width:100%;
2611
+ }
2612
+
2613
+ .add_btn_cont{
2614
+ text-align:right
2615
+ }
2616
+
2617
+ .amcharts-main-div .amcharts-chart-div svg {
2618
+ max-width: 100% !important;
2619
+ max-height: 100% !important;
2620
  }
inc/css/jquery.timepicker.css ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ui-timepicker-wrapper {
2
+ overflow-y: auto;
3
+ height: 150px;
4
+ width: 9em;
5
+ background: #fff;
6
+ border: 1px solid #ddd;
7
+ -webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);
8
+ -moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);
9
+ box-shadow:0 5px 10px rgba(0,0,0,0.2);
10
+ outline: none;
11
+ z-index: 100010;
12
+ margin: 0;
13
+ }
14
+
15
+ .ui-timepicker-wrapper.ui-timepicker-with-duration {
16
+ width: 13em;
17
+ }
18
+
19
+ .ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-30,
20
+ .ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-60 {
21
+ width: 11em;
22
+ }
23
+
24
+ .ui-timepicker-list {
25
+ margin: 0;
26
+ padding: 0;
27
+ list-style: none;
28
+ }
29
+
30
+ .ui-timepicker-duration {
31
+ margin-left: 5px; color: #888;
32
+ }
33
+
34
+ .ui-timepicker-list:hover .ui-timepicker-duration {
35
+ color: #888;
36
+ }
37
+
38
+ .ui-timepicker-list li {
39
+ padding: 3px 0 3px 5px;
40
+ cursor: pointer;
41
+ white-space: nowrap;
42
+ color: #000;
43
+ list-style: none;
44
+ margin: 0;
45
+ }
46
+
47
+ .ui-timepicker-list:hover .ui-timepicker-selected {
48
+ background: #fff; color: #000;
49
+ }
50
+
51
+ li.ui-timepicker-selected,
52
+ .ui-timepicker-list li:hover,
53
+ .ui-timepicker-list .ui-timepicker-selected:hover {
54
+ background: #1980EC; color: #fff;
55
+ }
56
+
57
+ li.ui-timepicker-selected .ui-timepicker-duration,
58
+ .ui-timepicker-list li:hover .ui-timepicker-duration {
59
+ color: #ccc;
60
+ }
61
+
62
+ .ui-timepicker-list li.ui-timepicker-disabled,
63
+ .ui-timepicker-list li.ui-timepicker-disabled:hover,
64
+ .ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled {
65
+ color: #888;
66
+ cursor: default;
67
+ }
68
+
69
+ .ui-timepicker-list li.ui-timepicker-disabled:hover,
70
+ .ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled {
71
+ background: #f2f2f2;
72
+ }
inc/js/gawd_admin.js CHANGED
@@ -2440,13 +2440,14 @@ function show_hide(obj) {
2440
  jQuery('.gawd_menu_coteiner').removeClass("gawd_open");
2441
  }
2442
  jQuery(document).ready(function () {
 
2443
  if(gawd_admin.show_report_page == 'on'){
2444
  jQuery('#gawd_ecommerce_ul li, #gawd_adWords, #gawd_adsense, #gawd_custom, #gawd_customReport').on('click', function(){
2445
  alert('This feature is available in WD Google Analytics Pro.');
2446
  return;
2447
  })
2448
  }
2449
- //jQuery('#gawd_email_time_input').timepicker({ 'scrollDefault': 'now','timeFormat': 'H:i' });
2450
  jQuery('#gawd_add_property').on('click', function(){
2451
  var empty_name = false;
2452
  jQuery("#gawd_property_name").removeClass('gawd_invalid')
@@ -2463,21 +2464,48 @@ jQuery(document).ready(function () {
2463
  jQuery('.gawd_inactive').each(function () {
2464
  if(jQuery(this).find('ul').length >0){
2465
  jQuery(this).find('ul').find('li').on('click', function(){
 
 
 
2466
  jQuery(".gawd_pro_popup").fadeIn('fast');
2467
  jQuery(".gawd_pro_popup_overlay").fadeIn('fast');
 
 
 
 
2468
  });
2469
  }
2470
  else{
2471
  jQuery(this).on('click', function(){
 
 
 
2472
  jQuery(".gawd_pro_popup").fadeIn('fast');
2473
  jQuery(".gawd_pro_popup_overlay").fadeIn('fast');
 
 
 
 
2474
  });
2475
  }
2476
  });
2477
- jQuery(".gawd_pro_popup_overlay, .gawd_pro_popup_btn").on('click', function () {
2478
- jQuery(".gawd_pro_popup").fadeOut('fast');
2479
- jQuery(".gawd_pro_popup_overlay").fadeOut('fast');
2480
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
2481
  }
2482
 
2483
 
@@ -2783,6 +2811,7 @@ function onDashboardLoad() {
2783
 
2784
  jQuery('.gawd_email_row').find('.gawd_email_week_day_div').hide();
2785
  jQuery('.gawd_email_row').find('.gawd_email_month_day_div').hide();
 
2786
 
2787
 
2788
 
@@ -2816,14 +2845,22 @@ function onDashboardLoad() {
2816
  jQuery("#gawd_email_period").on('change', function () {
2817
  if (jQuery("#gawd_email_period :selected").val() == "gawd_weekly") {
2818
  jQuery(".gawd_email_week_day_div").show();
2819
- } else {
 
2820
  jQuery(".gawd_email_week_day_div").hide();
2821
  }
2822
  if (jQuery("#gawd_email_period :selected").val() == "gawd_monthly") {
2823
  jQuery(".gawd_email_month_day_div").show();
2824
- } else {
 
2825
  jQuery(".gawd_email_month_day_div").hide();
2826
  }
 
 
 
 
 
 
2827
  })
2828
  jQuery("#email_submit").on('click', function () {
2829
  email_popup();
@@ -2867,6 +2904,7 @@ function email_popup() {
2867
  var gawd_email_body = jQuery("#gawd_email_body").val();
2868
  var week_day = jQuery("#gawd_email_week_day_hidden").val();
2869
  var month_day = jQuery("#gawd_email_month_day_select").val();
 
2870
  var view_id = jQuery("#gawd_id option:selected").closest('optgroup').attr('label');
2871
  var empty_subject = false;
2872
  var is_valid_email = true;
@@ -2913,6 +2951,7 @@ function email_popup() {
2913
  gawd_email_period: gawd_email_period,
2914
  gawd_email_month_day: month_day,
2915
  gawd_email_week_day: week_day,
 
2916
  gawd_email_to: gawd_email_to,
2917
  gawd_email_from: gawd_email_from,
2918
  gawd_email_subject: gawd_email_subject,
@@ -3856,6 +3895,43 @@ function gawd_auth_popup(url, w, h) {
3856
  }
3857
  });
3858
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3859
  }
3860
 
3861
  function gawd_remove_item(dataKey,hidden){
@@ -3950,4 +4026,25 @@ function remove_zoom_message(){
3950
  }).done(function (data) {
3951
  jQuery('.gawd_zoom_message').remove();
3952
  })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3953
  }
2440
  jQuery('.gawd_menu_coteiner').removeClass("gawd_open");
2441
  }
2442
  jQuery(document).ready(function () {
2443
+ jQuery('#gawd_email_time_input').timepicker({ 'scrollDefault': 'now','timeFormat': 'H:i' });
2444
  if(gawd_admin.show_report_page == 'on'){
2445
  jQuery('#gawd_ecommerce_ul li, #gawd_adWords, #gawd_adsense, #gawd_custom, #gawd_customReport').on('click', function(){
2446
  alert('This feature is available in WD Google Analytics Pro.');
2447
  return;
2448
  })
2449
  }
2450
+
2451
  jQuery('#gawd_add_property').on('click', function(){
2452
  var empty_name = false;
2453
  jQuery("#gawd_property_name").removeClass('gawd_invalid')
2464
  jQuery('.gawd_inactive').each(function () {
2465
  if(jQuery(this).find('ul').length >0){
2466
  jQuery(this).find('ul').find('li').on('click', function(){
2467
+ jQuery('.gawd_pro_popup_overlay').remove();
2468
+ jQuery('.gawd_pro_popup').remove();
2469
+ pro_popup('reports','page=gawd_reports');
2470
  jQuery(".gawd_pro_popup").fadeIn('fast');
2471
  jQuery(".gawd_pro_popup_overlay").fadeIn('fast');
2472
+ jQuery(".gawd_pro_popup_overlay, .gawd_pro_popup_btn").on('click', function () {
2473
+ jQuery('.gawd_pro_popup_overlay').remove();
2474
+ jQuery('.gawd_pro_popup').remove();
2475
+ });
2476
  });
2477
  }
2478
  else{
2479
  jQuery(this).on('click', function(){
2480
+ jQuery('.gawd_pro_popup_overlay').remove();
2481
+ jQuery('.gawd_pro_popup').remove();
2482
+ pro_popup('reports','page=gawd_reports');
2483
  jQuery(".gawd_pro_popup").fadeIn('fast');
2484
  jQuery(".gawd_pro_popup_overlay").fadeIn('fast');
2485
+ jQuery(".gawd_pro_popup_overlay, .gawd_pro_popup_btn").on('click', function () {
2486
+ jQuery('.gawd_pro_popup_overlay').remove();
2487
+ jQuery('.gawd_pro_popup').remove();
2488
+ });
2489
  });
2490
  }
2491
  });
2492
+
2493
+ jQuery('.gawd_pro_img').on('click', function(){
2494
+ jQuery('.gawd_pro_popup_overlay').remove();
2495
+ jQuery('.gawd_pro_popup').remove();
2496
+ if(jQuery(this).data('attr') == 'exclude options' || jQuery(this).data('attr') == 'custom dimensions'){
2497
+ pro_popup(jQuery(this).data('attr'),'page=gawd_tracking');
2498
+ }
2499
+ else{
2500
+ pro_popup(jQuery(this).data('attr'),'page=gawd_settings');
2501
+ }
2502
+ jQuery(".gawd_pro_popup").fadeIn('fast');
2503
+ jQuery(".gawd_pro_popup_overlay").fadeIn('fast');
2504
+ jQuery(".gawd_pro_popup_overlay, .gawd_pro_popup_btn").on('click', function () {
2505
+ jQuery('.gawd_pro_popup_overlay').remove();
2506
+ jQuery('.gawd_pro_popup').remove();
2507
+ });
2508
+ });
2509
  }
2510
 
2511
 
2811
 
2812
  jQuery('.gawd_email_row').find('.gawd_email_week_day_div').hide();
2813
  jQuery('.gawd_email_row').find('.gawd_email_month_day_div').hide();
2814
+ jQuery('.gawd_email_time_row').hide();
2815
 
2816
 
2817
 
2845
  jQuery("#gawd_email_period").on('change', function () {
2846
  if (jQuery("#gawd_email_period :selected").val() == "gawd_weekly") {
2847
  jQuery(".gawd_email_week_day_div").show();
2848
+ }
2849
+ else {
2850
  jQuery(".gawd_email_week_day_div").hide();
2851
  }
2852
  if (jQuery("#gawd_email_period :selected").val() == "gawd_monthly") {
2853
  jQuery(".gawd_email_month_day_div").show();
2854
+ }
2855
+ else {
2856
  jQuery(".gawd_email_month_day_div").hide();
2857
  }
2858
+ if (jQuery("#gawd_email_period :selected").val() != "once") {
2859
+ jQuery(".gawd_email_time_row").show();
2860
+ }
2861
+ else {
2862
+ jQuery(".gawd_email_time_row").hide();
2863
+ }
2864
  })
2865
  jQuery("#email_submit").on('click', function () {
2866
  email_popup();
2904
  var gawd_email_body = jQuery("#gawd_email_body").val();
2905
  var week_day = jQuery("#gawd_email_week_day_hidden").val();
2906
  var month_day = jQuery("#gawd_email_month_day_select").val();
2907
+ var email_time = jQuery("#gawd_email_time_input").val();
2908
  var view_id = jQuery("#gawd_id option:selected").closest('optgroup').attr('label');
2909
  var empty_subject = false;
2910
  var is_valid_email = true;
2951
  gawd_email_period: gawd_email_period,
2952
  gawd_email_month_day: month_day,
2953
  gawd_email_week_day: week_day,
2954
+ email_time: email_time,
2955
  gawd_email_to: gawd_email_to,
2956
  gawd_email_from: gawd_email_from,
2957
  gawd_email_subject: gawd_email_subject,
3895
  }
3896
  });
3897
  });
3898
+ jQuery('#gawd_token').bind("enterKey",function(e){
3899
+ jQuery.ajax({
3900
+ type: 'POST',
3901
+ url: gawd_admin.ajaxurl,
3902
+ data: {
3903
+ action: 'gawd_auth',
3904
+ token: jQuery('#gawd_token').val(),
3905
+ security: gawd_admin.ajaxnonce
3906
+ },
3907
+ beforeSend: function () {
3908
+ jQuery('#opacity_div').show();
3909
+ jQuery('#loading_div').show();
3910
+ },
3911
+ success: function (r) {
3912
+ if (typeof r.status == "undefined") {
3913
+ r.status = false;
3914
+ }
3915
+
3916
+ if (true == r.status) {
3917
+ jQuery('#gawd_auth_code').hide();
3918
+ //location.reload();
3919
+ window.location.href = gawd_admin.wp_admin_url + 'admin.php?page=gawd_settings&defaultExist=1';
3920
+ } else {
3921
+ jQuery('#opacity_div').hide();
3922
+ jQuery('#loading_div').hide();
3923
+ alert(r.status);
3924
+ window.location.href = gawd_admin.wp_admin_url + 'admin.php?page=gawd_settings';
3925
+ }
3926
+ }
3927
+ });
3928
+ });
3929
+ jQuery('#gawd_token').keyup(function(e){
3930
+ if(e.keyCode == 13)
3931
+ {
3932
+ jQuery(this).trigger("enterKey");
3933
+ }
3934
+ });
3935
  }
3936
 
3937
  function gawd_remove_item(dataKey,hidden){
4026
  }).done(function (data) {
4027
  jQuery('.gawd_zoom_message').remove();
4028
  })
4029
+ }
4030
+
4031
+ function pro_popup(title, link){
4032
+ var html = '';
4033
+ var icon = gawd_admin.gawd_plugin_url + '/assets/Report_icon.png';
4034
+ html += '<div class="gawd_pro_popup_overlay">';
4035
+ html += '</div>';
4036
+ html += '<div class="gawd_pro_popup">';
4037
+ html += '<div class="close_btn_cont">';
4038
+ html += '<div href="#" class="gawd_pro_popup_btn"></div>';
4039
+ html += '</div>';
4040
+ html += '<h3>Hi There!</h3>';
4041
+ html += '<div class="img_wrap">';
4042
+ html += '<img src="' + icon + '"/>';
4043
+ html += '</div>';
4044
+ html += '<div class="gawd_pro_text">These ' + title + ' are available in the pro version.</div>';
4045
+ html += '<div style="font-size:16px;margin-bottom:20px">Check out our Demo to see these amazing ' + title + ' in action. </div>';
4046
+ html += '<span style="display: inline-block; margin-right: 15px;"><a id="gawd_buy_now" class="gawd_pro_buttons" target="_blank" href="https://web-dorado.com/products/wordpress-google-analytics-plugin.html">Buy Now</a></span>';
4047
+ html += '<span style="display: inline-block;"><a id="gawd_try_demo" class="gawd_pro_buttons" target="_blank" href="http://wpdemo.web-dorado.com/wp-admin/admin.php?' + link + '">Try Demo</a></span>';
4048
+ html += '</div>';
4049
+ jQuery('body').append(html);
4050
  }
inc/js/jquery.timepicker.min.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /*!
2
+ * jquery-timepicker v1.11.5 - A jQuery timepicker plugin inspired by Google Calendar. It supports both mouse and keyboard navigation.
3
+ * Copyright (c) 2016 Jon Thornton - http://jonthornton.github.com/jquery-timepicker/
4
+ * License: MIT
5
+ */
6
+
7
+ !function(a){"object"==typeof exports&&exports&&"object"==typeof module&&module&&module.exports===exports?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(a){var b=a[0];return b.offsetWidth>0&&b.offsetHeight>0}function c(b){if(b.minTime&&(b.minTime=t(b.minTime)),b.maxTime&&(b.maxTime=t(b.maxTime)),b.durationTime&&"function"!=typeof b.durationTime&&(b.durationTime=t(b.durationTime)),"now"==b.scrollDefault)b.scrollDefault=function(){return b.roundingFunction(t(new Date),b)};else if(b.scrollDefault&&"function"!=typeof b.scrollDefault){var c=b.scrollDefault;b.scrollDefault=function(){return b.roundingFunction(t(c),b)}}else b.minTime&&(b.scrollDefault=function(){return b.roundingFunction(b.minTime,b)});if("string"===a.type(b.timeFormat)&&b.timeFormat.match(/[gh]/)&&(b._twelveHourTime=!0),b.showOnFocus===!1&&-1!=b.showOn.indexOf("focus")&&b.showOn.splice(b.showOn.indexOf("focus"),1),b.disableTimeRanges.length>0){for(var d in b.disableTimeRanges)b.disableTimeRanges[d]=[t(b.disableTimeRanges[d][0]),t(b.disableTimeRanges[d][1])];b.disableTimeRanges=b.disableTimeRanges.sort(function(a,b){return a[0]-b[0]});for(var d=b.disableTimeRanges.length-1;d>0;d--)b.disableTimeRanges[d][0]<=b.disableTimeRanges[d-1][1]&&(b.disableTimeRanges[d-1]=[Math.min(b.disableTimeRanges[d][0],b.disableTimeRanges[d-1][0]),Math.max(b.disableTimeRanges[d][1],b.disableTimeRanges[d-1][1])],b.disableTimeRanges.splice(d,1))}return b}function d(b){var c=b.data("timepicker-settings"),d=b.data("timepicker-list");if(d&&d.length&&(d.remove(),b.data("timepicker-list",!1)),c.useSelect){d=a("<select />",{"class":"ui-timepicker-select"});var g=d}else{d=a("<ul />",{"class":"ui-timepicker-list"});var g=a("<div />",{"class":"ui-timepicker-wrapper",tabindex:-1});g.css({display:"none",position:"absolute"}).append(d)}if(c.noneOption)if(c.noneOption===!0&&(c.noneOption=c.useSelect?"Time...":"None"),a.isArray(c.noneOption)){for(var i in c.noneOption)if(parseInt(i,10)==i){var k=e(c.noneOption[i],c.useSelect);d.append(k)}}else{var k=e(c.noneOption,c.useSelect);d.append(k)}if(c.className&&g.addClass(c.className),(null!==c.minTime||null!==c.durationTime)&&c.showDuration){"function"==typeof c.step?"function":c.step;g.addClass("ui-timepicker-with-duration"),g.addClass("ui-timepicker-step-"+c.step)}var l=c.minTime;"function"==typeof c.durationTime?l=t(c.durationTime()):null!==c.durationTime&&(l=c.durationTime);var n=null!==c.minTime?c.minTime:0,o=null!==c.maxTime?c.maxTime:n+u-1;n>o&&(o+=u),o===u-1&&"string"===a.type(c.timeFormat)&&c.show2400&&(o=u);var p=c.disableTimeRanges,v=0,x=p.length,y=c.step;"function"!=typeof y&&(y=function(){return c.step});for(var i=n,z=0;o>=i;z++,i+=60*y(z)){var A=i,B=s(A,c);if(c.useSelect){var C=a("<option />",{value:B});C.text(B)}else{var C=a("<li />");C.addClass(43200>A%86400?"ui-timepicker-am":"ui-timepicker-pm"),C.data("time",86400>=A?A:A%86400),C.text(B)}if((null!==c.minTime||null!==c.durationTime)&&c.showDuration){var D=r(i-l,c.step);if(c.useSelect)C.text(C.text()+" ("+D+")");else{var E=a("<span />",{"class":"ui-timepicker-duration"});E.text(" ("+D+")"),C.append(E)}}x>v&&(A>=p[v][1]&&(v+=1),p[v]&&A>=p[v][0]&&A<p[v][1]&&(c.useSelect?C.prop("disabled",!0):C.addClass("ui-timepicker-disabled"))),d.append(C)}if(g.data("timepicker-input",b),b.data("timepicker-list",g),c.useSelect)b.val()&&d.val(f(t(b.val()),c)),d.on("focus",function(){a(this).data("timepicker-input").trigger("showTimepicker")}),d.on("blur",function(){a(this).data("timepicker-input").trigger("hideTimepicker")}),d.on("change",function(){m(b,a(this).val(),"select")}),m(b,d.val(),"initial"),b.hide().after(d);else{var F=c.appendTo;"string"==typeof F?F=a(F):"function"==typeof F&&(F=F(b)),F.append(g),j(b,d),d.on("mousedown click","li",function(c){b.off("focus.timepicker"),b.on("focus.timepicker-ie-hack",function(){b.off("focus.timepicker-ie-hack"),b.on("focus.timepicker",w.show)}),h(b)||b[0].focus(),d.find("li").removeClass("ui-timepicker-selected"),a(this).addClass("ui-timepicker-selected"),q(b)&&(b.trigger("hideTimepicker"),d.on("mouseup.timepicker click.timepicker","li",function(a){d.off("mouseup.timepicker click.timepicker"),g.hide()}))})}}function e(b,c){var d,e,f;return"object"==typeof b?(d=b.label,e=b.className,f=b.value):"string"==typeof b?d=b:a.error("Invalid noneOption value"),c?a("<option />",{value:f,"class":e,text:d}):a("<li />",{"class":e,text:d}).data("time",String(f))}function f(a,b){return a=b.roundingFunction(a,b),null!==a?s(a,b):void 0}function g(b){if(b.target!=window){var c=a(b.target);c.closest(".ui-timepicker-input").length||c.closest(".ui-timepicker-wrapper").length||(w.hide(),a(document).unbind(".ui-timepicker"),a(window).unbind(".ui-timepicker"))}}function h(a){var b=a.data("timepicker-settings");return(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&b.disableTouchKeyboard}function i(b,c,d){if(!d&&0!==d)return!1;var e=b.data("timepicker-settings"),f=!1,d=e.roundingFunction(d,e);return c.find("li").each(function(b,c){var e=a(c);if("number"==typeof e.data("time"))return e.data("time")==d?(f=e,!1):void 0}),f}function j(a,b){b.find("li").removeClass("ui-timepicker-selected");var c=t(l(a),a.data("timepicker-settings"));if(null!==c){var d=i(a,b,c);if(d){var e=d.offset().top-b.offset().top;(e+d.outerHeight()>b.outerHeight()||0>e)&&b.scrollTop(b.scrollTop()+d.position().top-d.outerHeight()),d.addClass("ui-timepicker-selected")}}}function k(b,c){if(""!==this.value&&"timepicker"!=c){var d=a(this);if(!d.is(":focus")||b&&"change"==b.type){var e=d.data("timepicker-settings"),f=t(this.value,e);if(null===f)return void d.trigger("timeFormatError");var g=!1;if(null!==e.minTime&&null!==e.maxTime&&(f<e.minTime||f>e.maxTime)&&(g=!0),a.each(e.disableTimeRanges,function(){return f>=this[0]&&f<this[1]?(g=!0,!1):void 0}),e.forceRoundTime){var h=e.roundingFunction(f,e);h!=f&&(f=h,c=null)}var i=s(f,e);g?m(d,i,"error")&&d.trigger("timeRangeError"):m(d,i,c)}}}function l(a){return a.is("input")?a.val():a.data("ui-timepicker-value")}function m(a,b,c){if(a.is("input")){a.val(b);var d=a.data("timepicker-settings");d.useSelect&&"select"!=c&&"initial"!=c&&a.data("timepicker-list").val(f(t(b),d))}return a.data("ui-timepicker-value")!=b?(a.data("ui-timepicker-value",b),"select"==c?a.trigger("selectTime").trigger("changeTime").trigger("change","timepicker"):-1==["error","initial"].indexOf(c)&&a.trigger("changeTime"),!0):(a.trigger("selectTime"),!1)}function n(a){switch(a.keyCode){case 13:case 9:return;default:a.preventDefault()}}function o(c){var d=a(this),e=d.data("timepicker-list");if(!e||!b(e)){if(40!=c.keyCode)return!0;w.show.call(d.get(0)),e=d.data("timepicker-list"),h(d)||d.focus()}switch(c.keyCode){case 13:return q(d)&&(k.call(d.get(0),{type:"change"}),w.hide.apply(this)),c.preventDefault(),!1;case 38:var f=e.find(".ui-timepicker-selected");return f.length?f.is(":first-child")||(f.removeClass("ui-timepicker-selected"),f.prev().addClass("ui-timepicker-selected"),f.prev().position().top<f.outerHeight()&&e.scrollTop(e.scrollTop()-f.outerHeight())):(e.find("li").each(function(b,c){return a(c).position().top>0?(f=a(c),!1):void 0}),f.addClass("ui-timepicker-selected")),!1;case 40:return f=e.find(".ui-timepicker-selected"),0===f.length?(e.find("li").each(function(b,c){return a(c).position().top>0?(f=a(c),!1):void 0}),f.addClass("ui-timepicker-selected")):f.is(":last-child")||(f.removeClass("ui-timepicker-selected"),f.next().addClass("ui-timepicker-selected"),f.next().position().top+2*f.outerHeight()>e.outerHeight()&&e.scrollTop(e.scrollTop()+f.outerHeight())),!1;case 27:e.find("li").removeClass("ui-timepicker-selected"),w.hide();break;case 9:w.hide();break;default:return!0}}function p(c){var d=a(this),e=d.data("timepicker-list"),f=d.data("timepicker-settings");if(!e||!b(e)||f.disableTextInput)return!0;switch(c.keyCode){case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 77:case 80:case 186:case 8:case 46:f.typeaheadHighlight?j(d,e):e.hide()}}function q(a){var b=a.data("timepicker-settings"),c=a.data("timepicker-list"),d=null,e=c.find(".ui-timepicker-selected");return e.hasClass("ui-timepicker-disabled")?!1:(e.length&&(d=e.data("time")),null!==d&&("string"!=typeof d&&(d=s(d,b)),m(a,d,"select")),!0)}function r(a,b){a=Math.abs(a);var c,d,e=Math.round(a/60),f=[];return 60>e?f=[e,v.mins]:(c=Math.floor(e/60),d=e%60,30==b&&30==d&&(c+=v.decimal+5),f.push(c),f.push(1==c?v.hr:v.hrs),30!=b&&d&&(f.push(d),f.push(v.mins))),f.join(" ")}function s(b,c){if("number"!=typeof b)return null;var d=parseInt(b%60),e=parseInt(b/60%60),f=parseInt(b/3600%24),g=new Date(1970,0,2,f,e,d,0);if(isNaN(g.getTime()))return null;if("function"===a.type(c.timeFormat))return c.timeFormat(g);for(var h,i,j="",k=0;k<c.timeFormat.length;k++)switch(i=c.timeFormat.charAt(k)){case"a":j+=g.getHours()>11?v.pm:v.am;break;case"A":j+=g.getHours()>11?v.PM:v.AM;break;case"g":h=g.getHours()%12,j+=0===h?"12":h;break;case"G":h=g.getHours(),b===u&&(h=c.show2400?24:0),j+=h;break;case"h":h=g.getHours()%12,0!==h&&10>h&&(h="0"+h),j+=0===h?"12":h;break;case"H":h=g.getHours(),b===u&&(h=c.show2400?24:0),j+=h>9?h:"0"+h;break;case"i":var e=g.getMinutes();j+=e>9?e:"0"+e;break;case"s":d=g.getSeconds(),j+=d>9?d:"0"+d;break;case"\\":k++,j+=c.timeFormat.charAt(k);break;default:j+=i}return j}function t(a,b){if(""===a||null===a)return null;if("object"==typeof a)return 3600*a.getHours()+60*a.getMinutes()+a.getSeconds();if("string"!=typeof a)return a;a=a.toLowerCase().replace(/[\s\.]/g,""),("a"==a.slice(-1)||"p"==a.slice(-1))&&(a+="m");var c="("+v.am.replace(".","")+"|"+v.pm.replace(".","")+"|"+v.AM.replace(".","")+"|"+v.PM.replace(".","")+")?",d=new RegExp("^"+c+"([0-9]?[0-9])\\W?([0-5][0-9])?\\W?([0-5][0-9])?"+c+"$"),e=a.match(d);if(!e)return null;var f=parseInt(1*e[2],10);if(f>24){if(b&&b.wrapHours===!1)return null;f%=24}var g=e[1]||e[5],h=f;if(12>=f&&g){var i=g==v.pm||g==v.PM;h=12==f?i?12:0:f+(i?12:0)}var j=1*e[3]||0,k=1*e[4]||0,l=3600*h+60*j+k;if(12>f&&!g&&b&&b._twelveHourTime&&b.scrollDefault){var m=l-b.scrollDefault();0>m&&m>=u/-2&&(l=(l+u/2)%u)}return l}var u=86400,v={am:"am",pm:"pm",AM:"AM",PM:"PM",decimal:".",mins:"mins",hr:"hr",hrs:"hrs"},w={init:function(b){return this.each(function(){var e=a(this),f=[];for(var g in a.fn.timepicker.defaults)e.data(g)&&(f[g]=e.data(g));var h=a.extend({},a.fn.timepicker.defaults,f,b);if(h.lang&&(v=a.extend(v,h.lang)),h=c(h),e.data("timepicker-settings",h),e.addClass("ui-timepicker-input"),h.useSelect)d(e);else{if(e.prop("autocomplete","off"),h.showOn)for(var i in h.showOn)e.on(h.showOn[i]+".timepicker",w.show);e.on("change.timepicker",k),e.on("keydown.timepicker",o),e.on("keyup.timepicker",p),h.disableTextInput&&e.on("keydown.timepicker",n),k.call(e.get(0),null,"initial")}})},show:function(c){var e=a(this),f=e.data("timepicker-settings");if(c&&c.preventDefault(),f.useSelect)return void e.data("timepicker-list").focus();h(e)&&e.blur();var k=e.data("timepicker-list");if(!e.prop("readonly")&&(k&&0!==k.length&&"function"!=typeof f.durationTime||(d(e),k=e.data("timepicker-list")),!b(k))){e.data("ui-timepicker-value",e.val()),j(e,k),w.hide(),k.show();var m={};f.orientation.match(/r/)?m.left=e.offset().left+e.outerWidth()-k.outerWidth()+parseInt(k.css("marginLeft").replace("px",""),10):m.left=e.offset().left+parseInt(k.css("marginLeft").replace("px",""),10);var n;n=f.orientation.match(/t/)?"t":f.orientation.match(/b/)?"b":e.offset().top+e.outerHeight(!0)+k.outerHeight()>a(window).height()+a(window).scrollTop()?"t":"b","t"==n?(k.addClass("ui-timepicker-positioned-top"),m.top=e.offset().top-k.outerHeight()+parseInt(k.css("marginTop").replace("px",""),10)):(k.removeClass("ui-timepicker-positioned-top"),m.top=e.offset().top+e.outerHeight()+parseInt(k.css("marginTop").replace("px",""),10)),k.offset(m);var o=k.find(".ui-timepicker-selected");if(!o.length){var p=t(l(e));null!==p?o=i(e,k,p):f.scrollDefault&&(o=i(e,k,f.scrollDefault()))}if(o&&o.length){var q=k.scrollTop()+o.position().top-o.outerHeight();k.scrollTop(q)}else k.scrollTop(0);return f.stopScrollPropagation&&a(document).on("wheel.ui-timepicker",".ui-timepicker-wrapper",function(b){b.preventDefault();var c=a(this).scrollTop();a(this).scrollTop(c+b.originalEvent.deltaY)}),a(document).on("touchstart.ui-timepicker mousedown.ui-timepicker",g),a(window).on("resize.ui-timepicker",g),f.closeOnWindowScroll&&a(document).on("scroll.ui-timepicker",g),e.trigger("showTimepicker"),this}},hide:function(c){var d=a(this),e=d.data("timepicker-settings");return e&&e.useSelect&&d.blur(),a(".ui-timepicker-wrapper").each(function(){var c=a(this);if(b(c)){var d=c.data("timepicker-input"),e=d.data("timepicker-settings");e&&e.selectOnBlur&&q(d),c.hide(),d.trigger("hideTimepicker")}}),this},option:function(b,e){return"string"==typeof b&&"undefined"==typeof e?a(this).data("timepicker-settings")[b]:this.each(function(){var f=a(this),g=f.data("timepicker-settings"),h=f.data("timepicker-list");"object"==typeof b?g=a.extend(g,b):"string"==typeof b&&(g[b]=e),g=c(g),f.data("timepicker-settings",g),h&&(h.remove(),f.data("timepicker-list",!1)),g.useSelect&&d(f)})},getSecondsFromMidnight:function(){return t(l(this))},getTime:function(a){var b=this,c=l(b);if(!c)return null;var d=t(c);if(null===d)return null;a||(a=new Date);var e=new Date(a);return e.setHours(d/3600),e.setMinutes(d%3600/60),e.setSeconds(d%60),e.setMilliseconds(0),e},isVisible:function(){var a=this,c=a.data("timepicker-list");return!(!c||!b(c))},setTime:function(a){var b=this,c=b.data("timepicker-settings");if(c.forceRoundTime)var d=f(t(a),c);else var d=s(t(a),c);return a&&null===d&&c.noneOption&&(d=a),m(b,d),b.data("timepicker-list")&&j(b,b.data("timepicker-list")),this},remove:function(){var a=this;if(a.hasClass("ui-timepicker-input")){var b=a.data("timepicker-settings");return a.removeAttr("autocomplete","off"),a.removeClass("ui-timepicker-input"),a.removeData("timepicker-settings"),a.off(".timepicker"),a.data("timepicker-list")&&a.data("timepicker-list").remove(),b.useSelect&&a.show(),a.removeData("timepicker-list"),this}}};a.fn.timepicker=function(b){return this.length?w[b]?this.hasClass("ui-timepicker-input")?w[b].apply(this,Array.prototype.slice.call(arguments,1)):this:"object"!=typeof b&&b?void a.error("Method "+b+" does not exist on jQuery.timepicker"):w.init.apply(this,arguments):this},a.fn.timepicker.defaults={appendTo:"body",className:null,closeOnWindowScroll:!1,disableTextInput:!1,disableTimeRanges:[],disableTouchKeyboard:!1,durationTime:null,forceRoundTime:!1,maxTime:null,minTime:null,noneOption:!1,orientation:"l",roundingFunction:function(a,b){if(null===a)return null;if("number"!=typeof b.step)return a;var c=a%(60*b.step);return c>=30*b.step?a+=60*b.step-c:a-=c,a==u&&b.show2400?a:a%u},scrollDefault:null,selectOnBlur:!1,show2400:!1,showDuration:!1,showOn:["click","focus"],showOnFocus:!0,step:30,stopScrollPropagation:!1,timeFormat:"g:ia",typeaheadHighlight:!0,useSelect:!1,wrapHours:!0}});
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-google-analytics-plugin.h
4
  Tags: google analytics, google analytics dashboard, statistics, tracking, analytics, analytics dashboard, stats, ga, googleanalytics, ecommerce tracking, custom reports, custom dimensions
5
  Requires at least: 3.9
6
  Tested up to: 4.6
7
- Stable tag: 1.0.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -98,6 +98,12 @@ Upgrade to Google Analytics WD Pro for premium features:
98
 
99
  == Changelog ==
100
 
 
 
 
 
 
 
101
  = 1.0.8 =
102
  Added: Google Analytics reports for custom post types
103
  Added: New icon in the menu
4
  Tags: google analytics, google analytics dashboard, statistics, tracking, analytics, analytics dashboard, stats, ga, googleanalytics, ecommerce tracking, custom reports, custom dimensions
5
  Requires at least: 3.9
6
  Tested up to: 4.6
7
+ Stable tag: 1.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
98
 
99
  == Changelog ==
100
 
101
+ = 1.0.9 =
102
+ Added: Option to select the time of the day for scheduled emails
103
+ Changed: Save authenticate code with enter button
104
+ Changed: Select permissions for user groups in a pop-up (Settings page)
105
+ Fixed: minor bugs
106
+
107
  = 1.0.8 =
108
  Added: Google Analytics reports for custom post types
109
  Added: New icon in the menu