Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram - Version 1.10.15

Version Description

Added Christmas Gallery templates

Download this release

Release Info

Developer Icegram
Plugin Icon 128x128 Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram
Version 1.10.15
Comparing to
See all releases

Code changes from version 1.10.14 to 1.10.15

Files changed (122) hide show
  1. assets/images/christmas.png +0 -0
  2. icegram.php +5 -89
  3. ig-offer.php +21 -23
  4. ig-survey.php +0 -346
  5. readme.txt +9 -3
  6. trunk/about-icegram.php +301 -0
  7. trunk/addons.php +207 -0
  8. trunk/assets/css/admin.min.css +9 -0
  9. trunk/assets/css/frontend.min.css +1 -0
  10. trunk/assets/images/animated-overlay.gif +0 -0
  11. trunk/assets/images/arrows-sprite.png +0 -0
  12. trunk/assets/images/chosen-sprite.png +0 -0
  13. trunk/assets/images/christmas.png +0 -0
  14. trunk/assets/images/clear-footer.png +0 -0
  15. trunk/assets/images/clear-header.png +0 -0
  16. trunk/assets/images/clear-option.png +0 -0
  17. trunk/assets/images/desktop.png +0 -0
  18. trunk/assets/images/from_layouts.png +0 -0
  19. trunk/assets/images/halloween.png +0 -0
  20. trunk/assets/images/icegram-logo-16bit-gray-30.png +0 -0
  21. trunk/assets/images/icegram-logo-branding-18-white.png +0 -0
  22. trunk/assets/images/icegram-logo-branding-64-grey.png +0 -0
  23. trunk/assets/images/icegram-logo-branding-64-white.png +0 -0
  24. trunk/assets/images/icegram-logo-branding-64.png +0 -0
  25. trunk/assets/images/ig-growth-rocket_2.png +0 -0
  26. trunk/assets/images/popup-amaze-bg.jpg +0 -0
  27. trunk/assets/images/popup-close.png +0 -0
  28. trunk/assets/images/sketch-action-bar.png +0 -0
  29. trunk/assets/images/sketch-messenger.png +0 -0
  30. trunk/assets/images/sketch-multiple-sequence.png +0 -0
  31. trunk/assets/images/sketch-popup.png +0 -0
  32. trunk/assets/images/sketch-rules.png +0 -0
  33. trunk/assets/images/sketch-toast-notification.png +0 -0
  34. trunk/assets/images/social-img.png +0 -0
  35. trunk/assets/images/spinner-2x.gif +0 -0
  36. trunk/assets/images/sprite_1.png +0 -0
  37. trunk/assets/images/stand-out.png +0 -0
  38. trunk/assets/images/style_0.png +0 -0
  39. trunk/assets/images/style_1.png +0 -0
  40. trunk/assets/images/style_2.png +0 -0
  41. trunk/assets/images/style_3.png +0 -0
  42. trunk/assets/images/style_4.png +0 -0
  43. trunk/assets/images/talk-close.png +0 -0
  44. trunk/assets/images/talk-footer-1.png +0 -0
  45. trunk/assets/images/talk-header-1.png +0 -0
  46. trunk/assets/images/talk-header-2.png +0 -0
  47. trunk/assets/images/toast-glow.png +0 -0
  48. trunk/assets/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  49. trunk/assets/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  50. trunk/assets/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  51. trunk/assets/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  52. trunk/assets/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  53. trunk/assets/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  54. trunk/assets/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  55. trunk/assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  56. trunk/assets/images/ui-icons_222222_256x240.png +0 -0
  57. trunk/assets/images/ui-icons_2e83ff_256x240.png +0 -0
  58. trunk/assets/images/ui-icons_454545_256x240.png +0 -0
  59. trunk/assets/images/ui-icons_888888_256x240.png +0 -0
  60. trunk/assets/images/ui-icons_cd0a0a_256x240.png +0 -0
  61. trunk/assets/js/admin.min.js +22 -0
  62. trunk/assets/js/gallery.min.js +1 -0
  63. trunk/assets/js/icegram.min.js +1 -0
  64. trunk/assets/js/main.min.js +1 -0
  65. trunk/classes/class-icegram-cache.php +106 -0
  66. trunk/classes/class-icegram-campaign-admin.php +770 -0
  67. trunk/classes/class-icegram-campaign.php +177 -0
  68. trunk/classes/class-icegram-compat.php +24 -0
  69. trunk/classes/class-icegram-message-admin.php +795 -0
  70. trunk/classes/class-icegram-message-type.php +109 -0
  71. trunk/classes/class-icegram-message.php +23 -0
  72. trunk/classes/compat/class-icegram-compat-contact-form-7.php +108 -0
  73. trunk/classes/compat/class-icegram-compat-gravityforms.php +48 -0
  74. trunk/classes/ig-mobile-detect.php +1458 -0
  75. trunk/gallery.php +144 -0
  76. trunk/icegram.php +1677 -0
  77. trunk/ig-offer.php +72 -0
  78. trunk/lang/icegram-de_DE.mo +0 -0
  79. trunk/lang/icegram-de_DE.po +1125 -0
  80. trunk/lang/icegram-it_IT.mo +0 -0
  81. trunk/lang/icegram-it_IT.po +1134 -0
  82. trunk/lang/src/icegram.pot +1248 -0
  83. trunk/message-types/action-bar/default.css +1 -0
  84. trunk/message-types/action-bar/main.js +1 -0
  85. trunk/message-types/action-bar/main.php +37 -0
  86. trunk/message-types/action-bar/themes/action-bar.min.css +1 -0
  87. trunk/message-types/action-bar/themes/air-mail.png +0 -0
  88. trunk/message-types/action-bar/themes/bold.png +0 -0
  89. trunk/message-types/action-bar/themes/hello.png +0 -0
  90. trunk/message-types/action-bar/themes/solid.png +0 -0
  91. trunk/message-types/messenger/default.css +1 -0
  92. trunk/message-types/messenger/main.js +1 -0
  93. trunk/message-types/messenger/main.php +38 -0
  94. trunk/message-types/messenger/themes/canvas.png +0 -0
  95. trunk/message-types/messenger/themes/clear.png +0 -0
  96. trunk/message-types/messenger/themes/messenger.min.css +1 -0
  97. trunk/message-types/messenger/themes/social.png +0 -0
  98. trunk/message-types/messenger/themes/talk.png +0 -0
  99. trunk/message-types/popup/default.css +1 -0
  100. trunk/message-types/popup/main.js +1 -0
  101. trunk/message-types/popup/main.php +54 -0
  102. trunk/message-types/popup/themes/air-mail.png +0 -0
  103. trunk/message-types/popup/themes/amaze.png +0 -0
  104. trunk/message-types/popup/themes/compel.png +0 -0
  105. trunk/message-types/popup/themes/convert.png +0 -0
  106. trunk/message-types/popup/themes/inspire.png +0 -0
  107. trunk/message-types/popup/themes/persuade.png +0 -0
  108. trunk/message-types/popup/themes/popup.min.css +1 -0
  109. trunk/message-types/toast/default.css +1 -0
  110. trunk/message-types/toast/main.js +1 -0
  111. trunk/message-types/toast/main.php +36 -0
  112. trunk/message-types/toast/themes/announce.png +0 -0
  113. trunk/message-types/toast/themes/balance.png +0 -0
  114. trunk/message-types/toast/themes/burnt.png +0 -0
  115. trunk/message-types/toast/themes/clear.png +0 -0
  116. trunk/message-types/toast/themes/night-glow.png +0 -0
  117. trunk/message-types/toast/themes/stand-out.png +0 -0
  118. trunk/message-types/toast/themes/toast.min.css +1 -0
  119. trunk/readme.txt +747 -0
  120. trunk/settings.php +44 -0
  121. trunk/updates/icegram-update-1.2.php +70 -0
  122. trunk/wpml-config.xml +6 -0
assets/images/christmas.png ADDED
Binary file
icegram.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Icegram - Popups, Optins, CTAs & lot more...
4
  * Plugin URI: https://www.icegram.com/
5
  * Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
6
- * Version: 1.10.14
7
  * Author: icegram
8
  * Author URI: https://www.icegram.com/
9
  * Copyright (c) 2014-16 Icegram
@@ -34,7 +34,7 @@ class Icegram {
34
 
35
  function __construct() {
36
 
37
- $this->version = "1.10.14";
38
  $this->shortcode_instances = array();
39
  $this->mode = 'local';
40
  $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
@@ -153,20 +153,17 @@ class Icegram {
153
  if ( !in_array( $screen->id, array( 'ig_campaign', 'ig_message','edit-ig_message','edit-ig_campaign' ), true ) ) return;
154
  $timezone_format = _x('Y-m-d', 'timezone date format');
155
  $ig_current_date = strtotime(date_i18n($timezone_format));
156
- $ig_offer_start = strtotime("2017-11-16");
157
- $ig_offer_end = strtotime("2017-11-28");
158
  if(($ig_current_date >= $ig_offer_start) && ($ig_current_date <= $ig_offer_end)) {
159
  include_once('ig-offer.php');
160
- }else{
161
- include_once('ig-survey.php');
162
-
163
  }
164
  }
165
  public function dismiss_admin_notice(){
166
  if(isset($_GET['ig_dismiss_admin_notice']) && $_GET['ig_dismiss_admin_notice'] == '1' && isset($_GET['ig_option_name'])){
167
  $option_name = sanitize_text_field($_GET['ig_option_name']);
168
  update_option($option_name.'_icegram', true);
169
- header("Location: https://www.icegram.com/?utm_source=in_app&utm_medium=ig_banner&utm_campaign=bfcm2017_revised");
170
  exit();
171
  }
172
  }
@@ -1663,87 +1660,6 @@ class Icegram {
1663
  return $request_data;
1664
  }
1665
 
1666
- public static function ig_get_survey_data(){
1667
- global $wpdb;
1668
- $ig_survey_data = array();
1669
- // active plugin on site
1670
- $active_plugins = (array) get_option('active_plugins', array());
1671
- if (is_multisite()) {
1672
- $active_plugins = array_merge($active_plugins, get_site_option('active_sitewide_plugins', array()));
1673
- }
1674
- $active_plugins = array_unique( array_merge( array_values($active_plugins), array_keys($active_plugins)) );
1675
- $ig_plan = get_option('ig_engage_plan');
1676
- $ig_survey_data['ig_plan'] = $ig_plan;
1677
- $ig_survey_data['ig_is_rm'] = (in_array('icegram-rainmaker/icegram-rainmaker.php', $active_plugins)) ? true : false;
1678
- $ig_survey_data['ig_is_es'] = (in_array('email-subscribers/email-subscribers.php', $active_plugins)) ? true : false;
1679
-
1680
- $timezone_format = _x('Y-m-d', 'timezone date format');
1681
- $ig_current_date = date_i18n($timezone_format);
1682
- $sql = "SELECT COUNT(id) AS count_id,
1683
- month_post_date,
1684
- year_post_date,
1685
- max(post_date) as max_post_date,
1686
- max(post_modified) as max_post_modified
1687
- FROM (SELECT ID, MONTH(post_date) as month_post_date, YEAR(post_date) as year_post_date, post_date, post_modified FROM `{$wpdb->prefix}posts` WHERE `post_type` = 'ig_campaign') as temp
1688
- GROUP BY month_post_date, year_post_date
1689
- order by year_post_date DESC, month_post_date DESC";
1690
- $result = $wpdb->get_results( $sql, ARRAY_A );
1691
-
1692
- $ig_survey_data['ig_draft_campaign'] = wp_count_posts('ig_campaign')->draft;
1693
- $ig_survey_data['ig_published_campaign'] = wp_count_posts('ig_campaign')->publish;
1694
- $ig_survey_data['ig_last_modified_campaign'] = $result[0]['max_post_modified'];
1695
- $ig_survey_data['ig_last_publish_campaign'] = $result[0]['max_post_date'];
1696
-
1697
- return $ig_survey_data;
1698
- }
1699
-
1700
- //Function for submitting the sm survey data
1701
- function ig_submit_survey() {
1702
- $url = 'https://www.icegram.com/wp-admin/admin-ajax.php';
1703
-
1704
- if( !empty($_POST['btn-val']) && $_POST['btn-val'] == 'no' ) {
1705
- update_option('ig_survey_done', true);
1706
- exit();
1707
- }
1708
- if( !empty( $_POST ) ) {
1709
- $params = $_POST;
1710
- $params['domain'] = home_url();
1711
- $params['action'] = 'submit_survey';
1712
- } else {
1713
- exit();
1714
- }
1715
-
1716
- $method = 'POST';
1717
- $qs = http_build_query( $params );
1718
- $options = array(
1719
- 'timeout' => 15,
1720
- 'method' => $method
1721
- );
1722
-
1723
- if ( $method == 'POST' ) {
1724
- $options['body'] = $qs;
1725
- } else {
1726
- if ( strpos( $url, '?' ) !== false ) {
1727
- $url .= '&'.$qs;
1728
- } else {
1729
- $url .= '?'.$qs;
1730
- }
1731
- }
1732
-
1733
- $response = wp_remote_request( $url, $options );
1734
- if ( wp_remote_retrieve_response_code( $response ) == 200 ) {
1735
- $data = json_decode($response['body'], true);
1736
-
1737
- if ( empty($data['error']) ) {
1738
- if(!empty($data) && !empty($data['success'])){
1739
- update_option('ig_survey_done', true);
1740
- }
1741
- echo ( json_encode($data) );
1742
- exit();
1743
- }
1744
- }
1745
- exit();
1746
- }
1747
  }
1748
 
1749
 
3
  * Plugin Name: Icegram - Popups, Optins, CTAs & lot more...
4
  * Plugin URI: https://www.icegram.com/
5
  * Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
6
+ * Version: 1.10.15
7
  * Author: icegram
8
  * Author URI: https://www.icegram.com/
9
  * Copyright (c) 2014-16 Icegram
34
 
35
  function __construct() {
36
 
37
+ $this->version = "1.10.15";
38
  $this->shortcode_instances = array();
39
  $this->mode = 'local';
40
  $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
153
  if ( !in_array( $screen->id, array( 'ig_campaign', 'ig_message','edit-ig_message','edit-ig_campaign' ), true ) ) return;
154
  $timezone_format = _x('Y-m-d', 'timezone date format');
155
  $ig_current_date = strtotime(date_i18n($timezone_format));
156
+ $ig_offer_start = strtotime("2017-12-18");
157
+ $ig_offer_end = strtotime("2017-12-26");
158
  if(($ig_current_date >= $ig_offer_start) && ($ig_current_date <= $ig_offer_end)) {
159
  include_once('ig-offer.php');
 
 
 
160
  }
161
  }
162
  public function dismiss_admin_notice(){
163
  if(isset($_GET['ig_dismiss_admin_notice']) && $_GET['ig_dismiss_admin_notice'] == '1' && isset($_GET['ig_option_name'])){
164
  $option_name = sanitize_text_field($_GET['ig_option_name']);
165
  update_option($option_name.'_icegram', true);
166
+ header("Location: https://www.icegram.com/?utm_source=in_app&utm_medium=ig_banner&utm_campaign=christmas2017_30");
167
  exit();
168
  }
169
  }
1660
  return $request_data;
1661
  }
1662
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1663
  }
1664
 
1665
 
ig-offer.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
- if( get_option('ig_offer_bfcm_done_icegram') == 1 ) return;
3
  ?>
4
  <style type="text/css">
5
  .ig_offer{
6
- width: 95%;
7
  height: auto;
8
  margin: 1em auto;
9
  text-align: center;
10
- background-color: #000;
11
  font-size: 1.2em;
12
- font-family: sans-serif;
13
  letter-spacing: 3px;
14
  line-height: 1.2em;
15
  padding: 2em;
 
 
 
 
16
  }
17
  .ig_offer_heading{
18
  color: #64badd;
@@ -28,19 +32,9 @@
28
  line-height: 1.2em;
29
  position: relative;
30
  }
31
- .ig_main_heading:after{
32
- content: '';
33
- position: absolute;
34
- width: 60%;
35
- margin-left: 20%;
36
- left: 0;
37
- bottom: -0.6em;
38
- border-bottom: 1px solid #64badd;
39
- border-bottom: 1px solid #64ddc1;
40
- }
41
  .ig_text{
42
  font-size: 0.9em;
43
- display: -webkit-inline-box;
44
  }
45
  .ig_left_text{
46
  padding: 0.6em 5.4em 0.6em;
@@ -49,26 +43,30 @@
49
  .ig_right_text{
50
  color: #FFFFFF;
51
  font-weight: 600;
52
- border: 1px solid #64badd;
53
- border: 1px solid #64ddc1;
54
- border-top: 0;
55
  max-width: 50%;
56
  padding: 10px 56px;
57
  width: auto;
58
  margin: 0;
59
  display: inline-block;
60
  text-decoration: none;
 
61
  }
62
  .ig_right_text:hover, .ig_right_text:active{
63
  color: inherit;
64
  }
 
 
 
65
  </style>
66
  <div class="ig_offer">
67
  <div style="float:right;"><img src="<?php echo $this->plugin_url ?>/assets/images/icegram-logo-16bit-gray-30.png"/></div>
68
- <div class="ig_offer_heading">BLACK FRIDAY & CYBER MONDAY SALE</div>
69
- <div class="ig_main_heading">GET FLAT 30% OFF STOREWIDE</div>
 
70
  <div class="ig_text">
71
- <div class="ig_left_text">VALID TILL 28TH NOV 2017</div>
72
- <a href="?ig_dismiss_admin_notice=1&ig_option_name=ig_offer_bfcm_done" target="_blank" class="ig_right_text">SHOP NOW</a>
73
- </div>
 
 
74
  </div>
1
  <?php
2
+ if( get_option('ig_offer_christmas_done_icegram') == 1 ) return;
3
  ?>
4
  <style type="text/css">
5
  .ig_offer{
6
+ width: 90%;
7
  height: auto;
8
  margin: 1em auto;
9
  text-align: center;
10
+ background-color: #00003a;
11
  font-size: 1.2em;
12
+ /*font-family: sans-serif;*/
13
  letter-spacing: 3px;
14
  line-height: 1.2em;
15
  padding: 2em;
16
+ background-image: url('<?php echo $this->plugin_url ?>/assets/images/christmas.png');
17
+ background-repeat: no-repeat;
18
+ background-size: contain;
19
+ background-position: left;
20
  }
21
  .ig_offer_heading{
22
  color: #64badd;
32
  line-height: 1.2em;
33
  position: relative;
34
  }
35
+
 
 
 
 
 
 
 
 
 
36
  .ig_text{
37
  font-size: 0.9em;
 
38
  }
39
  .ig_left_text{
40
  padding: 0.6em 5.4em 0.6em;
43
  .ig_right_text{
44
  color: #FFFFFF;
45
  font-weight: 600;
 
 
 
46
  max-width: 50%;
47
  padding: 10px 56px;
48
  width: auto;
49
  margin: 0;
50
  display: inline-block;
51
  text-decoration: none;
52
+ background: #b70f0f;
53
  }
54
  .ig_right_text:hover, .ig_right_text:active{
55
  color: inherit;
56
  }
57
+ .ig_offer_content{
58
+ margin-left: 15%;
59
+ }
60
  </style>
61
  <div class="ig_offer">
62
  <div style="float:right;"><img src="<?php echo $this->plugin_url ?>/assets/images/icegram-logo-16bit-gray-30.png"/></div>
63
+ <div class="ig_offer_content">
64
+ <div class="ig_offer_heading">It's time to be merry! </div>
65
+ <div class="ig_main_heading">Grab FLAT 20% OFF Storewide </div>
66
  <div class="ig_text">
67
+ <div class="ig_left_text" style="font-size:1.1em;">Offer applicable on all premium plans of <span style="color:#64ddc1;font-weight:bold">Icegram, Rainmaker & Email Subscribers</span></div>
68
+ <a href="?ig_dismiss_admin_notice=1&ig_option_name=ig_offer_christmas_done" target="_blank" class="ig_right_text">Start Shopping</a>
69
+ <div class="ig_left_text">Offer ends on 26th December, 2017 - so hurry.. </div>
70
+ </div>
71
+ </div>
72
  </div>
ig-survey.php DELETED
@@ -1,346 +0,0 @@
1
- <?php
2
- if(!defined('IG_SURVEY_TDOMAIN')) define('IG_SURVEY_TDOMAIN', 'icegram');
3
- $screen = get_current_screen();
4
- if ( !in_array( $screen->id, array( 'ig_campaign', 'ig_message','edit-ig_message','edit-ig_campaign' ), true ) ) return;
5
- if( get_option('ig_survey_done') == 1 ) return;
6
- $timezone_format = _x('Y-m-d H:m:s', 'timezone date format');
7
- $ig_current_date = date_i18n($timezone_format);
8
- $ig_update_date = get_option('ig_update_v_1_10_9_date');
9
-
10
- if ( $ig_update_date === false ) {
11
- $ig_update_date = $ig_current_date;
12
- add_option('ig_update_v_1_10_9_date',$ig_update_date);
13
- }
14
-
15
- $date_diff = floor( ( strtotime($ig_current_date) - strtotime($ig_update_date) ) / (3600 * 24) );
16
- if($date_diff < 5) return;
17
-
18
- $ig_data = Icegram::ig_get_survey_data();
19
- $publish_days_diff = human_time_diff(strtotime($ig_data['ig_last_publish_campaign']),strtotime($ig_current_date));
20
- $edit_days_diff = human_time_diff(strtotime($ig_data['ig_last_modified_campaign']),strtotime($ig_current_date));
21
- ?>
22
- <style type="text/css">
23
- a.ig-admin-btn {
24
- margin-left: 10px;
25
- padding: 4px 8px;
26
- position: relative;
27
- text-decoration: none;
28
- border: none;
29
- -webkit-border-radius: 2px;
30
- border-radius: 2px;
31
- background: #e0e0e0;
32
- text-shadow: none;
33
- font-weight: 600;
34
- font-size: 13px;
35
- }
36
- a.ig-admin-btn-secondary {
37
- background: #fafafa;
38
- margin-left: 20px;
39
- font-weight: 400;
40
- }
41
-
42
- a.ig-admin-btn:hover {
43
- color: #FFF;
44
- background-color: #363b3f;
45
- }
46
- .ig-form-container .ig-form-field {
47
- display: inline-block;
48
- }
49
- .ig-form-container .ig-form-field:not(:first-child) {
50
- margin-left: 4%;
51
- }
52
- .ig-form-container {
53
- background-color: rgb(0, 115, 130) !important;
54
- /*background-color: rgb(2, 157, 177) !important;*/
55
- border-radius: 0.618em;
56
- margin-top: 1%;
57
- padding: 1em 1em 0.5em 1em;
58
- box-shadow: 0 0 7px 0 rgba(0, 0, 0, .2);
59
- color: #FFF;
60
- font-size: 1.1em;
61
- height: 17em;
62
- }
63
- .ig-form-wrapper {
64
- margin-bottom:0.4em;
65
- }
66
- .ig-form-headline div.ig-mainheadline {
67
- font-weight: bold;
68
- font-size: 1.618em;
69
- line-height: 1.8em;
70
- }
71
- .ig-form-headline div.ig-subheadline {
72
- padding-bottom: 0.4em;
73
- font-family: Georgia, Palatino, serif;
74
- font-size: 1.2em;
75
- color: #ffd965;
76
- }
77
- .ig-survey-ques {
78
- font-size:1.1em;
79
- padding-bottom: 0.3em;
80
- }
81
- .ig-form-field label {
82
- font-size:0.9em;
83
- margin-left: 0.2em;
84
- }
85
- .ig-survey-next,.ig-button {
86
- box-shadow: 0 1px 0 #03a025;
87
- font-weight: bold;
88
- height: 2em;
89
- line-height: 1em;
90
- }
91
- .ig-survey-next,.ig-button.primary {
92
- color: #FFFFFF!important;
93
- border-color: #a7c53c !important;
94
- background: #a7c53c !important;
95
- box-shadow: none;
96
- padding: 0 3.6em;
97
- }
98
- .ig-button.secondary {
99
- color: #545454!important;
100
- border-color: #d9dcda!important;
101
- background: rgba(243, 243, 243, 0.83) !important;
102
- }
103
- .ig-loader-wrapper {
104
- position: absolute;
105
- display: none;
106
- left: 53%;
107
- margin-top: 0.4em;
108
- margin-left: 4em;
109
- }
110
- .ig-loader-wrapper img {
111
- width: 50%;
112
- }
113
- .ig-msg-wrap {
114
- display: none;
115
- text-align: center;
116
- }
117
- .ig-msg-wrap .ig-msg-text {
118
- padding: 1%;
119
- font-size: 2em;
120
- }
121
- .ig-form-field.ig-left {
122
- margin-bottom: 0.6em;
123
- width: 32%;
124
- display: inline-block;
125
- float: left;
126
- }
127
- .ig-form-field.ig-right {
128
- margin-left: 3%;
129
- width: 64%;
130
- display: inline-block;
131
- }
132
- .ig-profile-txt:before {
133
- font-family: dashicons;
134
- content: "\f345";
135
- vertical-align: middle;
136
- }
137
- .ig-profile-txt {
138
- font-size: 0.9em;
139
- }
140
- .ig-right-info .ig-right {
141
- width: 35%;
142
- display: inline-block;
143
- float: right;
144
- margin-top: 2em;
145
- }
146
- .ig-right-info .ig-left {
147
- width: 65%;
148
- display: inline-block;
149
- }
150
- .ig-form-wrapper form {
151
- margin-top: 0.6em;
152
- }
153
- .ig-right-info label {
154
- padding: 0.5em 0.5em 0 0;
155
- /*font-size: 0.8em;*/
156
- /*text-transform: uppercase;*/
157
- color: rgba(239, 239, 239, 0.98);
158
- display: block;
159
- }
160
- .ig-list-item {
161
- margin-bottom: 0.9em;
162
- display: none;
163
- margin-top: 0.5em;
164
- }
165
- .ig-rocket {
166
- position: absolute;
167
- top: 2.5em;
168
- right: 1.8%;
169
- }
170
- #ig-no {
171
- box-shadow: none;
172
- cursor: pointer;
173
- color: #c3bfbf;
174
- text-decoration: underline;
175
- width: 100%;
176
- display: inline-block;
177
- margin: 0 auto;
178
- margin-left: 11em;
179
- margin-top: 0.2em;
180
- }
181
- .ig-clearfix:after {
182
- content: ".";
183
- display: block;
184
- clear: both;
185
- visibility: hidden;
186
- line-height: 0;
187
- height: 0;
188
- }
189
-
190
- .ig-survey-next {
191
- text-decoration: none;
192
- color: #fff;
193
- }
194
- .ig-list-item textarea{
195
- width: 70%;
196
- margin-top: 0.5em;
197
- }
198
- </style>
199
- <script type="text/javascript">
200
- jQuery(function() {
201
- jQuery('.ig-list-item:nth-child(2)').show();
202
- jQuery('.ig-list-item:nth-child(2)').addClass('current');
203
- jQuery('.ig-form-container').on('click', '.ig-survey-next', function(){
204
- var count = jQuery('.ig-counter').data('count');
205
- if(count < 5){
206
- count = parseInt(count) + 1;
207
- jQuery('.ig-counter').data('count', count);
208
- if(count == 3){
209
- jQuery('.ig-counter').show();
210
- }else{
211
- jQuery('.ig-counter').hide();
212
- }
213
- }
214
- jQuery('.ig-list-item.current').hide();
215
- jQuery('.ig-list-item.current').next().show().addClass('current');
216
- jQuery('.ig-list-item.current').prev('.ig-list-item').hide();
217
- if(jQuery('.ig-list-item.current').is(':last-child')){
218
- jQuery('.ig-survey-next').hide();
219
-
220
- }
221
- });
222
-
223
- });
224
- </script>
225
-
226
-
227
-
228
- <div class="ig-form-container wrap">
229
- <div class="ig-form-wrapper">
230
- <div class="ig-form-headline">
231
- <div class="ig-mainheadline"><?php _e('Icegram', IG_SURVEY_TDOMAIN); ?> <u><?php _e('is getting even better!', IG_SURVEY_TDOMAIN); ?></u></div>
232
- <div class="ig-subheadline"><?php _e('But we need your help..', IG_SURVEY_TDOMAIN); ?> <strong><?php _e('(Please, take this 2 minute survey) ', IG_SURVEY_TDOMAIN); ?></strong></div>
233
- </div>
234
- <form name="ig-survey-form" action="#" method="POST" accept-charset="utf-8">
235
- <div class="ig-container-1 ig-clearfix">
236
- <div class="ig-form-field ig-left">
237
- <div class="ig-profile">
238
- <div class="ig-profile-info">
239
- <div style="font-size: 1.218em;padding-bottom: 0.5em;display: block;font-weight: bold;color: #ffd3a2;"><?php echo __("Your Icegram usage has been great, here's a quick snapshot: ",IG_SURVEY_TDOMAIN); ?></div>
240
- <ul style="margin: 0 0.5em;">
241
- <li class="ig-profile-txt">You published a total of <?php echo $ig_data['ig_published_campaign']?> campaigns till date.</li>
242
- <li class="ig-profile-txt">Your last campaign was published <?php echo $publish_days_diff?> back.</li>
243
- <li class="ig-profile-txt">And you edited a campaign <?php echo $edit_days_diff ?> back. </li>
244
- <input type="hidden" name="ig_data[ig_plan]" value="<?php echo $ig_data['ig_plan']; ?>">
245
- <input type="hidden" name="ig_data[ig_is_rm]" value="<?php echo $ig_data['ig_is_rm']; ?>">
246
- <input type="hidden" name="ig_data[ig_is_es]" value="<?php echo $ig_data['ig_is_es']; ?>">
247
- <input type="hidden" name="ig_data[ig_draft_campaign]" value="<?php echo $ig_data['ig_draft_campaign']; ?>">
248
- <input type="hidden" name="ig_data[ig_published_campaign]" value="<?php echo $ig_data['ig_published_campaign']; ?>">
249
- <input type="hidden" name="ig_data[ig_last_modified_campaign]" value="<?php echo $ig_data['ig_last_modified_campaign']; ?>">
250
- <input type="hidden" name="ig_data[ig_last_publish_campaign]" value="<?php echo $ig_data['ig_last_publish_campaign']; ?>">
251
- <input type="hidden" name="ig_data[ig-survey-version]" value="0.2">
252
- <input type="hidden" name="rm_lead_name" value="IG-Survey-Capture">
253
- </ul>
254
- </div>
255
- </div>
256
- </div>
257
- <div class="ig-form-field ig-right">
258
- <div style="font-size: 1.218em;padding-bottom: 0.5em;display: block;font-weight: bold;color: #ffd3a2;"><?php echo __( 'Let us know what you think about these features', IG_SURVEY_TDOMAIN ); ?></div>
259
- <div class="ig-right-info">
260
- <div class="ig-left">
261
- <ul style="margin-top:0;"><span class="ig-counter" data-count="1" style="display:none">Just 2 more left</span>
262
- <li class="ig-list-item"><?php _e('Do you prefer a visual / WYSIWYG editor for campaign design - or the current form based campaign design?', IG_SURVEY_TDOMAIN); ?><br>
263
- <label title="days"><input checked="" type="radio" name="ig_data[editor]" value="0"><?php _e('Yes, I like those drag & drop editors.', IG_SURVEY_TDOMAIN); ?></label>
264
- <label title="days"><input type="radio" name="ig_data[editor]" value="1"><?php _e('I prefer the power of HTML editing in current approach.', IG_SURVEY_TDOMAIN); ?></label>
265
- <label title="days"><input type="radio" name="ig_data[editor]" value="2"><?php _e('I don\'t mind either.', IG_SURVEY_TDOMAIN); ?></label>
266
- </li>
267
- <li class="ig-list-item"><?php _e('How easy is it to add forms to Icegram?', IG_SURVEY_TDOMAIN); ?><br>
268
- <label><input type="radio" name="ig_data[form]" value="0"><?php _e('It\'s super simple - especially using the Rainmaker plugin.', IG_SURVEY_TDOMAIN); ?></label>
269
- <label><input checked="" type="radio" name="ig_data[form]" value="1"><?php _e('Easy enough - I use HTML / shortcode to embed my forms.', IG_SURVEY_TDOMAIN); ?></label>
270
- <label><input type="radio" name="ig_data[form]" value="2"><?php _e('It\'s difficult - you should improve form handling.', IG_SURVEY_TDOMAIN); ?></label>
271
- <label><input type="radio" name="ig_data[form]" value="3"><?php _e('I don\'t use forms!', IG_SURVEY_TDOMAIN); ?></label>
272
- </li>
273
- <li class="ig-list-item"><?php _e('Do you like Icegram\'s conversion experts to review your campaigns and offer recommendations?', IG_SURVEY_TDOMAIN); ?><br>
274
- <label><input type="radio" name="ig_data[review]" value="0"><?php _e('Sure - but only if it\'s free.', IG_SURVEY_TDOMAIN); ?></label>
275
- <label><input checked="" type="radio" name="ig_data[review]" value="1"><?php _e('Yes - and I don\'t mind paying a reasonable fee for that.', IG_SURVEY_TDOMAIN); ?></label>
276
- <label><input type="radio" name="ig_data[review]" value="2"><?php _e('No, I\'m good on my own.', IG_SURVEY_TDOMAIN); ?></label>
277
- </li>
278
- <li class="ig-list-item"><?php _e('Did you see / use the new designs in Icegram gallery?', IG_SURVEY_TDOMAIN); ?><br>
279
- <label><input type="radio" name="ig_data[gallery]" value="0"><?php _e('Oh yes - they are awesome.', IG_SURVEY_TDOMAIN); ?></label>
280
- <label><input type="radio" name="ig_data[gallery]" value="1"><?php _e('Sort of - I plan to use them on my next campaign.', IG_SURVEY_TDOMAIN); ?></label>
281
- <label><input checked="" type="radio" name="ig_data[gallery]" value="2"><?php _e('No - I\'m happy with my current designs.', IG_SURVEY_TDOMAIN); ?></label>
282
- </li>
283
- <li class="ig-list-item"><?php _e('What problems would you like Icegram to solve for you? (mention one or two!)', IG_SURVEY_TDOMAIN); ?><br>
284
- <textarea name="ig_data[ig_feedback]"></textarea>
285
- </li>
286
- <li class="ig-list-item">
287
- <div>
288
- <input style="width: 70%;vertical-align: middle;display: inline-block;" placeholder="Enter your email to get early access" type="email" name="ig_data[email]">
289
- <div class="" style="display: inline-block;margin-left: 0.4em;width: 23%;vertical-align: middle;">
290
- <input data-val="yes" type="submit" id="ig-yes" value="Alright, Send It All" class="ig-button button primary">
291
- </div>
292
- <div class="ig-loader-wrapper"><img src="<?php echo $this->plugin_url ?>/assets/images/spinner-2x.gif"></div>
293
- <a id="ig-no" data-val="no" class="">Nah, I don't like improvements</a>
294
- </div>
295
- </li>
296
- </ul>
297
- </div>
298
- <div class="ig-right">
299
- <a href="#" class="ig-survey-next button primary">Next</a>
300
- </div>
301
- </div>
302
- </div>
303
- </div>
304
- </form>
305
- <div class="ig-rocket"><img src="<?php echo $this->plugin_url ?>/assets/images/ig-growth-rocket_2.png"/></div>
306
- </div>
307
- <div class="ig-msg-wrap">
308
- <div class="ig-logo-wrapper"><img style="width:5%;" src="<?php echo $this->plugin_url ?>/assets/images/icegram-logo-branding-64.png"></div>
309
- <div class="ig-msg-text ig-yes"><?php _e('Thank you!', IG_SURVEY_TDOMAIN); ?></div>
310
- <div class="ig-msg-text ig-no"><?php _e('No issues, have a nice day!', IG_SURVEY_TDOMAIN); ?></div>
311
- </div>
312
- </div>
313
-
314
- <script type="text/javascript">
315
- jQuery(function () {
316
- jQuery("form[name=ig-survey-form]").on('click','.ig-button, #ig-no',function(e){
317
- e.preventDefault();
318
- jQuery("form[name=ig-survey-form]").find('.ig-loader-wrapper').show();
319
- var params = jQuery("form[name=ig-survey-form]").serializeArray();
320
- var that = this;
321
- params.push({name: 'btn-val', value: jQuery(this).data('val') });
322
- params.push({name: 'action', value: 'ig_submit_survey' });
323
- params.push({name: 'plugin-prefix', value: 'ig' });
324
- jQuery.ajax({
325
- method: 'POST',
326
- type: 'text',
327
- url: "<?php echo admin_url( 'admin-ajax.php' ); ?>",
328
- data: params,
329
- success: function(response) {
330
- jQuery("form[name=ig-survey-form]").find('.ig-loader-wrapper').hide();
331
- jQuery(".ig-msg-wrap").show('slow');
332
- if( jQuery(that).attr('id') =='ig-no'){
333
- jQuery(".ig-msg-wrap .ig-yes").hide();
334
- }else{
335
- jQuery(".ig-msg-wrap .ig-no").hide();
336
- }
337
- jQuery(".ig-form-wrapper").hide('slow');
338
- setTimeout(function(){
339
- jQuery(".ig-form-container").hide('slow');
340
- }, 5000);
341
- }
342
- });
343
- })
344
-
345
- });
346
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -3,11 +3,11 @@ Contributors: icegram, storeapps, niravmehta, sandhyam, ravioza, putler
3
  Donate link: https://www.icegram.com/
4
  Tags: popup, Exit-popup, optin-popup, popups, hellobar, optin, lead capture, form, marketing, notification, messenger, targeting, monster, ninja ,wordpress lead generation, wordpress lightbox optin, wordpress lightbox optin form, wordpress lightbox optins, wordpress mobile optin forms, wordpress mobile popup, wordpress mobile popups, wordpress optin form, wordpress overlay popup, wordpress popup, wordpress popup form, wordpress popup plugin, wordpress popup solution, wordpress popups , popups, subscribe, wp popups, optin bars, action grabber, promotion, popup message, leads, lists, builder, action bar, floating bar, footer bar, hellobar alternative, pop over, Popup plugin, aweber, campaign monitor, constant contact, email list, exit-intent, onclick popup, analytics, Hubspot, popup ads, pop-up, Mailing list pop-up, re-targeting, Animation,Popups with Animation ,Responsive Popup, split testing, AB testing
5
  Requires at least: 3.9
6
- Tested up to: 4.9
7
- Stable tag: 1.10.14
8
  License: GPLv3
9
 
10
- The best WP popup plugin that let's you create a popup within seconds. Customize, target popups to show offers, email signups, social buttons etc and instantly increase conversions on your website.
11
 
12
  == Description ==
13
 
@@ -217,6 +217,9 @@ Contact Us, provide as much detail of the problem as you can. We will try to sol
217
  5. Target your Icegram message using these display rules
218
 
219
  == Upgrade Notice ==
 
 
 
220
  = 1.10.14 =
221
  Compatibility with WordPress 4.9
222
 
@@ -417,6 +420,9 @@ Initial Release
417
 
418
 
419
  == Changelog ==
 
 
 
420
  = 1.10.14 =
421
  * Update: Compatibility with WordPress 4.9
422
 
3
  Donate link: https://www.icegram.com/
4
  Tags: popup, Exit-popup, optin-popup, popups, hellobar, optin, lead capture, form, marketing, notification, messenger, targeting, monster, ninja ,wordpress lead generation, wordpress lightbox optin, wordpress lightbox optin form, wordpress lightbox optins, wordpress mobile optin forms, wordpress mobile popup, wordpress mobile popups, wordpress optin form, wordpress overlay popup, wordpress popup, wordpress popup form, wordpress popup plugin, wordpress popup solution, wordpress popups , popups, subscribe, wp popups, optin bars, action grabber, promotion, popup message, leads, lists, builder, action bar, floating bar, footer bar, hellobar alternative, pop over, Popup plugin, aweber, campaign monitor, constant contact, email list, exit-intent, onclick popup, analytics, Hubspot, popup ads, pop-up, Mailing list pop-up, re-targeting, Animation,Popups with Animation ,Responsive Popup, split testing, AB testing
5
  Requires at least: 3.9
6
+ Tested up to: 4.9.1
7
+ Stable tag: 1.10.15
8
  License: GPLv3
9
 
10
+ The best WP popup plugin that let's you create a popup within seconds. Customize popup, target popups to show offers, email signups, social buttons etc and instantly increase conversions on your website.
11
 
12
  == Description ==
13
 
217
  5. Target your Icegram message using these display rules
218
 
219
  == Upgrade Notice ==
220
+ = 1.10.15 =
221
+ Added Christmas Gallery templates
222
+
223
  = 1.10.14 =
224
  Compatibility with WordPress 4.9
225
 
420
 
421
 
422
  == Changelog ==
423
+ = 1.10.15 =
424
+ * New: Added Christmas Gallery templates
425
+
426
  = 1.10.14 =
427
  * Update: Compatibility with WordPress 4.9
428
 
trunk/about-icegram.php ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * About Icegram
4
+ */
5
+
6
+ if ( !defined( 'ABSPATH' ) ) exit;
7
+
8
+ // Actions for support
9
+ add_action( 'admin_footer', 'icegram_support_ticket_content' );
10
+
11
+ function icegram_support_ticket_content() {
12
+ global $current_user, $pagenow, $typenow, $icegram;
13
+ $headers = '';
14
+ if ( $pagenow != 'edit.php' ) return;
15
+ if ( $typenow != 'ig_campaign') return;
16
+ if ( !( $current_user instanceof WP_User ) || !current_user_can( 'manage_options' )) return;
17
+
18
+ if( isset( $_POST['submit_query'] ) && $_POST['submit_query'] == "Send" && !empty($_POST['client_email'])){
19
+ check_admin_referer( 'icegram-submit-query' );
20
+ $additional_info = ( isset( $_POST['additional_information'] ) && !empty( $_POST['additional_information'] ) ) ? sanitize_text_field( $_POST['additional_information'] ) : '';
21
+ $additional_info = str_replace( '###', '<br />', $additional_info );
22
+ $additional_info = str_replace( array( '[', ']' ), '', $additional_info );
23
+
24
+ $from = 'From: ';
25
+ $from .= ( isset( $_POST['client_name'] ) && !empty( $_POST['client_name'] ) ) ? sanitize_text_field( $_POST['client_name'] ) : '';
26
+ $from .= ' <' . sanitize_email( $_POST['client_email'] ) . '>' . "\r\n";
27
+ $headers .= $from;
28
+ $headers .= str_replace('From: ', 'Reply-To: ', $from);
29
+ $headers .= 'MIME-Version: 1.0' . "\r\n";
30
+ $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
31
+ $message = $additional_info . '<br /><br />'.nl2br(sanitize_text_field($_POST['message'])) ;
32
+ wp_mail( 'hello@icegram.com', sanitize_text_field($_POST['subject']), $message, $headers );
33
+ header('Location: ' . $_SERVER['HTTP_REFERER'] );
34
+
35
+ }
36
+ ?>
37
+ <div id="icegram_post_query_form" style="display: none;">
38
+ <?php
39
+
40
+ if ( !wp_script_is('jquery') ) {
41
+ wp_enqueue_script('jquery');
42
+ wp_enqueue_style('jquery');
43
+ }
44
+
45
+ $first_name = get_user_meta($current_user->ID, 'first_name', true);
46
+ $last_name = get_user_meta($current_user->ID, 'last_name', true);
47
+ $name = $first_name . ' ' . $last_name;
48
+ $customer_name = ( !empty( $name ) ) ? $name : $current_user->data->display_name;
49
+ $customer_email = $current_user->data->user_email;
50
+
51
+ ?>
52
+ <form id="icegram_form_post_query" method="POST" action="" enctype="multipart/form-data">
53
+ <script type="text/javascript">
54
+ jQuery(function(){
55
+ jQuery('input#icegram_submit_query').click(function(e){
56
+ var error = false;
57
+
58
+ var client_name = jQuery('input#client_name').val();
59
+ if ( client_name == '' ) {
60
+ jQuery('input#client_name').css('border-color', 'red');
61
+ error = true;
62
+ } else {
63
+ jQuery('input#client_name').css('border-color', '');
64
+ }
65
+
66
+ var client_email = jQuery('input#client_email').val();
67
+ if ( client_email == '' ) {
68
+ jQuery('input#client_email').css('border-color', 'red');
69
+ error = true;
70
+ } else {
71
+ jQuery('input#client_email').css('border-color', '');
72
+ }
73
+
74
+ var subject = jQuery('table#icegram_post_query_table input#subject').val();
75
+ if ( subject == '' ) {
76
+ jQuery('input#subject').css('border-color', 'red');
77
+ error = true;
78
+ } else {
79
+ jQuery('input#subject').css('border-color', '');
80
+ }
81
+
82
+ var message = jQuery('table#icegram_post_query_table textarea#message').val();
83
+ if ( message == '' ) {
84
+ jQuery('textarea#message').css('border-color', 'red');
85
+ error = true;
86
+ } else {
87
+ jQuery('textarea#message').css('border-color', '');
88
+ }
89
+
90
+ if ( error == true ) {
91
+ jQuery('label#error_message').text('* All fields are compulsory.');
92
+ e.preventDefault();
93
+ } else {
94
+ jQuery('label#error_message').text('');
95
+ }
96
+
97
+ });
98
+
99
+ jQuery(".icegram-contact-us a.thickbox").click( function(){
100
+ setTimeout(function() {
101
+ jQuery('#TB_ajaxWindowTitle').text('Send your query');
102
+ }, 0 );
103
+ });
104
+
105
+ jQuery('div#TB_ajaxWindowTitle').each(function(){
106
+ var window_title = jQuery(this).text();
107
+ if ( window_title.indexOf('Send your query') != -1 ) {
108
+ jQuery(this).remove();
109
+ }
110
+ });
111
+
112
+ jQuery('input,textarea').keyup(function(){
113
+ var value = jQuery(this).val();
114
+ if ( value.length > 0 ) {
115
+ jQuery(this).css('border-color', '');
116
+ jQuery('label#error_message').text('');
117
+ }
118
+ });
119
+ jQuery('.update-nag, .ig_st_notice').hide();
120
+
121
+ });
122
+ </script>
123
+ <table id="icegram_post_query_table">
124
+ <tr>
125
+ <td><label for="client_name"><?php _e('Name', 'icegram'); ?>*</label></td>
126
+ <td><input type="text" class="regular-text sm_text_field" id="client_name" name="client_name" value="<?php echo $customer_name; ?>" /></td>
127
+ </tr>
128
+ <tr>
129
+ <td><label for="client_email"><?php _e('E-mail', 'icegram'); ?>*</label></td>
130
+ <td><input type="email" class="regular-text sm_text_field" id="client_email" name="client_email" value="<?php echo $customer_email; ?>" /></td>
131
+ </tr>
132
+ <tr>
133
+ <td><label for="subject"><?php _e('Subject', 'icegram'); ?>*</label></td>
134
+ <td><input type="text" class="regular-text sm_text_field" id="subject" name="subject" value="<?php echo ( !empty( $subject ) ) ? $subject : ''; ?>" /></td>
135
+ </tr>
136
+ <tr>
137
+ <td style="vertical-align: top; padding-top: 12px;"><label for="message"><?php _e('Message', 'icegram'); ?>*</label></td>
138
+ <td><textarea id="message" name="message" rows="10" cols="60"><?php echo ( !empty( $message ) ) ? $message : ''; ?></textarea></td>
139
+ </tr>
140
+ <tr>
141
+ <td></td>
142
+ <td><label id="error_message" style="color: red;"></label></td>
143
+ </tr>
144
+ <tr>
145
+ <td></td>
146
+ <td><input type="submit" class="button" id="icegram_submit_query" name="submit_query" value="Send" /></td>
147
+ </tr>
148
+ </table>
149
+ <?php wp_nonce_field( 'icegram-submit-query'); ?>
150
+ <input type="hidden" id="current_plugin" name="additional_info[current_plugin]" value="Icegram <?php echo $icegram->version; ?>" />
151
+ </form>
152
+ </div>
153
+ <?php
154
+ }
155
+
156
+ if ( !wp_script_is( 'thickbox' ) ) {
157
+ if ( !function_exists( 'add_thickbox' ) ) {
158
+ require_once ABSPATH . 'wp-includes/general-template.php';
159
+ }
160
+ add_thickbox();
161
+ }
162
+
163
+ ?>
164
+ <div class="wrap about-wrap icegram">
165
+ <div class="about-header">
166
+ <div class="about-text icegram-about-text">
167
+ <strong><?php _e( "Welcome to Icegram.", "icegram" ); ?></strong>
168
+ <?php _e( " Your sample campaign is ready!", "icegram" )?>
169
+ <?php
170
+ $sample_id = get_option('icegram_sample_data_imported');
171
+ $view_campaign = admin_url( 'post.php?post='.$sample_id[0].'&action=edit' );
172
+ $preview_url = home_url('?campaign_preview_id='.$sample_id[0]);
173
+ $assets_base = $this->plugin_url . '/assets/images/';
174
+ ?>
175
+ <p class="icegram-actions">
176
+ <a class="button button-primary button-large" href="<?php echo $preview_url; ?>" target="_blank" ><?php _e( 'Preview Your First Campaign', 'icegram' ); ?></a>
177
+ <span style="margin: 0 .5em"><?php _e( "OR", "icegram")?></span>
178
+ <a href="<?php echo $view_campaign ; ?>"> <strong><?php _e( 'Edit & Publish it.', 'icegram' ); ?></strong></a>
179
+ </p>
180
+ </div>
181
+ <div class="icegram-badge">
182
+ <?php printf(__( "Version: %s", "icegram"), $this->version ); ?>
183
+ </div>
184
+ <div class="icegram-support">
185
+ <?php _e( 'Questions? Need Help?', "icegram" ); ?>
186
+ <div id="icegram-contact-us" class="icegram-contact-us"><a class="thickbox" href="<?php echo admin_url() . "#TB_inline?inlineId=icegram_post_query_form&post_type=ig_campaign" ?>"><?php _e("Contact Us", "icegram"); ?></a></div>
187
+ </div>
188
+ <?php do_action('icegram_about_changelog'); ?>
189
+ </div>
190
+ <!-- <hr> -->
191
+ <div class="changelog">
192
+ <!-- <hr> -->
193
+ <div class="about-text">
194
+ <?php _e("Do read Icegram's core concepts below to understand how you can use Icegram to ", "icegram"); ?>
195
+ <strong><?php _e("inspire, convert and engage", "icegram"); ?></strong>
196
+ <?php _e("your audience.", "icegram"); ?>
197
+ </div>
198
+
199
+ <div class="feature-section col three-col">
200
+ <h2 class="icegram-dashicons dashicons-testimonial"><?php _e( "Messages", "icegram" ); ?></h2>
201
+ <div class="col-1">
202
+ <p><?php _e("A 'Message' is a communication you want to deliver to your audience.","icegram"); ?></p>
203
+ <p><?php _e("And Icegram comes with not one, but four message types.","icegram"); ?></p>
204
+ <p><?php _e("Different message types look and behave differently, but they all have many common characteristics. For instance, most message types will allow you to set a headline, a body text, label for the ‘call to action’ button, a link for that button, theme and styling options, animation effect and position on screen where that message should show.","icegram"); ?></p>
205
+ <?php do_action('icegram_about_after_core_message_types_col1'); ?>
206
+ </div>
207
+ <div class="col-2">
208
+ <h4><?php _e("Action Bar", "icegram"); ?></h4>
209
+ <img src="<?php echo $assets_base; ?>/sketch-action-bar.png" width="180" height="145">
210
+ <p><?php _e("An action bar is a proven attention grabber. It shows up as a solid bar either at top or bottom. Use it for your most important messages or time sensitive announcements. Put longer content in it and it acts like a collapsible panel!", "icegram"); ?></p>
211
+ <h4><?php _e("Messenger", "icegram"); ?></h4>
212
+ <img src="<?php echo $assets_base; ?>/sketch-messenger.png" width="180" height="145">
213
+ <p><?php _e("A messenger is best used to invoke interest while your visitor is reading your content. Users perceive it as something new, important and urgent and are highly likely to click on it.", "icegram"); ?></p>
214
+ <?php do_action('icegram_about_after_core_message_types_col2'); ?>
215
+ </div>
216
+ <div class="col-3 last-feature">
217
+ <h4><?php _e("Toast Notification", "icegram"); ?></h4>
218
+ <img src="<?php echo $assets_base; ?>/sketch-toast-notification.png" width="180" height="145">
219
+ <p><?php _e("Want to alert your visitor about some news, an update from your blog, a social proof or an offer? Use Icegram’s unique toast notification, it will catch their attention, let them click on the message, and disappear after a while.", "icegram"); ?></p>
220
+ <h4><?php _e("Popup", "icegram"); ?></h4>
221
+ <img src="<?php echo $assets_base; ?>/sketch-popup.png" width="180" height="145">
222
+ <p><?php _e("Lightbox popup windows are most widely used for lead capture, promotions and additional content display. Ask visitors to sign up to your newsletter, or like you on social networks, or tell them about a special offer...", "icegram"); ?></p>
223
+ <?php do_action('icegram_about_after_core_message_types_col3'); ?>
224
+ </div>
225
+ </div>
226
+ <hr>
227
+
228
+ <?php do_action('icegram_about_after_core_message_types'); ?>
229
+
230
+ <div class="feature-section col three-col">
231
+ <h2 class="icegram-dashicons dashicons-megaphone"><?php _e("Campaigns", "icegram"); ?></h2>
232
+ <div class="col-1">
233
+ <p><strong><?php _e("Campaign = Messages + Rules", "icegram"); ?></strong></p>
234
+ <p><?php _e("A campaign allows sequencing multiple messages and defining targeting rules. Create different campaigns for different marketing goals. Icegram supports showing multiple campaigns on any page.", "icegram"); ?></p>
235
+ <p><?php _e("You can always preview your campaign to ensure campaign works the way you want, before making it live.", "icegram"); ?></p>
236
+ <?php do_action('icegram_about_after_core_campaigns_col1'); ?>
237
+ </div>
238
+ <div class="col-2">
239
+ <h4><?php _e("Multiple Messages & Sequencing", "icegram"); ?></h4>
240
+ <img src="<?php echo $assets_base; ?>/sketch-multiple-sequence.png" width="180" height="145">
241
+ <p><?php _e("Add one or as many messages to a campaign as you want. Also choose the number of seconds after which each message should show up. Showing multiple messages for same goal, but with slightly different content / presentation, greatly improves conversions.", "icegram"); ?></p>
242
+ <?php do_action('icegram_about_after_core_campaigns_col2'); ?>
243
+ </div>
244
+ <div class="col-3 last-feature">
245
+ <h4><?php _e("Targeting Rules", "icegram"); ?></h4>
246
+ <img src="<?php echo $assets_base; ?>/sketch-rules.png" width="180" height="145">
247
+ <p><?php _e("You can control who sees a campaign – and on what device, which pages does it show on, and what time period will it stay active for. You can run different campaigns with different rules to maximize engagement.", "icegram"); ?></p>
248
+ <?php do_action('icegram_about_after_core_campaigns_col3'); ?>
249
+ </div>
250
+ </div>
251
+
252
+ <?php do_action('icegram_about_after_core_campaigns'); ?>
253
+
254
+ <hr>
255
+ <div class="feature-section col two-col">
256
+ <h2 class="icegram-dashicons dashicons-editor-help"><?php _e("FAQ / Common Problems", "icegram"); ?></h2>
257
+ <div class="col-1">
258
+
259
+ <h4><?php _e("Messages look broken / formatting is weird...", "icegram"); ?></h4>
260
+ <p><?php _e("This is most likely due to CSS conflicts with current theme. We suggest using simple formatting for messages. You can also write custom CSS in your theme to fix any problems.", "icegram"); ?></p>
261
+
262
+ <h4><?php _e("Extra Line Breaks / Paragraphs in messages...", "icegram"); ?></h4>
263
+ <p><?php _e("Go to HTML mode in content editor and pull your custom HTML code all together in one line. Don't leave blank lines between two tags. That should fix it.", "icegram"); ?></p>
264
+
265
+ <h4><?php _e("How do I add custom CSS for messages?", "icegram"); ?></h4>
266
+ <p><?php _e("You can use custom CSS/JS inline in your message HTML. You can also use your theme's custom JS / CSS feature to add your changes.", "icegram"); ?></p>
267
+
268
+ <h4><?php _e("Optin Forms / Mailing service integration...", "icegram"); ?></h4>
269
+ <p><?php _e("You can embed any optin / subscription form to your Icegram messages using 'Embed Form' button above text editor. Paste in form HTML code and let Icegram clean it up! You may even use a shortcode if you are using a WP plugin from your newsletter / lead capture service.", "icegram"); ?></p>
270
+
271
+ <h4><?php _e("How many messages should I show on a page?", "icegram"); ?></h4>
272
+ <p><?php _e("While Icegram provides you lots of different message types and ability to add multiple messages to a campaign, we discourage you to go overboard. We've observed two messages on a page work well, but YMMV!", "icegram"); ?></p>
273
+
274
+ <?php do_action('icegram_about_after_faq_col1'); ?>
275
+
276
+ </div>
277
+ <div class="col-2 last-feature">
278
+ <h4><?php _e("Preview does not work / not refreshing...", "icegram"); ?></h4>
279
+ <p><?php _e("Doing a browser refresh while previewing will not show your most recent changes. Click 'Preview' button to see a preview with your latest changes.", "icegram"); ?></p>
280
+
281
+ <h4><?php _e("Can I use shortcodes in a message?", "icegram"); ?></h4>
282
+ <p><?php _e("Yes! Messages support shortcodes. You may need to adjust CSS so the shortcode output looks good in your message.", "icegram"); ?></p>
283
+
284
+ <h4><?php _e("WPML / Multilingual usage...", "icegram"); ?></h4>
285
+ <p><?php _e("Go to <code>Messages</code> from Icegram menu. Edit a message and translate it like any other post. Icegram will show translated message where possible. Choose <code>All posts</code> under WPML Language setting - Blog Posts to display, to fall back to default language messages.", "icegram"); ?></p>
286
+
287
+ <?php do_action('icegram_about_after_faq_col2'); ?>
288
+
289
+ <h4><?php _e("I can't find a way to do X...", "icegram"); ?></h4>
290
+ <p><?php _e("Icegram is actively developed. If you can't find your favorite feature (or have a suggestion) contact us. We'd love to hear from you.", "icegram"); ?></p>
291
+
292
+ <h4><?php _e("I'm facing a problem and can't find a way out...", "icegram"); ?></h4>
293
+ <p><a class="thickbox" href="<?php echo admin_url() . "#TB_inline?inlineId=icegram_post_query_form&post_type=ig_campaign" ?>"><?php _e("Contact Us", "icegram"); ?></a><?php _e(", provide as much detail of the problem as you can. We will try to solve the problem ASAP.", "icegram"); ?></p>
294
+
295
+ </div>
296
+ </div>
297
+
298
+ <?php do_action('icegram_about_after_faq'); ?>
299
+
300
+ </div>
301
+ </div>
trunk/addons.php ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <style type="text/css">body{background:#FFF;}</style>
2
+ <style type="text/css">
3
+ /* Common styles */
4
+ .pricing {
5
+ display: -webkit-flex;
6
+ display: flex;
7
+ -webkit-flex-wrap: wrap;
8
+ flex-wrap: wrap;
9
+ -webkit-justify-content: center;
10
+ justify-content: center;
11
+ width: 100%;
12
+ margin: 0 auto 3em;
13
+ }
14
+
15
+ .pricing__item {
16
+ position: relative;
17
+ display: -webkit-flex;
18
+ display: flex;
19
+ -webkit-flex-direction: column;
20
+ flex-direction: column;
21
+ -webkit-align-items: stretch;
22
+ align-items: stretch;
23
+ text-align: center;
24
+ -webkit-flex: 0 1 230px;
25
+ flex: 0 1 230px;
26
+ }
27
+
28
+ .pricing__feature-list {
29
+ text-align: left;
30
+ }
31
+
32
+ .pricing__action {
33
+ color: inherit;
34
+ border: none;
35
+ background: none;
36
+ }
37
+
38
+ .pricing__action:focus {
39
+ outline: none;
40
+ }
41
+
42
+ /* Pema */
43
+ .pricing--pema .pricing__item {
44
+ /*font-family: 'Alegreya Sans', sans-serif;*/
45
+ padding: 2em;
46
+ margin: 1em;
47
+ color: #262b38;
48
+ background: #fff;
49
+ cursor: default;
50
+ overflow: hidden;
51
+ box-shadow: 0 0 10px 3px rgba(0,0,0,0.05);
52
+ }
53
+
54
+ @media screen and (min-width: 66.250em) {
55
+ .pricing--pema .pricing__item {
56
+ margin: 1.5em 0;
57
+ }
58
+ .pricing--pema .pricing__item--featured {
59
+ z-index: 10;
60
+ margin: 0;
61
+ font-size: 1em;
62
+ background-color: rgb(249, 246, 214);
63
+ outline: 1px solid rgba(58, 115, 190, 0.3);
64
+ outline-offset: -8px;
65
+ }
66
+ }
67
+
68
+ .pricing--pema .pricing__title {
69
+ font-size: 2em;
70
+ margin: 0.5em 0 .2em;
71
+ color: #555;
72
+ }
73
+
74
+ .pricing--pema .icon {
75
+ display: inline-block;
76
+ min-width: 2em;
77
+ color: #8A9790;
78
+ /*vertical-align: middle;*/
79
+ }
80
+
81
+ .pricing--pema .pricing__price {
82
+ font-size: 4em;
83
+ font-weight: 800;
84
+ color: #1e73be;
85
+ position: relative;
86
+ z-index: 100;
87
+ }
88
+
89
+ .pricing--pema .pricing__currency {
90
+ font-size: 0.5em;
91
+ /*vertical-align: text-bottom;*/
92
+ }
93
+
94
+ .pricing--pema .pricing__period {
95
+ font-size: 0.25em;
96
+ display: inline-block;
97
+ padding: 0 0 0 0.5em;
98
+ color: #AAA;
99
+ }
100
+
101
+ .pricing--pema .pricing__sentence {
102
+ /*font-weight: bold;*/
103
+ margin: 1.2em 0;
104
+ padding: 0;
105
+ color: #1e73be;
106
+ line-height: 1.4;
107
+ font-size: 0.9em;
108
+ color: rgb(0, 73, 148);
109
+ }
110
+ .pricing--pema .pricing__headline {
111
+ font-size: 1.2em;
112
+ font-weight: bold;
113
+ color: #555;
114
+ }
115
+
116
+ .pricing--pema .pricing__feature-list {
117
+ /*font-size: 0.85em;*/
118
+ margin: 0;
119
+ padding: 1.5em 0.5em 2.5em;
120
+ list-style: none;
121
+ }
122
+
123
+ .pricing--pema .pricing__feature {
124
+ padding: 0.15em 0;
125
+ }
126
+
127
+ .pricing--pema .pricing__action {
128
+ /*font-weight: bold;
129
+ margin-top: auto;
130
+ padding: 1em 2em;*/
131
+ color: #fff;
132
+ /*border-radius: 5px;*/
133
+ background: #1e73be;
134
+ -webkit-transition: background-color 0.3s;
135
+ transition: background-color 0.3s;
136
+ margin: 1.5em 0;
137
+ }
138
+
139
+ .pricing--pema .pricing__action:hover,
140
+ .pricing--pema .pricing__action:focus {
141
+ /*background-color: #4F5F56;*/
142
+ }
143
+ .button.button-primary.large.pricing__action a{
144
+ text-decoration: none;
145
+ color: #FFF !important;
146
+ }
147
+ </style>
148
+ <div class="wrap upgrade_page">
149
+ <h1><?php _e('The Various Plans Available', 'icegram'); ?></h1>
150
+ <!-- <div class="size-full-x"> -->
151
+ <section class="pricing-section bg-6">
152
+ <div class="pricing pricing--pema">
153
+ <div class="pricing__item">
154
+ <h3 class="pricing__title">Plus</h3>
155
+ <p class="pricing__sentence">For measuring & improving conversions<br/></p>
156
+ <div class="pricing__price"><span class="pricing__currency">$27</span><span class="pricing__period">/yr</span></div>
157
+ <button class="button button-primary large pricing__action"><a href="https://www.icegram.com/?buy-now=19926&qty=1&with-cart=1&utm_source=ig_inapp&utm_medium=ig_plus&utm_campaign=ig_upgrade" target="_blank">Sign Up</a></button>
158
+ <div class="pricing__headline">Everything in Free and:</div>
159
+ <ul class="pricing__feature-list">
160
+ <li class="pricing__feature">+ 1 Site license</li>
161
+ <li class="pricing__feature">+ Impression vs Conversion report</li>
162
+ <li class="pricing__feature">+ Top 5 message stats</li>
163
+ <li class="pricing__feature">+ Top 5 campaigns stats</li>
164
+ </ul>
165
+ </div>
166
+ <div class="pricing__item pricing__item--featured">
167
+ <h3 class="pricing__title">Pro</h3>
168
+ <p class="pricing__sentence">For reducing abandonments</p>
169
+ <div class="pricing__price"><span class="pricing__currency">$97</span><span class="pricing__period">/yr</span></div>
170
+ <button class="button button-primary large pricing__action"><a href="https://www.icegram.com/?buy-now=16522&qty=1&coupon=&with-cart=1&utm_source=ig_inapp&utm_medium=ig_pro&utm_campaign=ig_upgrade" target="_blank">Sign Up</a></button>
171
+ <div class="pricing__headline">Everything in Plus and:</div>
172
+ <ul class="pricing__feature-list">
173
+ <li class="pricing__feature">+ 1 Site license</li>
174
+ <li class="pricing__feature">+ Exit Intent Targeting</li>
175
+ <li class="pricing__feature">+ After CTA Click Control</li>
176
+ <li class="pricing__feature">+ Additional 17 Themes</li>
177
+ <li class="pricing__feature">+ Scroll popup</li>
178
+ <li class="pricing__feature">+ Inline message</li>
179
+ <li class="pricing__feature">+ Stickies</li>
180
+ <li class="pricing__feature">+ Ribbons</li>
181
+ <li class="pricing__feature">+ Badges</li>
182
+ </ul>
183
+ </div>
184
+ <div class="pricing__item">
185
+ <h3 class="pricing__title">Max</h3>
186
+ <p class="pricing__sentence">For increasing sales & customers</p>
187
+
188
+ <div class="pricing__price"><span class="pricing__currency">$147</span><span class="pricing__period">/yr</span></div>
189
+ <button class="button button-primary large pricing__action"><a href="https://www.icegram.com/?buy-now=16542&qty=1&coupon=&with-cart=1&utm_source=ig_inapp&utm_medium=ig_max&utm_campaign=ig_upgrade" target="_blank">Sign Up</a></button>
190
+ <div class="pricing__headline">Everything in Pro and:</div>
191
+ <ul class="pricing__feature-list">
192
+ <li class="pricing__feature">+ 3 Site license</li>
193
+ <li class="pricing__feature">+ A/B Testing</li>
194
+ <li class="pricing__feature">+ Geographical Targeting</li>
195
+ <li class="pricing__feature">+ Optin Entry Animations</li>
196
+ <li class="pricing__feature">+ Optin Exit Animations</li>
197
+ <li class="pricing__feature">+ Pack of 24 Pro Themes</li>
198
+ <li class="pricing__feature">+ Overlay</li>
199
+ <li class="pricing__feature">+ Tab</li>
200
+ <li class="pricing__feature">+ Sidebar</li>
201
+ <li class="pricing__feature">+ Interstitial</li>
202
+ </ul>
203
+ </div>
204
+ </div>
205
+ </section>
206
+ </body>
207
+ </html>
trunk/assets/css/admin.min.css ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ .shortcode_description.light,.shortcode_description:before{content:"\f348"}.actions,.help_tip{text-decoration:none}#postdivrich{display:none}#ig-admin-tabs .wp-picker-container{display:inline-block}.ig_preview_button{display:none;padding:10px 10px 0}.campaign_target_rules_panel .options_group{border-bottom:1px dashed #D3D3D3}.campaign_target_rules_panel .options_group:last-child{border-bottom-style:none}.campaign_target_rules_panel .options_group .form-field .options_header{display:inline-block;width:30%;vertical-align:top}.campaign_target_rules_panel .options_group p label input[type=checkbox],.campaign_target_rules_panel .options_group p label input[type=radio]{width:0}.campaign_target_rules_panel .options_group p label input[type=date]{width:auto;margin-left:10px}.user_roles p label input[type=checkbox],.user_roles p label input[type=radio]{margin-left:3px}.campaign_target_rules_panel .options_group .form-field #icegram_messages{width:300px;text-align:center}.empty_campaign{margin:1em;font-style:italic}.handle em{font-weight:400;font-size:85%;margin-left:1em;color:#777}h3 .chosen-container{font-weight:500}.thickbox_edit_message{padding:0 1em;border-bottom:1px solid #D3D3D3}.messages-list-sortable{margin-top:30px}.messages_list_table{font-size:1em;width:100%;border-collapse:separate;border-spacing:3px}th.message_header{text-align:center!important}.message_title{text-align:left}.message_headline{text-align:left;padding-left:1.2em}.action_links,.message_seconds{width:75px!important;text-align:center}.message_seconds input{text-align:right}.message-row .seconds-text{width:40px!important;text-align:center}.message-sort-placeholder{background-color:#D3D3D3}.device{width:auto;line-height:5em;vertical-align:baseline}.device:after{font-family:dashicons;font-size:3em}.device input{position:relative;left:2.5em;top:1.5em}.admin_field_icon{display:inline-block;-webkit-font-smoothing:antialiased;width:18px;height:18px;font:400 18px/1 dashicons;color:#888;vertical-align:text-top;margin:0 2px}.shortcode_description.light{color:#777}.campaign_shortcode{display:inline-block;width:45%;color:#777}.campaign_shortcode.light{border:1px dashed #CCC;padding-left:.6%;padding-right:.2%}.campaign_shortcode.light code{color:#777}label[for=device_mobile]{margin-left:-2em}label[for=device_mobile]:after{content:"\f470"}label[for=device_tablet]:after{content:"\f471"}label[for=device_laptop]:after{content:"\f472"}.date_picker:after{content:"\f145";position:relative;top:5px;font:400 20px/1 dashicons;vertical-align:top}.date_picker{margin-left:1em}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.date-picker{max-width:15%}.campaign_target_rules_panel .options_group .messages-list .form-field .message_header{width:75px!important;text-align:right}.disable{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30);opacity:.3}.enable{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";filter:alpha(opacity=100);opacity:1}.message_edit:after{content:"\f464"}.message_delete:after{content:"\f158"}.actions:after{font-family:dashicons;font-size:1.4em}.actions{color:#444;padding-right:3px;cursor:pointer}.actions:hover{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";filter:alpha(opacity=70);opacity:.7}.action_links{vertical-align:middle}.message_header_label{color:#fff;text-align:center;font-size:.7em!important;margin:0!important;padding:3px 5px;cursor:auto;text-transform:uppercase}.message_header_label.ig_unknown{color:#343232;border:1px solid #000}.message_label{float:left;width:25%;padding:0}.message_field{width:65%;display:inline-block}.message_field.message_custom_css,.message_field.message_custom_js{font-family:Consolas,Monaco,monospace;font-size:12px}.message_image_button .image-buttons-icon{margin:0 2px}.message_image_button .image-buttons-icon:before{content:"\f128"}.message_headline_button,.message_image_button{vertical-align:top!important}.message_headline_button .headline-buttons-icon{margin:2px}.message_headline_button .headline-buttons-icon:before{content:"\f130"}.help_tip:after{content:"\f223"}.help_tip{float:right;margin:4px 0;cursor:help}.chosen-container{width:65%!important}.message_row.position{height:110px}.location-selector input[type=radio]:checked+label span{background-color:#2ea2cc}.location-selector{width:128px;height:115px;position:absolute;display:block;margin-left:24.3%;background-image:url(../images/desktop.png);background-position:0 -19px}.location-selector .location{background-color:#ddd;cursor:pointer;position:absolute}.location-selector .location:hover{background-color:#ccc}.location-selector .location.bottom,.location-selector .location.middle,.location-selector .location.top{height:14%;width:14%;right:42%}.location-selector .location.top{top:13px}.location-selector .location.middle{top:30%}.location-selector .location.bottom{bottom:43px}.location-selector .location.left,.location-selector .location.right{height:14%;width:14%;margin-left:0;margin-right:0}.location-selector .location.right{right:15px}.location-selector .location.left{left:15px}.wp-editor-container{margin-left:25%}.message-setting-fields #message_title,.message-setting-fields #upload_image{width:58%}.wp-editor-container span .mceLayout{width:50%}#edit-slug-box,#ui-datepicker-div,#wp-admin-bar-view,.empty_campaign,.location-selector input[type=radio]{display:none}#the-list .message_thumbnail img{max-width:200px;max-height:100px}#icegram_messages+.chosen-container-single .chosen-search input[type=text]{width:100%!important}.message_theme+.chosen-container.chosen-container .chosen-results{max-height:30em!important}.message_theme+.chosen-container-single .chosen-single span{background-repeat:no-repeat!important;background-position:100% 50%!important}.message_theme+.chosen-container .chosen-results li{margin:0 0 2% 2%;background-position:.5em 2em!important;-webkit-background-size:95%!important;background-size:95%!important;border:2px solid #EEE!important;font-weight:700!important;display:inline-block!important;text-align:center!important;background-repeat:no-repeat!important}.message_theme+.chosen-container .chosen-results li.highlighted{color:#000!important;border:2px solid #2ea2cc!important;background-color:#EAEFFF!important}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#464646}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#464646}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#464646}#tiptip_holder.tip_left{padding-right:5px}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#464646}#tiptip_content,.chart-tooltip{font-size:11px;color:#fff;padding:.5em;background:#464646;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.1);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.1);box-shadow:1px 1px 3px rgba(0,0,0,.1);text-align:center;max-width:150px}#tiptip_content code,.chart-tooltip code{background:#888;padding:1px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}input.sm_text_field,table#icegram_post_query_table,table#icegram_post_query_table tr td{padding:5px}#icegram_post_query_table label{font-weight:700}.icegram-dashicons:before{position:relative;font-family:dashicons;font-style:normal;vertical-align:middle;font-size:2em}.about-wrap .icegram-badge,.icegram-support{position:absolute;top:0}.about-wrap.icegram h2{color:#3754a8;padding-top:19px;font-weight:600}.icegram-dashicons-testimonial h4{font-size:1.5em}.icegram-badge{background:url(../images/icegram-logo-branding-64-white.png) center 24px no-repeat #3754a8;color:#FFF;font-size:12px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:120px;height:24px;display:inline-block;width:150px;text-rendering:optimizeLegibility;-moz-box-shadow:0 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.2)}.icegram-support{font-size:14px;color:#000;margin:178px 0 0;height:10px;width:180px;text-rendering:optimizeLegibility;right:0;text-align:right}.upgrade_page,.upgrade_page h1{text-align:center}.icegram-contact-us{font-size:20px;line-height:1.5em;font-weight:800;margin-right:20px}.feature-section.col>div{position:relative;width:29.95%;margin-right:4.999999999%;float:left}.about-wrap.icegram .feature-section{display:block!important}.about-wrap [class$=col] .last-feature{margin-right:0}form[name=klawoo_subscribe]{margin-right:150px}form[name=klawoo_subscribe] input[name=email]{width:20em}.icegram-contact-us a{color:#3754a8}.upgrade_page h1{font-size:2.3em;color:#333;padding:1em;font-weight:700}.upgrade_page table{border-collapse:collapse;border:1px solid #d3d3d3;font-size:1.3em;margin:0 auto}.upgrade_page tr{padding:0}.upgrade_page td,.upgrade_page th{border-right:1px solid #d3d3d3;line-height:1.5;vertical-align:top;padding:.5em}.upgrade_page th{font-size:1.2em;padding-bottom:0}.upgrade_page td{padding:.5em 1em}.feat_list{text-align:left;font-size:1em}.td_data{padding-top:1em}.plan_title{font-size:1.4em;display:block;width:100%;margin-bottom:-.2em}.plan_price{color:#0e74b2;font-size:1.8em;font-weight:400}.sm_hr{position:relative}.sm_hr:before{position:absolute;content:'';width:80%;left:10%;border-bottom:1px dashed #d3d3d3}.td_list_icon{font-size:1.2em;color:#11772d;margin-right:.3em}.upgrade_page .button-primary{text-shadow:none;font-size:1.15em!important;line-height:1em!important;height:2.5em!important;padding:.75em 1.5em!important}#popup_container{width:550px;background-color:#FFF;margin:0 auto;padding:.5em 1em 1em}#popup_container input[value=ig_vertical]{margin-left:3%}#popup_container select{width:30%}#popup_container #embed_howto_link{float:right;font-size:.8em;font-weight:400}.campaign_target_rules_panel .messages_list_table p.inline{display:block;margin:1em 0}.campaign_target_rules_panel .form-field .delete-url:before{font-family:dashicons;content:"\f182";cursor:pointer}.campaign_target_rules_panel .form-field .url_input_field{width:65%!important}.campaign_target_rules_panel #valid-field{margin-left:92%}.campaign_target_rules_panel #valid-field.error{font-family:dashicons;font-size:1.5em;color:red;vertical-align:middle;display:inline-block;-webkit-font-smoothing:antialiased;cursor:help}.campaign_target_rules_panel #valid-field.error:after{content:"\f223"}.campaign_target_rules_panel #add-url-icon:after{font-family:dashicons;content:"\f132";vertical-align:middle}.message_colors_options_container p{margin-top:.3em!important;margin-bottom:.3em!important}.message_colors_options_container p span.message_label{font-size:12px;margin-top:2px}.message-setting-fields .chosen-container-single .chosen-single{z-index:initial!important}.message-setting-fields .chosen-container-single.chosen-single div b{background:url(../images/chosen-sprite.png) 0 2px no-repeat!important}.ig_get_more,.message_animation+.chosen-container .chosen-results li.ig_get_more,.message_theme+.chosen-container .chosen-results li.ig_get_more{height:1.5em!important;background:rgba(255,231,180,.47)!important;border:1px dashed #b40000!important;line-height:1.5em;color:maroon!important;border-radius:.5em;width:92%!important}.message_animation+.chosen-container .chosen-results li.ig_get_more{height:1em!important;line-height:1em;margin-bottom:.1em;text-align:center}.message_animation+.chosen-container .chosen-results li.ig_get_more:after,.message_theme+.chosen-container .chosen-results li.ig_get_more:after{content:" \2192"}.message_animation+.chosen-container .chosen-results li.ig_get_more:focus,.message_animation+.chosen-container .chosen-results li.ig_get_more:hover,.message_theme+.chosen-container .chosen-results li.ig_get_more:focus,.message_theme+.chosen-container .chosen-results li.ig_get_more:hover{box-shadow:inset 0 0 1.5em rgba(253,214,131,.62)}.message_form_options{width:75%;margin-left:25%}.message_form_options label.message_label{display:none}.message_form_options textarea{resize:none;width:86%}.message_form_options p>div.form_radio_group{width:86%}.message_form_options span.message_label{width:100%}.message_form_options .form_inline_shortcode{margin-left:0;margin-top:1em;position:relative;width:inherit}.message_form_html_original{font-family:Consolas,Monaco,monospace;font-size:.8em}.form_radio_group .location{display:inline-block;width:97px;height:94px;padding:3px 3px 0;margin-right:.8em;border:1px solid transparent}.form_radio_group .location label{background:url(../images/from_layouts.png) no-repeat;display:block;width:95px;height:100px;border:1px solid transparent}.form_radio_group .location:hover{border:1px solid #2EA2CC}#message_form_style+.chosen-container-single .chosen-single{height:6em!important}#message_form_style+.chosen-container-single .chosen-single span{background-size:9em!important;line-height:6em!important;background-repeat:no-repeat;background-position:100% 50%!important}#message_form_style+.chosen-container .chosen-results li{width:43%!important;height:10em!important;margin:0 0 2% 2%;-webkit-background-size:95%!important;background-size:100%!important;border:2px solid #EEE!important;font-weight:700!important;display:inline-block!important;text-align:center!important;background-repeat:no-repeat!important;background-position:0 100%!important;color:transparent}#message_form_style+.chosen-container .chosen-results li.highlighted{color:transparent!important;border:2px solid #2ea2cc!important;background-color:#EAEFFF!important}.message_form_options .chosen-container{width:86%!important}.feature-section.col.two-col>div{width:45.95%}.feature-section.col img{width:150px;border:none}.feature-section.col p{margin-bottom:1.5em}.about-wrap.icegram{max-width:100%}.about-wrap.icegram h2{margin-bottom:.5em}.about-wrap .feature-section h4{margin-top:.4em}.about-header .about-text{margin-top:0;margin-bottom:1.5em}.changelog .about-text{margin-bottom:0;margin-top:1.5em}.about-wrap .icegram-badge{right:1.3em;color:#3754a8;background-color:transparent;padding-top:100px;box-shadow:none;-webkit-box-shadow:none;background-image:url(../images/icegram-logo-branding-64.png)}.about-header .wrap{background-color:#fff;border-top:1px dotted #ddd}.about-header .wrap table{margin-top:.5em}.about-header th{font-size:1.1em;color:inherit;width:170px}.about-header{background-color:#FFF;padding:1em 1em .5em;-webkit-box-shadow:0 0 7px 0 rgba(0,0,0,.2);box-shadow:0 0 7px 0 rgba(0,0,0,.2)}.icegram-support{padding-right:1em;margin-top:140px}.icegram-actions a,.icegram-actions a:active{vertical-align:middle!important;font-size:1.15em;color:#3754a8}.icegram-actions .button-primary{text-shadow:none;font-size:1.15em!important;line-height:1em!important;height:2.5em!important;padding:.75em 1.5em!important;background:#038703!important;border-color:#038703!important}.icegram-actions .button-primary:active,.icegram-actions .button-primary:focus,.icegram-actions .button-primary:hover,.icegram-actions .button-primary:visited{color:#fff;background:#038703!important;-webkit-box-shadow:inset 0 2px 0 #038703!important;box-shadow:inset 0 2px 0 #038703!important}.icegram-dashicons:before{margin-right:.1em}#ig-admin-tabs{padding-top:0}#ig-admin-tabs a:focus{box-shadow:none}.ig-admin-tabs-nav{padding:0 15px 0 10px;margin:0}.ig-admin-tabs-nav li{display:inline-block;list-style:none;border:1px solid #aaa;padding:0;margin:0 4px -1px;background-color:#eee}#ig-admin-tabs .ig-admin-nav-last{background-color:#d6e3ef}#ig-admin-tabs .ig-admin-nav-last:hover{background-color:#c5daef}#ig-admin-tabs .ig-admin-nav-last.current,.ig-admin-tabs-nav li.current,.ig-admin-tabs-nav li.current:hover,.ig-admin-tabs-nav li:hover{background-color:#FFF;border:1px solid #aaa;border-bottom:1px solid #fff;color:#444}.ig-admin-tabs-nav li.current{border-bottom:1px solid #fff;z-index:5;color:#444}.ig-admin-tabs-nav li a{padding:6px 10px;font-size:14px;font-weight:400;line-height:30px;color:#333;text-decoration:none}.ig-admin-tabs-nav li.current a{text-decoration:none!important;font-weight:700}.ig-admin-tabs-nav li a:hover{color:#333}#ig-admin-tabs .ig-admin-tab{background-color:#FFF;border:1px solid #aaa;padding:16px;display:none}.message_label.sub_option_label{width:10%;padding-top:.3em}.message_label.sub_option_label+.message_field{width:62%}.message_alt_cta_container{margin-bottom:2em}.message_row .ig_admin_hr{border-top:1px dashed rgba(0,0,0,.2);width:75%;display:block;margin:.5em 0 .5em 25%}.message_row .option_title{text-decoration:underline}/*! jQuery UI - v1.11.0 - 2014-07-18
2
+ * http://jqueryui.com
3
+ * Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
5
+ * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
6
+
7
+ .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("../images/animated-overlay.gif");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url("../images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url("../images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url("../images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url("../images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url("../images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url("../images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url("../images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("../images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("../images/ui-icons_222222_256x240.png")}.ui-state-default .ui-icon{background-image:url("../images/ui-icons_888888_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("../images/ui-icons_454545_256x240.png")}.ui-state-active .ui-icon{background-image:url("../images/ui-icons_454545_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("../images/ui-icons_2e83ff_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("../images/ui-icons_cd0a0a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url("../images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url("../images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}/* Chosen v1.1.0 | (c) 2011-2013 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
8
+
9
+ .chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;*display:inline;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:23px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(../images/chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:#fff url(../images/chosen-sprite.png) no-repeat 100% -20px;background:url(../images/chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.chosen-container .chosen-results{position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:5px;height:15px;outline:0;border:0!important;background:transparent!important;box-shadow:none;color:#666;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-multi .chosen-choices li.search-field .default{color:#999}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 0 3px 5px;padding:3px 20px 3px 5px;border:1px solid #aaa;border-radius:3px;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#eee),color-stop(80%,#fff));background-image:-webkit-linear-gradient(#eee 20%,#fff 80%);background-image:-moz-linear-gradient(#eee 20%,#fff 80%);background-image:-o-linear-gradient(#eee 20%,#fff 80%);background-image:linear-gradient(#eee 20%,#fff 80%);box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:0;background:transparent}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#111!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single-nosearch .chosen-search,.chosen-rtl .chosen-drop{left:9999px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:0}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:#fff url(../images/chosen-sprite.png) no-repeat -30px -20px;background:url(../images/chosen-sprite.png) no-repeat -30px -20px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.chosen-rtl .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-container-single .chosen-search input[type=text],.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span{background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}
trunk/assets/css/frontend.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .ig_powered_by,.ig_powered_by a,a.ig_powered_by{color:#A8A8A8!important;text-decoration:none}.ig_cta_overlay{width:100%;height:100%;top:0;left:0;background:#E6E6E6;z-index:1000000;position:fixed;opacity:.5}.ig_cta_spinner{background:url(../images/spinner-2x.gif) center no-repeat no-repeat;height:100%}.icegram .ig_button,.icegram input[type=submit],.icegram input[type=button]{border:none;box-sizing:border-box;box-shadow:none}.ig_message p{margin:0;padding:0;line-height:inherit;font-size:inherit}.ig_clear_fix:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.ig_form_response_text{margin:.5em auto;padding:.5em;text-align:center}.ig_form_container{display:none;position:relative;height:100%;z-index:10;padding:.7em 1em;text-align:left;line-height:1;box-sizing:border-box}.ig_form_container form{margin:0;padding:0;font-size:100%}.ig_form_container select,.ig_form_container textarea{height:2.25em}.ig_form_container input[type=checkbox]{height:1.25em!important}.ig_form_container .ig_form_header{width:98%;text-align:left}.ig_form_container .ig_form_footer{font-size:.8em;width:98%;clear:both;text-align:left}.ig_form_container .ig_form_els{margin:.3em 1% .3em 0}.ig_form_left .ig_form_container.layout_left{display:block;padding:1em .7em}.ig_form_right .ig_form_container.layout_right{display:block;padding:1em .7em;float:left}.ig_form_bottom .ig_form_container.layout_bottom{display:block;width:100%;height:auto}.ig_form_inline .ig_form_container.layout_inline{display:block;width:100%;padding:.5em;background-color:transparent!important;color:inherit!important}.ig_form_left .ig_form_container.layout_left .ig_form_els,.ig_form_right .ig_form_container.layout_right .ig_form_els{margin:.5em auto}.ig_form_bottom .ig_form_container.layout_bottom .ig_form_els,.ig_form_inline .ig_form_container.layout_inline .ig_form_els{display:inline-block;float:left}.ig_form_bottom .ig_form_container.layout_bottom .ig_full .ig_form_els,.ig_form_inline .ig_form_container.layout_inline .ig_full .ig_form_els{width:99%}.ig_form_bottom .ig_form_container.layout_bottom .ig_half .ig_form_els,.ig_form_inline .ig_form_container.layout_inline .ig_half .ig_form_els{width:49%}.ig_form_bottom .ig_form_container.layout_bottom .ig_third .ig_form_els,.ig_form_inline .ig_form_container.layout_inline .ig_third .ig_form_els{width:32%}.ig_form_bottom .ig_form_container.layout_bottom .ig_quater .ig_form_els,.ig_form_inline .ig_form_container.layout_inline .ig_quater .ig_form_els{width:24%}.ig_form_container .ig_form_els input{height:2.25em;line-height:2.2em}.ig_form_container .ig_form_els button,.ig_form_container .ig_form_els input,.ig_form_container .ig_form_els label,.ig_form_container .ig_form_els select,.ig_form_container .ig_form_els textarea{width:99%;font-size:1em;text-align:left;display:block;margin:0 auto;box-sizing:border-box}.ig_form_container .ig_form_els .ig_button{text-align:center}.ig_form_container .ig_form_els select,.ig_form_container .ig_form_els textarea{padding-left:.5em}.ig_form_container .ig_form_els textarea{padding-top:.5em}.ig_form_container .ig_form_els.ig_form_el_radio{height:2.25em!important;line-height:2.2em}.ig_form_container .ig_form_els.ig_form_el_radio input{width:auto!important;display:inline;margin:0 .3em;height:1em!important}.ig_form_bottom .ig_form_container.layout_bottom .ig_quater .ig_form_els.ig_form_el_radio,.ig_form_inline .ig_form_container.layout_inline .ig_quater .ig_form_els.ig_form_el_radio{display:inline}.ig_form_bottom .ig_form_container.layout_bottom .ig_quater .ig_form_els.ig_form_el_radio label,.ig_form_inline .ig_form_container.layout_inline .ig_quater .ig_form_els.ig_form_el_radio label{width:auto;display:inline}.ig_form_left .ig_form_container.layout_left .ig_button_label,.ig_form_right .ig_form_container.layout_right .ig_button_label{display:none}.ig_form_bottom .ig_form_container.layout_bottom .ig_button_label,.ig_form_inline .ig_form_container.layout_inline .ig_button_label{display:block;visibility:hidden;opacity:0}.ig_form_bottom .ig_form_container.layout_bottom .ig_button,.ig_form_bottom .ig_form_container.layout_bottom input[type=submit],.ig_form_bottom .ig_form_container.layout_bottom input[type=button],.ig_form_inline .ig_form_container.layout_inline .ig_button,.ig_form_inline .ig_form_container.layout_inline input[type=submit],.ig_form_inline .ig_form_container.layout_inline input[type=button],.ig_form_left .ig_form_container.layout_left .ig_button,.ig_form_left .ig_form_container.layout_left input[type=submit],.ig_form_left .ig_form_container.layout_left input[type=button],.ig_form_right .ig_form_container.layout_right .ig_button,.ig_form_right .ig_form_container.layout_right input[type=submit],.ig_form_right .ig_form_container.layout_right input[type=button]{width:99%;font-size:1em;float:none;margin:0 auto!important;text-align:center;display:block;-ms-transform:inherit;-webkit-transform:inherit;transform:inherit;opacity:1}.ig_form_inline.ig_form_style_1 .ig_form_container:before,.ig_form_inline.ig_form_style_4 .ig_form_container:before,.ig_form_style_0 .ig_form_container:before{display:none}.ig_form_container:before{content:'';padding:0;margin:0;position:absolute;box-sizing:content-box}.ig_form_style_0 .ig_form_container .ig_form_els input{height:2.25em;line-height:2.2em;padding:inherit;padding-left:.5em}.ig_form_style_0 .ig_form_container .ig_form_els .ig_button,.ig_form_style_0 .ig_form_container .ig_form_els .ig_button:focus,.ig_form_style_0 .ig_form_container .ig_form_els .ig_button:hover{height:2.25em;line-height:2.2em;padding:inherit}.ig_form_style_1 .ig_form_container:before{border-width:0;border-style:solid;border-color:#000!important;opacity:.3;top:0}.ig_form_left.ig_form_style_1 .ig_form_container:before{right:0;height:inherit;border-left-width:.22em}.ig_form_right.ig_form_style_1 .ig_form_container:before{left:0;height:inherit;border-left-width:.22em}.ig_form_bottom.ig_form_style_1 .ig_form_container:before{left:0;width:100%;border-top-width:.22em}.ig_form_style_1 .ig_form_container .ig_form_els input:not(.ig_button),.ig_form_style_5 .ig_form_container .ig_form_els input:not(.ig_button),.ig_form_style_6 .ig_form_container .ig_form_els input:not(.ig_button){border:1px solid #ccc}.ig_form_style_1 .ig_form_container .ig_form_els input,.ig_form_style_5 .ig_form_container .ig_form_els input,.ig_form_style_6 .ig_form_container .ig_form_els input{height:2.25em;line-height:2.2em;border-radius:.2em;box-shadow:none;padding:inherit;padding-left:.5em}.ig_form_style_1 .ig_form_container .ig_form_els input:focus:not(.ig_button),.ig_form_style_1 .ig_form_container .ig_form_els input:hover:not(.ig_button),.ig_form_style_5 .ig_form_container .ig_form_els input:focus:not(.ig_button),.ig_form_style_5 .ig_form_container .ig_form_els input:hover:not(.ig_button),.ig_form_style_6 .ig_form_container .ig_form_els input:focus:not(.ig_button),.ig_form_style_6 .ig_form_container .ig_form_els input:hover:not(.ig_button){border-color:#999}.ig_form_style_1 .ig_form_container .ig_form_els input:focus,.ig_form_style_1 .ig_form_container .ig_form_els input:hover,.ig_form_style_5 .ig_form_container .ig_form_els input:focus,.ig_form_style_5 .ig_form_container .ig_form_els input:hover,.ig_form_style_6 .ig_form_container .ig_form_els input:focus,.ig_form_style_6 .ig_form_container .ig_form_els input:hover{height:2.25em;line-height:2.2em;padding:inherit;padding-left:.5em}.ig_form_style_1 .ig_form_container .ig_form_els .ig_button,.ig_form_style_1 .ig_form_container .ig_form_els .ig_button:focus,.ig_form_style_1 .ig_form_container .ig_form_els .ig_button:hover,.ig_form_style_5 .ig_form_container .ig_form_els .ig_button,.ig_form_style_5 .ig_form_container .ig_form_els .ig_button:focus,.ig_form_style_5 .ig_form_container .ig_form_els .ig_button:hover,.ig_form_style_6 .ig_form_container .ig_form_els .ig_button,.ig_form_style_6 .ig_form_container .ig_form_els .ig_button:focus,.ig_form_style_6 .ig_form_container .ig_form_els .ig_button:hover{height:2.25em;line-height:2.2em;padding:inherit}.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els,.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els{margin-right:0;margin-left:0}.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els .ig_button,.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els .ig_button,.ig_form_left.ig_form_style_2 .ig_form_container.layout_left .ig_form_els .ig_button,.ig_form_right.ig_form_style_2 .ig_form_container.layout_right .ig_form_els .ig_button{padding:inherit}.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els.ig_form_els_first label,.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_first label,.ig_form_left.ig_form_style_2 .ig_form_container.layout_left .ig_form_els input,.ig_form_left.ig_form_style_2 .ig_form_container.layout_left .ig_form_els label,.ig_form_right.ig_form_style_2 .ig_form_container.layout_right .ig_form_els input,.ig_form_right.ig_form_style_2 .ig_form_container.layout_right .ig_form_els label{padding-left:1em}.ig_form_left.ig_form_style_2 .ig_form_container.layout_left .ig_form_els .ig_button,.ig_form_left.ig_form_style_2 .ig_form_container.layout_left .ig_form_els input,.ig_form_right.ig_form_style_2 .ig_form_container.layout_right .ig_form_els .ig_button,.ig_form_right.ig_form_style_2 .ig_form_container.layout_right .ig_form_els input{height:2.25em;line-height:2.2em;border-radius:2em}.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els .ig_button,.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els input,.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els .ig_button,.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els input{height:2.25em;line-height:2.2em;width:100%;border-width:2px 0 2px 2px}.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els.ig_form_els_first input,.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_first input{border-radius:2em 0 0 2em;padding-left:1em}.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els.ig_form_els_last input,.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_last input{border-radius:0 2em 2em 0}.ig_form_style_3 .ig_form_container .ig_form_els input:not(.ig_button){border:1px solid rgba(255,255,255,.3)}.ig_form_style_3 .ig_form_container .ig_form_els input{height:2.25em;line-height:2.2em;box-shadow:none;padding:inherit;padding-left:.5em;background-color:rgba(0,0,0,.3)}.ig_form_style_3 .ig_form_container .ig_form_els input:focus:not(.ig_button),.ig_form_style_3 .ig_form_container .ig_form_els input:hover:not(.ig_button){border-color:rgba(255,255,255,.6)}.ig_form_style_3 .ig_form_container .ig_form_els input:focus,.ig_form_style_3 .ig_form_container .ig_form_els input:hover{height:2.25em;line-height:2.2em;padding:inherit;padding-left:.5em}.ig_form_style_3 .ig_form_container .ig_form_els .ig_button,.ig_form_style_3 .ig_form_container .ig_form_els .ig_button:focus,.ig_form_style_3 .ig_form_container .ig_form_els .ig_button:hover{height:2.25em;line-height:2.2em;padding:inherit}.ig_form_style_3 .ig_form_container .ig_form_els ::-webkit-input-placeholder{color:rgba(255,255,255,.5)}.ig_form_style_3 .ig_form_container .ig_form_els :-moz-placeholder{color:rgba(255,255,255,.5);opacity:1}.ig_form_style_3 .ig_form_container .ig_form_els ::-moz-placeholder{color:rgba(255,255,255,.5);opacity:1}.ig_form_style_3 .ig_form_container .ig_form_els :-ms-input-placeholder{color:rgba(255,255,255,.5)}.ig_form_bottom.ig_form_style_4 .ig_content{margin-bottom:1.3em}.ig_form_style_4 .ig_form_container:before{border-style:solid;top:-1em;left:-1em;width:100%;height:100%;border-width:1em;z-index:-1;box-shadow:0 0 15px rgba(0,0,0,.7)}.ig_form_right.ig_form_style_4 .ig_form_container:before{left:inherit;right:-1em}.ig_form_style_4 .ig_form_container .ig_form_els input{height:2.25em;line-height:2.2em;padding:inherit;padding-left:.5em}.ig_form_style_4 .ig_form_container .ig_form_els .ig_button,.ig_form_style_4 .ig_form_container .ig_form_els .ig_button:focus,.ig_form_style_4 .ig_form_container .ig_form_els .ig_button:hover{height:2.25em;line-height:2.2em;padding:inherit}.ig_form_bottom.ig_form_style_5 .ig_form_container.layout_bottom .ig_form_els_first,.ig_form_inline.ig_form_style_5 .ig_form_container.layout_inline .ig_form_els_first{width:68%}.ig_form_bottom.ig_form_style_5 .ig_form_container.layout_bottom .ig_form_els_last,.ig_form_inline.ig_form_style_5 .ig_form_container.layout_inline .ig_form_els_last{width:30%}.ig_form_style_6 .ig_form_container.layout_bottom .ig_full .ig_form_els,.ig_form_style_6 .ig_form_container.layout_bottom .ig_half .ig_form_els,.ig_form_style_6 .ig_form_container.layout_bottom .ig_quater .ig_form_els,.ig_form_style_6 .ig_form_container.layout_bottom .ig_third .ig_form_els,.ig_form_style_6 .ig_form_container.layout_inline .ig_full .ig_form_els,.ig_form_style_6 .ig_form_container.layout_inline .ig_half .ig_form_els,.ig_form_style_6 .ig_form_container.layout_inline .ig_quater .ig_form_els,.ig_form_style_6 .ig_form_container.layout_inline .ig_third .ig_form_els{width:99%;margin:.5em auto 0}.ig_anim_appear_in{-webkit-animation:IgFadeIn .9s;animation:IgFadeIn .9s;visibility:visible}@-webkit-keyframes IgFadeIn{0%{opacity:0}50%{opacity:.5}100%{opacity:1}}@keyframes IgFadeIn{0%{opacity:0}50%{opacity:.5}100%{opacity:1}}.ig_anim_appear_out{-webkit-animation:IgFadeOut .9s;animation:IgFadeOut .9s}@-webkit-keyframes IgFadeOut{0%{opacity:1}99.5%{opacity:.5}100%{opacity:1}}@keyframes IgFadeOut{0%{opacity:1}99.5%{opacity:.5}100%{opacity:1}}.ig_left.ig_anim_slide_in{animation-name:IgSlideInLeft;-moz-animation-name:IgSlideInLeft;-webkit-animation-name:IgSlideInLeft;animation-duration:.5s;-moz-animation-duration:.5s;-webkit-animation-duration:.5s;animation-timing-function:ease;-moz-animation-timing-function:ease;-webkit-animation-timing-function:ease}@-webkit-keyframes IgSlideInLeft{0%{-webkit-transform:translate3d(-100%,0,0)}100%{-webkit-transform:none}}@keyframes IgSlideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{-webkit-transform:none;transform:none}}.ig_left.ig_anim_slide_out{animation-name:IgFadeOutLeft;-moz-animation-name:IgFadeOutLeft;-webkit-animation-name:IgFadeOutLeft;animation-duration:.9s;-moz-animation-duration:.9s;-webkit-animation-duration:.9s;animation-timing-function:ease;-moz-animation-timing-function:ease;-webkit-animation-timing-function:ease;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@-webkit-keyframes IgFadeOutLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0)}99.5%{opacity:0;-webkit-transform:translate3d(-100%,0,0)}100%{opacity:1;-webkit-transform:translate3d(-100%,0,0)}}@keyframes IgFadeOutLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}99.5%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{opacity:1;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.ig_right.ig_anim_slide_in{animation-name:IgSlideInRight;-moz-animation-name:IgSlideInRight;-webkit-animation-name:IgSlideInRight;animation-duration:.5s;-moz-animation-duration:.5s;-webkit-animation-duration:.5s;animation-timing-function:ease;-moz-animation-timing-function:ease;-webkit-animation-timing-function:ease}@-webkit-keyframes IgSlideInRight{0%{-webkit-transform:translate3d(100%,0,0)}100%{-webkit-transform:none}}@keyframes IgSlideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{-webkit-transform:none;transform:none}}.ig_right.ig_anim_slide_out{animation-name:IgFadeOutRight;-moz-animation-name:IgFadeOutRight;-webkit-animation-name:IgFadeOutRight;animation-duration:.9s;-moz-animation-duration:.9s;-webkit-animation-duration:.9s;animation-timing-function:ease;-moz-animation-timing-function:ease;-webkit-animation-timing-function:ease;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@-webkit-keyframes IgFadeOutRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0)}99.5%{opacity:0;-webkit-transform:translate3d(100%,0,0)}100%{opacity:1;-webkit-transform:translate3d(100%,0,0)}}@keyframes IgFadeOutRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}99.5%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{opacity:1;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.ig_bottom .ig_anim_slide_in,.ig_bottom.ig_anim_slide_in{animation-name:IgSlideInUp;-moz-animation-name:IgSlideInUp;-webkit-animation-name:IgSlideInUp;animation-duration:.5s;-moz-animation-duration:.5s;-webkit-animation-duration:.5s;animation-timing-function:ease;-moz-animation-timing-function:ease;-webkit-animation-timing-function:ease}@-webkit-keyframes IgSlideInUp{0%{-webkit-transform:translate3d(0,100%,0)}100%{-webkit-transform:none}}@keyframes IgSlideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}100%{-webkit-transform:none;transform:none}}.ig_bottom .ig_anim_slide_out,.ig_bottom.ig_anim_slide_out{animation-name:IgFadeOutDown;-moz-animation-name:IgFadeOutDown;-webkit-animation-name:IgFadeOutDown;animation-duration:.9s;-moz-animation-duration:.9s;-webkit-animation-duration:.9s;animation-timing-function:ease;-moz-animation-timing-function:ease;-webkit-animation-timing-function:ease;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@-webkit-keyframes IgFadeOutDown{0%{opacity:1;-webkit-transform:translate3d(0,0,0)}99.5%{opacity:0;-webkit-transform:translate3d(0,100%,0)}100%{opacity:1;-webkit-transform:translate3d(0,100%,0)}}@keyframes IgFadeOutDown{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}99.5%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}100%{opacity:1;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.ig_anim_slide_in,.ig_top .ig_anim_slide_in,.ig_top.ig_anim_slide_in{animation-name:IgSlideInDown;-moz-animation-name:IgSlideInDown;-webkit-animation-name:IgSlideInDown;animation-duration:.5s;-moz-animation-duration:.5s;-webkit-animation-duration:.5s;animation-timing-function:ease;-moz-animation-timing-function:ease;-webkit-animation-timing-function:ease}@-webkit-keyframes IgSlideInDown{0%{-webkit-transform:translate3d(0,-100%,0)}100%{-webkit-transform:none}}@keyframes IgSlideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}100%{-webkit-transform:none;transform:none}}.ig_anim_slide_out,.ig_top .ig_anim_slide_out,.ig_top.ig_anim_slide_out{animation-name:IgFadeOutUp;-moz-animation-name:IgFadeOutUp;-webkit-animation-name:IgFadeOutUp;animation-duration:.9s;-moz-animation-duration:.9s;-webkit-animation-duration:.9s;animation-timing-function:ease;-moz-animation-timing-function:ease;-webkit-animation-timing-function:ease;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@-webkit-keyframes IgFadeOutUp{0%{opacity:1;-webkit-transform:translate3d(0,0,0)}99.5%{opacity:0;-webkit-transform:translate3d(0,-100%,0)}100%{opacity:1;-webkit-transform:translate3d(0,-100%,0)}}@keyframes IgFadeOutUp{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}99.5%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}100%{opacity:1;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}
trunk/assets/images/animated-overlay.gif ADDED
Binary file
trunk/assets/images/arrows-sprite.png ADDED
Binary file
trunk/assets/images/chosen-sprite.png ADDED
Binary file
trunk/assets/images/christmas.png ADDED
Binary file
trunk/assets/images/clear-footer.png ADDED
Binary file
trunk/assets/images/clear-header.png ADDED
Binary file
trunk/assets/images/clear-option.png ADDED
Binary file
trunk/assets/images/desktop.png ADDED
Binary file
trunk/assets/images/from_layouts.png ADDED
Binary file
trunk/assets/images/halloween.png ADDED
Binary file
trunk/assets/images/icegram-logo-16bit-gray-30.png ADDED
Binary file
trunk/assets/images/icegram-logo-branding-18-white.png ADDED
Binary file
trunk/assets/images/icegram-logo-branding-64-grey.png ADDED
Binary file
trunk/assets/images/icegram-logo-branding-64-white.png ADDED
Binary file
trunk/assets/images/icegram-logo-branding-64.png ADDED
Binary file
trunk/assets/images/ig-growth-rocket_2.png ADDED
Binary file
trunk/assets/images/popup-amaze-bg.jpg ADDED
Binary file
trunk/assets/images/popup-close.png ADDED
Binary file
trunk/assets/images/sketch-action-bar.png ADDED
Binary file
trunk/assets/images/sketch-messenger.png ADDED
Binary file
trunk/assets/images/sketch-multiple-sequence.png ADDED
Binary file
trunk/assets/images/sketch-popup.png ADDED
Binary file
trunk/assets/images/sketch-rules.png ADDED
Binary file
trunk/assets/images/sketch-toast-notification.png ADDED
Binary file
trunk/assets/images/social-img.png ADDED
Binary file
trunk/assets/images/spinner-2x.gif ADDED
Binary file
trunk/assets/images/sprite_1.png ADDED
Binary file
trunk/assets/images/stand-out.png ADDED
Binary file
trunk/assets/images/style_0.png ADDED
Binary file
trunk/assets/images/style_1.png ADDED
Binary file
trunk/assets/images/style_2.png ADDED
Binary file
trunk/assets/images/style_3.png ADDED
Binary file
trunk/assets/images/style_4.png ADDED
Binary file
trunk/assets/images/talk-close.png ADDED
Binary file
trunk/assets/images/talk-footer-1.png ADDED
Binary file
trunk/assets/images/talk-header-1.png ADDED
Binary file
trunk/assets/images/talk-header-2.png ADDED
Binary file
trunk/assets/images/toast-glow.png ADDED
Binary file
trunk/assets/images/ui-bg_flat_0_aaaaaa_40x100.png ADDED
Binary file
trunk/assets/images/ui-bg_flat_75_ffffff_40x100.png ADDED
Binary file
trunk/assets/images/ui-bg_glass_55_fbf9ee_1x400.png ADDED
Binary file
trunk/assets/images/ui-bg_glass_65_ffffff_1x400.png ADDED
Binary file
trunk/assets/images/ui-bg_glass_75_dadada_1x400.png ADDED
Binary file
trunk/assets/images/ui-bg_glass_75_e6e6e6_1x400.png ADDED
Binary file
trunk/assets/images/ui-bg_glass_95_fef1ec_1x400.png ADDED
Binary file
trunk/assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png ADDED
Binary file
trunk/assets/images/ui-icons_222222_256x240.png ADDED
Binary file
trunk/assets/images/ui-icons_2e83ff_256x240.png ADDED
Binary file
trunk/assets/images/ui-icons_454545_256x240.png ADDED
Binary file
trunk/assets/images/ui-icons_888888_256x240.png ADDED
Binary file
trunk/assets/images/ui-icons_cd0a0a_256x240.png ADDED
Binary file
trunk/assets/js/admin.min.js ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Chosen v1.1.0 | (c) 2011-2013 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
+ !function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),children:0,disabled:a.disabled}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&amp;"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0},AbstractChosen.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(){var a=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return a.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(){var a=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return a.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f;for(b="",f=this.results_data,d=0,e=f.length;e>d;d++)c=f[d],b+=c.group?this.result_add_group(c):this.result_add_option(c),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(c.text));return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match?this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,this.outerHTML(c)):"":""},AbstractChosen.prototype.result_add_group=function(a){var b;return a.search_match||a.group_match?a.active_options>0?(b=document.createElement("li"),b.className="group-result",b.innerHTML=a.search_text,this.outerHTML(b)):"":""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m;for(this.no_results_clear(),e=0,g=this.get_search_text(),a=g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),d=this.search_contains?"":"^",c=new RegExp(d+a,"i"),j=new RegExp(a,"i"),m=this.results_data,k=0,l=m.length;l>k;k++)b=m[k],b.search_match=!1,f=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(f=this.results_data[b.group_array_index],0===f.active_options&&f.search_match&&(e+=1),f.active_options+=1),(!b.group||this.group_search)&&(b.search_text=b.group?b.label:b.html,b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(e+=1),b.search_match?(g.length&&(h=b.search_text.search(j),i=b.search_text.substr(0,h+g.length)+"</em>"+b.search_text.substr(h+g.length),b.search_text=i.substr(0,h)+"<em>"+i.substr(h)),null!=f&&(f.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>e&&g.length?(this.update_results_content(""),this.no_results(g)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(){var a=this;return setTimeout(function(){return a.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(){var c,d;c=a(this),d=c.data("chosen"),"destroy"===b&&d?d.destroy():d||c.data("chosen",new Chosen(this,b))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(){var a;return this.form_field.tabIndex?(a=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=a):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+b.html+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(c.text),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").text(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":a("<div/>").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}.call(this);;// Generated by CoffeeScript 1.3.1
3
+ (function(e){return e.fn.ajaxChosen=function(t,n){var r,i,s,o;t==null&&(t={});n==null&&(n=function(){});i={minTermLength:3,afterTypeDelay:500,jsonTermKey:"term"};o=this;r=null;s=e.extend({},i,t);this.chosen();return this.each(function(){return e(this).next(".chosen-container").find(".search-field > input, .chosen-search > input").bind("keyup",function(){var t,i,u,a;a=e.trim(e(this).attr("value"));i=a.length<s.minTermLength?"Keep typing...":"Looking for '"+a+"'";o.next(".chosen-container").find(".no-results").text(i);if(a===e(this).data("prevVal"))return!1;e(this).data("prevVal",a);this.timer&&clearTimeout(this.timer);if(a.length<s.minTermLength)return!1;t=e(this);s.data==null&&(s.data={});s.data[s.jsonTermKey]=a;s.dataCallback!=null&&(s.data=s.dataCallback(s.data));u=s.success;s.success=function(r){var i,s;if(r==null)return;s=[];o.find("option").each(function(){return e(this).is(":selected")?s.push(e(this).val()+"-"+e(this).text()):e(this).remove()});i=n(r);e.each(i,function(t,n){if(e.inArray(t+"-"+n,s)===-1)return e("<option />").attr("value",t).html(n).appendTo(o)});o.trigger("chosen:updated");u!=null&&u(r);t.attr("value",a);return t.css("width","auto")};return this.timer=setTimeout(function(){r&&r.abort();return r=e.ajax(s)},s.afterTypeDelay)})})}})(jQuery);;jQuery(function(){function a(a){var b=jQuery(a).find(".message_type option:selected").val();jQuery(a).closest(".message-edit-row").prev().find(".message_header_label").text(b).removeClass().addClass("message_header_label ig_"+b);var c=jQuery(a).find(".message_row.ig_"+b).find(".message_theme").val(),d=jQuery(a).find(".message_row.ig_"+b).find("#message_form_style").val(),e=jQuery(a).find("#message_theme_ig_"+b).find("."+c).attr("style"),f=jQuery(a).find("#message_form_style").find("."+d).attr("style");jQuery(a).find(".message_row, .location").hide(),jQuery(a).find(".ig_"+b).show(),jQuery(a).find(".message_row.ig_"+b).find(".message_theme").next().find(".chosen-single span").attr("style",e),jQuery(a).find(".message_row.ig_"+b).find("#message_form_style").next().find(".chosen-single span").attr("style",f).text(function(){return jQuery(this).text().substr(0,jQuery(this).text().indexOf(" "))||jQuery(this).text()}),"block"!==jQuery(a).find(".message_body").parent().css("display")?jQuery(a).find(".message_body").parent().next(".wp-editor-wrap").hide():jQuery(a).find(".message_body").parent().next(".wp-editor-wrap").show(),jQuery(a).find(".message_form_layout:checked").is(":visible")||jQuery(a).find(".message_form_layout:visible").first().prop("checked",!0),1==jQuery(a).find(".show_form_options").prop("checked")&&jQuery(a).find(".message_link").parent().hide(),jQuery(".message_form_layout").change()}function b(a,c,d){var e=Math.floor(Math.random()*(d-c+1))+c;return e==a?b(e,c,d):e}function c(){var a='<span><label class="options_header"><span id="valid-field"> </span></label> <input type="text" class="url_input_field" data-option="local_url" name="campaign_target_rules[local_urls][]" value="'+e+'*"/><span class="delete-url"></span></span>';return a}function d(){0==jQuery(".message-row").length?jQuery(".empty_campaign").show():jQuery(".empty_campaign").hide()}var e=icegram_writepanel_params.home_url;jQuery(document).ready(function(){var c=jQuery("#ig-admin-tabs");c.find(".ig-admin-nav-main").addClass("current"),c.find("#ig-admin-tab-main").show(),"post-new-php"===adminpage&&(jQuery("#poststuff").find(".ig-gallery-wrap").addClass("ig-gallery-position"),jQuery("#wpbody").on("click","#ig-add-new-campaign",function(){jQuery("#poststuff").css("position","static"),jQuery("#postbox-container-1 #side-sortables").removeClass("empty-container").addClass("gal-toggled"),jQuery(".gallery-heading, .ig-gallery-wrap").hide(),jQuery(".postbox-container").show(),jQuery(".wrap h1.wp-heading-inline").not(".gallery-heading").show(),jQuery(".ig-gallery-wrap").siblings().not(".gallery-heading").show(),jQuery(".postbox-container").siblings().show()})),jQuery("#ig-admin-tabs").on("click",".ig-admin-tabs-nav li",function(a){a.preventDefault(),jQuery(this).hasClass("ig-admin-nav-notab")||(c.find(".ig-admin-tabs-nav li").not(this).removeClass("current"),jQuery(".ig-admin-tab").fadeOut("fast"),jQuery(jQuery(this).addClass("current").find("a").attr("href")).fadeIn("fast"),jQuery(this).hasClass("new-variation")&&(jQuery(this).removeClass("current"),jQuery(".ig-admin-nav-variations").addClass("current")))});var e=window.send_to_editor,f=jQuery(".ig_preview_button");jQuery("#submitdiv .submitbox #minor-publishing-actions").after(f),f.fadeIn("fast"),jQuery(".color-field").wpColorPicker().each(function(a){var b=jQuery(this).data("color-label")||"";""!==b&&jQuery(this).closest(".wp-picker-container").find("a.wp-color-result").attr("title",b)}),jQuery(".campaign_data, #message-settings").on("change",".show_color_options",function(){jQuery(this).closest("p").next(".message_colors_options_container").toggle(!this.checked)}).change(),d(),jQuery(".message_edit:first").trigger("click"),this_data=jQuery(".message_type option:selected").closest(".message-setting-fields");for(var g=0;g<this_data.length;g++)a(this_data[g]);jQuery(".campaign_data, #message-settings").on("change",".message_type",function(b){var c=jQuery(b.target).parents(".message-setting-fields");a(c)}),jQuery(".campaign_data, #message-settings").on("change",".message_theme",function(a){var b=jQuery(a.target).parents(".message-setting-fields"),c=jQuery(b).find(".message_type").val(),d=jQuery(b).find(".message_row.ig_"+c).find(".message_theme").val(),e=jQuery(b).find("#message_theme_ig_"+c).find("."+d).attr("style");jQuery(b).find(".message_row.ig_"+c).find(".message_theme").next().find(".chosen-single span").attr("style",e)}),jQuery(".campaign_data, #message-settings").on("change",".rainmaker_form_list",function(a){"null"!==(jQuery(a.target).val()||"null")&&jQuery(a.target).parent().siblings(".message_form_html_original").hide()}),jQuery(".campaign_data, #message-settings").on("click",".message_image_button",function(a){var b=this;return window.send_to_editor=function(a){imgurl=jQuery("img",a).attr("src"),jQuery(b).parent().find("#upload_image").val(imgurl),tb_remove(),window.send_to_editor=e},!1}),jQuery(".campaign_data, #message-settings").on("click",".message_headline_button",function(){var a=jQuery(this).prev().attr("data-headline"),c=icegram_writepanel_params.available_headlines.length,d=b(a,0,c),e=icegram_writepanel_params.available_headlines[d];jQuery(this).prev().val(e)}),jQuery(".tips, .help_tip").tipTip({attribute:"data-tip"}),jQuery("span.test_class").hover(function(){jQuery(this).next().show()},function(){jQuery(this).next().hide()}),jQuery(".campaign_data .handle, .campaign_data .handlediv").unbind("click"),jQuery(".campaign_data .handlediv").hide(),jQuery("#poststuff").on("click","#publish",function(a){jQuery(".campaign_data").find(".message_header_label.ig_unknown").length&&(alert("Please select Message type"),a.preventDefault())})}),jQuery(".campaign_data, #message-settings").on("click",".message_delete",function(){jQuery(this).parent().parent().next().remove(),jQuery(this).parent().parent().remove(),d()}),jQuery(".campaign_data, #message-settings").on("click",".message_edit",function(){jQuery(this).parent().parent().next().toggle(),jQuery(this).parent().parent().find(".message-title-text, .message-title-input").toggle()}),jQuery(".campaign_data, #message-settings").on("click",".embed_form_code_toggle",function(){jQuery(this).parent().parent().siblings(".message_form_html_original").toggle()}),jQuery(".campaign_data, #message-settings").on("change",".message-title-input",function(){jQuery(this).prev().text(jQuery(this).val())}),jQuery("select.ajax_chosen_select_messages").ajaxChosen({type:"GET",url:icegram_writepanel_params.ajax_url,dataType:"json",afterTypeDelay:100,data:{action:"icegram_json_search_messages",security:icegram_writepanel_params.search_message_nonce}},function(a){var b={};return jQuery.each(a,function(a,c){b[a]=c}),b}),jQuery(".campaign_data, #message-settings").on("change",".show_form_options",function(a){var b=jQuery(this).closest("p");if(jQuery(b).siblings(".message_form_options").slideToggle(this.checked),this.checked)jQuery(b).closest(".thickbox_edit_message").find(".message_link").parent().hide(),jQuery(b).siblings("p.cta-actions").find("select option").removeAttr("disabled"),jQuery(b).siblings("p.cta-actions").find("select").find('option[value="url"], option[value="hide"], option[value="cta_another_message"]').attr("disabled",!0).attr("selected",!1).end().find('option[value="form"]').attr("selected",!0).trigger("change"),jQuery(b).siblings(".message_form_options").find(".message_form_layout").change();else{jQuery(b).siblings("p.cta-actions").find("select option").removeAttr("disabled");var c=jQuery(b).siblings(".message_form_options").siblings(".wp-editor-wrap").find(".wp-editor-area"),d=jQuery(c).val().trim().replace("[ig_form]","");jQuery(c).val(d),jQuery(b).closest(".thickbox_edit_message").find(".message_link").parent().show()}}).change(),jQuery(".campaign_data, #message-settings").on("change",".message_form_style",function(a){var b=jQuery(a.target).parents(".message-setting-fields"),c=jQuery(b).find("#message_form_style").val(),d=jQuery(b).find("#message_form_style").find("."+c).attr("style");jQuery(b).find(".message_form_style").next().find(".chosen-single span").attr("style",d).text(function(){return jQuery(this).text().substr(0,jQuery(this).text().indexOf(" "))||jQuery(this).text()})}),jQuery(".campaign_data, #message-settings").on("change",".message_form_layout ",function(){if(jQuery(this).is(":visible")){var a=this,b=jQuery(this).closest(".message_form_options").siblings(".wp-editor-wrap").find(".wp-editor-area"),c=jQuery(b).val().trim();jQuery(a).closest(".form_radio_group").siblings(".form_inline_shortcode").hide(),jQuery(a).closest(".form_radio_group").siblings(".message_form_color").show(),jQuery(a).is(":checked")&&jQuery(a).closest(".message_form_options").prev("p.message_form_options_check").find(".show_form_options").is(":checked")&&("inline"==jQuery(a).val()?(-1==c.indexOf("[ig_form]")&&(c+="[ig_form]"),jQuery(a).closest(".form_radio_group").siblings(".message_form_color, .form_inline_shortcode").toggle()):"inline"!=jQuery(a).val()&&(c=c.replace("[ig_form]",""))),jQuery(b).val(c)}}),jQuery(".campaign_data, #message-settings").on("blur",".message_form_html_original",function(a){var b=this,c=jQuery("<div/>").html(jQuery(b).val()).find("input[type=submit], button, input[type=button]").not("*:disabled");if(c.length>0){var d=jQuery(c[c.length-1]),e=d.is("button")?d.not("br, span, div").text():d.val();jQuery(b).closest(".message_form_options").siblings("p").find("#message_label").val(e.trim())}}),jQuery(".campaign_data, #message-settings").on("change",".show_custom_code_options",function(a){var b=jQuery(this).closest("p");jQuery(b).siblings(".message_custom_code_options").slideToggle(this.checked)}),jQuery(".ajax_chosen_select_messages").chosen(),jQuery(".campaign_data, #message-settings").on("change",".ajax_chosen_select_messages",function(){var b={},c=jQuery("#ig-admin-tabs li.current").attr("variation_id");"undefined"!=typeof c&&jQuery.extend(b,{selected_tab:c});var e=jQuery.extend({},tinyMCEPreInit.mceInit.content),f=jQuery.extend({},tinyMCEPreInit.qtInit.content),g=jQuery(this).parent().siblings(".campaign_target_rules_panel");"undefined"!=typeof g&&(b.parent_campaign_box=g);var h=jQuery(g).find(".message-row").length,i=jQuery(this).val();return""==i?void jQuery(".ajax_chosen_select_messages").val("").trigger("chosen:updated"):(jQuery(".message-edit-row").hide(),jQuery(".message-title-text").show(),jQuery(".message-title-input").hide(),void jQuery.ajax({type:"POST",url:icegram_writepanel_params.ajax_url,dataType:"json",data:{action:"get_message_action_row",message_id:i,row:h},success:function(c){if(h++,jQuery(g).find(".messages-list .messages_list_table tbody").append(c.main),jQuery(".color-field").wpColorPicker().each(function(a){var b=jQuery(this).data("color-label")||"";""!==b&&jQuery(this).closest(".wp-picker-container").find("a.wp-color-result").attr("title",b)}),jQuery(".campaign_data, #message-settings").on("change",".show_color_options",function(){jQuery(this).closest("p").next(".message_colors_options_container").toggle(!this.checked)}).change(),a(jQuery("#"+c.id)),jQuery(".ajax_chosen_select_messages").val("").trigger("chosen:updated"),jQuery(".campaign_data, #message-settings").find(".message_theme").append('<option value="ig_get_more_theme" class="ig_get_more">Get more Themes</option>'),jQuery(".campaign_data, #message-settings").find(".message_animation").append('<option value="ig_get_more_animation" class="ig_get_more">Get more Animations</option>'),jQuery("select.icegram_chosen_page").chosen({disable_search_threshold:10}),d(),jQuery(".message-setting-fields").trigger("change"),jQuery(".tips, .help_tip").tipTip({attribute:"data-tip"}),"undefined"==typeof tinyMCEPreInit.mceInit["edit"+c.id]){for(_prop in e)"string"==typeof e[_prop]&&"content_css"!==_prop&&(e[_prop]=e[_prop].replace(new RegExp("content","g"),"edit"+c.id));tinyMCEPreInit.mceInit["edit"+c.id]=e}if("undefined"==typeof tinyMCEPreInit.qtInit["edit"+c.id]){for(_prop in f)"string"==typeof f[_prop]&&"content_css"!==_prop&&(f[_prop]=f[_prop].replace(new RegExp("content","g"),"edit"+c.id));tinyMCEPreInit.qtInit["edit"+c.id]=f}tinyMCE.init({id:tinyMCEPreInit.mceInit["edit"+c.id]}),quicktags({id:"edit"+c.id}),QTags._buttonsInit(),jQuery("#wp-edit"+c.id+"-wrap").hasClass("tmce-active")?jQuery("#edit"+c.id+"-tmce").click():jQuery("#edit"+c.id+"-html").click(),jQuery(window).trigger("icegram_message_added_ajax",[b])}}))}),jQuery(".campaign_target_rules").on("click","#add_local_url_row",function(a){a.preventDefault();var b=c();jQuery(".local_url").find(".url_input_field").length?jQuery(b).insertAfter(jQuery(".local_url").find(".url_input_field").last().parent("span")):jQuery(b).insertBefore(jQuery(".local_url").find("#add_local_url_row_label"))}),jQuery(".campaign_target_rules").on("click",".delete-url",function(a){jQuery(this).parent().remove()}),jQuery(document).on("click",".campaign_preview",function(a){0!=jQuery(".message-row").length&&(tinyMCE.triggerSave(),params=jQuery("#post").serializeArray(),params.push({name:"action",value:"save_campaign_preview"}),jQuery.ajax({type:"POST",async:!1,url:icegram_writepanel_params.ajax_url,data:params,success:function(a){""!=a&&window.open(a,"preview_window")}}))}),jQuery(".campaign_data, #message-settings").find(".message_theme").append('<option value="ig_get_more_theme" class="ig_get_more">Get more themes</option>'),jQuery(".campaign_data, #message-settings").find(".message_animation").append('<option value="ig_get_more_animation" class="ig_get_more">Get more Animations</option>'),jQuery(".campaign_data, #message-settings").on("change",".message_theme, .message_animation",function(){"ig_get_more_theme"==jQuery(this).val()&&window.open("https://www.icegram.com/product-category/themes-addons/?utm_source=icegram&utm_medium=admin&utm_campaign=theme_packs"),"ig_get_more_animation"==jQuery(this).val()&&window.open("https://www.icegram.com/addons/icegram-animation-pack/?utm_source=icegram&utm_medium=admin&utm_campaign=animation_pack")}),jQuery("select.icegram_chosen_page").chosen({disable_search_threshold:10}),jQuery("input#users_logged_in, input#users_all ,input#users_not_logged_in").on("change",function(){"logged_in"==jQuery(this).val()?(jQuery("select#users_roles").parent("p").show(),jQuery("#users_roles_chosen").find("input").trigger("click")):jQuery("select#users_roles").parent("p").hide()}),jQuery(".schedule_rule").on("change",function(){"when_schedule"==jQuery(this).attr("id")?jQuery("#date_picker").show():jQuery("#date_picker").hide()}),jQuery("input#where_other_page").on("change",function(){jQuery("select#where_page_id").parent("p").slideToggle(),jQuery(this).is(":checked")&&jQuery("#where_page_id_chosen").find("input").trigger("click")}),jQuery("input#where_sitewide").on("change",function(){jQuery("select#exclude_page_id").parent("p").slideToggle()}),jQuery("input#where_local_url").on("change",function(){jQuery(".local_url").slideToggle()}),jQuery(".date-picker").datepicker({dateFormat:"yy-mm-dd",defaultDate:0,showOtherMonths:!0,selectOtherMonths:!0,changeMonth:!0,changeYear:!0,showButtonPanel:!1,beforeShow:function(a,b){jQuery("#ui-datepicker-div").addClass("ig-date-picker")}}),jQuery(".campaign_target_rules").on("focusout","input.url_input_field",function(){var a=this;if(jQuery(a).parent().find("span#valid-field").removeClass("error"),"undefine"!==jQuery(a).data("option")&&"local_url"==jQuery(a).data("option")&&"*"!=jQuery(a).val()){var b=a.value;if(b.indexOf(e)<0)return void jQuery(a).val(e+b)}})});;/*
4
+ * TipTip
5
+ * Copyright 2010 Drew Wilson
6
+ * www.drewwilson.com
7
+ * code.drewwilson.com/entry/tiptip-jquery-plugin
8
+ *
9
+ * Version 1.3 - Updated: Mar. 23, 2010
10
+ *
11
+ * This Plug-In will create a custom tooltip to replace the default
12
+ * browser tooltip. It is extremely lightweight and very smart in
13
+ * that it detects the edges of the browser window and will make sure
14
+ * the tooltip stays within the current window size. As a result the
15
+ * tooltip will adjust itself to be displayed above, below, to the left
16
+ * or to the right depending on what is necessary to stay within the
17
+ * browser window. It is completely customizable as well via CSS.
18
+ *
19
+ * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
20
+ * http://www.opensource.org/licenses/mit-license.php
21
+ * http://www.gnu.org/licenses/gpl.html
22
+ */(function(e){e.fn.tipTip=function(t){var n={activation:"hover",keepAlive:!1,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:!1,enter:function(){},exit:function(){}},r=e.extend(n,t);if(e("#tiptip_holder").length<=0){var i=e('<div id="tiptip_holder" style="max-width:'+r.maxWidth+';"></div>'),s=e('<div id="tiptip_content"></div>'),o=e('<div id="tiptip_arrow"></div>');e("body").append(i.html(s).prepend(o.html('<div id="tiptip_arrow_inner"></div>')))}else var i=e("#tiptip_holder"),s=e("#tiptip_content"),o=e("#tiptip_arrow");return this.each(function(){var t=e(this);if(r.content)var n=r.content;else var n=t.attr(r.attribute);if(n!=""){r.content||t.removeAttr(r.attribute);var u=!1;if(r.activation=="hover"){t.hover(function(){a()},function(){r.keepAlive||f()});r.keepAlive&&i.hover(function(){},function(){f()})}else if(r.activation=="focus")t.focus(function(){a()}).blur(function(){f()});else if(r.activation=="click"){t.click(function(){a();return!1}).hover(function(){},function(){r.keepAlive||f()});r.keepAlive&&i.hover(function(){},function(){f()})}function a(){r.enter.call(this);s.html(n);i.hide().removeAttr("class").css("margin","0");o.removeAttr("style");var a=parseInt(t.offset().top),f=parseInt(t.offset().left),l=parseInt(t.outerWidth()),c=parseInt(t.outerHeight()),h=i.outerWidth(),p=i.outerHeight(),d=Math.round((l-h)/2),v=Math.round((c-p)/2),m=Math.round(f+d),g=Math.round(a+c+r.edgeOffset),y="",b="",w=Math.round(h-12)/2;r.defaultPosition=="bottom"?y="_bottom":r.defaultPosition=="top"?y="_top":r.defaultPosition=="left"?y="_left":r.defaultPosition=="right"&&(y="_right");var E=d+f<parseInt(e(window).scrollLeft()),S=h+f>parseInt(e(window).width());if(E&&d<0||y=="_right"&&!S||y=="_left"&&f<h+r.edgeOffset+5){y="_right";b=Math.round(p-13)/2;w=-12;m=Math.round(f+l+r.edgeOffset);g=Math.round(a+v)}else if(S&&d<0||y=="_left"&&!E){y="_left";b=Math.round(p-13)/2;w=Math.round(h);m=Math.round(f-(h+r.edgeOffset+5));g=Math.round(a+v)}var x=a+c+r.edgeOffset+p+8>parseInt(e(window).height()+e(window).scrollTop()),T=a+c-(r.edgeOffset+p+8)<0;if(x||y=="_bottom"&&x||y=="_top"&&!T){y=="_top"||y=="_bottom"?y="_top":y+="_top";b=p;g=Math.round(a-(p+5+r.edgeOffset))}else if(T|(y=="_top"&&T)||y=="_bottom"&&!x){y=="_top"||y=="_bottom"?y="_bottom":y+="_bottom";b=-12;g=Math.round(a+c+r.edgeOffset)}if(y=="_right_top"||y=="_left_top")g+=5;else if(y=="_right_bottom"||y=="_left_bottom")g-=5;if(y=="_left_top"||y=="_left_bottom")m+=5;o.css({"margin-left":w+"px","margin-top":b+"px"});i.css({"margin-left":m+"px","margin-top":g+"px"}).attr("class","tip"+y);u&&clearTimeout(u);u=setTimeout(function(){i.stop(!0,!0).fadeIn(r.fadeIn)},r.delay)}function f(){r.exit.call(this);u&&clearTimeout(u);i.fadeOut(r.fadeOut)}}})}})(jQuery);
trunk/assets/js/gallery.min.js ADDED
@@ -0,0 +1 @@
 
1
+ window.wp=window.wp||{},function(a){var b,c;b=wp.themes=wp.themes||{},b.data=_wpThemeSettings,c=b.data.l10n,b.isInstall=b.data.settings.isInstall,b.url="//www.icegram.com/gallery/wp-json/wp/v2/galleryitem",_.extend(b,{model:{},view:{},routes:{},router:{},template:wp.template}),b.Model=Backbone.Model.extend({initialize:function(){var a;-1!==_.indexOf(b.data.installedThemes,this.get("slug"))&&this.set({installed:!0}),this.set({id:this.get("id")}),this.has("sections")&&(a=this.get("sections").description,this.set({description:a}))}}),b.view.Appearance=wp.Backbone.View.extend({el:".wrap .theme-browser",events:{"click .filter-links li > a":"onSort"},window:a(window),page:0,activeClass:"current",initialize:function(a){_.bindAll(this,"scroller"),this.SearchView=a.SearchView?a.SearchView:b.view.Search,this.window.bind("scroll",_.throttle(this.scroller,300))},render:function(){this.view=new b.view.Themes({collection:this.collection,parent:this}),this.search(),this.view.render(),this.$el.append(this.view.el).addClass("rendered"),this.$el.append('<br class="clear"/>')},browse:function(a){if(this.collection.length<=0&&this.collection.query({browse:a}),"featured"==a||"all"==a)this.collection.query({browse:a});else{var b;if(b=this.collection.filter(function(b){var c=_.invert(b.attributes.tags);return c.hasOwnProperty(a)?!0:void 0})){this.collection.reset(b);var c=this.collection.length}}this.collection.trigger("update"),this.collection.trigger("query:success",c)},onSort:function(c){var d=a(c.target),e=d.data("sort");c.preventDefault(),a("body").removeClass("filters-applied show-filters"),d.hasClass(this.activeClass)||(this.collection.reset(b.data.themes,{silent:!0}),this.sort(e),b.router.navigate(b.router.baseUrl(b.router.browsePath+e)))},sort:function(b){this.clearSearch(),a(".filter-links li > a, .theme-filter").removeClass(this.activeClass),a('[data-sort="'+b+'"]').addClass(this.activeClass),"favorites"===b?a("body").addClass("show-favorites-form"):a("body").removeClass("show-favorites-form"),this.browse(b)},clearSearch:function(){a("#wp-filter-search-input").val("")},searchContainer:a("#wpbody h1:first"),search:function(){var d,e=this;1!==b.data.themes.length&&(d=new this.SearchView({collection:e.collection,parent:this}),d.render(),this.searchContainer.append(a.parseHTML('<label class="screen-reader-text" for="wp-filter-search-input">'+c.search+"</label>")).append(d.el))},scroller:function(){var a,b,c=this;a=this.window.scrollTop()+c.window.height(),b=c.$el.offset().top+c.$el.outerHeight(!1)-c.window.height(),b=Math.round(.9*b),a>b&&this.trigger("theme:scroll")}}),b.Collection=Backbone.Collection.extend({model:b.Model,terms:"",doSearch:function(c){this.terms!==c&&(this.terms=c,this.terms.length>0&&this.search(this.terms),""===this.terms&&(this.reset(b.data.themes),a("body").removeClass("no-results")),this.trigger("update"))},search:function(c){var d,e,f,g,h,i;this.reset(b.data.themes,{silent:!0}),c=c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),c=c.replace(/ /g,")(?=.*"),d=new RegExp("^(?=.*"+c+").+","i"),e=this.filter(function(a){return g=a.get("name").replace(/(<([^>]+)>)/gi,""),h=a.get("description").replace(/(<([^>]+)>)/gi,""),i=a.get("author").replace(/(<([^>]+)>)/gi,""),f=_.union(g,a.get("id"),h,i,a.get("tags")),d.test(a.get("author"))&&c.length>2&&a.set("displayAuthor",!0),d.test(f)}),0===e.length?this.trigger("query:empty"):a("body").removeClass("no-results"),this.reset(e)},paginate:function(a){var b=this;return a=a||0,b=_(b.rest(20*a)),b=_(b.first(20))},count:!1,query:function(b){var c,d,e,f=this.queries,g=this;if(this.currentQuery.request=b,c=_.find(f,function(a){return _.isEqual(a.request,b)}),d=_.has(b,"page"),d||(this.currentQuery.page=1),c||d){if(d)return this.apiCall(b,d).then(function(a){g.add(a.themes),g.trigger("query:success"),g.loadingThemes=!1}).fail(function(){g.trigger("query:fail")});0===c.themes.length?g.trigger("query:empty"):a("body").removeClass("no-results"),_.isNumber(c.total)&&(this.count=c.total),this.reset(c.themes),c.total||(this.count=this.length),this.trigger("update"),this.trigger("query:success",this.count)}else c=this.apiCall(b).done(function(a){if(a){g.reset(a);var c=_.sortBy(g.models,function(a){return a.attributes.modified});g.reset(c.reverse()),e=a.length,f.push({themes:a,request:b,total:e})}g.trigger("update"),g.trigger("query:success",e),a.themes&&0===a.themes.length&&g.trigger("query:empty")}).fail(function(){g.trigger("query:fail")})},queries:[],currentQuery:{page:1,request:{}},apiCall:function(a,c){var d=b.url;if(a&&"undefined"!=typeof a.id)return d=d+"/"+a.id,jQuery.getJSON(d,function(a){});var e,f=d+"?per_page=100&page=1",g=d+"?per_page=1&page=2";return jQuery.getJSON(f,function(a){e=a.contents,jQuery.getJSON(g,function(a){jQuery.extend(e,a.contents)})})},loadingThemes:!1}),b.view.Theme=wp.Backbone.View.extend({className:"theme",state:"grid",html:b.template("theme"),events:{click:"preview",keydown:"preview",touchend:"preview",keyup:"addFocus",touchmove:"preventExpand"},touchDrag:!1,render:function(){var a=this.model.toJSON();this.$el.html(this.html(a)).attr({tabindex:0}),this.model.get("displayAuthor")&&this.$el.addClass("display-author"),this.model.get("installed")&&this.$el.addClass("is-installed")},activeTheme:function(){this.model.get("active")&&this.$el.addClass("active")},addFocus:function(){var b=a(":focus").hasClass("theme")?a(":focus"):a(":focus").parents(".theme");a(".theme.focus").removeClass("focus"),b.addClass("focus")},expand:function(c){var d=this;return c=c||window.event,"keydown"!==c.type||13===c.which||32===c.which?this.touchDrag===!0?this.touchDrag=!1:void(a(c.target).is(".theme-actions a")||(b.focusedTheme=this.$el,this.trigger("theme:expand",d.model.cid))):void 0},preventExpand:function(){this.touchDrag=!0},preview:function(c){var d,e,f=this;return c=c||window.event,this.touchDrag===!0?this.touchDrag=!1:void(a(c.target).hasClass("button-primary")||"keydown"===c.type&&13!==c.which&&32!==c.which||"keydown"===c.type&&13!==c.which&&a(":focus").hasClass("button")||(c.preventDefault(),c=c||window.event,b.focusedTheme=this.$el,e=new b.view.Preview({model:this.model}),e.render(),this.setNavButtonsState(),1===this.model.collection.length?e.$el.addClass("no-navigation"):e.$el.removeClass("no-navigation"),a("div.wrap").append(e.el),this.listenTo(e,"theme:next",function(){return d=f.model,_.isUndefined(f.current)||(d=f.current),f.current=f.model.collection.at(f.model.collection.indexOf(d)+1),_.isUndefined(f.current)?(f.options.parent.parent.trigger("theme:end"),f.current=d):(e.model=f.current,e.render(),this.setNavButtonsState(),void a(".next-theme").focus())}).listenTo(e,"theme:previous",function(){d=f.model,0!==f.model.collection.indexOf(f.current)&&(_.isUndefined(f.current)||(d=f.current),f.current=f.model.collection.at(f.model.collection.indexOf(d)-1),_.isUndefined(f.current)||(e.model=f.current,e.render(),this.setNavButtonsState(),a(".previous-theme").focus()))}),this.listenTo(e,"preview:close",function(){f.current=f.model})))},setNavButtonsState:function(){var b=a(".theme-install-overlay"),c=_.isUndefined(this.current)?this.model:this.current;0===this.model.collection.indexOf(c)&&b.find(".previous-theme").addClass("disabled"),_.isUndefined(this.model.collection.at(this.model.collection.indexOf(c)+1))&&b.find(".next-theme").addClass("disabled")}}),b.view.Details=wp.Backbone.View.extend({className:"theme-overlay",events:{click:"collapse","click .delete-theme":"deleteTheme","click .left":"previousTheme","click .right":"nextTheme"},html:b.template("theme-single"),render:function(){var a=this.model.toJSON();this.$el.html(this.html(a)),this.activeTheme(),this.navigation(),this.screenshotCheck(this.$el),this.containFocus(this.$el)},activeTheme:function(){this.$el.toggleClass("active",this.model.get("active"))},containFocus:function(b){var c;_.delay(function(){a(".theme-wrap a.button-primary:visible").focus()},500),b.on("keydown.wp-themes",function(d){9===d.which&&(c=a(d.target),c.is("button.left")&&d.shiftKey?(b.find(".theme-actions a:last-child").focus(),d.preventDefault()):c.is(".theme-actions a:last-child")&&(b.find("button.left").focus(),d.preventDefault()))})},collapse:function(c){var d,e=this;c=c||window.event,1!==b.data.themes.length&&(a(c.target).is(".theme-backdrop")||a(c.target).is(".close")||27===c.keyCode)&&(a("body").addClass("closing-overlay"),this.$el.fadeOut(130,function(){a("body").removeClass("closing-overlay"),e.closeOverlay(),d=document.body.scrollTop,b.router.navigate(b.router.baseUrl("")),document.body.scrollTop=d,b.focusedTheme&&b.focusedTheme.focus()}))},navigation:function(){this.model.cid===this.model.collection.at(0).cid&&this.$el.find(".left").addClass("disabled"),this.model.cid===this.model.collection.at(this.model.collection.length-1).cid&&this.$el.find(".right").addClass("disabled")},closeOverlay:function(){a("body").removeClass("modal-open"),this.remove(),this.unbind(),this.trigger("theme:collapse")},deleteTheme:function(){return confirm(b.data.settings.confirmDelete)},nextTheme:function(){var a=this;return a.trigger("theme:next",a.model.cid),!1},previousTheme:function(){var a=this;return a.trigger("theme:previous",a.model.cid),!1},screenshotCheck:function(a){var b,c;b=a.find(".screenshot img"),c=new Image,c.src=b.attr("src"),c.width&&c.width<=300&&a.addClass("small-screenshot")}}),b.view.Preview=b.view.Details.extend({className:"wp-full-overlay expanded",el:".theme-install-overlay",events:{"click .close-full-overlay":"close","click .collapse-sidebar":"collapse","click .previous-theme":"previousTheme","click .next-theme":"nextTheme",keyup:"keyEvent"},html:b.template("theme-preview"),render:function(){var c=this,d=this.model.toJSON();this.$el.removeClass("iframe-ready").html(this.html(d)),b.router.navigate(b.router.baseUrl(b.router.themePath+this.model.get("id")),{replace:!0}),this.$el.fadeIn(200,function(){a("body").addClass("theme-installer-active full-overlay-active"),a(".close-full-overlay").focus()}),this.$el.find("iframe").one("load",function(){c.iframeLoaded()}),d.plan<=b.data.settings.ig_plan?this.$el.find(".theme-install").show():this.$el.find(".ig-get-pro").show()},iframeLoaded:function(){this.$el.addClass("iframe-ready")},close:function(){return this.$el.fadeOut(200,function(){a("body").removeClass("theme-installer-active full-overlay-active"),b.focusedTheme&&b.focusedTheme.focus()}).removeClass("iframe-ready"),b.router.navigate(b.router.baseUrl("")),this.trigger("preview:close"),this.undelegateEvents(),this.unbind(),!1},collapse:function(b){var d=a(b.currentTarget);return"true"===d.attr("aria-expanded")?d.attr({"aria-expanded":"false","aria-label":c.expandSidebar}):d.attr({"aria-expanded":"true","aria-label":c.collapseSidebar}),this.$el.toggleClass("collapsed").toggleClass("expanded"),!1},keyEvent:function(a){27===a.keyCode&&(this.undelegateEvents(),this.close()),39===a.keyCode&&_.once(this.nextTheme()),37===a.keyCode&&this.previousTheme()}}),b.view.Themes=wp.Backbone.View.extend({className:"themes",$overlay:a("div.theme-overlay"),index:0,count:a(".wp-core-ui .theme-count"),liveThemeCount:0,initialize:function(b){var c=this;this.parent=b.parent,this.setView("grid"),c.currentTheme(),this.listenTo(c.collection,"update",function(){c.parent.page=0,c.currentTheme(),c.render(this)}),this.listenTo(c.collection,"query:success",function(a){_.isNumber(a)?(c.count.text(a),c.announceSearchResults(a)):(c.count.text(c.collection.length),c.announceSearchResults(c.collection.length))}),this.listenTo(c.collection,"query:empty",function(){a("body").addClass("no-results")}),this.listenTo(this.parent,"theme:scroll",function(){c.renderThemes(c.parent.page)}),this.listenTo(this.parent,"theme:close",function(){c.overlay&&c.overlay.closeOverlay()}),a("body").on("keyup",function(a){c.overlay&&(39===a.keyCode&&c.overlay.nextTheme(),37===a.keyCode&&c.overlay.previousTheme(),27===a.keyCode&&c.overlay.collapse(a))})},render:function(){this.$el.empty(),1===b.data.themes.length&&(this.singleTheme=new b.view.Details({model:this.collection.models[0]}),this.singleTheme.render(),this.$el.addClass("single-theme"),this.$el.append(this.singleTheme.el)),this.options.collection.size()>0&&this.renderThemes(this.parent.page),this.liveThemeCount=this.collection.count?this.collection.count:this.collection.length,this.count.text(this.liveThemeCount),this.announceSearchResults(this.liveThemeCount)},renderThemes:function(d){var e=this;return e.instance=e.collection.paginate(d),0===e.instance.size()?void this.parent.trigger("theme:end"):(!b.isInstall&&d>=1&&a(".add-new-theme").remove(),e.instance.each(function(a){e.theme=new b.view.Theme({model:a,parent:e}),e.theme.render(),e.$el.append(e.theme.el),e.listenTo(e.theme,"theme:expand",e.expand,e)}),!b.isInstall&&b.data.settings.canInstall&&this.$el.append('<div class="theme add-new-theme"><a href="'+b.data.settings.installURI+'"><div class="theme-screenshot"><span></span></div><h2 class="theme-name">'+c.addNew+"</h2></a></div>"),void this.parent.page++)},currentTheme:function(){var a,b=this;a=b.collection.findWhere({active:!0}),a&&(b.collection.remove(a),b.collection.add(a,{at:0}))},setView:function(a){return a},expand:function(c){var d=this;this.model=d.collection.get(c),b.router.navigate(b.router.baseUrl(b.router.themePath+this.model.id)),this.setView("detail"),a("body").addClass("modal-open"),this.overlay=new b.view.Details({model:d.model}),this.overlay.render(),this.$overlay.html(this.overlay.el),this.listenTo(this.overlay,"theme:next",function(){d.next([d.model.cid])}).listenTo(this.overlay,"theme:previous",function(){d.previous([d.model.cid])})},next:function(a){var b,c,d=this;b=d.collection.get(a[0]),c=d.collection.at(d.collection.indexOf(b)+1),void 0!==c&&(this.overlay.closeOverlay(),d.theme.trigger("theme:expand",c.cid))},previous:function(a){var b,c,d=this;b=d.collection.get(a[0]),c=d.collection.at(d.collection.indexOf(b)-1),void 0!==c&&(this.overlay.closeOverlay(),d.theme.trigger("theme:expand",c.cid))},announceSearchResults:function(a){0===a?wp.a11y.speak(c.noThemesFound):wp.a11y.speak(c.themesFound.replace("%d",a))}}),b.view.Search=wp.Backbone.View.extend({tagName:"input",className:"wp-filter-search",id:"wp-filter-search-input",searching:!1,attributes:{placeholder:c.searchPlaceholder,type:"search","aria-describedby":"live-search-desc"},events:{input:"search",keyup:"search",blur:"pushState"},initialize:function(a){this.parent=a.parent,this.listenTo(this.parent,"theme:close",function(){this.searching=!1})},search:function(a){"keyup"===a.type&&27===a.which&&(a.target.value=""),this.doSearch(a)},doSearch:_.debounce(function(a){var c={};this.collection.doSearch(a.target.value),this.searching&&13!==a.which?c.replace=!0:this.searching=!0,a.target.value?b.router.navigate(b.router.baseUrl(b.router.searchPath+a.target.value),c):b.router.navigate(b.router.baseUrl(""))},500),pushState:function(a){var c=b.router.baseUrl("");a.target.value&&(c=b.router.baseUrl(b.router.searchPath+a.target.value)),this.searching=!1,b.router.navigate(c)}}),b.Router=Backbone.Router.extend({routes:{"demos/?item=:id":"preview","demos/?browse=:sort":"sort",demos:"sort","&search=:query":"search"},baseUrl:function(a){return"demos"+a},themePath:"?item=",browsePath:"?browse=",searchPath:"?search=",search:function(b){a(".wp-filter-search").val(b)},themes:function(){a(".wp-filter-search").val("")},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),b.Run={init:function(){this.themes=new b.Collection(b.data.themes),this.view=new b.view.Appearance({collection:this.themes}),this.render()},render:function(){this.view.render(),this.routes(),Backbone.history.start({pushState:!0,hashChange:!1})},routes:function(){var c=this;request={},b.router=new b.Router,b.router.on("route:preview",function(a){request.id=a,c.view.collection.query(request),c.view.collection.once("update",function(){c.view.view.theme.preview()})}),b.router.on("route:themes",function(){c.themes.doSearch(""),c.view.trigger("theme:close")}),b.router.on("route:search",function(){a(".wp-filter-search").trigger("keyup")}),this.extraRoutes()},extraRoutes:function(){return!1}},b.view.InstallerSearch=b.view.Search.extend({events:{input:"search",keyup:"search"},search:function(a){("keyup"!==a.type||9!==a.which&&16!==a.which)&&(this.collection=this.options.parent.view.collection,"keyup"===a.type&&27===a.which&&(a.target.value=""),this.doSearch(a.target.value))},doSearch:_.debounce(function(c){var d,e,f,g,h,i;if(a(".filter-links li > a.current").removeClass("current"),a("body").removeClass("show-filters filters-applied show-favorites-form"),this.collection.reset(b.data.themes,{silent:!0}),term=c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),term=term.replace(/ /g,")(?=.*"),d=new RegExp("^(?=.*"+term+").+","i"),e=this.collection.filter(function(a){return g=a.get("description"),h=a.get("content").rendered.replace(/(<([^>]+)>)/gi,""),h=h.replace(/\n/g,""),i=a.get("message_type"),f=i+h+g,d.test(f)})){this.collection.reset(e);var j=this.collection.length}this.collection.trigger("update"),this.collection.trigger("query:success",j),b.router.navigate(b.router.baseUrl(b.router.searchPath+c),{replace:!0})},500)}),b.view.Installer=b.view.Appearance.extend({el:".wrap",events:{"click .filter-links li > a":"onSort","click .theme-filter":"onFilter","click .drawer-toggle":"moreFilters","click .filter-drawer .apply-filters":"applyFilters",'click .filter-group [type="checkbox"]':"addFilter","click .filter-drawer .clear-filters":"clearFilters","click .filtered-by":"backToFilters","click .favorites-form-submit":"saveUsername","keyup #wporg-username-input":"saveUsername"},render:function(){var d=this;this.search(),this.uploader(),this.collection=new b.Collection,this.listenTo(this,"theme:end",function(){d.collection.loadingThemes||(d.collection.loadingThemes=!0,d.collection.currentQuery.page++,_.extend(d.collection.currentQuery.request,{page:d.collection.currentQuery.page}),d.collection.query(d.collection.currentQuery.request))}),this.listenTo(this.collection,"query:success",function(){a("body").removeClass("loading-content"),a(".theme-browser").find("div.error").remove()}),this.listenTo(this.collection,"query:fail",function(){a("body").removeClass("loading-content"),a(".theme-browser").find("div.error").remove(),a(".theme-browser").find("div.themes").before('<div class="error"><p>'+c.error+"</p></div>")}),this.view&&this.view.remove(),this.view=new b.view.Themes({collection:this.collection,parent:this}),this.page=0,this.$el.find(".themes").remove(),this.view.render(),this.$el.find(".theme-browser").append(this.view.el).addClass("rendered")},browse:function(a){if(this.collection.length<=0&&this.collection.query({browse:a}),"featured"==a||"all"==a)this.collection.query({browse:a});else{var b;if(b=this.collection.filter(function(b){var c=_.invert(b.attributes.tags);return c.hasOwnProperty(a)?!0:void 0})){this.collection.reset(b);var c=this.collection.length}}this.collection.trigger("update"),this.collection.trigger("query:success",c)},onSort:function(c){var d=a(c.target),e=d.data("sort");c.preventDefault(),a("body").removeClass("filters-applied show-filters"),d.hasClass(this.activeClass)||(this.collection.reset(b.data.themes,{silent:!0}),this.sort(e),b.router.navigate(b.router.baseUrl(b.router.browsePath+e)))},sort:function(b){this.clearSearch(),a(".filter-links li > a, .theme-filter").removeClass(this.activeClass),a('[data-sort="'+b+'"]').addClass(this.activeClass),"favorites"===b?a("body").addClass("show-favorites-form"):a("body").removeClass("show-favorites-form"),this.browse(b)},onFilter:function(b){var c,d=a(b.target),e=d.data("filter");d.hasClass(this.activeClass)||(a(".filter-links li > a, .theme-section").removeClass(this.activeClass),d.addClass(this.activeClass),e&&(e=_.union(e,this.filtersChecked()),c={tag:[e]},this.collection.query(c)))},addFilter:function(){this.filtersChecked()},applyFilters:function(b){var c,d=this.filtersChecked(),e={tag:d},f=a(".filtered-by .tags");b&&b.preventDefault(),a("body").addClass("filters-applied"),a(".filter-links li > a.current").removeClass("current"),f.empty(),_.each(d,function(b){c=a('label[for="filter-id-'+b+'"]').text(),f.append('<span class="tag">'+c+"</span>")}),this.collection.query(e)},saveUsername:function(b){var c=a("#wporg-username-input").val(),d={browse:"favorites",user:c},e=this;return b&&b.preventDefault(),"keyup"!==b.type||13===b.which?wp.ajax.send("save-wporg-username",{data:{username:c},success:function(){e.collection.query(d)}}):void 0},filtersChecked:function(){var b=a(".filter-group").find(":checkbox"),c=[];return _.each(b.filter(":checked"),function(b){c.push(a(b).prop("value"))}),0===c.length?(a(".filter-drawer .apply-filters").find("span").text(""),a(".filter-drawer .clear-filters").hide(),a("body").removeClass("filters-applied"),!1):(a(".filter-drawer .apply-filters").find("span").text(c.length),a(".filter-drawer .clear-filters").css("display","inline-block"),c)},activeClass:"current",searchContainer:a(".wp-filter .search-form"),uploader:function(){a("a.upload").on("click",function(c){c.preventDefault(),a("body").addClass("show-upload-theme"),b.router.navigate(b.router.baseUrl("?upload"),{replace:!0})}),a("a.browse-themes").on("click",function(c){c.preventDefault(),a("body").removeClass("show-upload-theme"),b.router.navigate(b.router.baseUrl(""),{replace:!0})})},moreFilters:function(c){return c.preventDefault(),a("body").hasClass("filters-applied")?this.backToFilters():a("body").hasClass("show-filters")&&this.filtersChecked()?this.addFilter():(this.clearSearch(),b.router.navigate(b.router.baseUrl("")),void a("body").toggleClass("show-filters"))},clearFilters:function(b){var c=a(".filter-group").find(":checkbox"),d=this;b.preventDefault(),_.each(c.filter(":checked"),function(b){return a(b).prop("checked",!1),d.filtersChecked()})},backToFilters:function(b){b&&b.preventDefault(),a("body").removeClass("filters-applied")},clearSearch:function(){a("#wp-filter-search-input").val("")}}),b.InstallerRouter=Backbone.Router.extend({routes:{"edit.php?post_type=ig_campaign&page=icegram-gallery&item=:id":"preview","edit.php?post_type=ig_campaign&page=icegram-gallery&browse=:sort":"sort","edit.php?post_type=ig_campaign&page=icegram-gallery":"sort","post-new.php?post_type=ig_campaign":"sort","edit.php?post_type=ig_campaign&page=icegram-gallery&search=:query":"search"},baseUrl:function(a){return"edit.php?post_type=ig_campaign&page=icegram-gallery"+a},themePath:"&item=",browsePath:"&browse=",searchPath:"&search=",search:function(b){a(".wp-filter-search").val(b)},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),b.RunInstaller={init:function(){this.view=new b.view.Installer({section:"featured",SearchView:b.view.InstallerSearch}),this.render()},render:function(){this.view.render(),this.routes(),Backbone.history.start({root:b.data.settings.adminUrl,pushState:!0,hashChange:!1})},routes:function(){var c=this,d={};b.router=new b.InstallerRouter,b.router.on("route:preview",function(a){d.id=a,c.view.collection.query(d),c.view.collection.once("update",function(){c.view.view.theme.preview()})}),b.router.on("route:sort",function(a){a||(a="featured"),c.view.sort(a),c.view.trigger("theme:close")}),b.router.on("route:upload",function(){a("a.upload").trigger("click")}),b.router.on("route:search",function(){a(".wp-filter-search").focus().trigger("keyup")}),this.extraRoutes()},extraRoutes:function(){return!1}},a(document).ready(function(){b.isInstall?b.RunInstaller.init():b.Run.init(),a(".broken-themes .delete-theme").on("click",function(){return confirm(_wpThemeSettings.settings.confirmDelete)})})}(jQuery);var tb_position;jQuery(document).ready(function(a){tb_position=function(){var b=a("#TB_window"),c=a(window).width(),d=a(window).height(),e=c>1040?1040:c,f=0;a("#wpadminbar").length&&(f=parseInt(a("#wpadminbar").css("height"),10)),b.size()&&(b.width(e-50).height(d-45-f),a("#TB_iframeContent").width(e-50).height(d-75-f),b.css({"margin-left":"-"+parseInt((e-50)/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&b.css({top:20+f+"px","margin-top":"0"}))},a(window).resize(function(){tb_position()})});
trunk/assets/js/icegram.min.js ADDED
@@ -0,0 +1 @@
 
1
+ function Icegram(){}function Icegram_Message_Type(a){var a;this.root_container="#icegram_messages_container",this.data=a,this.type=a.type,this.data.delay_time=parseInt(this.data.delay_time),"string"!=typeof this.data.link||""==this.data.link||/^tel:/i.test(this.data.link)||/^https?:\/\//i.test(this.data.link)||(this.data.link="http://"+this.data.link),this.set_template(this.get_template_default()),jQuery(window).trigger("msg_preinit.icegram",[this]),this.init()}Icegram.prototype.init=function(a){if(void 0!=a){jQuery(window).trigger("preinit.icegram",[a]),this.data=a,this.defaults=jQuery.extend({},a.defaults),this.message_data=a.messages,this.messages,this.tracking_data=[],this.message_template_cache={},this.map_id_to_index={},this.map_type_to_index={},this.mode=void 0==window.ig_mode?"local":window.ig_mode,this.powered_by={link:"https://www.icegram.com/?utm_source=inapp&utm_campaign=poweredby&utm_medium="},this.powered_by.text=this.defaults.powered_by_text,this.powered_by.logo=this.defaults.powered_by_logo,jQuery("body").append('<div id="icegram_messages_container"></div>');this.messages=[];var b=this;this.message_data.length>0&&jQuery.each(this.message_data,function(a,c){try{if(-1==window.location.href.indexOf("campaign_preview_id")){if("yes"==c.retargeting&&1==jQuery.cookie("icegram_campaign_shown_"+c.campaign_id))return;if("yes"==c.retargeting_clicked&&1==jQuery.cookie("icegram_campaign_clicked_"+c.campaign_id))return}"undefined"!==c.ig_mobile_popup&&1==c.ig_mobile_popup&&(c.delay_time=-1);var d=null,e=c.type.split("-").join(" ").ucwords().split(" ").join("_");d="function"==typeof window["Icegram_Message_Type_"+e]?new window["Icegram_Message_Type_"+e](c):new Icegram_Message_Type(c),b.messages.push(d),b.map_id_to_index["_"+c.id]=a,b.map_type_to_index[c.type]=jQuery.isArray(b.map_type_to_index[c.type])?b.map_type_to_index[c.type]:new Array,b.map_type_to_index[c.type].push(a)}catch(f){console.log(f)}}),jQuery(window).on("unload",function(){"function"==typeof window.icegram.submit_tracking_data&&window.icegram.submit_tracking_data(!1)}),setInterval(function(){"function"==typeof window.icegram.submit_tracking_data&&window.icegram.submit_tracking_data(!0)},5e3),jQuery(window).trigger("init.icegram",[this])}},Icegram.prototype.timer_tick=function(){},Icegram.prototype.get_template_fn=function(a){return this.message_template_cache[a]},Icegram.prototype.set_template_fn=function(a,b){this.message_template_cache[a]=b},Icegram.prototype.get_message=function(a){return this.messages.length>a?this.messages[a]:void 0},Icegram.prototype.get_message_by_id=function(a){if(this.map_id_to_index.hasOwnProperty("_"+a)){var b=this.map_id_to_index["_"+a];return this.get_message(b)}},Icegram.prototype.get_message_by_campaign_id=function(a){a=String(a);var b=[],c=this.messages;return a.indexOf(" ")&&(a=a.split(" ")),jQuery.each(a,function(a,d){jQuery.each(c,function(a,c){d==c.data.campaign_id&&b.push(c)})}),b},Icegram.prototype.get_messages_by_type=function(a){if(this.map_type_to_index.hasOwnProperty(a)){var b=this.map_type_to_index[a],c=[];if(jQuery.isArray(b)){var d=this;jQuery.each(b,function(a,b){c.push(d.get_message(b))})}return c}},Icegram.prototype.get_powered_by=function(a){var b=jQuery.extend({},this.powered_by);return b.link=b.link+(a||""),b},Icegram.prototype.track=function(a,b){"object"==typeof b&&b.hasOwnProperty("message_id")&&b.hasOwnProperty("campaign_id")&&-1==b.message_id.indexOf("_00")&&(jQuery(window).trigger("track.icegram",[a,b]),this.tracking_data.push({type:a,params:b}))},Icegram.prototype.submit_tracking_data=function(a){var b=window.location.protocol.split(":"),c=b[0],d=this.data.ajax_url.split("://"),e=d[0];if(this.tracking_data.length>0&&-1==window.location.href.indexOf("campaign_preview_id")&&!this.is_bot()){var f={type:"POST",url:this.data.ajax_url,async:a||!1,data:{action:"icegram_event_track",event_data:JSON.parse(JSON.stringify(this.tracking_data)),ig_remote_url:"remote"==this.mode?window.location.href:void 0},success:function(a,b,c){},error:function(a,b,c){}};"remote"==this.mode?(f.xhrFields={withCredentials:!0},f.crossDomain=!0,f.async=!0):c!=e&&(f.xhrFields={withCredentials:!0},jQuery.extend(f.data,{ig_local_url_cs:window.location.href})),jQuery.ajax(f),this.tracking_data=[]}},Icegram.prototype.is_bot=function(){var a=/bot|spider|crawl|sucker|ia_archiver|alexa|spade|slurp|webbug|ZyBorg|Feedfetcher-Google|Mediapartners-Google|aolserver|seamonkey|binlar|casper|comodo|feedfinder|jakarta|java|larbin|libwww|pycurl|linkwalker|steeler|nutch|turnit|zmeu/i;return!!a.test(navigator.userAgent)},Icegram.prototype.hide_all_messages=function(){this.messages.length>0&&jQuery.each(this.messages,function(a,b){b.hide()})},Icegram_Message_Type.prototype.init=function(){this.render(),this.add_event_handlers()},Icegram_Message_Type.prototype.add_event_handlers=function(){this.el.on("click",{self:this},this.on_click),jQuery(window).on("resize",{self:this},this.on_resize)},Icegram_Message_Type.prototype.animations={},Icegram_Message_Type.prototype.embed_form=function(){if(-1===jQuery.inArray(this.data.type,["toast","badge","ribbon","exit-redirect"])){var a=null,b=this.data.form_layout,c=this.data.form_has_label,d=this.data.form_style||"none",e=this.data.label||void 0;if(d=d.toLowerCase().replace(" ","_"),void 0!=this.data.use_form&&"yes"==this.data.use_form&&(a=this.data.form_html),this.el.find("form.ig_embed_form").length>0){var f=this.el.find("form.ig_embed_form");b="inline",-1===jQuery.inArray(this.data.type,["messenger","tab","sidebar","interstitial","sticky"])&&(f.hasClass("ig_left")?b="left":f.hasClass("ig_right")&&(b="right")),"inline"==b&&this.el.find("form.ig_embed_form").replaceWith('<div class="ig_form_container layout_inline"></div>'),c=f.find(".ig_form_el_group label").length>0?"yes":void 0,0==f.find(".ig_button").length&&0==f.find("button[type=submit]").length&&(e=e||"Submit",f.append('<input class="ig_button" type="submit" value="'+e+'">')),a=jQuery("<div/>").append(f).html()}if(null==a)this.el.find(".ig_form_container").remove();else{var g=window.icegram.formProcess(this,a);if(g&&0==this.el.find(".ig_form_container form").length){var h=void 0!=this.data.form_header&&""!=this.data.form_header?'<div class="ig_form_header">'+this.data.form_header+"</div>":"",i=void 0!=this.data.form_footer&&""!=this.data.form_footer?'<div class="ig_form_footer">'+this.data.form_footer+"</div>":"",j=jQuery("<div/>").html(a);if(this.el.find(".ig_form_container").append(h).append(g).append(i),this.data.rainmaker_form_code&&""!=this.data.rainmaker_form_code){this.data.cta&&"form"!==this.data.cta&&this.data.show_response&&this.data.response_text&&(!this.data.response_text||""!=this.data.response_text)||(this.data.response_text=j.find(".rm_form_message").html()||""),this.el.find(".ig_form_container").addClass(j.find(".rm_form_container").data("type")).data("form-id",j.find(".rm_form_container").data("form-id")).addClass("rainmaker_form");var k=j.find("#rm_script"),l=j.find("#rm_style");this.el.find(".ig_form_container").prepend(l).append(k);var m=j.find(".rm_captcha"),n=j.find(".rm_form_error_message");this.el.find(".ig_form_container form").prepend(n).append(m)}void 0==c?this.el.find(".ig_el_label").not("span.ig_el_label").remove():(this.el.find("input, textarea").removeAttr("placeholder"),this.el.find("select option.ig_el_placeholder").remove()),this.el.find(".ig_form_container .ig_button").length>0&&(this.el.find(".ig_button").not(".ig_form_container .ig_button").hide(),e=e||this.el.find(".ig_button").val()||"Submit",this.el.find(".ig_button").val(e)),this.el.addClass("ig_form_"+b);var o="";void 0!=this.data.form_bg_color&&""!=this.data.form_bg_color?(this.el.find(".ig_form_container").css("background-color",this.data.form_bg_color),o+=".ig_form_"+b+".ig_form_"+d+" .ig_form_container:before{ background-color:"+this.data.form_bg_color+"; border-color:"+this.data.form_bg_color+";}"):o+=".ig_form_"+b+".ig_form_"+d+" .ig_form_container:before{ display:none;}",void 0!=this.data.form_text_color&&""!=this.data.form_text_color&&this.el.find(".ig_form_container").css("color",this.data.form_text_color),this.el.addClass("ig_form_"+d).find(".ig_form_container").prepend('<style type="text/css">'+o+"</style>"),jQuery.each(this.el.find(".ig_form_container")||[],function(a,b){jQuery(b).find(".ig_form_els").first().addClass("ig_form_els_first").end().last().addClass("ig_form_els_last")})}}}},Icegram_Message_Type.prototype.render=function(){this.pre_render();var a=this.render_template();try{jQuery(this.root_container).append(a)}catch(b){}this.dom_id="icegram_message_"+this.data.id,this.el=jQuery("#"+this.dom_id),this.set_position();var c=window.icegram.get_powered_by(this.type);if(c.hasOwnProperty("link")&&c.hasOwnProperty("text")&&""!=c.text&&this.add_powered_by(c),void 0!=this.data.headline&&""!=this.data.headline||this.el.find(".ig_headline").hide(),void 0!=this.data.icon&&""!=this.data.icon||this.el.addClass("ig_no_icon").find(".ig_icon").remove(),void 0!=this.data.message&&""!=this.data.message||this.el.find(".ig_message").hide(),void 0!=this.data.label&&""!=this.data.label||this.el.find(".ig_button").hide(),this.embed_form(),void 0==this.data.use_theme_defaults||"yes"!=this.data.use_theme_defaults){if(void 0!=this.data.text_color&&""!=this.data.text_color&&(this.el.css("color",this.data.text_color),this.el.find(".ig_container").css("color",this.data.text_color)),void 0!=this.data.bg_color&&""!=this.data.bg_color&&(this.el.css("background-color",this.data.bg_color),this.el.find(".ig_container").css("background-color",this.data.bg_color)),void 0!=this.data.cta_bg_color&&""!=this.data.cta_bg_color){this.el.find('.ig_button, form input[type="submit"]').css("background-color",this.data.cta_bg_color);var d=window.icegram.hexToHsl(this.data.cta_bg_color);this.el.find('.ig_button, form input[type="submit"]').css("border-color","hsl("+d.h+","+(d.s-5)+"%,"+(d.l-8)+"%)")}void 0!=this.data.cta_text_color&&""!=this.data.cta_text_color&&this.el.find('.ig_button, form input[type="submit"]').css("color",this.data.cta_text_color)}this.data.use_custom_code&&this.data.custom_css&&this.el.prepend('<style id="ig_custom_css_'+this.data.id+'" type="text/css">'+this.data.custom_css.replace(/#ig_this_message/g,"#"+this.dom_id)+"</style>"),"string"==typeof this.data.link&&""!=this.data.link&&this.el.parent().find(".ig_cta, .ig_button").css("cursor","pointer"),this.post_render(),this.hide({},!0),this.set_up_show_trigger()},Icegram.prototype.formProcess=function(a,b){var c=jQuery("<div/>").html(b).find('input[name="fake_text"]').data("required_field",!0).end().find("input.rm_required_feild").data("required_field",!0).end().find(".gform_validation_container input").data("required_field",!0).end().find(".rm_captcha_input").data("keep_class",!0).end().find(".required_field").data("required_field",!0).end().find("input, label, select, textarea, button").not(".rm_captcha_input, .rm_captcha_verify").not("br");if(c.length>0){var d=jQuery('<div class="ig_embed_form_container ig_clear_fix"></div>'),e=jQuery("<div/>").html(b).find("form").removeAttr("class").removeAttr("style").addClass("ig_clear_fix").empty(),f=".",g=0;jQuery.each(c,function(a,b){var c=jQuery(b),e=jQuery('<div class="ig_form_els"></div>');if(c.removeAttr("style"),c.data("keep_class")||c.removeAttr("class"),(-1==c.attr("tabindex")||c.is('*[name*="[abs]"]')||c.data("required_field")||"data[email]"==c.attr("name")||"_mc4wp_required_but_not_really"==c.attr("name"))&&(c.addClass("ig_form_required_field").removeData("required_field"),g--),"hidden"!=c.attr("type")&&c.prop("disabled")!==!0||(c.addClass("ig_form_hidden_field"),g--),c.is("label"))f=c.not("input, select, textarea, button, span, br").text().replace(/\s+/g," ")||".";else if((c.is("input")||c.is("button")||c.is("textarea")||c.is("select"))&&!c.is("input[type=radio]")){if(c.removeAttr("id"),c.is("button")){var h=c.not("br, span, div").text().trim()||"";c.remove(),c=jQuery('<input type="submit" value="'+h+'">')}!c.is("input[type=submit]")&&!c.is("input[type=button]")||c.is(".ig_form_hidden_field, .ig_form_required_field")||c.addClass("ig_button"),(c.is("input[type=text]")||c.is("input[type=email]"))&&c.attr("size",25),label_class="ig_el_label ig_button_label","."!=f&&(label_class="ig_el_label",c.is("select")?jQuery('<option class="ig_el_placeholder">'+f+"</option>").prependTo(c):c.attr("placeholder",f)),jQuery('<label class="'+label_class+'">'+f+"</label>").appendTo(e),f=".",e.append(c),d.append(e),g++}else c.is("input[type=radio]")&&(label_class="ig_el_label ig_button_label","."!=f&&(label_class="ig_el_label"),jQuery('<label><span class="'+label_class+'">'+f+"</span></label>").prepend(c).appendTo(e),f=".",e.addClass("ig_form_el_radio"),d.append(e),g++)});var h=["","ig_full","ig_half","ig_third","ig_quater"];return g=4>g?g:4,d.find(".ig_form_required_field").length<=0&&d.append('<div class="ig_form_els"><input class="ig_form_required_field" type="text" tabindex="-1" value="" /></div>'),d.addClass(h[g]).find(".ig_form_required_field").parent().removeClass("ig_form_els").css({position:"absolute",left:"-5000px"}).end().end().find(".ig_form_hidden_field").parent().removeClass("ig_form_els").css({display:"none"}),e.append(d),jQuery("<div/>").append(e).html()}return null},Icegram_Message_Type.prototype.render_template=function(){return"function"!=typeof window.icegram.get_template_fn(this.type)&&window.icegram.set_template_fn(this.type,new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+this.template.replace(/[\r\t\n]/g," ").split("{{").join(" ").replace(/((^|\}\})[^\t]*)'/g,"$1\r").replace(/\t=(.*?)\}\}/g,"',$1,'").split(" ").join("');").split("}}").join("p.push('").split("\r").join("\\'")+"');}return p.join('');")),window.icegram.get_template_fn(this.type)(this.data)},Icegram_Message_Type.prototype.pre_render=function(){},Icegram_Message_Type.prototype.post_render=function(){},Icegram_Message_Type.prototype.set_up_show_trigger=function(){if(isNaN(this.data.delay_time))this.show();else if(this.data.delay_time>=0){var a=this;this.timer=setTimeout(function(){a.show()},1e3*this.data.delay_time)}},Icegram_Message_Type.prototype.set_template=function(a){this.template=a},Icegram_Message_Type.prototype.get_template_default=function(){return'<div id="icegram_message_{{=id}}" class="icegram"><div class="ig_headline">{{=headline}}</div></div>'},Icegram_Message_Type.prototype.show=function(a,b){this.is_visible()||(this.animate("in"),this.pre_show(),this.el.show(a),this.el.addClass("ig_show").removeClass("ig_hide"),b!==!0&&this.track("shown"),this.post_show());var c=this;window.icegram.adjustFormContainerHeight(c)},Icegram_Message_Type.prototype.hide=function(a,b){if(this.is_visible()){var c=this;this.animate("out"),this.pre_hide(),setTimeout(function(){c.el.hasClass("ig_no_hide")||c.el.hide(a),c.el.addClass("ig_hide").removeClass("ig_show")},500),b!==!0&&this.track("closed"),this.post_hide()}},Icegram_Message_Type.prototype.set_position=function(){},Icegram_Message_Type.prototype.add_powered_by=function(a){},Icegram_Message_Type.prototype.pre_show=function(){},Icegram_Message_Type.prototype.post_show=function(){},Icegram_Message_Type.prototype.pre_hide=function(){},Icegram_Message_Type.prototype.post_hide=function(){},Icegram_Message_Type.prototype.track=function(a,b){"function"==typeof window.icegram.track&&(b=b||{},jQuery.extend(b,{message_id:this.data.id,campaign_id:this.data.campaign_id,expiry_time:this.data.expiry_time,expiry_time_clicked:this.data.expiry_time_clicked}),window.icegram.track(a,b))},Icegram_Message_Type.prototype.is_visible=function(){return this.el.hasClass("ig_show")},Icegram_Message_Type.prototype.toggle=function(a){this.is_visible()?this.hide(a):this.show(a)},Icegram_Message_Type.prototype.on_click=function(a){if(a.data=a.data||{self:this},jQuery(a.target).filter(".ig_close").length||jQuery(a.target).parents(".ig_close").length)return void a.data.self.hide();var b=jQuery(a.target).closest(".icegram").find("form:visible").first();(jQuery(a.target).filter(".ig_button, .ig_cta, :submit").length||jQuery(a.target).parents("button[type=submit]").length||jQuery(a.target).filter(".es_submit_button").length||jQuery(a.target).parents(".ig_button, .ig_cta").length&&!(b.find(".ig_button, input[type=button], input[type=submit], button[type=submit]").length>0))&&jQuery(a.target).not(".donot-track").length&&a.data.self.on_cta_click(a)},Icegram_Message_Type.prototype.on_resize=function(a){},Icegram_Message_Type.prototype.on_cta_click=function(a){a.data=a.data||{self:this};var b=jQuery(a.target).closest(".icegram").find("form:visible").first();return jQuery(b).length&&jQuery(b).find(".ig_form_required_field").length&&""!==jQuery(b).find(".ig_form_required_field").val()?(a.preventDefault(),void a.data.self.hide()):(a.data.self.track("clicked"),void(jQuery(b).length?jQuery(b).submit(function(a){jQuery(b).hasClass("ig_form_init_done")&&a.preventDefault()}):"string"==typeof a.data.self.data.link&&""!=a.data.self.data.link?(window.location.href=a.data.self.data.link,a.data.self.hide()):a.data.self.data.hide!==!1&&a.data.self.hide()))},Icegram_Message_Type.prototype.animate=function(a){if("undefined"!=typeof this.data.animation){var b=this.data.animation,c=this;"in"==a?"function"==typeof this.animations[b+"_in"]?this.animations[b+"_in"](c):this.el.hasClass("ig_anim_"+b+"_in")||(this.el.removeClass("ig_anim_"+b+"_out"),setTimeout(function(){c.el.addClass("ig_anim_"+b+"_in")},1)):"out"==a&&("function"==typeof this.animations[b+"_out"]?this.animations[b+"_out"](c):(this.el.removeClass("ig_anim_"+b+"_in"),setTimeout(function(){c.el.addClass("ig_anim_"+b+"_out")},1)))}},String.prototype.ucwords=function(){return this.toLowerCase().replace(/\b[a-z]/g,function(a){return a.toUpperCase()})},Icegram.prototype.adjustFormContainerHeight=function(a){var b="";if(a.el.hasClass("ig_form_left")||a.el.hasClass("ig_form_right")){b=a.el.hasClass("ig_form_left")?"left":"right";var c=a.el.find(".ig_data").outerHeight()>a.el.find(".ig_form_container.layout_"+b).outerHeight()?a.el.find(".ig_data").outerHeight():a.el.find(".ig_form_container.layout_"+b).outerHeight();a.el.find(".ig_form_container").outerHeight(c)}},Icegram.prototype.hexToRgb=function(a){var b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},Icegram.prototype.rgbToHsl=function(a,b,c){a/=255,b/=255,c/=255;var d,e,f=Math.max(a,b,c),g=Math.min(a,b,c),h=(f+g)/2;if(f==g)d=e=0;else{var i=f-g;switch(e=h>.5?i/(2-f-g):i/(f+g),f){case a:d=(b-c)/i;break;case b:d=(c-a)/i+2;break;case c:d=(a-b)/i+4}h=Math.floor(100*h),e=Math.floor(100*e),d=Math.floor(60*d),0>d&&(d+=360)}return{h:d,s:e,l:h}},Icegram.prototype.hexToHsl=function(a){var b=window.icegram.hexToRgb(a);return window.icegram.rgbToHsl(b.r,b.g,b.b)},"function"!=typeof Object.create&&!function(){var a=function(){};Object.create=function(b){if(arguments.length>1)throw Error("Second argument not supported");if(null===b)throw Error("Cannot set a null [[Prototype]]");if("object"!=typeof b)throw TypeError("Argument must be an object");return a.prototype=b,new a}}();var es_responseHandler=function(a){if("undefined"!=typeof icegram){var b=((jQuery(a.target).closest("[id^=icegram_message_]")||{}).attr("id")||"").split("_").pop()||0,c=icegram.get_message_by_id(b)||void 0;"undefined"!=typeof c&&(jQuery(a.target).find(".es_msg_ig").remove(),"form_via_ajax"===c.data.cta&&"success"===a.detail.es_response?(""===c.data.response_text&&(c.data.response_text=a.detail.msg),c.el.trigger("form_success.ig_cta",[c])):"undefined"!=typeof c.data.use_form&&jQuery(a.target).append('<div class="es_msg es_msg_ig">'+a.detail.msg+"</div>"))}};document.addEventListener("es_response",es_responseHandler,!1),void 0!==typeof jQuery.cookie&&!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});;function Icegram_Message_Type_Action_Bar(a){Icegram_Message_Type.apply(this,arguments)}Icegram_Message_Type_Action_Bar.prototype=Object.create(Icegram_Message_Type.prototype),Icegram_Message_Type_Action_Bar.prototype.constructor=Icegram_Message_Type_Action_Bar,Icegram_Message_Type_Action_Bar.prototype.get_template_default=function(){return'<div class="icegram action_bar_{{=id}}" ><div class="ig_action_bar ig_container ig_{{=theme}} ig_no_hide" id="icegram_message_{{=id}}"><div class="ig_content ig_clear_fix"><div class="ig_close" id="ig_close_{{=id}}"><span></span></div><div class="ig_form_container layout_left"></div><div class="ig_data ig_clear_fix"><div class="ig_headline">{{=headline}}</div><div class="ig_message">{{=message}}</div></div><div class="ig_button">{{=label}}</div><div class="ig_form_container layout_right layout_bottom"></div></div></div></div>'},Icegram_Message_Type_Action_Bar.prototype.post_render=function(){Icegram_Message_Type.prototype.post_render.apply(this,arguments),void 0!=this.data.use_theme_defaults&&"yes"==this.data.use_theme_defaults||void 0!=this.data.bg_color&&""!=this.data.bg_color&&this.el.find(".ig_close").css("background-color",this.data.bg_color),"21"!==this.data.position&&0==jQuery("#ig_body_pushdown").length&&jQuery("body").prepend('<div id="ig_body_pushdown"></div>')},Icegram_Message_Type_Action_Bar.prototype.set_position=function(){switch(this.data.position){case"21":this.el.addClass("ig_bottom");break;case"01":default:this.el.addClass("ig_top")}},Icegram_Message_Type_Action_Bar.prototype.add_powered_by=function(a){this.el.addClass("ig_has_pwby").find(".ig_content").before('<div class="ig_powered_by" ><a href="'+a.link+'" target="_blank"><img src="'+a.logo+'" title="'+a.text+'"/></a></div>')},Icegram_Message_Type_Action_Bar.prototype.on_click=function(a){return a.data=a.data||{self:this},jQuery(a.target).filter(".ig_show .ig_close, .ig_show .ig_close span").length?void a.data.self.hide():jQuery(a.target).filter(".ig_hide .ig_close, .ig_hide .ig_close span").length?void a.data.self.show():void Icegram_Message_Type.prototype.on_click.apply(this,arguments)},Icegram_Message_Type_Action_Bar.prototype.post_show=function(){if("21"!==this.data.position){var a=this.el.outerHeight()||0;jQuery("#ig_body_pushdown").css("display","block").animate({height:a},500),jQuery("*",document.body).not(".ig_action_bar, .ig_popup, .ig_messenger, .ig_inline, .ig_overlay, .ig_sidebar, .ig_tab, .ig_interstitial ,#ig_body_pushdown ").each(function(){var b=window.getComputedStyle(this,null);("fixed"===b.position||"absolute"===b.position&&("BODY"===this.parentNode.nodeName||"HEADER"===this.nodeName))&&!isNaN(parseInt(b.top,10))&&this.getBoundingClientRect().top<=a&&jQuery(this).data("ig_fx_top",b.top).animate({top:parseInt(b.top,10)+a+"px"},300)})}},Icegram_Message_Type_Action_Bar.prototype.pre_hide=function(){"21"!==this.data.position&&(jQuery("#ig_body_pushdown").animate({height:0},300).css("display","none"),jQuery("*",document.body).not(".ig_action_bar, .ig_popup, .ig_messenger, .ig_inline, .ig_overlay, .ig_sidebar, .ig_tab, .ig_interstitial ,#ig_body_pushdown ").each(function(){"undefined"!=typeof jQuery(this).data("ig_fx_top")&&jQuery(this).animate({top:jQuery(this).data("ig_fx_top")},200)}))};;function Icegram_Message_Type_Messenger(a){Icegram_Message_Type.apply(this,arguments)}Icegram_Message_Type_Messenger.prototype=Object.create(Icegram_Message_Type.prototype),Icegram_Message_Type_Messenger.prototype.constructor=Icegram_Message_Type_Messenger,Icegram_Message_Type_Messenger.prototype.get_template_default=function(){return'<div class="icegram ig_messenger ig_{{=theme}} ig_container ig_cta" id="icegram_message_{{=id}}"><div class="ig_content"><div class="ig_close" id="ig_close_{{=id}}"></div><div class="ig_data"><div class="ig_headline">{{=headline}}</div><div class="ig_body"><img class="ig_icon" src="{{=icon}}"/><div class="ig_message">{{=message}}</div></div><div class="ig_footer"></div></div></div></div>'},Icegram_Message_Type_Messenger.prototype.set_position=function(){switch(this.data.position){case"20":this.el.addClass("ig_left ig_bottom");break;case"22":default:this.el.addClass("ig_right ig_bottom")}},Icegram_Message_Type_Messenger.prototype.add_powered_by=function(a){this.el.addClass("ig_has_pwby").find(".ig_content").after('<div class="ig_powered_by"><a href="'+a.link+'" target="_blank">'+a.text+"</a></div>")};;function Icegram_Message_Type_Popup(a){Icegram_Message_Type.apply(this,arguments)}Icegram_Message_Type_Popup.prototype=Object.create(Icegram_Message_Type.prototype),Icegram_Message_Type_Popup.prototype.constructor=Icegram_Message_Type_Popup,Icegram_Message_Type_Popup.prototype.get_template_default=function(){return'<div id="icegram_message_{{=id}}" class="icegram ig_popup ig_{{=theme}} ig_container mfp-hide"><div class="ig_close" id="popup_box_close_{{=id}}"></div><div class="ig_clear_fix" data={{=id}}><div class="ig_bg_overlay"></div><div class="ig_form_container layout_left"></div><div class="ig_data ig_clear_fix"><div class="ig_headline">{{=headline}}</div><div class="ig_content"><div class="ig_message ig_clear_fix">{{=message}}</div></div><div class="ig_button" >{{=label}}</div></div><div class="ig_form_container layout_right layout_bottom"></div></div></div>'},Icegram_Message_Type_Popup.prototype.post_render=function(){Icegram_Message_Type.prototype.post_render.apply(this,arguments),void 0!=this.data.use_theme_defaults&&"yes"==this.data.use_theme_defaults||void 0!=this.data.bg_color&&""!=this.data.bg_color&&this.el.find(".ig_bg_overlay").css("border-color",this.data.bg_color)},Icegram_Message_Type_Popup.prototype.show=function(a,b){if(!this.is_visible()){var c=this,d="#icegram_message_"+this.data.id;this.animate("in"),window.ig_popup=jQuery.magnificPopup,window.ig_popup.open({items:{src:d,type:"inline"},showCloseBtn:!1,callbacks:{close:function(){b!==!0&&c.track("closed"),c.el.removeClass("ig_show")},open:function(){window.icegram.adjustFormContainerHeight(c)}}}),c.el.addClass("ig_show").removeClass("ig_hide"),b!==!0&&this.track("shown")}},Icegram_Message_Type_Popup.prototype.add_powered_by=function(a){setTimeout(function(){jQuery(".mfp-wrap").append('<div class="ig_powered_by"><a href="'+a.link+'" target="_blank">'+a.text+"</a></div>")},1e3+1e3*this.data.delay_time)},Icegram_Message_Type_Popup.prototype.hide=function(a,b){if(this.is_visible()){var c="#icegram_message_"+this.data.id,d=this;this.animate("out"),setTimeout(function(){d.el.addClass("ig_hide").removeClass("ig_show"),jQuery.magnificPopup.close({items:{src:c,type:"inline"}})},500)}},"undefined"==typeof window.ig_popup&&!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),b.st.showCloseBtn&&(!b.st.closeBtnInside||b.currTemplate[b.currItem.type]===!0)&&b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),!d&&"loading"===a&&(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,H&&clearInterval(H),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){H&&clearInterval(H),H=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(H),c++,3===c?e(10):40===c?e(50):100===c&&e(500),void 0)},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:I(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(H&&clearInterval(H),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var J,K=function(){return void 0===J&&(J=void 0!==document.createElement("p").style.MozTransform),J};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return K()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var L="retina";a.magnificPopup.registerModule(L,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+L,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+L,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});;function Icegram_Message_Type_Toast(a){this.width=300,this.sticky=!1,this.duration=1e4,Icegram_Message_Type.apply(this,arguments)}Icegram_Message_Type_Toast.prototype=Object.create(Icegram_Message_Type.prototype),Icegram_Message_Type_Toast.prototype.constructor=Icegram_Message_Type_Toast,Icegram_Message_Type_Toast.prototype.get_template_default=function(){return'<li class="icegram ig_toast ig_container ig_{{=theme}} ig_cta" data="{{=id}}" id="icegram_message_{{=id}}"><div class="ig_wrapper"><div class="ig_content"><div class="ig_base"></div><div class="ig_line"></div><img class="ig_icon" src="{{=icon}}"/><div class="ig_headline">{{=headline}}</div><div class="ig_message">{{=message}}</div></div></div></li>'},Icegram_Message_Type_Toast.prototype.pre_render=function(){if("10"!=this.data.position&&"12"!=this.data.position||(this.data.position="20"),jQuery("ul#"+this.data.position).length)var a=jQuery("ul#"+this.data.position);else{var a=jQuery('<ul id="'+this.data.position+'"></ul>').addClass("ig_toast_block").appendTo(this.root_container).hide();a.width(this.width),"00"==this.data.position?a.css({top:"0",left:"0"}).addClass("ig_left").addClass("ig_top"):"01"==this.data.position?a.css({top:"0",left:"50%",margin:"5px 0 0 -"+this.width/2+"px"}).addClass("ig_center").addClass("ig_top"):"02"==this.data.position?a.css({top:"0",right:"0"}).addClass("ig_right").addClass("ig_top"):"20"==this.data.position?a.css({bottom:"0",left:"0"}).addClass("ig_left").addClass("ig_bottom"):"21"==this.data.position?a.css({bottom:"0",left:"50%",margin:"5px 0 0 -"+this.width/2+"px"}).addClass("ig_center").addClass("ig_bottom"):"22"==this.data.position?a.css({bottom:"0",right:"0"}).addClass("ig_right").addClass("ig_bottom"):"11"==this.data.position&&a.css({top:"50%",left:"50%",margin:"-"+this.width/2+"px 0 0 -"+this.width/2+"px"}).addClass("ig_center").addClass("ig_top")}this.root_container=a},Icegram_Message_Type_Toast.prototype.pre_show=function(){!this.root_container.hasClass("active")&&this.root_container.addClass("active").show()},Icegram_Message_Type_Toast.prototype.post_show=function(){var a=this;!this.sticky&&this.duration>0&&setTimeout(function(){a.hide(),a.root_container.children().length||a.root_container.removeClass("active").hide()},this.duration)};
trunk/assets/js/main.min.js ADDED
@@ -0,0 +1 @@
 
1
+ function load_scripts_and_css(a){var b={};jQuery.each(a.css,function(a,c){b["ig_css_"+a]=1}),jQuery.each(a.scripts,function(a,c){b["ig_script_"+a]=1});var c=function(c){var d=c.target.id||"";""!=d&&b.hasOwnProperty(d)&&delete b[d],jQuery.isEmptyObject(b)&&(jQuery(window).trigger("scripts_loaded.icegram"),jQuery(function(){window.icegram=new Icegram,window.icegram.init(a),jQuery("body").addClass("ig_"+icegram_pre_data.post_obj.device),icegram_timing.end=Date.now()}))};jQuery.each(a.css,function(a,b){jQuery("<link>").attr("type","text/css").attr("rel","stylesheet").attr("id","ig_css_"+a).attr("media","all").appendTo("head").on("load",c).attr("href",b)});var d=a.scripts.shift();jQuery("<script>").attr("type","text/javascript").attr("id","ig_script_0").appendTo("body").on("load",function(b){c(b),jQuery.each(a.scripts,function(a,b){jQuery("<script>").attr("type","text/javascript").attr("id","ig_script_"+(a+1)).appendTo("body").on("load",c).attr("src",b)})}).attr("src",d)}try{var icegram_data,icegram_timing={};icegram_pre_data.post_obj.referral_url=window.location.href,icegram_timing.start=Date.now(),"yes"===icegram_pre_data.post_obj.cache_compatibility?(jQuery.ajax({url:icegram_pre_data.ajax_url,type:"POST",async:!0,cache:!1,data:icegram_pre_data.post_obj,dataType:"json",success:function(a){a?(icegram_data=a,load_scripts_and_css(icegram_data)):jQuery(".ig_inline_container:empty").remove()},error:function(a){}}),jQuery(window).on("init.icegram",function(a,b){"undefined"!=typeof b&&"undefined"!=typeof b.messages&&jQuery.each(b.messages,function(a,b){b.data.assets&&(jQuery.each(b.data.assets.styles||[],function(a,b){var c=jQuery("<div/>").html(b).find("link").attr("href");c&&0==jQuery('link[href="'+c+'"]').length&&jQuery("body").append(b)}),jQuery.each(b.data.assets.scripts||[],function(a,b){var c=jQuery("<div/>").html("<script "+b).find("script").attr("src");c&&0==jQuery('script[src="'+c+'"]').length&&jQuery("body").append("<script "+b)}))})})):"undefined"!=typeof icegram_data&&load_scripts_and_css(icegram_data),jQuery(window).on("init.icegram",function(a,b){"undefined"!=typeof b&&"undefined"!=typeof b.messages&&jQuery.each(b.messages,function(a,b){"yes"==b.data.use_custom_code&&"undefined"!=typeof b.data.custom_js&&jQuery("body").append(b.data.custom_js)}),jQuery("body").find(".trigger_onclick").length&&jQuery.each(jQuery("body").find(".trigger_onclick"),function(a,c){var d="",e=jQuery(c).data("campaigns"),f=b.get_message_by_campaign_id(e);jQuery.each(f,function(a,b){var c=parseInt(b.data.id);d+="icegram.get_message_by_id("+c+").show();"}),jQuery(c).children().length?jQuery(c).children().attr("onclick",d):jQuery(c).attr("onclick",d)})})}catch(err){console.log(err)}
trunk/classes/class-icegram-cache.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+
4
+ if ( !class_exists( 'Icegram_Cache' ) ) {
5
+
6
+ /*
7
+ // Example usage
8
+ $cache = new Icegram_Cache('category', 14 * 86400);
9
+ $val = $cache->get( $key );
10
+ if ( $val === null ) {
11
+ // Not in cache, compute
12
+ $val = doyourprocess();
13
+ $cache->set( $key, $val );
14
+ }
15
+ // Now use the $val
16
+
17
+ function cleanup() {
18
+ $cache = new Icegram_Cache('category', 14 * 86400);
19
+ $cache->cleanup();
20
+ }
21
+
22
+ // For cleanup
23
+ wp_schedule_event( time(), 'daily', array($this, 'cleanup') );
24
+ */
25
+
26
+ class Icegram_Cache {
27
+
28
+ var $base_dir;
29
+ var $expire_after;
30
+ var $enabled;
31
+ var $_group;
32
+ var $_hashes;
33
+
34
+ public function set( $key, $data ) {
35
+ if (!$this->enabled) return false;
36
+ $res = file_put_contents($this->_file( $key ), serialize($data));
37
+ return ( $res === false ) ? false : true;
38
+ }
39
+
40
+ public function get( $key ) {
41
+ if (!$this->enabled) return null;
42
+ if ($this->_exists( $key )) {
43
+ return unserialize( file_get_contents( $this->_file( $key )));
44
+ }
45
+ return null;
46
+ }
47
+
48
+ public function delete( $key ) {
49
+ if (!$this->enabled) return true;
50
+ if ($this->_exists( $key )) {
51
+ return unlink( $this->_file( $key ) );
52
+ }
53
+ return true;
54
+ }
55
+
56
+ public function cleanup( ) {
57
+ if (!$this->enabled) return true;
58
+ foreach (glob($this->base_dir . $this->_group . "*") as $filename) {
59
+ if (filemtime($filename) < time() - $this->expire_after) {
60
+ @unlink($filename);
61
+ }
62
+ }
63
+ return true;
64
+ }
65
+
66
+ private function _exists( $key ) {
67
+ return (is_file( $this->_file( $key ) ) );
68
+ }
69
+
70
+ private function _file( $key ) {
71
+ return $this->base_dir . $this->_group . '_' . $this->_hash( $key );
72
+ }
73
+
74
+ private function _hash( $key ) {
75
+ if (!array_key_exists($key, $this->_hashes)) {
76
+ $this->_hashes[ $key ] = md5($key);
77
+ }
78
+ return $this->_hashes[ $key ];
79
+ }
80
+
81
+
82
+ public function __construct( $group = '', $expire_after = 86400, $base_dir = '' ) {
83
+
84
+ $this->_group = sanitize_key($group);
85
+ $this->base_dir = $base_dir;
86
+ $this->expire_after = $expire_after;
87
+ $this->_hashes = array();
88
+
89
+ if (empty($this->base_dir)) {
90
+ $uploads = wp_upload_dir();
91
+ $uploads_base_dir = trailingslashit( $uploads['basedir'] );
92
+ $this->base_dir = $uploads_base_dir . 'igcache/';
93
+ }
94
+
95
+ if (!is_dir( $this->base_dir )) {
96
+ if ( false === mkdir( $this->base_dir ) ) {
97
+ $this->enabled = false;
98
+ return;
99
+ }
100
+ }
101
+ $this->base_dir = trailingslashit( $this->base_dir );
102
+ $this->enabled = true;
103
+ }
104
+ }
105
+
106
+ }
trunk/classes/class-icegram-campaign-admin.php ADDED
@@ -0,0 +1,770 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+ /**
4
+ * Icegram Campaign Admin class
5
+ */
6
+ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
7
+ class Icegram_Campaign_Admin {
8
+
9
+ var $default_target_rules;
10
+ var $site_url;
11
+ function __construct() {
12
+
13
+ // add_action( 'add_meta_boxes', array( &$this, 'add_campaigns_metaboxes' ), 0 );
14
+ add_action( 'edit_form_advanced', array( &$this, 'add_campaigns_tabs' ) );
15
+
16
+ add_action( 'save_post', array( &$this, 'save_campaign_settings' ), 10, 2 );
17
+ add_action( 'wp_ajax_icegram_json_search_messages', array( &$this, 'icegram_json_search_messages' ) );
18
+ add_action( 'wp_ajax_get_message_action_row', array( &$this, 'get_message_action_row' ) );
19
+ // add_filter( 'wp_default_editor', create_function('', 'return "html";') );
20
+ add_action( 'wp_ajax_save_campaign_preview', array( &$this, 'save_campaign_preview' ) );
21
+ add_action( 'icegram_campaign_target_rules', array( &$this, 'icegram_add_campaign_target_rules' ), 10, 2 );
22
+ add_filter('icegram_campaign_messages' ,array( &$this, 'get_icegram_campaign_messages' ) ,10,2 );
23
+ //duplicate campaign
24
+ add_filter( 'post_row_actions', array(&$this , 'add_campaign_action'), 10, 2 );
25
+ add_action('admin_init', array(&$this ,'duplicate_campaign') ,10, 1);
26
+
27
+ // Adding tabs here
28
+ add_filter( 'icegram_campaign_tabs', array( &$this, 'campaign_data_tab_content' ), 0, 1 );
29
+ add_filter( 'icegram_campaign_tabs', array( &$this, 'campaign_target_rules_tab_content' ), 100, 1 );
30
+
31
+ $this->site_url = home_url().'/';
32
+
33
+ $this->default_target_rules = apply_filters( 'icegram_campaign_default_rules',
34
+ array ( 'homepage' => 'yes',
35
+ 'when' => 'always',
36
+ 'mobile' => 'yes',
37
+ 'tablet' => 'yes',
38
+ 'laptop' => 'yes',
39
+ 'logged_in' => 'all'
40
+ )
41
+ );
42
+
43
+ }
44
+ public static function getInstance(){
45
+ static $ig_campaign_admin = null;
46
+ if (null === $ig_campaign_admin) {
47
+ $ig_campaign_admin = new Icegram_Campaign_Admin();
48
+ }
49
+ return $ig_campaign_admin;
50
+ }
51
+
52
+ // Initialize campaign Tabs
53
+ function add_campaigns_tabs() {
54
+ global $post, $pagenow;
55
+
56
+ if ($post->post_type != 'ig_campaign') return;
57
+
58
+ // $tabs = array();
59
+ $tabs = array('nav' => array(), 'tabs' => array());
60
+ $tabs = apply_filters('icegram_campaign_tabs', $tabs);
61
+
62
+ if(!empty($tabs)){
63
+ $tabs_nav = !empty($tabs['nav']) ? implode('', $tabs['nav']) : '';
64
+ $tabs_content = !empty($tabs['tabs']) ? implode('', $tabs['tabs']) : '';
65
+
66
+ $preview_button = '<div id="" class="ig_preview_button">
67
+ <div class="button button-primary campaign_preview">' . __( 'Preview Campaign', 'icegram' ) .'</div>
68
+ <div class="clear"></div></div>';
69
+
70
+ // $preview_button = '<div class="button button-primary campaign_preview">' . __( 'Preview', 'icegram' ) . '</div>';
71
+ echo $preview_button .'<div id="ig-admin-tabs"><ul class="ig-admin-tabs-nav">'. $tabs_nav .'</ul>'. $tabs_content .'</div>';
72
+ }
73
+
74
+ if ( $pagenow == 'post-new.php' ) {
75
+ echo "<style>
76
+ #poststuff{
77
+ position:relative;
78
+ }
79
+ .wrap h1.wp-heading-inline,
80
+ #post-body-content,
81
+ .postbox-container + *:not(:last-child),
82
+ .postbox-container > *:not(.ig-gallery-wrap){
83
+ display:none;
84
+ }
85
+ .wrap h1.wp-heading-inline.gallery-heading{
86
+ display:inline-block;
87
+ }
88
+ .ig-gallery-position{
89
+ position: absolute;
90
+ width: 100%;
91
+ left: 0;
92
+ top: 50px;
93
+ }
94
+ #postbox-container-1 #side-sortables.gal-toggled{
95
+ display:block;
96
+ }
97
+ </style>";
98
+ echo '<h1 class="wp-heading-inline gallery-heading">'. __('Import from beautiful design templates - or', 'icegram'). '<a href="#" class="page-title-action" id="ig-add-new-campaign">'. __('Add New Campaign', 'icegram'). '</a></h1>';
99
+ Icegram::gallery_screen();
100
+ }
101
+
102
+ }
103
+
104
+ // Display list of messages of campaign tab
105
+ function campaign_data_tab_content($tabs) {
106
+
107
+ $tab_id = 'main';
108
+ $tab_class = 'campaign_data'; // space seprated classes
109
+
110
+ $tabs['nav'][$tab_id] = '<li class="ig-admin-nav-'. $tab_id . '"><a href="#ig-admin-tab-'. $tab_id .'">'. __( 'Messages', 'icegram' ) .'</a></li>';
111
+ $tabs['tabs'][$tab_id] = '';
112
+
113
+ ob_Start();
114
+ self::campaign_data_content();
115
+ $tabs['tabs'][$tab_id] .= '<div id="ig-admin-tab-'. $tab_id .'" class="ig-admin-tab '. $tab_class.'">' . ob_get_clean() .'</div>';
116
+
117
+ return $tabs;
118
+ }
119
+
120
+ // Campaign targeting rules tab
121
+ function campaign_target_rules_tab_content($tabs) {
122
+
123
+ $tab_id = 'last';
124
+ $tab_class = 'campaign_target_rules'; // space seprated classes
125
+
126
+
127
+ // $tabs['nav'][$tab_id] = '<li><a href="#ig-admin-tab-'. $tab_id .'">'. __( 'Targeting Rules', 'icegram' ) .'</a></li>';
128
+ $tabs['nav'][$tab_id] = '<li class="ig-admin-nav-'. $tab_id . '"><a href="#ig-admin-tab-'. $tab_id .'">'. __( 'Display Rules', 'icegram' ) .'</a></li>';
129
+ $tabs['tabs'][$tab_id] = '';
130
+
131
+ ob_Start();
132
+ self::campaign_target_rules_content();
133
+ $tabs['tabs'][$tab_id] .= '<div id="ig-admin-tab-'. $tab_id .'" class="ig-admin-tab '. $tab_class .'">' . ob_get_clean() .'</div>';
134
+
135
+ return $tabs;
136
+ }
137
+
138
+ // Display list of messages of campaign
139
+ function campaign_data_content() {
140
+ global $post, $icegram;
141
+ $ig_message_admin = Icegram_Message_Admin::getInstance();
142
+
143
+ $campaign_box = '<select id="icegram_messages" name="icegram_messages[]" class="ajax_chosen_select_messages" data-placeholder="' . __( 'Search to add / Create new&hellip;', 'icegram' ) . '">';
144
+ $campaign_box .= '<option value=""></option>';
145
+ foreach ( $icegram->message_types as $message ) {
146
+ $campaign_box .= '<option value="'.$message['type'].'">'.__( 'Create new', 'icegram' ).' '.$message['name'].' ...</option>';
147
+ }
148
+ $campaign_box .= '</select>';
149
+ // $campaign_box .= '<div class="button button-primary campaign_preview">' . __( 'Preview', 'icegram' ) . '</div>';
150
+
151
+ $title = '<label class="options_header" for="icegram_messages"><strong>' . __( 'Message', 'icegram' ) . '</strong></label>';
152
+ ?>
153
+ <? do_action('main_tab_prepand_content')?>
154
+ <div class="campaign_box"><?php echo $title; ?> &mdash; <?php echo $campaign_box; ?></div>
155
+ <div style="margin: 8px -12px 12px -12px">
156
+ <hr/>
157
+ </div>
158
+ <div class="campaign_target_rules_panel">
159
+ <div class="options_group">
160
+ <div class="messages-list">
161
+ <table class="messages_list_table">
162
+ <?php
163
+ $this->message_list_table_header();
164
+ ?>
165
+ <tbody>
166
+ <?php
167
+ $messages = array();
168
+ $messages = apply_filters('icegram_campaign_messages', $messages, $post->ID);
169
+ $icegram_message_meta_key = apply_filters('icegram_message_meta_key', 'messages');
170
+ if ( !empty( $messages ) ) {
171
+ foreach ( $messages as $row => $message ) {
172
+ $message_title = get_the_title( $message['id'] );
173
+ $message_data = get_post_meta( $message['id'], 'icegram_message_data', true );
174
+ $message_type = ( !empty( $message_data['type'] ) ) ? $message_data['type'] : '';
175
+ $class = ( !empty( $icegram->message_types[ $message_type ] ) ) ? $message_type : 'unknown';
176
+ //if ( empty( $icegram->message_types[ $message_type ] ) ) continue;
177
+ ?>
178
+ <tr class="form-field message-row" value="<?php echo $message['id']; ?>">
179
+ <td class="message_header">
180
+ <label class="message_header_label <?php echo "ig_".$message_data['type'] ." " .$class; ?>"><?php echo $class; ?></label>
181
+ </td>
182
+ <td class="message_title">
183
+ <div class="message-title-text"><?php echo $message_title; ?></div>
184
+ <input type="text" class="message-title-input" name="message_data[<?php echo $message['id']; ?>][post_title]" value="<?php echo $message_title; ?>" placeholder="<?php echo __( 'Give this message a name for your own reference', 'icegram' ); ?>" style="display: none;">
185
+ </td>
186
+ <td class="message_seconds">
187
+ <input type="hidden" name="<?php echo $icegram_message_meta_key .'['.$row; ?>][id]" value="<?php echo $message['id']; ?>" />
188
+ <input type="number" class="seconds-text" name="<?php echo $icegram_message_meta_key .'['.$row; ?>][time]" min="-1" value="<?php echo ( !empty( $message['time'] ) ) ? $message['time'] : 0; ?>" size="3" />
189
+ <?php _e( ' sec', 'icegram' )?>
190
+ </td>
191
+ <td class="action_links">
192
+ <span class="actions message_edit" title="<?php _e( 'Edit Message', 'icegram' ); ?>" ></span>
193
+ <span class="actions message_delete" title="<?php _e( 'Remove from Campaign', 'icegram' ); ?>" ></span>
194
+ </td>
195
+ </tr>
196
+ <tr id="message_row_<?php echo $message['id']; ?>" class="message-edit-row" style="display: none;">
197
+ <td colspan="4">
198
+ <?php
199
+ $ig_message_admin->message_form_fields( '', array( 'message_id' => $message['id'] ) );
200
+ ?>
201
+ </td>
202
+ </tr>
203
+ <?php
204
+ }
205
+ }
206
+ ?>
207
+ </tbody>
208
+ </table>
209
+ <div class="empty_campaign">
210
+ <?php
211
+ echo __( 'No messages yet. Use search / create bar above to add messages to this campaign.', 'icegram' );
212
+ ?>
213
+ </div>
214
+ </div>
215
+ </div>
216
+ </div>
217
+ <?php
218
+ }
219
+
220
+ // Campaign targeting rules metabox
221
+ function campaign_target_rules_content() {
222
+ global $post;
223
+
224
+ wp_nonce_field( 'icegram_campaign_save_data', 'icegram_campaign_meta_nonce' );
225
+ $campaign_target_rules = get_post_meta( $post->ID, 'icegram_campaign_target_rules', true );
226
+
227
+ if( empty( $campaign_target_rules ) ) {
228
+ $campaign_target_rules = $this->default_target_rules;
229
+ }
230
+
231
+ ?>
232
+ <span class="target_rules_desc"> <em><?php echo 'Messages in this campaign will be shown when all these rules match...' ?></em></span>
233
+ <div class="campaign_target_rules_panel">
234
+ <?php do_action( 'icegram_campaign_target_rules', $post->ID, $campaign_target_rules ); ?>
235
+ </div>
236
+ <?php
237
+ }
238
+
239
+ function get_icegram_campaign_messages($messages, $campaign_id){
240
+ $messages = get_post_meta($campaign_id, 'messages', true);
241
+ return $messages;
242
+ }
243
+
244
+ // Display setting fields for campaign targeting rules
245
+ function icegram_add_campaign_target_rules( $campaign_id, $campaign_target_rules ) {
246
+ global $wp_roles;
247
+ ?>
248
+ <div class="options_group" id="campaign_target_rules_where">
249
+ <p class="form-field">
250
+ <label class="options_header"><?php _e( 'Where?', 'icegram' ); ?></label>
251
+ <label for="where_sitewide">
252
+ <input type="checkbox" name="campaign_target_rules[sitewide]" id="where_sitewide" value="yes" <?php ( !empty( $campaign_target_rules['sitewide'] ) ) ? checked( $campaign_target_rules['sitewide'], 'yes' ) : ''; ?> />
253
+ <?php _e( 'Sitewide', 'icegram' ); ?>
254
+ </label>
255
+ </p>
256
+ <p class="form-field" <?php echo ( !empty( $campaign_target_rules['sitewide'] ) && $campaign_target_rules['sitewide'] == 'yes' ) ? '' : 'style="display: none;"'; ?>>
257
+ <label class="options_header"></label>
258
+ <?php
259
+ echo '<select name="exclude_page_id[]" id="exclude_page_id" data-placeholder="' . __( 'Select pages to exclude&hellip;', 'icegram' ) . '" style="min-width:300px;" class="icegram_chosen_page" multiple>';
260
+ foreach ( get_pages() as $page ) {
261
+ echo '<option value="' . $page->ID . '"';
262
+ if( !empty( $campaign_target_rules['exclude_page_id'] ) ) {
263
+ echo selected( in_array( $page->ID, $campaign_target_rules['exclude_page_id'] ) );
264
+ }
265
+ echo '>' . $page->post_title . '</option>';
266
+ }
267
+ echo '</select>';
268
+ ?>
269
+ </p>
270
+ <p class="form-field">
271
+ <label class="options_header">&nbsp;</label>
272
+ <label for="where_homepage">
273
+ <input type="checkbox" name="campaign_target_rules[homepage]" id="where_homepage" value="yes" <?php ( !empty( $campaign_target_rules['homepage'] ) ) ? checked( $campaign_target_rules['homepage'], 'yes' ) : ''; ?> />
274
+ <?php _e( 'Homepage', 'icegram' ); ?>
275
+ </label>
276
+ </p>
277
+ <p class="form-field">
278
+ <label class="options_header">&nbsp;</label>
279
+ <label for="where_other_page">
280
+ <input type="checkbox" name="campaign_target_rules[other_page]" id="where_other_page" value="yes" <?php ( !empty( $campaign_target_rules['other_page'] ) ) ? checked( $campaign_target_rules['other_page'], 'yes' ) : ''; ?> />
281
+ <?php _e( 'Selected pages', 'icegram' ); ?>
282
+ </label>
283
+ </p>
284
+ <p class="form-field" <?php echo ( !empty( $campaign_target_rules['other_page'] ) && $campaign_target_rules['other_page'] == 'yes' ) ? '' : 'style="display: none;"'; ?>>
285
+ <label class="options_header">&nbsp;</label>
286
+ <?php
287
+ echo '<select name="page_id[]" id="where_page_id" data-placeholder="' . __( 'Select a page&hellip;', 'icegram' ) . '" style="min-width:300px;" class="icegram_chosen_page" multiple>';
288
+ foreach ( get_pages() as $page ) {
289
+ echo '<option value="' . $page->ID . '"';
290
+ if( !empty( $campaign_target_rules['page_id'] ) ) {
291
+ echo selected( in_array( $page->ID, $campaign_target_rules['page_id'] ) );
292
+ }
293
+ echo '>' . $page->post_title . '</option>';
294
+ }
295
+ echo '</select>';
296
+ ?>
297
+ </p>
298
+ <p class="form-field">
299
+ <label class="options_header">&nbsp;</label>
300
+ <label for="where_local_url">
301
+ <input type="checkbox" name="campaign_target_rules[local_url]" id="where_local_url" value="yes" <?php ( !empty( $campaign_target_rules['local_url'] ) ) ? checked( $campaign_target_rules['local_url'], 'yes' ) : ''; ?> />
302
+ <?php _e( 'Specific URLs on this site', 'icegram' ); ?>
303
+ </label>
304
+ </p>
305
+ <p class="form-field local_url" <?php echo ( !empty( $campaign_target_rules['local_url'] ) && $campaign_target_rules['local_url'] == 'yes' ) ? '' : 'style="display: none;"'; ?>>
306
+ <?php
307
+ if(!empty($campaign_target_rules['local_urls'])){
308
+ foreach ($campaign_target_rules['local_urls'] as $url) {?>
309
+ <span><label class="options_header"><span id="valid-field"> </span></label>
310
+ <input type="text" data-option="local_url" class="url_input_field" name="campaign_target_rules[local_urls][]" value="<?php echo $this->site_url.$url ;?>"/><span class="delete-url"></span></span>
311
+ <?php
312
+ }
313
+ }else{ ?>
314
+ <span><label class="options_header"><span id="valid-field"> </span></label>
315
+ <input type="text" data-option="local_url" class="url_input_field" name="campaign_target_rules[local_urls][]" value="<?php echo $this->site_url.'*' ;?>"/><span class="delete-url"></span></span>
316
+ <?php }
317
+ ?>
318
+ <label class="options_header " id="add_local_url_row_label">&nbsp;</label><span id="add-url-icon"> </span><a class="campaign_add_url" id="add_local_url_row" href="#"><?php _e( ' Add another', 'icegram' ); ?></a>
319
+ </p>
320
+
321
+ <?php
322
+ do_action( 'icegram_after_campaign_where_rule', $campaign_id, $campaign_target_rules );
323
+ ?>
324
+ <p class="form-field">
325
+ <label class="options_header">&nbsp;</label>
326
+ <span class="campaign_shortcode light">
327
+ <?php echo sprintf(__( 'Additionally you can insert <code>[%s]</code> wherever you want to run this campaign.', 'icegram' ), 'icegram campaigns="' .$campaign_id . '"' ); ?>
328
+ </span>
329
+ </p>
330
+
331
+ </div>
332
+ <div class="options_group" id="campaign_target_rules_when">
333
+ <p class="form-field">
334
+ <label class="options_header"><?php _e( 'When?', 'icegram' ); ?></label>
335
+ <label for="when_always">
336
+ <input type="radio" class="schedule_rule" name="campaign_target_rules[when]" id="when_always" value="always" <?php ( !empty( $campaign_target_rules['when'] ) ) ? checked( $campaign_target_rules['when'], 'always' ) : ''; ?> />
337
+ <?php _e( 'Always', 'icegram' ); ?>
338
+ </label>
339
+ </p>
340
+ <p class="form-field">
341
+ <label class="options_header">&nbsp;</label>
342
+ <label for="when_schedule">
343
+ <input type="radio" class="schedule_rule" name="campaign_target_rules[when]" id="when_schedule" value="schedule" <?php ( !empty( $campaign_target_rules['when'] ) ) ? checked( $campaign_target_rules['when'], 'schedule' ) : ''; ?> />
344
+ <?php _e( 'Schedule', 'icegram' ); ?>
345
+ <span class="form-field" id="date_picker" <?php echo ( !empty( $campaign_target_rules['when'] ) && $campaign_target_rules['when'] == 'schedule' ) ? '' : 'style="display: none;"'; ?>>
346
+ <label class="date_picker">
347
+ <input type="text" class="date-picker" name="campaign_target_rules[from]" value="<?php echo ( !empty( $campaign_target_rules['from'] ) ) ? esc_attr( $campaign_target_rules['from'] ) : ''; ?>" placeholder="<?php _e( 'From&hellip;', 'icegram' );?>" />
348
+ </label>
349
+ <label class="date_picker">
350
+ <input type="text" class="date-picker" name="campaign_target_rules[to]" value="<?php echo ( !empty( $campaign_target_rules['to'] ) ) ? esc_attr( $campaign_target_rules['to'] ) : ''; ?>" placeholder="<?php _e( 'To&hellip;', 'icegram' );?>" />
351
+ </label>
352
+ </span>
353
+ </label>
354
+ </p>
355
+ <?php
356
+ do_action( 'icegram_after_campaign_when_rule', $campaign_id, $campaign_target_rules );
357
+ ?>
358
+ </div>
359
+ <div class="options_group" id="campaign_target_rules_device">
360
+ <p class="form-field">
361
+ <label class="options_header"><?php _e( 'Device?', 'icegram' ); ?></label>
362
+ <label for="device_mobile" class="device" title="<?php _e( 'Mobile / Smartphones', 'icegram' ); ?>">
363
+ <input type="checkbox" name="campaign_target_rules[mobile]" id="device_mobile" value="yes" <?php ( !empty( $campaign_target_rules['mobile'] ) ) ? checked( $campaign_target_rules['mobile'], 'yes' ) : ''; ?> />
364
+ <span class="device_mobile"></span>
365
+ </label>
366
+ <label for="device_tablet" class="device" title="<?php _e( 'Tablet', 'icegram' ); ?>">
367
+ <input type="checkbox" name="campaign_target_rules[tablet]" id="device_tablet" value="yes" <?php ( !empty( $campaign_target_rules['tablet'] ) ) ? checked( $campaign_target_rules['tablet'], 'yes' ) : ''; ?> />
368
+ <span class="device_tablet"></span>
369
+ </label>
370
+ <label for="device_laptop" class="device" title="<?php _e( 'Desktop / Laptop', 'icegram' ); ?>">
371
+ <input type="checkbox" name="campaign_target_rules[laptop]" id="device_laptop" value="yes" <?php ( !empty( $campaign_target_rules['laptop'] ) ) ? checked( $campaign_target_rules['laptop'], 'yes' ) : ''; ?> />
372
+ <span class="device_laptop"></span>
373
+ </label>
374
+ </p>
375
+ </div>
376
+ <div class="options_group" id="campaign_target_rules_users">
377
+ <p class="form-field">
378
+ <label class="options_header"><?php _e( 'Who?', 'icegram' ); ?></label>
379
+ <label for="users_all">
380
+ <input type="radio" name="campaign_target_rules[logged_in]" id="users_all" value="all" <?php ( !empty( $campaign_target_rules['logged_in'] ) ) ? checked( $campaign_target_rules['logged_in'], 'all' ) : ''; ?> />
381
+ <?php _e( 'All users', 'icegram' ); ?>
382
+ </label>
383
+ </p>
384
+ <p class="form-field">
385
+ <label class="options_header">&nbsp;</label>
386
+ <label for="users_logged_in">
387
+ <input type="radio" name="campaign_target_rules[logged_in]" id="users_logged_in" value="logged_in" <?php ( !empty( $campaign_target_rules['logged_in'] ) ) ? checked( $campaign_target_rules['logged_in'], 'logged_in' ) : ''; ?> />
388
+ <?php _e( 'Logged in users only', 'icegram' ); ?>
389
+ </label>
390
+ </p>
391
+
392
+ <div class="user_roles">
393
+ <?php
394
+ if ( !empty( $campaign_target_rules['logged_in'] ) && ($campaign_target_rules['logged_in'] == 'all' || $campaign_target_rules['logged_in'] == 'not_logged_in') ) {
395
+ $campaign_logged_in_user_style = 'style="display: none;"';
396
+ } else {
397
+ $campaign_logged_in_user_style = 'style="display: block;"';
398
+ }
399
+ ?>
400
+ <p class="form-field" <?php echo $campaign_logged_in_user_style; ?>>
401
+ <label class="options_header">&nbsp;</label>
402
+ <?php
403
+ if ( isset( $wp_roles ) ) {
404
+ $wp_roles = new WP_Roles();
405
+ $roles = $wp_roles->get_names();
406
+
407
+ echo '<select name="campaign_target_rules[users][]" id="users_roles" data-placeholder="' . __( 'Select a user role&hellip;', 'icegram' ) . '" style="min-width:300px;" class="icegram_chosen_page" multiple>';
408
+ foreach ( $roles as $role_value => $role_name ) {
409
+ echo '<option value="' . $role_value . '"';
410
+ if( !empty( $campaign_target_rules['users'] ) ) {
411
+ echo selected( in_array( $role_value, $campaign_target_rules['users'] ) );
412
+ }
413
+ echo '>' . $role_name . '</option>';
414
+ }
415
+ echo '</select>';
416
+ }
417
+ ?>
418
+ </div>
419
+ <p class="form-field">
420
+ <label class="options_header">&nbsp;</label>
421
+ <label for="users_not_logged_in">
422
+ <input type="radio" name="campaign_target_rules[logged_in]" id="users_not_logged_in" value="not_logged_in" <?php ( !empty( $campaign_target_rules['logged_in'] ) ) ? checked( $campaign_target_rules['logged_in'], 'not_logged_in' ) : ''; ?> />
423
+ <?php _e( 'Not Logged in users', 'icegram' ); ?>
424
+ </label>
425
+ </p>
426
+ </div>
427
+ <?php $expiry_options_for_shown = array( 'current_session' => __('Current Session' ,'icegram'),
428
+ '+50 years' => __('Never' ,'icegram'),
429
+ 'today' => __('Today' ,'icegram'),
430
+ '+1 week' => __('One week' ,'icegram') ,
431
+ '+2 week' => __('Two weeks' ,'icegram'),
432
+ '+1 month' => __('One Month ' ,'icegram'),
433
+ '+3 months' => __('Three Months ' ,'icegram') ,
434
+ '+1 year' => __('One year' ,'icegram') ,
435
+ '+2 years' => __('Two Years' ,'icegram'));
436
+ $expiry_options_for_clicked = array( '+50 years' => __('Never' ,'icegram'),
437
+ 'current_session' => __('Current Session' ,'icegram'),
438
+ 'today' => __('Today' ,'icegram'),
439
+ '+1 week' => __('One week' ,'icegram') ,
440
+ '+2 week' => __('Two weeks' ,'icegram'),
441
+ '+1 month' => __('One Month ' ,'icegram'),
442
+ '+3 months' => __('Three Months ' ,'icegram') ,
443
+ '+1 year' => __('One year' ,'icegram') ,
444
+ '+2 years' => __('Two Years' ,'icegram'));
445
+
446
+ ?>
447
+ <div class="options_group" id="campaign_target_rules_retargeting">
448
+ <?php
449
+ $html_content = '<p class="form-field">
450
+ <label class="options_header">'.__( 'Retargeting', 'icegram' ).'</label>
451
+ <label for="retargeting">
452
+ <input type="checkbox" name="campaign_target_rules[retargeting]" id="retargeting" value="yes"'.(( !empty( $campaign_target_rules['retargeting'] ) ) ? checked( $campaign_target_rules['retargeting'], 'yes', false ) : '').'/>';
453
+ $html_content .= __(' Once shown, do NOT show this campaign again for ', 'icegram' );
454
+ $html_content .= '<select name="campaign_target_rules[expiry_time]">';
455
+ foreach($expiry_options_for_shown as $key => $option){
456
+ ?>
457
+ <?php $html_content .= '<option value="'.$key.'"'.((!empty($campaign_target_rules['expiry_time'])) ? selected( $campaign_target_rules['expiry_time'], $key, false ) : "").'>'.$option.'</option>';
458
+ }
459
+ $html_content .= '</select>';
460
+ $html_content .= '</label>';
461
+ $campaign_target_rules_retargeting = apply_filters('icegram_campaign_target_rules_retargeting' , array( 'html' => $html_content, 'campaign_target_rules' => $campaign_target_rules, 'expiry_options_for_shown' => $expiry_options_for_shown));
462
+ echo $campaign_target_rules_retargeting['html'];
463
+ ?>
464
+ </p>
465
+ <p class="form-field">
466
+ <label class="options_header">&nbsp;</label>
467
+ <label for="retargeting_clicked">
468
+ <input type="checkbox" name="campaign_target_rules[retargeting_clicked]" id="retargeting_clicked" value="yes" <?php ( !empty( $campaign_target_rules['retargeting_clicked'] ) ) ? checked( $campaign_target_rules['retargeting_clicked'], 'yes' ) : ''; ?> />
469
+ <?php _e( 'Once CTA is clicked, do NOT show this campaign again for', 'icegram' ); ?>
470
+ <select name="campaign_target_rules[expiry_time_clicked]">
471
+ <?php foreach($expiry_options_for_clicked as $key => $option){
472
+ ?>
473
+ <option value="<?php echo $key; ?>" <?php (!empty($campaign_target_rules['expiry_time_clicked'])) ? selected( $campaign_target_rules['expiry_time_clicked'], $key ) : ''; ?>><?php echo $option; ?></option>
474
+ <?php
475
+ }
476
+ ?>
477
+ </select>
478
+ </label>
479
+ </p>
480
+ </div>
481
+ <?php
482
+ }
483
+
484
+ // Return json encoded messages for searched term
485
+ function icegram_json_search_messages( $x = '' ) {
486
+ global $icegram;
487
+ check_ajax_referer( 'search-messages', 'security' );
488
+
489
+ header( 'Content-Type: application/json; charset=utf-8' );
490
+
491
+ $term = ( string ) urldecode( stripslashes( strip_tags( $_GET['term'] ) ) );
492
+ $post_types = array('ig_message');
493
+
494
+ if ( empty( $term ) ) die();
495
+
496
+ if ( is_numeric( $term ) ) {
497
+
498
+ $args = array(
499
+ 'post_type' => $post_types,
500
+ 'post_status' => 'publish',
501
+ 'posts_per_page' => -1,
502
+ 'post__in' => array( 0, $term ),
503
+ 'fields' => 'ids'
504
+ );
505
+
506
+ $posts = get_posts( $args );
507
+
508
+ } else {
509
+
510
+ $args = array(
511
+ 'post_type' => $post_types,
512
+ 'post_status' => 'publish',
513
+ 'posts_per_page' => -1,
514
+ 's' => $term,
515
+ 'fields' => 'ids'
516
+ );
517
+
518
+ $posts = get_posts( $args );
519
+
520
+ }
521
+
522
+ $found_messages = array();
523
+ if ( $posts ) {
524
+
525
+ foreach ( $posts as $post ) {
526
+
527
+ $message_title = get_the_title( $post );
528
+ $message_data = get_post_meta( $post, 'icegram_message_data', true );
529
+ $message_type = ( !empty( $icegram->message_types[ $message_data['type'] ]['type'] ) ) ? $icegram->message_types[ $message_data['type'] ]['type'] : '';
530
+ $found_messages[ $post ] = $message_type . ' &mdash; ' . $message_title;
531
+
532
+ }
533
+ $found_messages[''] = __( '- - - - - - - - - - - - - - - - - - - - - - - - - -', 'icegram' );
534
+ }
535
+
536
+ foreach ( $icegram->message_types as $message ) {
537
+ $found_messages[ $message['type'] ] = __( 'Create new', 'icegram' ) . ' ' . $message['name'] . ' ...';
538
+ }
539
+ ob_clean();
540
+ $found_messages = apply_filters( 'icegram_searched_messages', $found_messages, $term );
541
+ echo json_encode( $found_messages );
542
+ die();
543
+ }
544
+
545
+ // Constant table header for campaign
546
+ function message_list_table_header() {
547
+ ?>
548
+ <thead>
549
+ <tr class="form-field message-row-header">
550
+ <th class="message_header"><?php _e( 'Type', 'icegram' ); ?></th>
551
+ <th class="message_title"><?php _e( 'Name', 'icegram' ); ?></th>
552
+ <th class="message_seconds"><?php _e( 'Show after', 'icegram' ); ?></th>
553
+ <th class="action_links"><?php _e( 'Actions', 'icegram' ); ?></th>
554
+ </tr>
555
+ </thead>
556
+ <?php
557
+ }
558
+
559
+ // Return html for message row in json encoded format
560
+ function get_message_action_row() {
561
+
562
+ $ig_message_admin = Icegram_Message_Admin::getInstance();
563
+ $ig_message_admin->is_icegram_editor = true;
564
+
565
+ if ( empty( $_POST['message_id'] ) || !is_numeric( $_POST['message_id'] ) ) {
566
+
567
+ $my_post = array(
568
+ 'post_status' => 'auto-draft',
569
+ 'post_type' => 'ig_message'
570
+ );
571
+ $message_id = wp_insert_post( $my_post );
572
+ $message_title = '';
573
+ $message_type = $_POST['message_id'];
574
+
575
+ } else {
576
+
577
+ $message_id = $_POST['message_id'];
578
+ $message_title = get_the_title( $message_id );
579
+ $message_data = get_post_meta( $message_id, 'icegram_message_data', true );
580
+ $message_type = $message_data['type'];
581
+
582
+ }
583
+
584
+ ob_start();
585
+ $icegram_message_meta_key = apply_filters('icegram_message_meta_key' , 'messages');
586
+ ?>
587
+ <tr class="form-field message-row" value="<?php echo $message_id; ?>">
588
+ <td class="message_header">
589
+ <label class="message_header_label <?php echo "ig_".$message_type; ?>"><?php echo ucwords( str_replace( "-", ' ', $message_type ) ); ?></label>
590
+ </td>
591
+ <td class="message_title">
592
+ <div class="message-title-text" style="display:none;"><?php echo $message_title; ?></div>
593
+ <input type="text" class="message-title-input" name="message_data[<?php echo $message_id; ?>][post_title]" value="<?php echo $message_title; ?>" placeholder="<?php echo __( 'Give this message a name for your own reference', 'icegram' ); ?>">
594
+ </td>
595
+ <td class="message_seconds">
596
+ <input type="hidden" name="<?php echo $icegram_message_meta_key .'['.$_POST['row']; ?>][id]" value="<?php echo $message_id; ?>" />
597
+ <input type="number" class="seconds-text" name="<?php echo $icegram_message_meta_key .'['.$_POST['row']; ?>][time]" min="-1" value="0" size="3" /><?php _e( ' sec', 'icegram' )?>
598
+ </td>
599
+ <td class="action_links">
600
+ <span class="actions message_edit" title="<?php _e( 'Edit Message', 'icegram' ); ?>" ></span>
601
+ <span class="actions message_delete" title="<?php _e( 'Remove from Campaign', 'icegram' ); ?>" ></span>
602
+ </td>
603
+ </tr>
604
+ <tr id="message_row_<?php echo $message_id; ?>" class="message-edit-row">
605
+ <td colspan="4">
606
+ <?php
607
+ $ig_message_admin->message_form_fields( '', array( 'message_type' => $message_type, 'message_id' => $message_id, 'new_message_row' => true ) );
608
+ ?>
609
+ </td>
610
+ </tr>
611
+ <?php
612
+
613
+ echo json_encode( array( 'id' => $message_id, 'main' => ob_get_clean() ) );
614
+ die();
615
+
616
+ }
617
+
618
+ // Save all list of messages and targeting rules
619
+ function save_campaign_settings( $post_id, $post ) {
620
+
621
+ if (empty( $post_id ) || empty( $post ) || empty( $_POST )) return;
622
+ if (defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE) return;
623
+ if (is_int( wp_is_post_revision( $post ) )) return;
624
+ if (is_int( wp_is_post_autosave( $post ) )) return;
625
+ if ( empty( $_POST['icegram_campaign_meta_nonce'] ) || ! wp_verify_nonce( $_POST['icegram_campaign_meta_nonce'], 'icegram_campaign_save_data' ) ) return;
626
+ if (! current_user_can( 'edit_post', $post_id )) return;
627
+ if ($post->post_type != 'ig_campaign') return;
628
+
629
+ $campaign_target_rules = apply_filters( 'icegram_update_campaign_rules', $_POST['campaign_target_rules'], $post_id );
630
+
631
+ if(!empty($campaign_target_rules) && !empty($campaign_target_rules['local_urls'])){
632
+ foreach ($campaign_target_rules['local_urls'] as $key => $url) {
633
+ if( !empty( $url ) ){
634
+ if( $url == '*'){
635
+ $campaign_target_rules['local_urls'][$key] = $url;
636
+ }else{
637
+ $url = str_replace($this->site_url, '', $url);
638
+ $campaign_target_rules['local_urls'][$key] = $url;
639
+ }
640
+ } else {
641
+ unset($campaign_target_rules['local_urls'][$key]);
642
+ }
643
+ }
644
+
645
+ }
646
+
647
+ if ( isset( $_POST['page_id'] ) ) {
648
+ $campaign_target_rules['page_id'] = $_POST['page_id'];
649
+ update_post_meta( $post_id, 'icegram_campaign_target_pages', $_POST['page_id'] );
650
+ }
651
+ if ( isset( $_POST['exclude_page_id'] ) ) {
652
+ $campaign_target_rules['exclude_page_id'] = $_POST['exclude_page_id'];
653
+ update_post_meta( $post_id, 'icegram_campaign_target_pages', $_POST['exclude_page_id'] );
654
+ }
655
+
656
+ if ( count( $campaign_target_rules ) > 0 ) {
657
+ update_post_meta( $post_id, 'icegram_campaign_target_rules', $campaign_target_rules );
658
+ }
659
+
660
+ if ( empty( $_POST['messages'] ) ) {
661
+ update_post_meta( $post_id, 'messages', array() );
662
+ } else {
663
+
664
+ update_post_meta( $post_id, 'messages', array_values( $_POST['messages'] ) );
665
+ update_post_meta( $post_id, 'campaign_preview', array_values( $_POST['messages'] ) );
666
+
667
+ // Saving $_POST to temp var before updating messages
668
+ // to avoid problems with action handlers that rely on
669
+ // $_POST vars - e.g. WPML!!
670
+ $old_post = $_POST;
671
+ $_POST = array();
672
+ foreach ( $old_post['message_data'] as $message_id => $message_data ) {
673
+
674
+ $type = $message_data['type'];
675
+ if( isset( $message_data['theme'][$type] ) ) {
676
+ $message_data['theme'] = $message_data['theme'][$type];
677
+ } else {
678
+ unset( $message_data['theme'] );
679
+ }
680
+ if( isset( $message_data['animation'][$type] ) ) {
681
+ $message_data['animation'] = $message_data['animation'][$type];
682
+ } else {
683
+ unset( $message_data['animation'] );
684
+ }
685
+ if( isset( $message_data['position'][$type] ) ) {
686
+ $message_data['position'] = $message_data['position'][$type];
687
+ } elseif( isset( $message_data['position']['ig_default'] ) ) {
688
+ $message_data['position'] = $message_data['position']['ig_default'];
689
+ }
690
+ //save message data when campaign is save
691
+ $message_data = apply_filters( 'icegram_update_message_data', $message_data, $message_id );
692
+ update_post_meta( $message_id, 'icegram_message_data', $message_data );
693
+ update_post_meta( $message_id, 'icegram_message_preview_data', $message_data );
694
+ wp_update_post( array ( 'ID' => $message_id,
695
+ 'post_content' => $message_data['message'],
696
+ 'post_status' => 'publish',
697
+ 'post_title' => empty( $message_data['post_title'] ) ? $message_data['headline']: $message_data['post_title']
698
+ ) );
699
+ }
700
+ $_POST = $old_post;
701
+ }
702
+ }
703
+
704
+ // On preview button click save campaign messages list
705
+ function save_campaign_preview() {
706
+
707
+ if ( empty($_POST['post_ID']) ) die();
708
+ if ( !current_user_can( 'edit_post', $_POST['post_ID'] ) ) die();
709
+
710
+ $messages = apply_filters('campaign_preview_messages', $_POST['messages'], $_POST);
711
+ if( !empty( $messages ) ) {
712
+ update_post_meta( $_POST['post_ID'], 'campaign_preview', $messages ) ;
713
+
714
+ foreach ( (array) $_POST['message_data'] as $message_id => $message_data ) {
715
+ $type = $message_data['type'];
716
+ if( isset( $message_data['theme'][$type] ) ) {
717
+ $message_data['theme'] = $message_data['theme'][$type];
718
+ } else {
719
+ unset( $message_data['theme'] );
720
+ }
721
+ if( isset( $message_data['animation'][$type] ) ) {
722
+ $message_data['animation'] = $message_data['animation'][$type];
723
+ } else {
724
+ unset( $message_data['animation'] );
725
+ }
726
+ if( isset( $message_data['position'][$type] ) ) {
727
+ $message_data['position'] = $message_data['position'][$type];
728
+ } elseif( isset( $message_data['position']['ig_default'] ) ) {
729
+ $message_data['position'] = $message_data['position']['ig_default'];
730
+ }
731
+ $message_data = apply_filters( 'icegram_update_message_preview_data', $message_data, $message_id );
732
+ update_post_meta( $message_id, 'icegram_message_preview_data', $message_data );
733
+ }
734
+ // Determine page url to preview on...
735
+ $page_url = '';
736
+
737
+ if ( !empty($_POST['campaign_target_rules']) && !empty($_POST['campaign_target_rules']['other_page']) && !empty($_POST['page_id']) && is_array($_POST['page_id'])) {
738
+ $page_url = get_permalink( $_POST['page_id'][0] );
739
+ }
740
+ if ($page_url == '') {
741
+ if(!empty($_POST['campaign_target_rules']['local_url']) && is_array($_POST['campaign_target_rules']['local_urls'])){
742
+ $page_url = (strpos($_POST['campaign_target_rules']['local_urls'][0], '*') === false) ? $_POST['campaign_target_rules']['local_urls'][0] : home_url();
743
+ }else{
744
+ $page_url = home_url();
745
+ }
746
+ }
747
+ ob_clean();
748
+ echo add_query_arg( 'campaign_preview_id', $_POST['post_ID'], $page_url );
749
+ }
750
+ die();
751
+
752
+ }
753
+
754
+ function add_campaign_action( $actions, $post ){
755
+ if ($post->post_type != 'ig_campaign') return $actions;
756
+
757
+ // Create a nonce & add an action
758
+ $actions['duplicate_campaign'] = '<a class="ig-duplicate-campaign" href="post.php?campaign_id='.$post->ID.'&action=duplicate-campaign" >'.__('Duplicate' ,'icegram').'</a>';
759
+ $actions['preview_campaign'] = '<a class="ig-preview-campaign" target="_blank" href="'.home_url().'?campaign_preview_id='.$post->ID.'" >'.__('Preview' ,'icegram').'</a>';
760
+ return $actions;
761
+ }
762
+
763
+ function duplicate_campaign(){
764
+ if(!empty($_REQUEST['action']) && $_REQUEST['action'] == 'duplicate-campaign' && !empty($_REQUEST['campaign_id'])){
765
+ Icegram::duplicate( $_REQUEST['campaign_id']);
766
+ }
767
+ }
768
+
769
+ }
770
+ }
trunk/classes/class-icegram-campaign.php ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+ /**
4
+ * Icegram Campaign class
5
+ */
6
+ if ( !class_exists( 'Icegram_Campaign' ) ) {
7
+ class Icegram_Campaign {
8
+
9
+ var $_post;
10
+ var $title;
11
+ var $messages;
12
+ var $rules;
13
+ var $rules_summary;
14
+
15
+ function __construct( $id = '' ) {
16
+
17
+ if ( !empty( $id ) ) {
18
+
19
+ $this->_post = get_post( $id );
20
+ if(!is_object($this->_post)) return;
21
+ $this->title = $this->_post->post_title;
22
+ //icegram_campaign_meta_key
23
+ $meta_key = apply_filters('icegram_campaign_meta_key' ,'messages' ,$this->_post->ID);
24
+ $this->messages = get_post_meta( $this->_post->ID, $meta_key, true );
25
+ $this->rules = get_post_meta( $this->_post->ID, 'icegram_campaign_target_rules', true );
26
+ $this->rules_summary['where'] = array(
27
+ 'homepage' => ( !empty( $this->rules['homepage'] ) ) ? $this->rules['homepage'] : '',
28
+ 'other_page' => ( !empty( $this->rules['other_page'] ) && $this->rules['other_page'] == 'yes' && !empty( $this->rules['page_id'] ) ) ? $this->rules['page_id'] : '',
29
+ 'blog' => ( !empty( $this->rules['blog'] ) ) ? $this->rules['blog'] : '',
30
+ 'sitewide' => ( !empty( $this->rules['sitewide'] ) ) ? $this->rules['sitewide'] : '',
31
+ 'local_url' => ( !empty( $this->rules['local_url'] ) ) ? $this->rules['local_url'] : ''
32
+ );
33
+ $this->rules_summary['when'] = array(
34
+ 'when' => ( !empty( $this->rules['when'] ) ) ? $this->rules['when'] : '',
35
+ 'from' => ( !empty( $this->rules['from'] ) ) ? $this->rules['from'] : '',
36
+ 'to' => ( !empty( $this->rules['to'] ) ) ? $this->rules['to'] : ''
37
+ );
38
+ $this->rules_summary['device'] = array(
39
+ 'mobile' => ( !empty( $this->rules['mobile'] ) ) ? $this->rules['mobile'] : '',
40
+ 'tablet' => ( !empty( $this->rules['tablet'] ) ) ? $this->rules['tablet'] : '',
41
+ 'laptop' => ( !empty( $this->rules['laptop'] ) ) ? $this->rules['laptop'] : ''
42
+ );
43
+ $this->rules_summary['users'] = ( !empty( $this->rules['logged_in'] ) && $this->rules['logged_in'] == 'logged_in' )
44
+ ? ( ( !empty( $this->rules['users'] ) ) ? $this->rules['users'] : array( 'none' ) )
45
+ : (!empty($this->rules['logged_in']) ? array($this->rules['logged_in']) : array('all'));
46
+
47
+ $this->rules_summary['retargeting'] = array( 'retargeting' => ( !empty( $this->rules['retargeting'] ) ) ? $this->rules['retargeting'] : '' ,
48
+ 'expiry_time' => ( !empty( $this->rules['retargeting']) ) ? $this->rules['expiry_time'] : '' );
49
+ $this->rules_summary['retargeting_clicked'] = array( 'retargeting_clicked' => ( !empty( $this->rules['retargeting_clicked'] ) ) ? $this->rules['retargeting_clicked'] : '' ,
50
+ 'expiry_time_clicked' => ( !empty( $this->rules['retargeting_clicked']) ) ? $this->rules['expiry_time_clicked'] : '' );
51
+
52
+ }
53
+
54
+ add_filter( 'icegram_campaign_validation', array( $this, '_is_valid_user_roles' ), 10, 3 );
55
+ add_filter( 'icegram_campaign_validation', array( $this, '_is_valid_device' ), 10, 3 );
56
+ add_filter( 'icegram_campaign_validation', array( $this, '_is_valid_time' ), 10, 3 );
57
+ add_filter( 'icegram_campaign_validation', array( $this, '_is_valid_page' ), 10, 3 );
58
+
59
+ }
60
+
61
+ function get_message_meta_by_id( $message_id ) {
62
+ foreach ($this->messages as $value) {
63
+ if ($value['id'] == $message_id) {
64
+ return $value;
65
+ }
66
+ }
67
+ }
68
+
69
+ function get_rule_value( $rule_type ) {
70
+ return (isset($this->rules_summary[$rule_type])) ? $this->rules_summary[$rule_type] : '';
71
+ }
72
+
73
+ function is_valid( $options = array() ) {
74
+ if( !empty( $this->_post->ID ) && $this->_post->post_status === 'publish') {
75
+ return apply_filters( 'icegram_campaign_validation', true, $this, $options );
76
+ }
77
+ return false;
78
+ }
79
+
80
+ function _is_valid_user_roles( $campaign_valid, $campaign, $options ) {
81
+ if( !$campaign_valid ) {
82
+ return $campaign_valid;
83
+ }
84
+
85
+ if(in_array( 'not_logged_in', $campaign->rules_summary['users'], true ) && !is_user_logged_in() ){
86
+ return true;
87
+ }
88
+ elseif ( in_array( 'all', $campaign->rules_summary['users'], true ) ) {
89
+ return true;
90
+ } elseif ( is_user_logged_in() && !in_array( 'none', $campaign->rules_summary['users'], true ) ) {
91
+ $current_user = wp_get_current_user();
92
+ if ( in_array( $current_user->roles[0], $campaign->rules_summary['users'], true ) ) {
93
+ return true;
94
+ }
95
+ }
96
+ return false;
97
+ }
98
+
99
+ function _is_valid_device( $campaign_valid, $campaign, $options ) {
100
+ if( !$campaign_valid ) {
101
+ return $campaign_valid;
102
+ }
103
+ $current_platform = Icegram::get_platform();
104
+ if ( !empty( $campaign->rules_summary['device'][ $current_platform ] ) && $campaign->rules_summary['device'][ $current_platform ] == 'yes' ) {
105
+ return true;
106
+ }
107
+ return false;
108
+ }
109
+
110
+ function _is_valid_time( $campaign_valid, $campaign, $options ) {
111
+
112
+ if( !$campaign_valid ) {
113
+ return $campaign_valid;
114
+ }
115
+ if ( !empty( $campaign->rules_summary['when']['when'] ) && $campaign->rules_summary['when']['when'] == 'always' ) {
116
+ return true;
117
+ }
118
+ if ( ( !empty( $campaign->rules_summary['when']['from'] ) && current_time('timestamp') > strtotime( $campaign->rules_summary['when']['from'] . " 00:00:00") ) && ( !empty( $campaign->rules_summary['when']['to'] ) && strtotime( $campaign->rules_summary['when']['to'] . " 23:59:59") > current_time('timestamp') ) ) {
119
+ return true;
120
+ }
121
+
122
+ return false;
123
+ }
124
+
125
+ function _is_valid_page( $campaign_valid, $campaign, $options ) {
126
+ $page_id = Icegram::get_current_page_id();
127
+ if( !$campaign_valid || !empty($options['skip_page_check']) ) {
128
+ return $campaign_valid;
129
+ }
130
+ if ( (!empty( $campaign->rules_summary['where']['sitewide'] ) && $campaign->rules_summary['where']['sitewide'] == 'yes' )) {
131
+ if (!empty($campaign->rules['exclude_page_id']) && in_array($page_id, $campaign->rules['exclude_page_id'])){
132
+ return false;
133
+ }else{
134
+ return true;
135
+ }
136
+ }
137
+ if ( !empty( $campaign->rules_summary['where']['homepage'] ) && $campaign->rules_summary['where']['homepage'] == 'yes' && ((isset($_REQUEST['is_home']) && $_REQUEST['is_home'] === 'true') || is_home() || is_front_page() )) {
138
+ return true;
139
+ }
140
+ if ( !empty( $page_id ) ) {
141
+ if ( !empty( $campaign->rules_summary['where']['other_page'] ) && in_array( $page_id, $campaign->rules_summary['where']['other_page'] ) ) {
142
+ return true;
143
+ }
144
+ }
145
+ if ( (!empty( $campaign->rules_summary['where']['local_url'] ) && $campaign->rules_summary['where']['local_url'] == 'yes' )) {
146
+ $current_page_url = Icegram::get_current_page_url();
147
+ // TODO::change this check with remote mode
148
+ //return if call made from remote url
149
+ if(!empty($_POST['ig_remote_url'])){
150
+ return;
151
+ }
152
+ foreach ($campaign->rules['local_urls'] as $local_url_pattern) {
153
+ if(empty($local_url_pattern)){
154
+ $local_url_pattern = home_url().'/';
155
+ }
156
+ $result = $this->is_valid_url($local_url_pattern, $current_page_url);
157
+ if($result){
158
+ return $result;
159
+ }else{
160
+ continue;
161
+ }
162
+ }
163
+ }
164
+ return false;
165
+ }
166
+
167
+ static function is_valid_url($pattern, $current_page_url){
168
+ $pattern = preg_quote($pattern,'/');
169
+ if(strpos($pattern, '*') !== false){
170
+ $pattern = str_replace('\*', '[-a-zA-Z0-9+&@#\/%?=~_|!:,.;]*', $pattern);
171
+ }
172
+
173
+ $result = (bool) preg_match('/'.$pattern.'$/i', $current_page_url);
174
+ return $result;
175
+ }
176
+ }
177
+ }
trunk/classes/class-icegram-compat.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+ /**
4
+ * Icegram Compatibility class with other plugins
5
+ */
6
+ if ( !class_exists( 'Icegram_Compat_Base' ) ) {
7
+ class Icegram_Compat_Base {
8
+
9
+ // Sets up printing compatibility code
10
+ function __construct() {
11
+ global $icegram;
12
+ if($icegram->cache_compatibility === 'yes'){
13
+ add_action( 'wp_footer', array( &$this, 'render_js' ) );
14
+ } else {
15
+ add_action( 'icegram_data_printed', array( &$this, 'render_js' ) );
16
+ }
17
+ }
18
+
19
+ // This will be overridden in child classes
20
+ function render_js() {
21
+
22
+ }
23
+ }
24
+ }
trunk/classes/class-icegram-message-admin.php ADDED
@@ -0,0 +1,795 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+ /**
4
+ * Icegram Message Admin class
5
+ */
6
+ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
7
+
8
+ class Icegram_Message_Admin {
9
+
10
+ var $message_themes;
11
+ var $is_icegram_editor;
12
+
13
+ private function __construct() {
14
+
15
+ add_action( 'add_meta_boxes', array( &$this, 'add_message_meta_boxes' ) );
16
+ add_action( 'wp_ajax_get_message_setting', array( &$this , 'message_form_fields' ) );
17
+
18
+ add_action( 'save_post', array( &$this, 'update_message_settings' ), 10, 2 );
19
+ add_filter( 'wp_insert_post_data', array( &$this, 'save_message_in_post_content' ) );
20
+
21
+ add_filter( 'manage_edit-ig_message_columns', array( $this, 'edit_columns' ) );
22
+ add_action( 'manage_ig_message_posts_custom_column', array( $this, 'custom_columns' ), 2 );
23
+ add_filter( 'icegram_available_headlines', array( &$this, 'available_headlines' ) );
24
+
25
+ //duplicate message
26
+ add_filter( 'post_row_actions', array(&$this , 'add_message_action'), 10, 2 );
27
+ add_action('admin_init', array(&$this ,'duplicate_message') ,10, 1);
28
+
29
+ }
30
+ public static function getInstance(){
31
+ static $ig_message_admin = null;
32
+ if (null === $ig_message_admin) {
33
+ $ig_message_admin = new Icegram_Message_Admin();
34
+ }
35
+ return $ig_message_admin;
36
+ }
37
+
38
+ // Initialize message metabox
39
+ function add_message_meta_boxes() {
40
+ global $icegram;
41
+ add_meta_box( 'message-settings', __( 'Message Settings', 'icegram' ), array ( &$this, 'message_form_fields' ), 'ig_message', 'normal', 'high' );
42
+
43
+ }
44
+
45
+ // Display all message settings fields
46
+ function message_form_fields( $post = '', $action = array() ) {
47
+ global $icegram, $pagenow;
48
+ if( ( is_object( $post ) && $post->post_type != 'ig_message' ) )
49
+ return;
50
+ ?>
51
+
52
+ <style type="text/css">
53
+ <?php
54
+ foreach ( $icegram->message_types as $message_type => $message ) {
55
+
56
+ if( !empty( $message['admin_style'] ) ) {
57
+ $message_type = 'ig_'.$message_type;
58
+ $label_bg_color = $message['admin_style']['label_bg_color'];
59
+ $theme_header_height = $message['admin_style']['theme_header_height'];
60
+ $theme_header_bg_size = ( $theme_header_height + 3 )."em";
61
+ $thumbnail_width = $message['admin_style']['thumbnail_width'];
62
+ $thumbnail_height = $message['admin_style']['thumbnail_height'];
63
+ echo " .message_header .$message_type {
64
+ background-color: {$label_bg_color};
65
+ }
66
+ .message_theme_{$message_type} + .chosen-container-single .chosen-single {
67
+ height: {$theme_header_height} !important;
68
+ }
69
+ .message_theme_{$message_type} + .chosen-container-single .chosen-single span {
70
+ background-size: {$theme_header_bg_size} !important;
71
+ line-height: {$theme_header_height} !important;
72
+ }
73
+ .message_theme_{$message_type} + .chosen-container .chosen-results li {
74
+ width: {$thumbnail_width} !important;
75
+ height: {$thumbnail_height} !important;
76
+ }";
77
+ }
78
+
79
+ }
80
+ ?>
81
+ </style>
82
+ <?php
83
+ $message_id = !empty( $action['message_id'] ) ? $action['message_id'] : $post->ID;
84
+ $message_data = get_post_meta( $message_id, 'icegram_message_data', true );
85
+ $message_headlines = $icegram->available_headlines;
86
+ $settings = $this->message_settings_to_show();
87
+ $positions = $this->message_positions_to_show();
88
+ if ( $pagenow == 'post-new.php' ) {
89
+ $message_title_key = array_rand( $message_headlines );
90
+ $default_message_title = $message_headlines[$message_title_key];
91
+ } else {
92
+ $default_message_title = $message_title_key = '';
93
+ }
94
+
95
+ if( empty( $message_data ) ) {
96
+ $message_type = !empty( $action['message_type'] ) ? $action['message_type'] : '';
97
+ $message_data = $this->default_message_data( $message_type );
98
+ }
99
+
100
+ if( !empty( $action['message_type'] ) ) {
101
+ $message_data['type'] = $action['message_type'];
102
+ }
103
+
104
+ wp_nonce_field( 'icegram_message_save_data', 'icegram_message_meta_nonce' );
105
+ if( !empty( $action['message_id'] ) ) {
106
+ ?>
107
+ <div class="thickbox_edit_message" id="<?php echo $action['message_id']; ?>">
108
+ <?php
109
+ }
110
+ ?>
111
+ <div class="wp_attachment_details edit-form-section message-setting-fields">
112
+ <p>
113
+ <label for="message_type" class="message_label"><strong><?php _e( 'Type', 'icegram' ); ?></strong></label>
114
+ <select id="message_type" name="message_data[<?php echo $message_id; ?>][type]" class="message_type icegram_chosen_page">
115
+ <option value="unknown">Select Message</option>
116
+ <?php foreach ( $icegram->message_types as $message ) {
117
+ $selected = ( ( !empty( $message_data['type'] ) && esc_attr( $message['type'] ) == $message_data['type'] ) ) ? 'selected' : '';
118
+ ?>
119
+ <option value="<?php echo esc_attr( $message['type'] ) ?>" <?php echo $selected; ?>><?php echo esc_html( $message['name'] ) ?></option>
120
+ <?php } ?>
121
+ </select>
122
+ </p>
123
+ <?php foreach ( $icegram->message_types as $message ) {
124
+ if( empty( $message['themes'] ) ) {
125
+ continue;
126
+ }
127
+ ?>
128
+ <p class="message_row <?php echo "ig_".$message['type']; ?>">
129
+
130
+ <label for="message_theme_ig_<?php echo $message['type'] ?>" class="message_label"><strong><?php _e( 'Theme', 'icegram' ); ?></strong></label>
131
+ <select id="message_theme_ig_<?php echo $message['type'] ?>" name="message_data[<?php echo $message_id; ?>][theme][<?php echo $message['type'] ?>]" class="icegram_chosen_page message_theme message_theme_ig_<?php echo $message['type']; ?>">
132
+ <?php
133
+ asort($message['themes']);
134
+ foreach ( $message['themes'] as $theme ) {
135
+ $bg_img = "background-image: url(" . $theme['baseurl'] . $theme['type'] . ".png)";
136
+ ?>
137
+ <option style="<?php echo $bg_img; ?>" value="<?php echo esc_attr( $theme['type'] ) ?>" class="<?php echo esc_attr( $theme['type'] ) ?>" <?php echo ( !empty( $message_data['theme'] ) && esc_attr( $theme['type'] ) == $message_data['theme'] ) ? 'selected' : ''; ?>><?php echo esc_html( $theme['name'] ) ?></option>
138
+ <?php } ?>
139
+ </select>
140
+ </p>
141
+ <?php } ?>
142
+ <?php foreach ( $icegram->message_types as $message ) {
143
+ if( empty( $message['settings']['animation']['values'] ) ) continue;
144
+ $animations = $message['settings']['animation']['values']
145
+ ?>
146
+ <p class="message_row <?php echo "ig_".$message['type']; ?>">
147
+ <label for="message_animation_<?php echo $message['type'] ?>" class="message_label"><strong><?php _e( 'Animation', 'icegram' ); ?></strong></label>
148
+ <select id="message_animation_<?php echo $message['type'] ?>" name="message_data[<?php echo $message_id; ?>][animation][<?php echo $message['type'] ?>]" class="icegram_chosen_page message_animation message_animation_<?php echo $message['type']; ?>">
149
+ <?php asort($animations);
150
+ $animations = array('no-anim' => 'No Animation') + $animations;
151
+ foreach ( $animations as $value => $label ) { ?>
152
+ <option value="<?php echo esc_attr( $value ) ?>" <?php echo ( !empty( $message_data['animation'] ) && esc_attr( $value ) == $message_data['animation'] ) ? 'selected' : ''; ?>><?php echo esc_html( $label ) ?></option>
153
+ <?php } ?>
154
+ </select>
155
+ </p>
156
+ <?php }
157
+ // action add for interstitial message setting
158
+ do_action( 'icegram_after_message_theme_settings', $message_id, $message_data );
159
+ ?>
160
+ <p class="message_row <?php echo "ig_".implode( ' ig_', $settings['headline'] )?>">
161
+ <label for="message_headline" class="message_label">
162
+ <strong><?php _e( 'Headline', 'icegram' ); ?></strong>
163
+ <span class="help_tip admin_field_icon" data-tip="<?php _e( 'Shown with highest prominence. Click on idea button on right to get a new headline.', 'icegram' ); ?>"></span>
164
+ </label>
165
+ <?php
166
+ $message_headline = ( isset( $message_data['headline'] ) ) ? $message_data['headline'] : $default_message_title;
167
+ ?>
168
+ <input type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][headline]" id="message_title" value="<?php echo esc_attr( $message_headline ); ?>" data-headline="<?php echo $message_title_key; ?>" />
169
+ <a class="button message_headline_button tips" data-tip="<?php _e( 'Give Me Another Headline', 'icegram' ); ?>">
170
+ <span class="headline-buttons-icon admin_field_icon"></span>
171
+ </a>
172
+ </p>
173
+ <p class="message_row <?php echo "ig_".implode( ' ig_', $settings['icon'] )?>">
174
+ <label for="upload_image" class="message_label">
175
+ <strong><?php _e( 'Icon / Avatar Image', 'icegram' ); ?></strong>
176
+ <span class="help_tip admin_field_icon" data-tip="<?php _e( 'This image will appear in message content.', 'icegram' ); ?>"></span>
177
+ </label>
178
+ <input id="upload_image" type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][icon]" value="<?php if( isset( $message_data['icon'] ) ) echo esc_attr( $message_data['icon'] ); ?>"/>
179
+ <a class="button message_image_button tips" data-tip="<?php _e( 'Upload / Select an image', 'icegram' ); ?>" onclick="tb_show('<?php _e( 'Upload / Select Image' ); ?>', 'media-upload.php?type=image&TB_iframe=true', false);" >
180
+ <span class="image-buttons-icon admin_field_icon"></span>
181
+ </a>
182
+ </p>
183
+
184
+ <?php
185
+ $editor_args = array(
186
+ 'textarea_name' => 'message_data[' . $message_id . '][message]',
187
+ 'textarea_rows' => 10,
188
+ 'editor_class' => 'wp-editor-message',
189
+ 'media_buttons' => true,
190
+ 'tinymce' => true
191
+ );
192
+ ?>
193
+ <p class="message_row <?php echo "ig_".implode( ' ig_', $settings['message'] )?>">
194
+ <style type="text/css">.wp-editor-tools:after {display: inline-block !important; }</style>
195
+ <label for="message_body" class="message_body message_label"><strong><?php _e( 'Message Body', 'icegram' ); ?></strong></label>
196
+ <?php
197
+ $message = ( !empty( $message_data['message'] ) ) ? $message_data['message'] : '';
198
+ //TODO :: check need of exit-redirect Type
199
+ if(in_array($message_data['type'], array('toast', 'badge', 'ribbon' , 'exit-redirect'))){
200
+ $message = str_replace('[ig_form]', '', $message);
201
+ }
202
+ ?>
203
+
204
+ <?php wp_editor( $message, 'edit'.$message_id, $editor_args ); ?>
205
+ </p>
206
+
207
+ <!-- Embed Form options -->
208
+
209
+ <?php
210
+
211
+ $form_html = ( !empty( $message_data['form_html'] ) ) ? $message_data['form_html'] : '';
212
+ $form_html_original = ( !empty( $message_data['form_html_original'] ) ) ? $message_data['form_html_original'] : '';
213
+ $form_header = ( !empty( $message_data['form_header'] ) ) ? $message_data['form_header'] : '';
214
+ $form_footer = ( !empty( $message_data['form_footer'] ) ) ? $message_data['form_footer'] : '';
215
+ $form_bg_color = ( !empty( $message_data['form_bg_color'] ) ) ? $message_data['form_bg_color'] : '';
216
+ $form_text_color = ( !empty( $message_data['form_text_color'] ) ) ? $message_data['form_text_color'] : '';
217
+ $form_has_label = ( !empty( $message_data['form_has_label'] ) ) ? checked( $message_data['form_has_label'], 'yes', 0 ) : '';
218
+ $form_layouts = $this->message_form_layouts_to_show();
219
+ $default_form_layout = !empty($icegram->message_types[$message_data['type']]['settings']['form_layout']['default']) ? $icegram->message_types[$message_data['type']]['settings']['form_layout']['default'] : '';
220
+ $use_form_check = ( !empty( $message_data['use_form'] ) )
221
+ ? checked( $message_data['use_form'], 'yes', 0)
222
+ : '';
223
+ $show_form_options = empty($use_form_check) ? 'style="display:none;"' : '';
224
+ ?>
225
+ <p class="message_row message_form_options_check <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>" message_id="<?php echo $message_id; ?>">
226
+ <label for="message_use_form" class="message_label"><strong><?php _e( 'Form', 'icegram' ); ?></strong></label> <label >
227
+ <input class="show_form_options" type="checkbox" name="message_data[<?php echo $message_id; ?>][use_form]" id="message_use_form" value="yes" <?php echo $use_form_check ?>/> <?php _e('Use Opt-in / Subscription / Lead capture form' , 'icegram' ); ?></label>
228
+ </p>
229
+
230
+ <div class="message_form_options" <?php echo $show_form_options; ?> message_id="<?php echo $message_id; ?>">
231
+ <p class="message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>">
232
+ <label for="message_form_style" class="message_label">&nbsp;</label>
233
+ <select id="message_form_style" name="message_data[<?php echo $message_id; ?>][form_style]" class="icegram_chosen_page message_form_style " >
234
+ <?php
235
+ $available_form_styles = $this->available_form_styles();
236
+ foreach ( $available_form_styles as $style ) {
237
+ $bg_img = "background-image: url(" . $icegram->plugin_url.'/assets/images/' . strtolower(str_replace( ' ', '_', $style['name'])) . ".png)";
238
+ ?>
239
+ <option style="<?php echo $bg_img; ?>" <?php echo ( !empty( $message_data['form_style'] ) && strtolower(str_replace( ' ', '_', $style['name'])) == $message_data['form_style'] ) ? 'selected' : ''; ?> value="<?php echo esc_attr( strtolower(str_replace( ' ', '_', $style['name'])) ) ?>" class="<?php echo strtolower(str_replace( ' ', '_', $style['name'])) ?>" <?php echo ( !empty( $message_data['form_style'] ) && esc_attr( strtolower($style['name']) ) == $message_data['form_style'] ) ? 'selected' : ''; ?>><?php echo esc_html( $style['name'] ) ?></option>
240
+ <?php } ?>
241
+ </select>
242
+ </p>
243
+
244
+ <p class="form_layouts message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>">
245
+ <label for="message_form_layouts" class="message_label">&nbsp;</label>
246
+ <div class="form_radio_group" >
247
+ <!-- <span class="message_label message_row <?php //echo "ig_".implode( ' ig_', $settings['embed_form'] )?>"> <?php// _e('Position', 'icegram' ); ?></span> -->
248
+ <span class="location <?php if( !empty( $form_layouts['left'] ) ) { echo "ig_".implode( ' ig_', $form_layouts['left'] ); } ?>" >
249
+ <label style="background-position:0px 23px;" for="form_layout_left_<?php echo $message_id;?>" title="<?php _e('Left', 'icegram' ); ?>">
250
+ <input class="message_form_layout" type="radio" id="form_layout_left_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][form_layout]" value="left" <?php echo ( !empty($message_data['form_layout']) && "left" == $message_data['form_layout'] ) ? 'checked' : ( empty($message_data['form_layout']) && "left" == $default_form_layout ? 'checked' : '') ; ?> />
251
+ <?php _e('Left', 'icegram' ); ?>
252
+ </label>
253
+ </span>
254
+
255
+ <span class="location <?php if( !empty( $form_layouts['right'] ) ) { echo "ig_".implode( ' ig_', $form_layouts['right'] ); } ?>">
256
+ <label style="background-position:-100px 23px;" for="form_layout_right_<?php echo $message_id;?>" title="<?php _e('Right', 'icegram' ); ?>">
257
+ <input class="message_form_layout" type="radio" id="form_layout_right_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][form_layout]" value="right" <?php echo ( !empty( $message_data['form_layout'] ) && "right" == $message_data['form_layout'] ) ? 'checked' : ( empty($message_data['form_layout']) && "right" == $default_form_layout ? 'checked' : '') ; ?> />
258
+ <?php _e('Right', 'icegram' ); ?>
259
+ </label>
260
+ </span>
261
+
262
+ <span class="location <?php if( !empty( $form_layouts['bottom'] ) ) { echo "ig_".implode( ' ig_', $form_layouts['bottom'] ); } ?>">
263
+ <label style="background-position:-200px 23px;"for="form_layout_bottom_<?php echo $message_id;?>" title="<?php _e('Bottom', 'icegram' ); ?>">
264
+ <input class="message_form_layout" type="radio" id="form_layout_bottom_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][form_layout]" value="bottom" <?php echo ( !empty( $message_data['form_layout'] ) && "bottom" == $message_data['form_layout'] ) ? 'checked' : ( empty($message_data['form_layout']) && "bottom" == $default_form_layout ? 'checked' : '') ; ?> />
265
+ <?php _e('Bottom', 'icegram' ); ?>
266
+ </label>
267
+ </span>
268
+
269
+ <?php
270
+ $inline_position_checked = ( !empty( $message_data['form_layout'] ) && "inline" == $message_data['form_layout'] ) ? 'checked' : ( empty($message_data['form_layout']) && "inline" == $default_form_layout ? 'checked' : '') ;
271
+ $show_color_options = !empty( $inline_position_checked ) ? 'style="display:none;"' : '';
272
+ ?>
273
+ <span class="location <?php if( !empty( $form_layouts['inline'] ) ) { echo "ig_".implode( ' ig_', $form_layouts['inline'] ); } ?>">
274
+ <label style="background-position:-300px 23px;" for="form_layout_inline_<?php echo $message_id;?>" title="<?php _e('Inline', 'icegram' ); ?>">
275
+ <input class="message_form_layout" type="radio" id="form_layout_inline_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][form_layout]" value="inline" <?php echo $inline_position_checked;?> />
276
+ <?php _e('Inline', 'icegram' ); ?>
277
+ </label>
278
+ </span>
279
+ </div>
280
+
281
+ </p>
282
+ <?php
283
+
284
+ $color_field_html = '<p class="message_form_color message_row ig_"'.implode( ' ig_', $settings['embed_form'] ) .'" '. $show_color_options.'>
285
+ <label for="message_form_bg_color" class="message_label">&nbsp;</label>
286
+ <input type="text" class="message_field color-field" data-color-label="'.__( 'Background Color', 'icegram' ).'" name="message_data['.$message_id.'][form_bg_color]" id="message_form_bg_color" value="'. $form_bg_color .'" />
287
+ <input type="text" class="message_field color-field" data-color-label="'.__( 'Text Color', 'icegram' ).'" name="message_data['.$message_id.'][form_text_color]" id="message_form_text_color" value="'.$form_text_color.'" style="margin-left:5em !important" />
288
+ </p>';
289
+ echo $color_field_html;
290
+ $active_plugins = get_option( 'active_plugins', array() );
291
+
292
+ ?>
293
+
294
+ <p class="message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>">
295
+ <label class="message_label">&nbsp;</label>
296
+ <textarea class="message_field message_form_header" rows="2" autocomplete="off" cols="65" name="message_data[<?php echo $message_id; ?>][form_header]" id="" value="" placeholder="<?php _e('Text / HTML to show before the form', 'icegram' ); ?>"><?php echo esc_attr( $form_header ); ?></textarea>
297
+ </p>
298
+ <p class="message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>">
299
+ <label class="message_label">&nbsp;</label>
300
+ <?php
301
+ //Add Rainmaker form
302
+ $rm_html = __("Add form embed code") .'<strong>'. __(" or easily embed using ", "icegram" ). '<a style="font-style:normal;" href="' . admin_url("plugin-install.php?tab=search&type=term&s=icegram-rainmaker") .'" target="_blank" alt="Rainmaker - Forms, Leads and CRM">Icegram\'s Rainmaker' . '</a> plugin </strong>';
303
+ $hide_embed = '';
304
+ if(in_array('icegram-rainmaker/icegram-rainmaker.php', $active_plugins)){
305
+ $rainmaker_form_list = Rainmaker::get_rm_form_id_name_map();
306
+ $rm_html = __("Use Rainmaker form ", "icegram" );
307
+ $rm_html .= '<select class="rainmaker_form_list" style="max-width:30%" name="message_data['. $message_id .'][rainmaker_form_code]">
308
+ <option value="" selected>'. __("Select form ", "icegram" ) .'</option>' ;
309
+ foreach ( $rainmaker_form_list as $id => $name ){
310
+ $rm_html .= '<option '. ( (!empty( $message_data["rainmaker_form_code"] ) && $id == $message_data["rainmaker_form_code"] ) ? 'selected' : '' ) .' value="' . $id .'">' . $name .'</option>';
311
+ }
312
+ $rm_html .= '</select><span style="font-style:italic">'. __(' or add ', 'icegram') . '<a class="embed_form_code_toggle" style="cursor: pointer;">'. __('form embed code', 'icegram' ) .'</a></span>';
313
+ $hide_embed = (empty($message_data["rainmaker_form_code"]) && !empty($form_html_original)) ? '' : 'style="display:none"';
314
+ }
315
+ ?>
316
+ <label class="message_label">&nbsp;</label>
317
+ <span class="message_label" style="padding-bottom:.3em"> <?php echo $rm_html; ?></span>
318
+ <label class="message_label">&nbsp;</label>
319
+ <textarea class="message_field message_form_html_original" <?php echo $hide_embed ?> rows="6" autocomplete="off" cols="65" name="message_data[<?php echo $message_id; ?>][form_html_original]" id="message_form_html_original_<?php echo $message_id; ?>" value="" placeholder="<?php _e('Paste HTML / shortcode of your form here...', 'icegram' ); ?>"><?php if( isset( $form_html_original ) ) echo esc_attr( $form_html_original ); ?></textarea>
320
+ <br>
321
+ <label class="message_label">&nbsp;</label>
322
+ <label style="font-size:.9em;"><input class="message_form_has_label" type="checkbox" name="message_data[<?php echo $message_id; ?>][form_has_label]" value="yes" <?php echo $form_has_label ?> />
323
+ <?php _e('Show labels above fields' , 'icegram' ); ?></label>
324
+ </p>
325
+
326
+ <p class="message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>">
327
+ <label class="message_label">&nbsp;</label>
328
+ <textarea class="message_field message_form_footer" rows="2" autocomplete="off" cols="65" name="message_data[<?php echo $message_id; ?>][form_footer]" id="" value="" placeholder="<?php _e('Text / HTML to show after the form', 'icegram' ); ?>"><?php echo esc_attr( $form_footer ); ?></textarea>
329
+ </p>
330
+ <div class="form_inline_shortcode campaign_shortcode light message_row <?php echo "ig_".implode( ' ig_', $settings['embed_form'] )?>" style="font-size:.9em;display:inline;">
331
+ <?php echo __( 'Insert <code>[ig_form]</code> where you want to show this form in message body.', 'icegram' ); ?>
332
+ </div>
333
+ </div>
334
+
335
+ <!-- Embed Form options : End -->
336
+
337
+ <?php
338
+
339
+ $show_cta_actions = array_merge($settings['label'], $settings['link']);
340
+ $show_only_link = array_diff($settings['link'], $settings['label']);
341
+
342
+ ?>
343
+ <p class="message_row <?php echo "ig_".implode( ' ig_', $show_cta_actions )?>">
344
+ <label for="message_label" class="message_label">
345
+ <strong>
346
+ <span class="message_row <?php echo "ig_".implode( ' ig_', $settings['label'] )?>"> <?php _e( 'Call To Action', 'icegram' ); ?> </span>
347
+ <span class="message_row <?php echo "ig_".implode( ' ig_', $show_only_link )?>"> <?php _e( 'Call To Action', 'icegram' ); ?> </span>
348
+ </strong>
349
+ </label>
350
+ <span class="message_row option_title <?php echo "ig_".implode( ' ig_', $settings['label'] )?>"><?php _e("Main Call To Action Button", "icegram"); ?></span>
351
+ </p>
352
+
353
+ <p class="message_row <?php echo "ig_".implode( ' ig_', $settings['label'] )?>">
354
+ <label for="message_label" class="message_label"> &nbsp;
355
+ <span class="help_tip admin_field_icon" data-tip="<?php _e( 'Your call to action text. Something unusual will increase conversions.', 'icegram' ); ?>"></span>
356
+ </label><span class="message_row <?php echo "ig_".implode( ' ig_', $settings['label'] )?>"><span class="message_label sub_option_label"><?php _e("Label", "icegram"); ?></span>
357
+ <input type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][label]" id="message_label" value="<?php if( isset( $message_data['label'] ) ) echo esc_attr( $message_data['label'] ); ?>" /> </span>
358
+ </p>
359
+
360
+ <?php
361
+ do_action( 'icegram_after_button_label', $message_id, $message_data );
362
+ ?>
363
+ <?php
364
+
365
+ $target_link_field = '<p class="message_row ig_'.implode( ' ig_', $settings['link'] ).'">
366
+ <span class="message_row ig_'.implode( ' ig_', $settings['label'] ) .'">
367
+ <label for="message_link" class="message_label">&nbsp;
368
+ <span class="help_tip admin_field_icon" data-tip="'.__('Enter destination URL here. Clicking will redirect to this link.' ,'icegram').'"></span>
369
+ </label>
370
+ </span>
371
+ <span class="message_row ig_'.implode( ' ig_', $show_only_link ) .'">
372
+ <span style="float:left" class="help_tip admin_field_icon" data-tip="'.__('Enter destination URL here. Clicking will redirect to this link.' ,'icegram').'"></span>
373
+ </span>
374
+ <span class="message_label sub_option_label">' . __("Target Link", "icegram") . '</span>
375
+ <input type="text" class="message_field message_link" name="message_data['.$message_id.'][link]"
376
+ id="message_link" value="'.esc_attr( ( isset($message_data['link']) ? $message_data['link'] : '') ) .'" />
377
+ </p>';
378
+
379
+ $target_link_field .= '<p class="message_row ig_'.implode( ' ig_', $settings["link"] ) .'">
380
+ <label for="message" class="message_label">&nbsp;</label>
381
+ <label style="color:#BBB;">&nbsp;<input type="checkbox" disabled checked="checked"/>'. __("Open in new tab ","icegram") .'</label>
382
+ <span>
383
+ <a href="https://www.icegram.com/documentation/how-to-open-cta-link-in-a-new-tab-using-icegram/?utm_source=ig_field&utm_medium=ig_inapp_promo&utm_campaign=ig_inapp_promo" target="_blank">'.__("How to do this?", "icegram") .'</a>
384
+ </span>
385
+ </p>';
386
+ $icegram_message_target_link = apply_filters('icegram_message_field_link' , array( 'html' => $target_link_field ,'message_id' => $message_id ,'message_data' => $message_data, 'settings' => $settings) );
387
+ echo $icegram_message_target_link['html'];
388
+ ?>
389
+ <p class="message_row <?php echo "ig_".implode( ' ig_', $show_cta_actions )?>">
390
+ <label for="message_label" class="message_label"> &nbsp;</label>
391
+ <span class="ig_admin_hr">&nbsp;</span>
392
+ </p>
393
+
394
+ <?php
395
+ $text_color = ( !empty( $message_data['text_color'] ) ) ? $message_data['text_color'] : '';
396
+ $bg_color = ( !empty( $message_data['bg_color'] ) ) ? $message_data['bg_color'] : '';
397
+ $cta_bg_color = ( !empty( $message_data['cta_bg_color'] ) ) ? $message_data['cta_bg_color'] : '';
398
+ $cta_text_color = ( !empty( $message_data['cta_text_color'] ) ) ? $message_data['cta_text_color'] : '';
399
+ $colors_options_check = ( !empty( $message_data['use_theme_defaults'] ) )
400
+ ? checked( $message_data['use_theme_defaults'], 'yes', 0)
401
+ : ( (!empty($bg_color) || !empty($text_color) || !empty($cta_bg_color) || !empty($cta_text_color)) ? '' : 'checked="checked"' );
402
+
403
+ $show_color_options = (!empty($colors_options_check)) ? 'style="display: none;"' : '';
404
+ $color_field_html = '<p class="message_row ig_'.implode( ' ig_', $settings['bg_color']).'">
405
+ <label for="message_bg_color" class="message_label">&nbsp;</label>
406
+ <span class="message_label sub_option_label" > '.__( 'Body', 'icegram' ).'</span>
407
+ <input type="text" class="message_field color-field" data-color-label="'.__( 'Background', 'icegram' ).'" name="message_data['.$message_id.'][bg_color]" id="message_bg_color" value="'.$bg_color.'" />
408
+ <input type="text" class="message_field color-field" data-color-label="'.__( 'Text', 'icegram' ).'" name="message_data['.$message_id.'][text_color]" id="message_text_color" value="'.$text_color.'" />
409
+ </p>
410
+ <p class="message_row ig_'.implode( ' ig_', $settings['label'] ).'">
411
+ <label for="message_cta_bg_color" class="message_label">&nbsp;</label>
412
+ <span class="message_label sub_option_label" >'.__( 'Button', 'icegram' ) .'</span>
413
+ <input type="text" class="message_field color-field" data-color-label="'.__( 'Background', 'icegram' ).'" name="message_data['.$message_id.'][cta_bg_color]" id="message_cta_bg_color" value="'.$cta_bg_color.'" />
414
+ <input type="text" class="message_field color-field" data-color-label="'.__( 'Text', 'icegram' ).'" name="message_data['.$message_id.'][cta_text_color]" id="message_cta_text_color" value="'.$cta_text_color.'" />
415
+ </p>';
416
+ // </div>';
417
+ $color_field = apply_filters('icegram_color_fields' , array( 'html' => $color_field_html ,'message_id' => $message_id ,'message_data' => $message_data, 'settings' => $settings) );
418
+ $color_field_html = '<div class="message_colors_options_container" '.$show_color_options.'>'.$color_field['html'].'</div>';
419
+
420
+ $colors_options_html = '<p class="message_row ig_'.implode( ' ig_', $settings['bg_color']).'">
421
+ <label for="message_use_theme_defaults" class="message_label"><strong>'. __( 'Colors', 'icegram' ).'</strong></label> <label >
422
+ <input class="show_color_options" type="checkbox" name="message_data['.$message_id.'][use_theme_defaults]" id="message_use_theme_defaults" value="yes" '. $colors_options_check .'/> '. __( 'Use theme\'s default colors', 'icegram') .'</label> '.$color_field_html.'
423
+ </p>';
424
+ echo $colors_options_html;
425
+
426
+ ?>
427
+ <p class="message_row position <?php echo "ig_".implode( ' ig_', $settings['position'] )?>">
428
+ <label for="message_position" class="message_label"><strong><?php _e( 'Position', 'icegram' ); ?></strong></label>
429
+ <span class="message_field location-selector message_label">
430
+ <input type="radio" id="radio01_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="00" <?php echo ( !empty( $message_data['position'] ) && "00" == $message_data['position'] ) ? 'checked' : ''; ?> />
431
+ <label for="radio01_<?php echo $message_id;?>" title="Top Left">
432
+ <span class="location <?php if( !empty( $positions['00'] ) ) { echo "ig_".implode( ' ig_', $positions['00'] ); } ?> top left" data-position="top left"></span>
433
+ </label>
434
+ <input type="radio" id="radio02_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="01" <?php echo ( !empty( $message_data['position'] ) && "01" == $message_data['position'] ) ? 'checked' : ''; ?> />
435
+ <label for="radio02_<?php echo $message_id;?>" title="Top">
436
+ <span class="location <?php if( !empty( $positions['01'] ) ) { echo "ig_".implode( ' ig_', $positions['01'] ); } ?> top" data-position="top"></span>
437
+ </label>
438
+ <input type="radio" id="radio03_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="02" <?php echo ( !empty( $message_data['position'] ) && "02" == $message_data['position'] ) ? 'checked' : ''; ?> />
439
+ <label for="radio03_<?php echo $message_id;?>" title="Top Right">
440
+ <span class="location <?php if( !empty( $positions['02'] ) ) { echo "ig_".implode( ' ig_', $positions['02'] ); } ?> top right" data-position="top right"></span>
441
+ </label>
442
+ <input type="radio" id="radio04_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="10" <?php echo ( !empty( $message_data['position'] ) && "10" == $message_data['position'] ) ? 'checked' : ''; ?> />
443
+ <label for="radio04_<?php echo $message_id;?>" title="Middle Left">
444
+ <span class="location <?php if( !empty( $positions['10'] ) ) { echo "ig_".implode( ' ig_', $positions['10'] ); } ?> middle left" data-position="middle left"></span>
445
+ </label>
446
+ <input type="radio" id="radio05_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="11" <?php echo ( !empty( $message_data['position'] ) && "11" == $message_data['position'] ) ? 'checked' : ''; ?> />
447
+ <label for="radio05_<?php echo $message_id;?>" title="Middle">
448
+ <span class="location <?php if( !empty( $positions['11'] ) ) { echo "ig_".implode( ' ig_', $positions['11'] ); } ?> middle middle" data-position="middle middle"></span>
449
+ </label>
450
+ <input type="radio" id="radio06_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="12" <?php echo ( !empty( $message_data['position'] ) && "12" == $message_data['position'] ) ? 'checked' : ''; ?> />
451
+ <label for="radio06_<?php echo $message_id;?>" title="Middle Right">
452
+ <span class="location <?php if( !empty( $positions['12'] ) ) { echo "ig_".implode( ' ig_', $positions['12'] ); } ?> middle right" data-position="middle right"></span>
453
+ </label>
454
+ <input type="radio" id="radio07_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="20" <?php echo ( !empty( $message_data['position'] ) && "20" == $message_data['position'] ) ? 'checked' : ''; ?> />
455
+ <label for="radio07_<?php echo $message_id;?>" title="Bottom Left">
456
+ <span class="location <?php if( !empty( $positions['20'] ) ) { echo "ig_".implode( ' ig_', $positions['20'] ); } ?> bottom left" data-position="bottom left"></span>
457
+ </label>
458
+ <input type="radio" id="radio08_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="21" <?php echo ( !empty( $message_data['position'] ) && "21" == $message_data['position'] || !isset( $message_data['position'] ) ) ? 'checked' : ''; ?> />
459
+ <label for="radio08_<?php echo $message_id;?>" title="Bottom">
460
+ <span class="location <?php if( !empty( $positions['21'] ) ) { echo "ig_".implode( ' ig_', $positions['21'] ); } ?> bottom" data-position="bottom"></span>
461
+ </label>
462
+ <input type="radio" id="radio09_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="22" <?php echo ( !empty( $message_data['position'] ) && "22" == $message_data['position'] ) ? 'checked' : ''; ?> />
463
+ <label for="radio09_<?php echo $message_id;?>" title="Bottom Right">
464
+ <span class="location <?php if( !empty( $positions['22'] ) ) { echo "ig_".implode( ' ig_', $positions['22'] ); } ?> bottom right" data-position="bottom right"></span>
465
+ </label>
466
+ </span>
467
+ </p>
468
+ <?php
469
+ do_action( 'icegram_after_message_settings', $message_id, $message_data );
470
+ ?>
471
+ <!-- Custom code -->
472
+ <?php
473
+ $dummy_css = '#ig_this_message .ig_headline{ /* font-size: 3em !important; */ }';
474
+ $dummy_js = '<script type="text/javascript"> /* add your js code here */ </script>';
475
+ $message_custom_css = ( !empty( $message_data['custom_css'] ) ) ? $message_data['custom_css'] : $dummy_css;
476
+ $message_custom_js = ( !empty( $message_data['custom_js'] ) ) ? $message_data['custom_js'] : $dummy_js;
477
+ $use_custom_code_check = ( !empty( $message_data['use_custom_code'] ) )
478
+ ? checked( $message_data['use_custom_code'], 'yes', 0)
479
+ : '';
480
+ $show_custom_code_options = empty($use_custom_code_check) ? 'style="display:none;"' : '';
481
+
482
+ ?>
483
+ <p class="message_row message_custom_code_options_check <?php echo "ig_".implode( ' ig_', $settings['custom_code'] )?>" message_id="<?php echo $message_id; ?>">
484
+ <label for="message_custom_code" class="message_label"><strong><?php _e( 'Custom Code', 'icegram' ); ?></strong></label>
485
+ <label><input class="show_custom_code_options" type="checkbox" name="message_data[<?php echo $message_id; ?>][use_custom_code]" id="message_use_custom_code" value="yes" <?php echo $use_custom_code_check ?>/> <?php _e('Add custom code for this message' , 'icegram' ); ?></label>
486
+ </p>
487
+ <div class="message_custom_code_options" <?php echo $show_custom_code_options; ?> message_id="<?php echo $message_id; ?>">
488
+ <label class="message_label">&nbsp;</label>
489
+ <span class="message_label"> <?php _e('CSS', 'icegram' ); ?></span>
490
+ <br>
491
+ <label class="message_label">&nbsp;</label>
492
+ <textarea class="message_field message_custom_css" rows="6" autocomplete="off" cols="65" name="message_data[<?php echo $message_id; ?>][custom_css]" id="message_message_custom_css_<?php echo $message_id; ?>" value="" placeholder="<?php //_e('Add Custom CSS for this message here...', 'icegram' ); ?>"><?php if( isset( $message_custom_css ) ) echo esc_attr( $message_custom_css ); ?></textarea>
493
+ <br>
494
+ <label class="message_label">&nbsp;</label>
495
+ <span class="message_label"> <?php _e('JS', 'icegram' ); ?></span>
496
+ <br>
497
+ <label class="message_label">&nbsp;</label>
498
+ <textarea class="message_field message_custom_js" rows="6" autocomplete="off" cols="65" name="message_data[<?php echo $message_id; ?>][custom_js]" id="message_message_custom_js_<?php echo $message_id; ?>" value="" placeholder="<?php _e('Add Custom javaScript for this message here...', 'icegram' ); ?>"><?php if( isset( $message_custom_js ) ) echo esc_attr( $message_custom_js ); ?></textarea>
499
+ </div>
500
+
501
+ <!-- Custom code : End -->
502
+ </div>
503
+ <input type="hidden" name="message_data[<?php echo $message_id; ?>][id]" value="<?php echo $message_id; ?>">
504
+ <input type="hidden" class="message_id" name="message_id" value="<?php echo $message_id; ?>">
505
+ <?php
506
+
507
+ if( !empty( $action['message_id'] ) ) {
508
+ ?></div>
509
+ <?php
510
+ } else {
511
+
512
+ ?>
513
+ <p class="message_row">
514
+ <label class="message_label">&nbsp;</label>
515
+ <span>
516
+ <span class="shortcode_description admin_field_icon"></span>
517
+ <?php
518
+ echo sprintf(__( 'You may add <code>[%s]</code> where you want to show this message.', 'icegram' ), 'icegram messages="' .$post->ID . '"' );
519
+ ?>
520
+ </span></p>
521
+ <?php
522
+ }
523
+
524
+ }
525
+
526
+ // Used to save the settings which are being made in the message form and added to message page appropriately
527
+ function update_message_settings( $post_id, $post ) {
528
+
529
+ if (empty( $post_id ) || empty( $post ) || empty( $_POST['message_data'] ) || empty( $_POST['message_data'][$post_id] ) ) return;
530
+ if (defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE) return;
531
+ if (is_int( wp_is_post_revision( $post ) )) return;
532
+ if (is_int( wp_is_post_autosave( $post ) )) return;
533
+ if ( empty( $_POST['icegram_message_meta_nonce'] ) || ! wp_verify_nonce( $_POST['icegram_message_meta_nonce'], 'icegram_message_save_data' ) ) return;
534
+ if (! current_user_can( 'edit_post', $post_id )) return;
535
+ if ($post->post_type != 'ig_message') return;
536
+
537
+ $message_data = $_POST['message_data'][$post_id];
538
+ $type = $message_data['type'];
539
+
540
+ if( isset( $message_data['theme'][$type] ) ) {
541
+ $message_data['theme'] = $message_data['theme'][$type];
542
+ } else {
543
+ unset( $message_data['theme'] );
544
+ }
545
+ if( isset( $message_data['animation'][$type] ) ) {
546
+ $message_data['animation'] = $message_data['animation'][$type];
547
+ } else {
548
+ unset( $message_data['animation'] );
549
+ }
550
+ if( isset( $message_data['position'][$type] ) ) {
551
+ $message_data['position'] = $message_data['position'][$type];
552
+ } elseif( isset( $message_data['position']['ig_default'] ) ) {
553
+ $message_data['position'] = $message_data['position']['ig_default'];
554
+ }
555
+
556
+ $message_data = apply_filters( 'icegram_update_message_data', $message_data, $post_id );
557
+ update_post_meta( $post_id, 'icegram_message_data', $message_data );
558
+ update_post_meta( $post_id, 'icegram_message_preview_data', $message_data );
559
+
560
+ }
561
+
562
+ // Additionally save message body content in post_content of post table
563
+ function save_message_in_post_content( $post_data ) {
564
+
565
+ if( !empty( $_POST['post_type'] ) && $_POST['post_type'] == 'ig_message' && !empty( $_POST['message_data'] ) ) {
566
+ $message_id = $_POST['ID'];
567
+ $post_data['post_content'] = $_POST['message_data'][$message_id]['message'];
568
+
569
+ if( isset( $_POST['message_data'][$message_id]['post_title'] ) ) {
570
+
571
+ if( !empty( $_POST['message_data'][$message_id]['post_title'] ) ) {
572
+ $post_data['post_title'] = $_POST['message_data'][$message_id]['post_title'];
573
+ } else {
574
+ $post_data['post_title'] = $_POST['message_data'][$message_id]['headline'];
575
+ }
576
+
577
+ }
578
+ }
579
+ return $post_data;
580
+ }
581
+
582
+ // Add message columns to message dashboard
583
+ function edit_columns( $existing_columns ) {
584
+
585
+ $date = $existing_columns['date'];
586
+ unset( $existing_columns['date'] );
587
+
588
+ $existing_columns['message_type'] = __( 'Type', 'icegram' );
589
+ $existing_columns['message_theme'] = __( 'Theme', 'icegram' );
590
+ $existing_columns['message_thumbnail'] = __( 'Thumbnail', 'icegram' );
591
+ $existing_columns['date'] = $date;
592
+
593
+ return apply_filters( 'icegram_manage_message_columns', $existing_columns );
594
+
595
+ }
596
+
597
+ // Add message columns data to message dashboard
598
+ function custom_columns( $column ) {
599
+ global $post ,$icegram;
600
+
601
+ if( ( is_object( $post ) && $post->post_type != 'ig_message' ) )
602
+ return;
603
+
604
+ $message_data = get_post_meta( $post->ID, 'icegram_message_data', true );
605
+ if ( empty( $message_data['type'] ) ) {
606
+ return;
607
+ }
608
+ $class_name = 'Icegram_Message_Type_' . str_replace(' ', '_', ucwords(str_replace('-', ' ', $message_data['type'])));
609
+ if( !class_exists( $class_name ) ) {
610
+ return;
611
+ }
612
+ $type = ucwords( str_replace( "-", ' ', $message_data['type'] ) );
613
+ $theme = ucwords( str_replace( "-", ' ', $message_data['theme'] ) );
614
+
615
+ $bg_img = $icegram->message_types[ $message_data['type'] ]['themes'][ $message_data['theme'] ]['baseurl'] . $message_data['theme'] . ".png";
616
+
617
+ switch ($column) {
618
+ case 'message_type':
619
+ echo $type;
620
+ break;
621
+
622
+ case 'message_theme':
623
+ echo $theme;
624
+ break;
625
+
626
+ case 'message_thumbnail':
627
+ // echo "<img src='$bg_img' style='max-width: 200px; max-height: 100px;'>";
628
+ echo "<img src='$bg_img' style='max-width: 100%; max-height: 100px;'>";
629
+ break;
630
+
631
+ default:
632
+ do_action( 'icegram_manage_message_custom_column', $column, $message_data );
633
+ break;
634
+
635
+ }
636
+
637
+ }
638
+
639
+ // Create array for settings based on message types
640
+ function message_settings_to_show() {
641
+
642
+ global $icegram;
643
+ $settings = array();
644
+ foreach ( $icegram->message_types as $type => $value ) {
645
+ foreach ( $value['settings'] as $setting => $property ) {
646
+ $settings[$setting][] = $type;
647
+ }
648
+ }
649
+ return apply_filters( 'icegram_message_settings_to_show', $settings );
650
+
651
+ }
652
+
653
+ // Create array for positions available for all message types
654
+ function message_form_layouts_to_show() {
655
+
656
+ global $icegram;
657
+ $form_layouts = array();
658
+ foreach ( $icegram->message_types as $type => $value ) {
659
+ if( empty( $value['settings']['form_layout'] ) )
660
+ continue;
661
+
662
+ if( !empty( $value['settings']['form_layout']['values'] ) ) {
663
+ foreach ( $value['settings']['form_layout']['values'] as $form_layout ) {
664
+ $form_layouts[$form_layout][] = $type;
665
+ }
666
+ }
667
+ }
668
+
669
+ // return apply_filters( 'icegram_message_form_layouts_to_show', $form_layouts );
670
+ return $form_layouts;
671
+
672
+ }
673
+
674
+
675
+ // Create array for positions available for all message types
676
+ function message_positions_to_show() {
677
+
678
+ global $icegram;
679
+ $positions = array();
680
+ foreach ( $icegram->message_types as $type => $value ) {
681
+ if( empty( $value['settings']['position'] ) )
682
+ continue;
683
+
684
+ if( !empty( $value['settings']['position']['values'] ) ) {
685
+ foreach ( $value['settings']['position']['values'] as $position ) {
686
+ $positions[$position][] = $type;
687
+ }
688
+ }
689
+ }
690
+ return apply_filters( 'icegram_message_positions_to_show', $positions );
691
+
692
+ }
693
+
694
+ // Default message data for newly created message
695
+ function default_message_data( $message_type = '' ) {
696
+
697
+ global $icegram;
698
+ $default_themes = array();
699
+ foreach ( $icegram->message_types as $type => $value ) {
700
+ if( isset( $value['settings']['theme']['default'] ) ) {
701
+ $default_themes[$type] = $value['settings']['theme']['default'];
702
+ }
703
+ }
704
+ if( !empty( $message_type ) ) {
705
+ $default_message = $icegram->message_types[$message_type];
706
+ } else {
707
+ $default_message = reset( $icegram->message_types );
708
+ }
709
+ $default_message_data = array( 'type' => $default_message['type'],
710
+ 'position' => ( !empty( $default_message['settings']['position']['values'][0] ) ) ? $default_message['settings']['position']['values'][0] : '',
711
+ 'text_color' => ( !empty( $default_message['settings']['text_color']['default'] ) ) ? $default_message['settings']['text_color']['default'] : '',
712
+ 'bg_color' => ( !empty( $default_message['settings']['bg_color']['default'] ) ) ? $default_message['settings']['bg_color']['default'] : '',
713
+ 'theme' => $default_themes
714
+ );
715
+ return apply_filters( 'icegram_default_message_data', $default_message_data );
716
+ }
717
+
718
+ // Form styles for the form
719
+ //TODO :: check this and do changes if required
720
+ function available_form_styles( ) {
721
+ $available_form_styles = array(
722
+ array('name' => 'Style 0'),
723
+ array('name' => 'Style 1'),
724
+ array('name' => 'Style 2'),
725
+ array('name' => 'Style 3'),
726
+ array('name' => 'Style 4')
727
+ ) ;
728
+ return $available_form_styles;
729
+ }
730
+ // All headline to generate randomly for messages
731
+ function available_headlines( $available_headlines = array() ) {
732
+ $available_headlines = array_merge( $available_headlines, array(
733
+ __( 'Here Is A Method That Is Helping ____ To ____', 'icegram' ),
734
+ __( '__ Little Known Ways To ____', 'icegram' ),
735
+ __( 'Get Rid Of ____ Once And For All', 'icegram' ),
736
+ __( 'How To ____ So You Can ____', 'icegram' ),
737
+ __( 'They Didn\'t Think I Could ____, But I Did', 'icegram' ),
738
+ __( 'How ____ Made Me ____', 'icegram' ),
739
+ __( 'Are You ____ ?', 'icegram' ),
740
+ __( 'Warning: ____ !', 'icegram' ),
741
+ __( 'Do You Make These Mistakes With ____ ?', 'icegram' ),
742
+ __( '7 Ways To ____', 'icegram' ),
743
+ __( 'If You\'re ____, You Can ____', 'icegram' ),
744
+ __( 'Turn your ____ into a ____', 'icegram' ),
745
+ __( 'Want To Be A ____?', 'icegram' ),
746
+ __( 'The Ugly Truth About Your Beautiful ____', 'icegram' ),
747
+ __( 'The Secret to ____ Is Simply ____!', 'icegram' ),
748
+ __( 'The Quickest Way I Know To ____', 'icegram' ),
749
+ __( 'The Lazy Man\'s Way To ____', 'icegram' ),
750
+ __( 'The Amazing Story Of ____ That Requires So Little Of ____ You Could ____', 'icegram' ),
751
+ __( 'The Amazing Secret Of The ____ Genius Who Is Afraid Of ____', 'icegram' ),
752
+ __( 'The 10 Wackiest Ideas That ____... And How You Can Too!', 'icegram' ),
753
+ __( 'The Inside Secrets To ____ With Crazy, Outlandish And Outrageous ____', 'icegram' ),
754
+ __( '____ Like A ____', 'icegram' ),
755
+ __( 'Remember When You Could Have ____, And You Didn\'t?', 'icegram' ),
756
+ __( 'Is The ____ Worth $x To You?', 'icegram' ),
757
+ __( 'Increase your ____, reduce ____, maintain ____ and ____ with ____', 'icegram' ),
758
+ __( 'If You Can ____ You Can ____', 'icegram' ),
759
+ __( 'I Discovered How To ____... Now I\'m Revealing My Secret', 'icegram' ),
760
+ __( 'How To Turn Your ____ Into The Most ____', 'icegram' ),
761
+ __( 'How To Take The Headache Out Of ____', 'icegram' ),
762
+ __( 'How To ____ ... Legally', 'icegram' ),
763
+ __( 'How To ____ That ____', 'icegram' ),
764
+ __( 'How To Discover The ____ That Lies Hidden In Your ____', 'icegram' ),
765
+ __( 'How To ____ Even When Your Not ____', 'icegram' ),
766
+ __( '____ With No ____!', 'icegram' ),
767
+ __( 'Greatest Goldmine of ____ Ever Jammed Into One Big ____', 'icegram' ),
768
+ __( 'Free ____ Tells How To Get Better ____', 'icegram' ),
769
+ __( 'FREE ____ Worth $____ for the first 100 People to take Advantage of this Offer', 'icegram' ),
770
+ __( 'Don\'t Try This With Any Other ____', 'icegram' ),
771
+ __( 'Do You Honestly Want To ____?', 'icegram' ),
772
+ __( 'Discover The Magic ____ That Will Bring You ____ & ____!', 'icegram' ),
773
+ __( '____ Man Reveals A Short-Cut To ____', 'icegram' ),
774
+ __( 'Confessions Of A ____', 'icegram' ),
775
+ __( 'Are You Ready To ____?', 'icegram' ),
776
+ __( 'An Open Letter To Everyone Who ____ More Than ____ Per ____', 'icegram' ),
777
+ __( 'An Amazing ____ You Can Carry In Your ____', 'icegram' ),
778
+ __( '21 Secret ____ that will ____... NOW!', 'icegram' )
779
+ ) );
780
+ return $available_headlines;
781
+ }
782
+
783
+ function add_message_action( $actions, $post ){
784
+ if ($post->post_type != 'ig_message') return $actions;
785
+ $actions['duplicate_message'] = '<a class="ig-duplicate-message" href="post.php?message_id='.$post->ID.'&action=duplicate-message" >'.__('Duplicate' ,'icegram').'</a>';
786
+ return $actions;
787
+ }
788
+
789
+ function duplicate_message(){
790
+ if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'duplicate-message' && !empty($_REQUEST['message_id'])){
791
+ Icegram::duplicate( $_REQUEST['message_id'] );
792
+ }
793
+ }
794
+ }
795
+ }
trunk/classes/class-icegram-message-type.php ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+ if ( class_exists( 'Icegram_Message_Type' ) ) return;
4
+
5
+ /**
6
+ * Class Icegram_Message_Type
7
+ */
8
+ abstract class Icegram_Message_Type {
9
+
10
+ var $type;
11
+ var $name;
12
+ var $basedir;
13
+ var $baseurl;
14
+ var $settings;
15
+ var $version;
16
+
17
+ function __construct( $basedir = '', $baseurl = '' ) {
18
+ $class_name = get_class($this);
19
+ $base = 'Icegram_Message_Type_';
20
+ if ( strpos($class_name, $base) === 0 ) {
21
+ $class_name = str_replace($base, '', $class_name);
22
+ $this->type = str_replace( '_', '-', strtolower($class_name) );
23
+ $this->name = ucwords( str_replace( "-", ' ', $this->type ) );
24
+ $this->basedir = trailingslashit($basedir);
25
+ $this->baseurl = trailingslashit($baseurl);
26
+
27
+ add_filter('icegram_message_types', array( $this, 'init') );
28
+ }
29
+ }
30
+
31
+ function meets_guidelines() {
32
+ if (empty($this->type) || empty($this->name) || !is_dir($this->basedir) ) {
33
+ return false;
34
+ }
35
+ if (!is_file( $this->basedir . '/default.css') || !is_file( $this->basedir . '/main.js') ) {
36
+ return false;
37
+ }
38
+ return true;
39
+ }
40
+
41
+ function init( $message_types = array() ) {
42
+ if (! $this->meets_guidelines() ) {
43
+ return $message_types;
44
+ }
45
+
46
+ // Load themes
47
+ $theme_files = (array) glob( $this->basedir . 'themes/*.png' );
48
+
49
+ if( empty( $theme_files ) ) {
50
+ $theme_files[] = $this->basedir . '/default.css';
51
+ }
52
+
53
+ $themes = array();
54
+ if( !empty( $theme_files ) ) {
55
+ foreach ( $theme_files as $file ) {
56
+ if (is_file ( $file )) {
57
+ $theme = str_replace( ".png", "", basename( $file ) );
58
+ $themes[ $theme ] = array(
59
+ 'name' => ucwords( str_replace( "-", ' ', $theme ) ),
60
+ 'type' => $theme,
61
+ 'basedir' => $this->basedir . 'themes/',
62
+ 'baseurl' => $this->baseurl . 'themes/'
63
+ );
64
+ }
65
+ }
66
+ }
67
+ // Allow other plugins to add themes
68
+ $themes = apply_filters( 'icegram_message_type_themes', $themes ,$this->type);
69
+
70
+ $this->define_settings();
71
+
72
+ $params = array(
73
+ 'name' => $this->name,
74
+ 'type' => $this->type,
75
+ 'basedir' => $this->basedir,
76
+ 'baseurl' => $this->baseurl,
77
+ 'themes' => $themes,
78
+ 'version' => $this->version,
79
+ 'settings' => $this->settings
80
+ );
81
+
82
+ $params = apply_filters( 'icegram_message_type_params_'.$this->type, $params );
83
+ $params = apply_filters( 'icegram_message_type_params', $params, $this->type );
84
+ $message_types[ $this->type ] = $params;
85
+ return $message_types;
86
+ }
87
+
88
+ function define_settings() {
89
+ $this->settings = array(
90
+ 'animation' => array( 'type' => 'select' ),
91
+ 'theme' => array( 'type' => 'select' ),
92
+ 'headline' => array( 'type' => 'text' ),
93
+ 'message' => array( 'type' => 'editor' ),
94
+ 'label' => array( 'type' => 'text' ),
95
+ 'link' => array( 'type' => 'text' ),
96
+ 'icon' => array( 'type' => 'text' ),
97
+ 'bg_color' => array( 'type' => 'color' ),
98
+ 'text_color' => array( 'type' => 'color' ),
99
+ 'position' => array( 'type' => 'position' ),
100
+ 'custom_code' => array( 'type' => 'text' ), // TODO :: remove this setting from all MS type
101
+ 'form_layout' => array( 'type' => 'position' ), //TODO :: check this , remove if not required
102
+ 'embed_form' => array( 'type' => 'form' ) // TODO :: remove this setting from all MS type
103
+ );
104
+ // add animations
105
+ $this->settings['animation']['values'] = array( 'slide' => 'Slide', 'appear' => 'Appear' );
106
+ $this->settings['animation']['default'] = 'slide';
107
+
108
+ }
109
+ }
trunk/classes/class-icegram-message.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+ /**
4
+ * Icegram Message class
5
+ */
6
+ if ( !class_exists( 'Icegram_Message' ) ) {
7
+
8
+ class Icegram_Message {
9
+
10
+ var $_post;
11
+ var $title;
12
+ var $message_data;
13
+
14
+ function __construct( $message_id = '' ) {
15
+
16
+ if ( !empty( $message_id ) ) {
17
+ $this->_post = get_post( $message_id );
18
+ $this->title = $this->_post->post_title;
19
+ $this->message_data = get_post_meta( $this->_post->ID, 'icegram_message_data', true );
20
+ }
21
+ }
22
+ }
23
+ }
trunk/classes/compat/class-icegram-compat-contact-form-7.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+ /**
4
+ * Icegram Campaign Admin class
5
+ */
6
+ if ( !class_exists( 'Icegram_Compat_contact_form_7' ) ) {
7
+ class Icegram_Compat_contact_form_7 extends Icegram_Compat_Base {
8
+
9
+ function __construct() {
10
+ global $icegram;
11
+ parent::__construct();
12
+
13
+ if($icegram->cache_compatibility === 'yes') {
14
+ add_filter('wpcf7_form_action_url', array( &$this, 'change_form_action_url') );
15
+ }
16
+ }
17
+
18
+ function change_form_action_url($url) {
19
+ return Icegram::get_current_page_url();
20
+ }
21
+
22
+
23
+ function render_js() {
24
+ ?>
25
+
26
+ <style type="text/css">
27
+ .ig_hide .wpcf7-response-output,
28
+ .ig_form_container .screen-reader-response{
29
+ display: none !important;
30
+ }
31
+ .ig_show .ig_form_container.layout_bottom .wpcf7-response-output,
32
+ .ig_show .ig_form_container.layout_right .wpcf7-response-output,
33
+ .ig_show .ig_form_container.layout_left .wpcf7-response-output{
34
+ background-color: #FFF;
35
+ color: #444;
36
+ position: absolute;
37
+ }
38
+ .ig_sidebar .ig_form_bottom.ig_show .ig_form_container.layout_bottom .wpcf7-response-output{
39
+ bottom: 0;
40
+ }
41
+ .ig_overlay.ig_form_bottom.ig_show .ig_form_container.layout_bottom .wpcf7-response-output,
42
+ .ig_action_bar.ig_bottom.ig_show .ig_form_container.layout_right .wpcf7-response-output,
43
+ .ig_action_bar.ig_bottom.ig_show .ig_form_container.layout_left .wpcf7-response-output{
44
+ bottom: 100%;
45
+ }
46
+ </style>
47
+
48
+ <script type="text/javascript">
49
+ jQuery(function() {
50
+ jQuery( window ).on( "init.icegram", function(e, ig) {
51
+ // Find and init all CF7 forms within Icegram messages/divs and init them
52
+ if(typeof ig !== 'undefined' && typeof ig.messages !== 'undefined' ){
53
+ jQuery.each(ig.messages, function(i, msg){
54
+ jQuery(msg.el).find('form input[name=_wpcf7]').each(function(){
55
+ var form = jQuery(this).closest('form');
56
+ if(form && !form.hasClass('ig_form_init_done')){
57
+ if(form.closest('.ig_form_container').length > 0){
58
+ if(form.parent().find('.screen-reader-response').length == 0){
59
+ form.before('<div class="screen-reader-response"></div>')
60
+ }
61
+ if(form.find('wpcf7-response-output').length == 0){
62
+ form.append('<div class="wpcf7-response-output wpcf7-display-none"></div>')
63
+ }
64
+ form.closest('.ig_form_container').attr('id', form.find('input[name=_wpcf7_unit_tag]').val()); //_wpcf7_unit_tag
65
+ }
66
+ if(typeof _wpcf7 !== 'undefined'){
67
+ form.wpcf7InitForm();
68
+ }else{
69
+ form.submit( function( event ) {
70
+ if ( typeof window.FormData !== 'function' ) {
71
+ return;
72
+ }
73
+ wpcf7.submit( form );
74
+ event.preventDefault();
75
+ } );
76
+ }
77
+ form.addClass('ig_form_init_done');
78
+ }
79
+ });
80
+
81
+ });
82
+ }
83
+
84
+ }); // init.icegram
85
+
86
+ // Dismiss response text/div when shown within icegram form container
87
+ jQuery('body').on('click', '.ig_form_container .wpcf7-response-output', function(e) {
88
+ jQuery(e.target).slideUp();
89
+ });
90
+ // Handle CTA function(s) after successful submission of form
91
+ jQuery( window ).on('wpcf7:mailsent', function(e) {
92
+ if( typeof icegram !== 'undefined' ){
93
+ var msg_id = ((jQuery(e.target).closest('[id^=icegram_message_]') || {}).attr('id') || '').split('_').pop() || 0 ;
94
+ var ig_msg = icegram.get_message_by_id(msg_id) || undefined;
95
+ if(ig_msg && ig_msg.data.cta === 'form_via_ajax' && ig_msg.data.cta_option_form_via_ajax == 'hide_on_success'){
96
+ setTimeout(function(){
97
+ ig_msg.hide();
98
+ }, 2000);
99
+ }
100
+ }
101
+ });
102
+ });
103
+ </script>
104
+
105
+ <?php
106
+ }
107
+ }
108
+ }
trunk/classes/compat/class-icegram-compat-gravityforms.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+ /**
4
+ * Icegram Campaign Admin class
5
+ */
6
+ if ( !class_exists( 'Icegram_Compat_gravityforms' ) ) {
7
+ class Icegram_Compat_gravityforms extends Icegram_Compat_Base {
8
+
9
+ function __construct() {
10
+ global $icegram;
11
+ parent::__construct();
12
+
13
+ if($icegram->cache_compatibility === 'yes') {
14
+ add_filter( 'gform_form_tag', 'change_form_action_url', 10, 2 );
15
+ function change_form_action_url( $form_tag, $form ) {
16
+ $form_tag = preg_replace( "|action='(.*?)'|", "action='".Icegram::get_current_page_url()."'", $form_tag );
17
+ return $form_tag;
18
+ }
19
+
20
+ }
21
+ }
22
+
23
+ function render_js() {
24
+ ?>
25
+
26
+ <style type="text/css">
27
+ body.ig_laptop div#ui-datepicker-div[style],
28
+ body.ig_tablet div#ui-datepicker-div[style],
29
+ body.ig_mobile div#ui-datepicker-div[style]{
30
+ z-index: 9999999!important;
31
+ }
32
+ </style>
33
+
34
+ <script type="text/javascript">
35
+ jQuery(function() {
36
+ jQuery( window ).on( "init.icegram", function(e, ig) {
37
+ // Find and init all datepicker inside gravityForms
38
+ jQuery('body').on('focus', 'form[id^="gform_"] .datepicker', function(){
39
+ jQuery(this).datepicker();
40
+ });
41
+ }); // init.icegram
42
+ });
43
+ </script>
44
+
45
+ <?php
46
+ }
47
+ }
48
+ }
trunk/classes/ig-mobile-detect.php ADDED
@@ -0,0 +1,1458 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Mobile Detect Library
4
+ * =====================
5
+ *
6
+ * Motto: "Every business should have a mobile detection script to detect mobile readers"
7
+ *
8
+ * Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets).
9
+ * It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
10
+ *
11
+ * @author Current authors: Serban Ghita <serbanghita@gmail.com>
12
+ * Nick Ilyin <nick.ilyin@gmail.com>
13
+ *
14
+ * Original author: Victor Stanciu <vic.stanciu@gmail.com>
15
+ *
16
+ * @license Code and contributions have 'MIT License'
17
+ * More details: https://github.com/serbanghita/Mobile-Detect/blob/master/LICENSE.txt
18
+ *
19
+ * @link Homepage: http://mobiledetect.net
20
+ * GitHub Repo: https://github.com/serbanghita/Mobile-Detect
21
+ * Google Code: http://code.google.com/p/php-mobile-detect/
22
+ * README: https://github.com/serbanghita/Mobile-Detect/blob/master/README.md
23
+ * HOWTO: https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples
24
+ *
25
+ * @version 2.8.24
26
+ */
27
+
28
+ class Ig_Mobile_Detect
29
+ {
30
+ /**
31
+ * Mobile detection type.
32
+ *
33
+ * @deprecated since version 2.6.9
34
+ */
35
+ const DETECTION_TYPE_MOBILE = 'mobile';
36
+
37
+ /**
38
+ * Extended detection type.
39
+ *
40
+ * @deprecated since version 2.6.9
41
+ */
42
+ const DETECTION_TYPE_EXTENDED = 'extended';
43
+
44
+ /**
45
+ * A frequently used regular expression to extract version #s.
46
+ *
47
+ * @deprecated since version 2.6.9
48
+ */
49
+ const VER = '([\w._\+]+)';
50
+
51
+ /**
52
+ * Top-level device.
53
+ */
54
+ const MOBILE_GRADE_A = 'A';
55
+
56
+ /**
57
+ * Mid-level device.
58
+ */
59
+ const MOBILE_GRADE_B = 'B';
60
+
61
+ /**
62
+ * Low-level device.
63
+ */
64
+ const MOBILE_GRADE_C = 'C';
65
+
66
+ /**
67
+ * Stores the version number of the current release.
68
+ */
69
+ const VERSION = '2.8.24';
70
+
71
+ /**
72
+ * A type for the version() method indicating a string return value.
73
+ */
74
+ const VERSION_TYPE_STRING = 'text';
75
+
76
+ /**
77
+ * A type for the version() method indicating a float return value.
78
+ */
79
+ const VERSION_TYPE_FLOAT = 'float';
80
+
81
+ /**
82
+ * A cache for resolved matches
83
+ * @var array
84
+ */
85
+ protected $cache = array();
86
+
87
+ /**
88
+ * The User-Agent HTTP header is stored in here.
89
+ * @var string
90
+ */
91
+ protected $userAgent = null;
92
+
93
+ /**
94
+ * HTTP headers in the PHP-flavor. So HTTP_USER_AGENT and SERVER_SOFTWARE.
95
+ * @var array
96
+ */
97
+ protected $httpHeaders = array();
98
+
99
+ /**
100
+ * CloudFront headers. E.g. CloudFront-Is-Desktop-Viewer, CloudFront-Is-Mobile-Viewer & CloudFront-Is-Tablet-Viewer.
101
+ * @var array
102
+ */
103
+ protected $cloudfrontHeaders = array();
104
+
105
+ /**
106
+ * The matching Regex.
107
+ * This is good for debug.
108
+ * @var string
109
+ */
110
+ protected $matchingRegex = null;
111
+
112
+ /**
113
+ * The matches extracted from the regex expression.
114
+ * This is good for debug.
115
+ * @var string
116
+ */
117
+ protected $matchesArray = null;
118
+
119
+ /**
120
+ * The detection type, using self::DETECTION_TYPE_MOBILE or self::DETECTION_TYPE_EXTENDED.
121
+ *
122
+ * @deprecated since version 2.6.9
123
+ *
124
+ * @var string
125
+ */
126
+ protected $detectionType = self::DETECTION_TYPE_MOBILE;
127
+
128
+ /**
129
+ * HTTP headers that trigger the 'isMobile' detection
130
+ * to be true.
131
+ *
132
+ * @var array
133
+ */
134
+ protected static $mobileHeaders = array(
135
+
136
+ 'HTTP_ACCEPT' => array('matches' => array(
137
+ // Opera Mini; @reference: http://dev.opera.com/articles/view/opera-binary-markup-language/
138
+ 'application/x-obml2d',
139
+ // BlackBerry devices.
140
+ 'application/vnd.rim.html',
141
+ 'text/vnd.wap.wml',
142
+ 'application/vnd.wap.xhtml+xml'
143
+ )),
144
+ 'HTTP_X_WAP_PROFILE' => null,
145
+ 'HTTP_X_WAP_CLIENTID' => null,
146
+ 'HTTP_WAP_CONNECTION' => null,
147
+ 'HTTP_PROFILE' => null,
148
+ // Reported by Opera on Nokia devices (eg. C3).
149
+ 'HTTP_X_OPERAMINI_PHONE_UA' => null,
150
+ 'HTTP_X_NOKIA_GATEWAY_ID' => null,
151
+ 'HTTP_X_ORANGE_ID' => null,
152
+ 'HTTP_X_VODAFONE_3GPDPCONTEXT' => null,
153
+ 'HTTP_X_HUAWEI_USERID' => null,
154
+ // Reported by Windows Smartphones.
155
+ 'HTTP_UA_OS' => null,
156
+ // Reported by Verizon, Vodafone proxy system.
157
+ 'HTTP_X_MOBILE_GATEWAY' => null,
158
+ // Seen this on HTC Sensation. SensationXE_Beats_Z715e.
159
+ 'HTTP_X_ATT_DEVICEID' => null,
160
+ // Seen this on a HTC.
161
+ 'HTTP_UA_CPU' => array('matches' => array('ARM')),
162
+ );
163
+
164
+ /**
165
+ * List of mobile devices (phones).
166
+ *
167
+ * @var array
168
+ */
169
+ protected static $phoneDevices = array(
170
+ 'iPhone' => '\biPhone\b|\biPod\b', // |\biTunes
171
+ 'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+',
172
+ 'HTC' => 'HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m',
173
+ 'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6',
174
+ // @todo: Is 'Dell Streak' a tablet or a phone? ;)
175
+ 'Dell' => 'Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b',
176
+ 'Motorola' => 'Motorola|DROIDX|DROID BIONIC|\bDroid\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\bMoto E\b',
177
+ 'Samsung' => '\bSamsung\b|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F',
178
+ 'LG' => '\bLG\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323)',
179
+ 'Sony' => 'SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533',
180
+ 'Asus' => 'Asus.*Galaxy|PadFone.*Mobile',
181
+ 'NokiaLumia' => 'Lumia [0-9]{3,4}',
182
+ // http://www.micromaxinfo.com/mobiles/smartphones
183
+ // Added because the codes might conflict with Acer Tablets.
184
+ 'Micromax' => 'Micromax.*\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\b',
185
+ // @todo Complete the regex.
186
+ 'Palm' => 'PalmSource|Palm', // avantgo|blazer|elaine|hiptop|plucker|xiino ;
187
+ 'Vertu' => 'Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature', // Just for fun ;)
188
+ // http://www.pantech.co.kr/en/prod/prodList.do?gbrand=VEGA (PANTECH)
189
+ // Most of the VEGA devices are legacy. PANTECH seem to be newer devices based on Android.
190
+ 'Pantech' => 'PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790',
191
+ // http://www.fly-phone.com/devices/smartphones/ ; Included only smartphones.
192
+ 'Fly' => 'IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250',
193
+ // http://fr.wikomobile.com
194
+ 'Wiko' => 'KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM',
195
+ 'iMobile' => 'i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)',
196
+ // Added simvalley mobile just for fun. They have some interesting devices.
197
+ // http://www.simvalley.fr/telephonie---gps-_22_telephonie-mobile_telephones_.html
198
+ 'SimValley' => '\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\b',
199
+ // Wolfgang - a brand that is sold by Aldi supermarkets.
200
+ // http://www.wolfgangmobile.com/
201
+ 'Wolfgang' => 'AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q',
202
+ 'Alcatel' => 'Alcatel',
203
+ 'Nintendo' => 'Nintendo 3DS',
204
+ // http://en.wikipedia.org/wiki/Amoi
205
+ 'Amoi' => 'Amoi',
206
+ // http://en.wikipedia.org/wiki/INQ
207
+ 'INQ' => 'INQ',
208
+ // @Tapatalk is a mobile app; http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039
209
+ 'GenericPhone' => 'Tapatalk|PDA;|SAGEM|\bmmp\b|pocket|\bpsp\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\bwap\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser',
210
+ );
211
+
212
+ /**
213
+ * List of tablet devices.
214
+ *
215
+ * @var array
216
+ */
217
+ protected static $tabletDevices = array(
218
+ // @todo: check for mobile friendly emails topic.
219
+ 'iPad' => 'iPad|iPad.*Mobile',
220
+ // Removed |^.*Android.*Nexus(?!(?:Mobile).)*$
221
+ // @see #442
222
+ 'NexusTablet' => 'Android.*Nexus[\s]+(7|9|10)',
223
+ 'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y|SM-T280', // SCH-P709|SCH-P729|SM-T2558|GT-I9205 - Samsung Mega - treat them like a regular phone.
224
+ // http://docs.aws.amazon.com/silk/latest/developerguide/user-agent.html
225
+ 'Kindle' => 'Kindle|Silk.*Accelerated|Android.*\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI)\b',
226
+ // Only the Surface tablets with Windows RT are considered mobile.
227
+ // http://msdn.microsoft.com/en-us/library/ie/hh920767(v=vs.85).aspx
228
+ 'SurfaceTablet' => 'Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)',
229
+ // http://shopping1.hp.com/is-bin/INTERSHOP.enfinity/WFS/WW-USSMBPublicStore-Site/en_US/-/USD/ViewStandardCatalog-Browse?CatalogCategoryID=JfIQ7EN5lqMAAAEyDcJUDwMT
230
+ 'HPTablet' => 'HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10',
231
+ // Watch out for PadFone, see #132.
232
+ // http://www.asus.com/de/Tablets_Mobile/Memo_Pad_Products/
233
+ 'AsusTablet' => '^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\bK00F\b|\bK00C\b|\bK00E\b|\bK00L\b|TX201LA|ME176C|ME102A|\bM80TA\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\bME70C\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z',
234
+ 'BlackBerryTablet' => 'PlayBook|RIM Tablet',
235
+ 'HTCtablet' => 'HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410',
236
+ 'MotorolaTablet' => 'xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617',
237
+ 'NookTablet' => 'Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2',
238
+ // http://www.acer.ro/ac/ro/RO/content/drivers
239
+ // http://www.packardbell.co.uk/pb/en/GB/content/download (Packard Bell is part of Acer)
240
+ // http://us.acer.com/ac/en/US/content/group/tablets
241
+ // http://www.acer.de/ac/de/DE/content/models/tablets/
242
+ // Can conflict with Micromax and Motorola phones codes.
243
+ 'AcerTablet' => 'Android.*; \b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\b|W3-810|\bA3-A10\b|\bA3-A11\b|\bA3-A20\b|\bA3-A30',
244
+ // http://eu.computers.toshiba-europe.com/innovation/family/Tablets/1098744/banner_id/tablet_footerlink/
245
+ // http://us.toshiba.com/tablets/tablet-finder
246
+ // http://www.toshiba.co.jp/regza/tablet/
247
+ 'ToshibaTablet' => 'Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO',
248
+ // http://www.nttdocomo.co.jp/english/service/developer/smart_phone/technical_info/spec/index.html
249
+ // http://www.lg.com/us/tablets
250
+ 'LGTablet' => '\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\b',
251
+ 'FujitsuTablet' => 'Android.*\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\b',
252
+ // Prestigio Tablets http://www.prestigio.com/support
253
+ 'PrestigioTablet' => 'PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002',
254
+ // http://support.lenovo.com/en_GB/downloads/default.page?#
255
+ 'LenovoTablet' => 'Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)',
256
+ // http://www.dell.com/support/home/us/en/04/Products/tab_mob/tablets
257
+ 'DellTablet' => 'Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7',
258
+ // http://www.yarvik.com/en/matrix/tablets/
259
+ 'YarvikTablet' => 'Android.*\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\b',
260
+ 'MedionTablet' => 'Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB',
261
+ 'ArnovaTablet' => '97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2',
262
+ // http://www.intenso.de/kategorie_en.php?kategorie=33
263
+ // @todo: http://www.nbhkdz.com/read/b8e64202f92a2df129126bff.html - investigate
264
+ 'IntensoTablet' => 'INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004',
265
+ // IRU.ru Tablets http://www.iru.ru/catalog/soho/planetable/
266
+ 'IRUTablet' => 'M702pro',
267
+ 'MegafonTablet' => 'MegaFon V9|\bZTE V9\b|Android.*\bMT7A\b',
268
+ // http://www.e-boda.ro/tablete-pc.html
269
+ 'EbodaTablet' => 'E-Boda (Supreme|Impresspeed|Izzycomm|Essential)',
270
+ // http://www.allview.ro/produse/droseries/lista-tablete-pc/
271
+ 'AllViewTablet' => 'Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)',
272
+ // http://wiki.archosfans.com/index.php?title=Main_Page
273
+ 'ArchosTablet' => '\b(101G9|80G9|A101IT)\b|Qilive 97R|Archos5|\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\b',
274
+ // http://www.ainol.com/plugin.php?identifier=ainol&module=product
275
+ 'AinolTablet' => 'NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark',
276
+ 'NokiaLumiaTablet' => 'Lumia 2520',
277
+ // @todo: inspect http://esupport.sony.com/US/p/select-system.pl?DIRECTOR=DRIVER
278
+ // Readers http://www.atsuhiro-me.net/ebook/sony-reader/sony-reader-web-browser
279
+ // http://www.sony.jp/support/tablet/
280
+ 'SonyTablet' => 'Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP612|SOT31',
281
+ // http://www.support.philips.com/support/catalog/worldproducts.jsp?userLanguage=en&userCountry=cn&categoryid=3G_LTE_TABLET_SU_CN_CARE&title=3G%20tablets%20/%20LTE%20range&_dyncharset=UTF-8
282
+ 'PhilipsTablet' => '\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\b',
283
+ // db + http://www.cube-tablet.com/buy-products.html
284
+ 'CubeTablet' => 'Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT',
285
+ // http://www.cobyusa.com/?p=pcat&pcat_id=3001
286
+ 'CobyTablet' => 'MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010',
287
+ // http://www.match.net.cn/products.asp
288
+ 'MIDTablet' => 'M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10',
289
+ // http://www.msi.com/support
290
+ // @todo Research the Windows Tablets.
291
+ 'MSITablet' => 'MSI \b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\b',
292
+ // @todo http://www.kyoceramobile.com/support/drivers/
293
+ // 'KyoceraTablet' => null,
294
+ // @todo http://intexuae.com/index.php/category/mobile-devices/tablets-products/
295
+ // 'IntextTablet' => null,
296
+ // http://pdadb.net/index.php?m=pdalist&list=SMiT (NoName Chinese Tablets)
297
+ // http://www.imp3.net/14/show.php?itemid=20454
298
+ 'SMiTTablet' => 'Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)',
299
+ // http://www.rock-chips.com/index.php?do=prod&pid=2
300
+ 'RockChipTablet' => 'Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A',
301
+ // http://www.fly-phone.com/devices/tablets/ ; http://www.fly-phone.com/service/
302
+ 'FlyTablet' => 'IQ310|Fly Vision',
303
+ // http://www.bqreaders.com/gb/tablets-prices-sale.html
304
+ 'bqTablet' => 'Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris [E|M]10)|Maxwell.*Lite|Maxwell.*Plus',
305
+ // http://www.huaweidevice.com/worldwide/productFamily.do?method=index&directoryId=5011&treeId=3290
306
+ // http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index&directoryId=3372&treeId=0&tb=1&type=software (including legacy tablets)
307
+ 'HuaweiTablet' => 'MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim',
308
+ // Nec or Medias Tab
309
+ 'NecTablet' => '\bN-06D|\bN-08D',
310
+ // Pantech Tablets: http://www.pantechusa.com/phones/
311
+ 'PantechTablet' => 'Pantech.*P4100',
312
+ // Broncho Tablets: http://www.broncho.cn/ (hard to find)
313
+ 'BronchoTablet' => 'Broncho.*(N701|N708|N802|a710)',
314
+ // http://versusuk.com/support.html
315
+ 'VersusTablet' => 'TOUCHPAD.*[78910]|\bTOUCHTAB\b',
316
+ // http://www.zync.in/index.php/our-products/tablet-phablets
317
+ 'ZyncTablet' => 'z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900',
318
+ // http://www.positivoinformatica.com.br/www/pessoal/tablet-ypy/
319
+ 'PositivoTablet' => 'TB07STA|TB10STA|TB07FTA|TB10FTA',
320
+ // https://www.nabitablet.com/
321
+ 'NabiTablet' => 'Android.*\bNabi',
322
+ 'KoboTablet' => 'Kobo Touch|\bK080\b|\bVox\b Build|\bArc\b Build',
323
+ // French Danew Tablets http://www.danew.com/produits-tablette.php
324
+ 'DanewTablet' => 'DSlide.*\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\b',
325
+ // Texet Tablets and Readers http://www.texet.ru/tablet/
326
+ 'TexetTablet' => 'NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE',
327
+ // Avoid detecting 'PLAYSTATION 3' as mobile.
328
+ 'PlaystationTablet' => 'Playstation.*(Portable|Vita)',
329
+ // http://www.trekstor.de/surftabs.html
330
+ 'TrekstorTablet' => 'ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab',
331
+ // http://www.pyleaudio.com/Products.aspx?%2fproducts%2fPersonal-Electronics%2fTablets
332
+ 'PyleAudioTablet' => '\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\b',
333
+ // http://www.advandigital.com/index.php?link=content-product&jns=JP001
334
+ // because of the short codenames we have to include whitespaces to reduce the possible conflicts.
335
+ 'AdvanTablet' => 'Android.* \b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\b ',
336
+ // http://www.danytech.com/category/tablet-pc
337
+ 'DanyTechTablet' => 'Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1',
338
+ // http://www.galapad.net/product.html
339
+ 'GalapadTablet' => 'Android.*\bG1\b',
340
+ // http://www.micromaxinfo.com/tablet/funbook
341
+ 'MicromaxTablet' => 'Funbook|Micromax.*\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\b',
342
+ // http://www.karbonnmobiles.com/products_tablet.php
343
+ 'KarbonnTablet' => 'Android.*\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\b',
344
+ // http://www.myallfine.com/Products.asp
345
+ 'AllFineTablet' => 'Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide',
346
+ // http://www.proscanvideo.com/products-search.asp?itemClass=TABLET&itemnmbr=
347
+ 'PROSCANTablet' => '\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\b',
348
+ // http://www.yonesnav.com/products/products.php
349
+ 'YONESTablet' => 'BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026',
350
+ // http://www.cjshowroom.com/eproducts.aspx?classcode=004001001
351
+ // China manufacturer makes tablets for different small brands (eg. http://www.zeepad.net/index.html)
352
+ 'ChangJiaTablet' => 'TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503',
353
+ // http://www.gloryunion.cn/products.asp
354
+ // http://www.allwinnertech.com/en/apply/mobile.html
355
+ // http://www.ptcl.com.pk/pd_content.php?pd_id=284 (EVOTAB)
356
+ // @todo: Softwiner tablets?
357
+ // aka. Cute or Cool tablets. Not sure yet, must research to avoid collisions.
358
+ 'GUTablet' => 'TX-A1301|TX-M9002|Q702|kf026', // A12R|D75A|D77|D79|R83|A95|A106C|R15|A75|A76|D71|D72|R71|R73|R77|D82|R85|D92|A97|D92|R91|A10F|A77F|W71F|A78F|W78F|W81F|A97F|W91F|W97F|R16G|C72|C73E|K72|K73|R96G
359
+ // http://www.pointofview-online.com/showroom.php?shop_mode=product_listing&category_id=118
360
+ 'PointOfViewTablet' => 'TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10',
361
+ // http://www.overmax.pl/pl/katalog-produktow,p8/tablety,c14/
362
+ // @todo: add more tests.
363
+ 'OvermaxTablet' => 'OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)',
364
+ // http://hclmetablet.com/India/index.php
365
+ 'HCLTablet' => 'HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync',
366
+ // http://www.edigital.hu/Tablet_es_e-book_olvaso/Tablet-c18385.html
367
+ 'DPSTablet' => 'DPS Dream 9|DPS Dual 7',
368
+ // http://www.visture.com/index.asp
369
+ 'VistureTablet' => 'V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10',
370
+ // http://www.mijncresta.nl/tablet
371
+ 'CrestaTablet' => 'CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989',
372
+ // MediaTek - http://www.mediatek.com/_en/01_products/02_proSys.php?cata_sn=1&cata1_sn=1&cata2_sn=309
373
+ 'MediatekTablet' => '\bMT8125|MT8389|MT8135|MT8377\b',
374
+ // Concorde tab
375
+ 'ConcordeTablet' => 'Concorde([ ]+)?Tab|ConCorde ReadMan',
376
+ // GoClever Tablets - http://www.goclever.com/uk/products,c1/tablet,c5/
377
+ 'GoCleverTablet' => 'GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042',
378
+ // Modecom Tablets - http://www.modecom.eu/tablets/portal/
379
+ 'ModecomTablet' => 'FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003',
380
+ // Vonino Tablets - http://www.vonino.eu/tablets
381
+ 'VoninoTablet' => '\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\bQ8\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\b',
382
+ // ECS Tablets - http://www.ecs.com.tw/ECSWebSite/Product/Product_Tablet_List.aspx?CategoryID=14&MenuID=107&childid=M_107&LanID=0
383
+ 'ECSTablet' => 'V07OT2|TM105A|S10OT1|TR10CS1',
384
+ // Storex Tablets - http://storex.fr/espace_client/support.html
385
+ // @note: no need to add all the tablet codes since they are guided by the first regex.
386
+ 'StorexTablet' => 'eZee[_\']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab',
387
+ // Generic Vodafone tablets.
388
+ 'VodafoneTablet' => 'SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497',
389
+ // French tablets - Essentiel B http://www.boulanger.fr/tablette_tactile_e-book/tablette_tactile_essentiel_b/cl_68908.htm?multiChoiceToDelete=brand&mc_brand=essentielb
390
+ // Aka: http://www.essentielb.fr/
391
+ 'EssentielBTablet' => 'Smart[ \']?TAB[ ]+?[0-9]+|Family[ \']?TAB2',
392
+ // Ross & Moor - http://ross-moor.ru/
393
+ 'RossMoorTablet' => 'RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711',
394
+ // i-mobile http://product.i-mobilephone.com/Mobile_Device
395
+ 'iMobileTablet' => 'i-mobile i-note',
396
+ // http://www.tolino.de/de/vergleichen/
397
+ 'TolinoTablet' => 'tolino tab [0-9.]+|tolino shine',
398
+ // AudioSonic - a Kmart brand
399
+ // http://www.kmart.com.au/webapp/wcs/stores/servlet/Search?langId=-1&storeId=10701&catalogId=10001&categoryId=193001&pageSize=72&currentPage=1&searchCategory=193001%2b4294965664&sortBy=p_MaxPrice%7c1
400
+ 'AudioSonicTablet' => '\bC-22Q|T7-QC|T-17B|T-17P\b',
401
+ // AMPE Tablets - http://www.ampe.com.my/product-category/tablets/
402
+ // @todo: add them gradually to avoid conflicts.
403
+ 'AMPETablet' => 'Android.* A78 ',
404
+ // Skk Mobile - http://skkmobile.com.ph/product_tablets.php
405
+ 'SkkTablet' => 'Android.* (SKYPAD|PHOENIX|CYCLOPS)',
406
+ // Tecno Mobile (only tablet) - http://www.tecno-mobile.com/index.php/product?filterby=smart&list_order=all&page=1
407
+ 'TecnoTablet' => 'TECNO P9',
408
+ // JXD (consoles & tablets) - http://jxd.hk/products.asp?selectclassid=009008&clsid=3
409
+ 'JXDTablet' => 'Android.* \b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\b',
410
+ // i-Joy tablets - http://www.i-joy.es/en/cat/products/tablets/
411
+ 'iJoyTablet' => 'Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)',
412
+ // http://www.intracon.eu/tablet
413
+ 'FX2Tablet' => 'FX2 PAD7|FX2 PAD10',
414
+ // http://www.xoro.de/produkte/
415
+ // @note: Might be the same brand with 'Simply tablets'
416
+ 'XoroTablet' => 'KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151',
417
+ // http://www1.viewsonic.com/products/computing/tablets/
418
+ 'ViewsonicTablet' => 'ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a',
419
+ // http://www.odys.de/web/internet-tablet_en.html
420
+ 'OdysTablet' => 'LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\bXELIO\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10',
421
+ // http://www.captiva-power.de/products.html#tablets-en
422
+ 'CaptivaTablet' => 'CAPTIVA PAD',
423
+ // IconBIT - http://www.iconbit.com/products/tablets/
424
+ 'IconbitTablet' => 'NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S',
425
+ // http://www.teclast.com/topic.php?channelID=70&topicID=140&pid=63
426
+ 'TeclastTablet' => 'T98 4G|\bP80\b|\bX90HD\b|X98 Air|X98 Air 3G|\bX89\b|P80 3G|\bX80h\b|P98 Air|\bX89HD\b|P98 3G|\bP90HD\b|P89 3G|X98 3G|\bP70h\b|P79HD 3G|G18d 3G|\bP79HD\b|\bP89s\b|\bA88\b|\bP10HD\b|\bP19HD\b|G18 3G|\bP78HD\b|\bA78\b|\bP75\b|G17s 3G|G17h 3G|\bP85t\b|\bP90\b|\bP11\b|\bP98t\b|\bP98HD\b|\bG18d\b|\bP85s\b|\bP11HD\b|\bP88s\b|\bA80HD\b|\bA80se\b|\bA10h\b|\bP89\b|\bP78s\b|\bG18\b|\bP85\b|\bA70h\b|\bA70\b|\bG17\b|\bP18\b|\bA80s\b|\bA11s\b|\bP88HD\b|\bA80h\b|\bP76s\b|\bP76h\b|\bP98\b|\bA10HD\b|\bP78\b|\bP88\b|\bA11\b|\bA10t\b|\bP76a\b|\bP76t\b|\bP76e\b|\bP85HD\b|\bP85a\b|\bP86\b|\bP75HD\b|\bP76v\b|\bA12\b|\bP75a\b|\bA15\b|\bP76Ti\b|\bP81HD\b|\bA10\b|\bT760VE\b|\bT720HD\b|\bP76\b|\bP73\b|\bP71\b|\bP72\b|\bT720SE\b|\bC520Ti\b|\bT760\b|\bT720VE\b|T720-3GE|T720-WiFi',
427
+ // Onda - http://www.onda-tablet.com/buy-android-onda.html?dir=desc&limit=all&order=price
428
+ 'OndaTablet' => '\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\b[\s]+',
429
+ 'JaytechTablet' => 'TPC-PA762',
430
+ 'BlaupunktTablet' => 'Endeavour 800NG|Endeavour 1010',
431
+ // http://www.digma.ru/support/download/
432
+ // @todo: Ebooks also (if requested)
433
+ 'DigmaTablet' => '\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\b',
434
+ // http://www.evolioshop.com/ro/tablete-pc.html
435
+ // http://www.evolio.ro/support/downloads_static.html?cat=2
436
+ // @todo: Research some more
437
+ 'EvolioTablet' => 'ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\bEvotab\b|\bNeura\b',
438
+ // @todo http://www.lavamobiles.com/tablets-data-cards
439
+ 'LavaTablet' => 'QPAD E704|\bIvoryS\b|E-TAB IVORY|\bE-TAB\b',
440
+ // http://www.breezetablet.com/
441
+ 'AocTablet' => 'MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712',
442
+ // http://www.mpmaneurope.com/en/products/internet-tablets-14/android-tablets-14/
443
+ 'MpmanTablet' => 'MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\bMPG7\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010',
444
+ // https://www.celkonmobiles.com/?_a=categoryphones&sid=2
445
+ 'CelkonTablet' => 'CT695|CT888|CT[\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\bCT-1\b',
446
+ // http://www.wolderelectronics.com/productos/manuales-y-guias-rapidas/categoria-2-miTab
447
+ 'WolderTablet' => 'miTab \b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\b',
448
+ // http://www.mi.com/en
449
+ 'MiTablet' => '\bMI PAD\b|\bHM NOTE 1W\b',
450
+ // http://www.nbru.cn/index.html
451
+ 'NibiruTablet' => 'Nibiru M1|Nibiru Jupiter One',
452
+ // http://navroad.com/products/produkty/tablety/
453
+ 'NexoTablet' => 'NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI',
454
+ // http://leader-online.com/new_site/product-category/tablets/
455
+ // http://www.leader-online.net.au/List/Tablet
456
+ 'LeaderTablet' => 'TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100',
457
+ // http://www.datawind.com/ubislate/
458
+ 'UbislateTablet' => 'UbiSlate[\s]?7C',
459
+ // http://www.pocketbook-int.com/ru/support
460
+ 'PocketBookTablet' => 'Pocketbook',
461
+ // http://www.kocaso.com/product_tablet.html
462
+ 'KocasoTablet' => '\b(TB-1207)\b',
463
+ // http://global.hisense.com/product/asia/tablet/Sero7/201412/t20141215_91832.htm
464
+ 'HisenseTablet' => '\b(F5281|E2371)\b',
465
+ // http://www.tesco.com/direct/hudl/
466
+ 'Hudl' => 'Hudl HT7S3|Hudl 2',
467
+ // http://www.telstra.com.au/home-phone/thub-2/
468
+ 'TelstraTablet' => 'T-Hub2',
469
+ 'GenericTablet' => 'Android.*\b97D\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\bA7EB\b|CatNova8|A1_07|CT704|CT1002|\bM721\b|rk30sdk|\bEVOTAB\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\bM6pro\b|CT1020W|arc 10HD|\bTP750\b'
470
+ );
471
+
472
+ /**
473
+ * List of mobile Operating Systems.
474
+ *
475
+ * @var array
476
+ */
477
+ protected static $operatingSystems = array(
478
+ 'AndroidOS' => 'Android',
479
+ 'BlackBerryOS' => 'blackberry|\bBB10\b|rim tablet os',
480
+ 'PalmOS' => 'PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino',
481
+ 'SymbianOS' => 'Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\bS60\b',
482
+ // @reference: http://en.wikipedia.org/wiki/Windows_Mobile
483
+ 'WindowsMobileOS' => 'Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;',
484
+ // @reference: http://en.wikipedia.org/wiki/Windows_Phone
485
+ // http://wifeng.cn/?r=blog&a=view&id=106
486
+ // http://nicksnettravels.builttoroam.com/post/2011/01/10/Bogus-Windows-Phone-7-User-Agent-String.aspx
487
+ // http://msdn.microsoft.com/library/ms537503.aspx
488
+ // https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
489
+ 'WindowsPhoneOS' => 'Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;',
490
+ 'iOS' => '\biPhone.*Mobile|\biPod|\biPad',
491
+ // http://en.wikipedia.org/wiki/MeeGo
492
+ // @todo: research MeeGo in UAs
493
+ 'MeeGoOS' => 'MeeGo',
494
+ // http://en.wikipedia.org/wiki/Maemo
495
+ // @todo: research Maemo in UAs
496
+ 'MaemoOS' => 'Maemo',
497
+ 'JavaOS' => 'J2ME/|\bMIDP\b|\bCLDC\b', // '|Java/' produces bug #135
498
+ 'webOS' => 'webOS|hpwOS',
499
+ 'badaOS' => '\bBada\b',
500
+ 'BREWOS' => 'BREW',
501
+ );
502
+
503
+ /**
504
+ * List of mobile User Agents.
505
+ *
506
+ * IMPORTANT: This is a list of only mobile browsers.
507
+ * Mobile Detect 2.x supports only mobile browsers,
508
+ * it was never designed to detect all browsers.
509
+ * The change will come in 2017 in the 3.x release for PHP7.
510
+ *
511
+ * @var array
512
+ */
513
+ protected static $browsers = array(
514
+ //'Vivaldi' => 'Vivaldi',
515
+ // @reference: https://developers.google.com/chrome/mobile/docs/user-agent
516
+ 'Chrome' => '\bCrMo\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?',
517
+ 'Dolfin' => '\bDolfin\b',
518
+ 'Opera' => 'Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+|Coast/[0-9.]+',
519
+ 'Skyfire' => 'Skyfire',
520
+ 'Edge' => 'Mobile Safari/[.0-9]* Edge',
521
+ 'IE' => 'IEMobile|MSIEMobile', // |Trident/[.0-9]+
522
+ 'Firefox' => 'fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile|FxiOS',
523
+ 'Bolt' => 'bolt',
524
+ 'TeaShark' => 'teashark',
525
+ 'Blazer' => 'Blazer',
526
+ // @reference: http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW3
527
+ 'Safari' => 'Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari',
528
+ // http://en.wikipedia.org/wiki/Midori_(web_browser)
529
+ //'Midori' => 'midori',
530
+ //'Tizen' => 'Tizen',
531
+ 'UCBrowser' => 'UC.*Browser|UCWEB',
532
+ 'baiduboxapp' => 'baiduboxapp',
533
+ 'baidubrowser' => 'baidubrowser',
534
+ // https://github.com/serbanghita/Mobile-Detect/issues/7
535
+ 'DiigoBrowser' => 'DiigoBrowser',
536
+ // http://www.puffinbrowser.com/index.php
537
+ 'Puffin' => 'Puffin',
538
+ // http://mercury-browser.com/index.html
539
+ 'Mercury' => '\bMercury\b',
540
+ // http://en.wikipedia.org/wiki/Obigo_Browser
541
+ 'ObigoBrowser' => 'Obigo',
542
+ // http://en.wikipedia.org/wiki/NetFront
543
+ 'NetFront' => 'NF-Browser',
544
+ // @reference: http://en.wikipedia.org/wiki/Minimo
545
+ // http://en.wikipedia.org/wiki/Vision_Mobile_Browser
546
+ 'GenericBrowser' => 'NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger',
547
+ // @reference: https://en.wikipedia.org/wiki/Pale_Moon_(web_browser)
548
+ 'PaleMoon' => 'Android.*PaleMoon|Mobile.*PaleMoon',
549
+ );
550
+
551
+ /**
552
+ * Utilities.
553
+ *
554
+ * @var array
555
+ */
556
+ protected static $utilities = array(
557
+ // Experimental. When a mobile device wants to switch to 'Desktop Mode'.
558
+ // http://scottcate.com/technology/windows-phone-8-ie10-desktop-or-mobile/
559
+ // https://github.com/serbanghita/Mobile-Detect/issues/57#issuecomment-15024011
560
+ // https://developers.facebook.com/docs/sharing/best-practices
561
+ 'Bot' => 'Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom',
562
+ 'MobileBot' => 'Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2',
563
+ 'DesktopMode' => 'WPDesktop',
564
+ 'TV' => 'SonyDTV|HbbTV', // experimental
565
+ 'WebKit' => '(webkit)[ /]([\w.]+)',
566
+ // @todo: Include JXD consoles.
567
+ 'Console' => '\b(Nintendo|Nintendo WiiU|Nintendo 3DS|PLAYSTATION|Xbox)\b',
568
+ 'Watch' => 'SM-V700',
569
+ );
570
+
571
+ /**
572
+ * All possible HTTP headers that represent the
573
+ * User-Agent string.
574
+ *
575
+ * @var array
576
+ */
577
+ protected static $uaHttpHeaders = array(
578
+ // The default User-Agent string.
579
+ 'HTTP_USER_AGENT',
580
+ // Header can occur on devices using Opera Mini.
581
+ 'HTTP_X_OPERAMINI_PHONE_UA',
582
+ // Vodafone specific header: http://www.seoprinciple.com/mobile-web-community-still-angry-at-vodafone/24/
583
+ 'HTTP_X_DEVICE_USER_AGENT',
584
+ 'HTTP_X_ORIGINAL_USER_AGENT',
585
+ 'HTTP_X_SKYFIRE_PHONE',
586
+ 'HTTP_X_BOLT_PHONE_UA',
587
+ 'HTTP_DEVICE_STOCK_UA',
588
+ 'HTTP_X_UCBROWSER_DEVICE_UA'
589
+ );
590
+
591
+ /**
592
+ * The individual segments that could exist in a User-Agent string. VER refers to the regular
593
+ * expression defined in the constant self::VER.
594
+ *
595
+ * @var array
596
+ */
597
+ protected static $properties = array(
598
+
599
+ // Build
600
+ 'Mobile' => 'Mobile/[VER]',
601
+ 'Build' => 'Build/[VER]',
602
+ 'Version' => 'Version/[VER]',
603
+ 'VendorID' => 'VendorID/[VER]',
604
+
605
+ // Devices
606
+ 'iPad' => 'iPad.*CPU[a-z ]+[VER]',
607
+ 'iPhone' => 'iPhone.*CPU[a-z ]+[VER]',
608
+ 'iPod' => 'iPod.*CPU[a-z ]+[VER]',
609
+ //'BlackBerry' => array('BlackBerry[VER]', 'BlackBerry [VER];'),
610
+ 'Kindle' => 'Kindle/[VER]',
611
+
612
+ // Browser
613
+ 'Chrome' => array('Chrome/[VER]', 'CriOS/[VER]', 'CrMo/[VER]'),
614
+ 'Coast' => array('Coast/[VER]'),
615
+ 'Dolfin' => 'Dolfin/[VER]',
616
+ // @reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox
617
+ 'Firefox' => array('Firefox/[VER]', 'FxiOS/[VER]'),
618
+ 'Fennec' => 'Fennec/[VER]',
619
+ // http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx
620
+ // https://msdn.microsoft.com/en-us/library/ie/hh869301(v=vs.85).aspx
621
+ 'Edge' => 'Edge/[VER]',
622
+ 'IE' => array('IEMobile/[VER];', 'IEMobile [VER]', 'MSIE [VER];', 'Trident/[0-9.]+;.*rv:[VER]'),
623
+ // http://en.wikipedia.org/wiki/NetFront
624
+ 'NetFront' => 'NetFront/[VER]',
625
+ 'NokiaBrowser' => 'NokiaBrowser/[VER]',
626
+ 'Opera' => array( ' OPR/[VER]', 'Opera Mini/[VER]', 'Version/[VER]' ),
627
+ 'Opera Mini' => 'Opera Mini/[VER]',
628
+ 'Opera Mobi' => 'Version/[VER]',
629
+ 'UC Browser' => 'UC Browser[VER]',
630
+ 'MQQBrowser' => 'MQQBrowser/[VER]',
631
+ 'MicroMessenger' => 'MicroMessenger/[VER]',
632
+ 'baiduboxapp' => 'baiduboxapp/[VER]',
633
+ 'baidubrowser' => 'baidubrowser/[VER]',
634
+ 'SamsungBrowser' => 'SamsungBrowser/[VER]',
635
+ 'Iron' => 'Iron/[VER]',
636
+ // @note: Safari 7534.48.3 is actually Version 5.1.
637
+ // @note: On BlackBerry the Version is overwriten by the OS.
638
+ 'Safari' => array( 'Version/[VER]', 'Safari/[VER]' ),
639
+ 'Skyfire' => 'Skyfire/[VER]',
640
+ 'Tizen' => 'Tizen/[VER]',
641
+ 'Webkit' => 'webkit[ /][VER]',
642
+ 'PaleMoon' => 'PaleMoon/[VER]',
643
+
644
+ // Engine
645
+ 'Gecko' => 'Gecko/[VER]',
646
+ 'Trident' => 'Trident/[VER]',
647
+ 'Presto' => 'Presto/[VER]',
648
+ 'Goanna' => 'Goanna/[VER]',
649
+
650
+ // OS
651
+ 'iOS' => ' \bi?OS\b [VER][ ;]{1}',
652
+ 'Android' => 'Android [VER]',
653
+ 'BlackBerry' => array('BlackBerry[\w]+/[VER]', 'BlackBerry.*Version/[VER]', 'Version/[VER]'),
654
+ 'BREW' => 'BREW [VER]',
655
+ 'Java' => 'Java/[VER]',
656
+ // @reference: http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/08/29/introducing-the-ie9-on-windows-phone-mango-user-agent-string.aspx
657
+ // @reference: http://en.wikipedia.org/wiki/Windows_NT#Releases
658
+ 'Windows Phone OS' => array( 'Windows Phone OS [VER]', 'Windows Phone [VER]'),
659
+ 'Windows Phone' => 'Windows Phone [VER]',
660
+ 'Windows CE' => 'Windows CE/[VER]',
661
+ // http://social.msdn.microsoft.com/Forums/en-US/windowsdeveloperpreviewgeneral/thread/6be392da-4d2f-41b4-8354-8dcee20c85cd
662
+ 'Windows NT' => 'Windows NT [VER]',
663
+ 'Symbian' => array('SymbianOS/[VER]', 'Symbian/[VER]'),
664
+ 'webOS' => array('webOS/[VER]', 'hpwOS/[VER];'),
665
+ );
666
+
667
+ /**
668
+ * Construct an instance of this class.
669
+ *
670
+ * @param array $headers Specify the headers as injection. Should be PHP _SERVER flavored.
671
+ * If left empty, will use the global _SERVER['HTTP_*'] vars instead.
672
+ * @param string $userAgent Inject the User-Agent header. If null, will use HTTP_USER_AGENT
673
+ * from the $headers array instead.
674
+ */
675
+ public function __construct(
676
+ array $headers = null,
677
+ $userAgent = null
678
+ ) {
679
+ $this->setHttpHeaders($headers);
680
+ $this->setUserAgent($userAgent);
681
+ }
682
+
683
+ /**
684
+ * Get the current script version.
685
+ * This is useful for the demo.php file,
686
+ * so people can check on what version they are testing
687
+ * for mobile devices.
688
+ *
689
+ * @return string The version number in semantic version format.
690
+ */
691
+ public static function getScriptVersion()
692
+ {
693
+ return self::VERSION;
694
+ }
695
+
696
+ /**
697
+ * Set the HTTP Headers. Must be PHP-flavored. This method will reset existing headers.
698
+ *
699
+ * @param array $httpHeaders The headers to set. If null, then using PHP's _SERVER to extract
700
+ * the headers. The default null is left for backwards compatibility.
701
+ */
702
+ public function setHttpHeaders($httpHeaders = null)
703
+ {
704
+ // use global _SERVER if $httpHeaders aren't defined
705
+ if (!is_array($httpHeaders) || !count($httpHeaders)) {
706
+ $httpHeaders = $_SERVER;
707
+ }
708
+
709
+ // clear existing headers
710
+ $this->httpHeaders = array();
711
+
712
+ // Only save HTTP headers. In PHP land, that means only _SERVER vars that
713
+ // start with HTTP_.
714
+ foreach ($httpHeaders as $key => $value) {
715
+ if (substr($key, 0, 5) === 'HTTP_') {
716
+ $this->httpHeaders[$key] = $value;
717
+ }
718
+ }
719
+
720
+ // In case we're dealing with CloudFront, we need to know.
721
+ $this->setCfHeaders($httpHeaders);
722
+ }
723
+
724
+ /**
725
+ * Retrieves the HTTP headers.
726
+ *
727
+ * @return array
728
+ */
729
+ public function getHttpHeaders()
730
+ {
731
+ return $this->httpHeaders;
732
+ }
733
+
734
+ /**
735
+ * Retrieves a particular header. If it doesn't exist, no exception/error is caused.
736
+ * Simply null is returned.
737
+ *
738
+ * @param string $header The name of the header to retrieve. Can be HTTP compliant such as
739
+ * "User-Agent" or "X-Device-User-Agent" or can be php-esque with the
740
+ * all-caps, HTTP_ prefixed, underscore seperated awesomeness.
741
+ *
742
+ * @return string|null The value of the header.
743
+ */
744
+ public function getHttpHeader($header)
745
+ {
746
+ // are we using PHP-flavored headers?
747
+ if (strpos($header, '_') === false) {
748
+ $header = str_replace('-', '_', $header);
749
+ $header = strtoupper($header);
750
+ }
751
+
752
+ // test the alternate, too
753
+ $altHeader = 'HTTP_' . $header;
754
+
755
+ //Test both the regular and the HTTP_ prefix
756
+ if (isset($this->httpHeaders[$header])) {
757
+ return $this->httpHeaders[$header];
758
+ } elseif (isset($this->httpHeaders[$altHeader])) {
759
+ return $this->httpHeaders[$altHeader];
760
+ }
761
+
762
+ return null;
763
+ }
764
+
765
+ public function getMobileHeaders()
766
+ {
767
+ return self::$mobileHeaders;
768
+ }
769
+
770
+ /**
771
+ * Get all possible HTTP headers that
772
+ * can contain the User-Agent string.
773
+ *
774
+ * @return array List of HTTP headers.
775
+ */
776
+ public function getUaHttpHeaders()
777
+ {
778
+ return self::$uaHttpHeaders;
779
+ }
780
+
781
+
782
+ /**
783
+ * Set CloudFront headers
784
+ * http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html#header-caching-web-device
785
+ *
786
+ * @param array $cfHeaders List of HTTP headers
787
+ *
788
+ * @return boolean If there were CloudFront headers to be set
789
+ */
790
+ public function setCfHeaders($cfHeaders = null) {
791
+ // use global _SERVER if $cfHeaders aren't defined
792
+ if (!is_array($cfHeaders) || !count($cfHeaders)) {
793
+ $cfHeaders = $_SERVER;
794
+ }
795
+
796
+ // clear existing headers
797
+ $this->cloudfrontHeaders = array();
798
+
799
+ // Only save CLOUDFRONT headers. In PHP land, that means only _SERVER vars that
800
+ // start with cloudfront-.
801
+ $response = false;
802
+ foreach ($cfHeaders as $key => $value) {
803
+ if (substr(strtolower($key), 0, 16) === 'http_cloudfront_') {
804
+ $this->cloudfrontHeaders[strtoupper($key)] = $value;
805
+ $response = true;
806
+ }
807
+ }
808
+
809
+ return $response;
810
+ }
811
+
812
+ /**
813
+ * Retrieves the cloudfront headers.
814
+ *
815
+ * @return array
816
+ */
817
+ public function getCfHeaders()
818
+ {
819
+ return $this->cloudfrontHeaders;
820
+ }
821
+
822
+ /**
823
+ * Set the User-Agent to be used.
824
+ *
825
+ * @param string $userAgent The user agent string to set.
826
+ *
827
+ * @return string|null
828
+ */
829
+ public function setUserAgent($userAgent = null)
830
+ {
831
+ // Invalidate cache due to #375
832
+ $this->cache = array();
833
+
834
+ if (false === empty($userAgent)) {
835
+ return $this->userAgent = $userAgent;
836
+ } else {
837
+ $this->userAgent = null;
838
+ foreach ($this->getUaHttpHeaders() as $altHeader) {
839
+ if (false === empty($this->httpHeaders[$altHeader])) { // @todo: should use getHttpHeader(), but it would be slow. (Serban)
840
+ $this->userAgent .= $this->httpHeaders[$altHeader] . " ";
841
+ }
842
+ }
843
+
844
+ if (!empty($this->userAgent)) {
845
+ return $this->userAgent = trim($this->userAgent);
846
+ }
847
+ }
848
+
849
+ if (count($this->getCfHeaders()) > 0) {
850
+ return $this->userAgent = 'Amazon CloudFront';
851
+ }
852
+ return $this->userAgent = null;
853
+ }
854
+
855
+ /**
856
+ * Retrieve the User-Agent.
857
+ *
858
+ * @return string|null The user agent if it's set.
859
+ */
860
+ public function getUserAgent()
861
+ {
862
+ return $this->userAgent;
863
+ }
864
+
865
+ /**
866
+ * Set the detection type. Must be one of self::DETECTION_TYPE_MOBILE or
867
+ * self::DETECTION_TYPE_EXTENDED. Otherwise, nothing is set.
868
+ *
869
+ * @deprecated since version 2.6.9
870
+ *
871
+ * @param string $type The type. Must be a self::DETECTION_TYPE_* constant. The default
872
+ * parameter is null which will default to self::DETECTION_TYPE_MOBILE.
873
+ */
874
+ public function setDetectionType($type = null)
875
+ {
876
+ if ($type === null) {
877
+ $type = self::DETECTION_TYPE_MOBILE;
878
+ }
879
+
880
+ if ($type !== self::DETECTION_TYPE_MOBILE && $type !== self::DETECTION_TYPE_EXTENDED) {
881
+ return;
882
+ }
883
+
884
+ $this->detectionType = $type;
885
+ }
886
+
887
+ public function getMatchingRegex()
888
+ {
889
+ return $this->matchingRegex;
890
+ }
891
+
892
+ public function getMatchesArray()
893
+ {
894
+ return $this->matchesArray;
895
+ }
896
+
897
+ /**
898
+ * Retrieve the list of known phone devices.
899
+ *
900
+ * @return array List of phone devices.
901
+ */
902
+ public static function getPhoneDevices()
903
+ {
904
+ return self::$phoneDevices;
905
+ }
906
+
907
+ /**
908
+ * Retrieve the list of known tablet devices.
909
+ *
910
+ * @return array List of tablet devices.
911
+ */
912
+ public static function getTabletDevices()
913
+ {
914
+ return self::$tabletDevices;
915
+ }
916
+
917
+ /**
918
+ * Alias for getBrowsers() method.
919
+ *
920
+ * @return array List of user agents.
921
+ */
922
+ public static function getUserAgents()
923
+ {
924
+ return self::getBrowsers();
925
+ }
926
+
927
+ /**
928
+ * Retrieve the list of known browsers. Specifically, the user agents.
929
+ *
930
+ * @return array List of browsers / user agents.
931
+ */
932
+ public static function getBrowsers()
933
+ {
934
+ return self::$browsers;
935
+ }
936
+
937
+ /**
938
+ * Retrieve the list of known utilities.
939
+ *
940
+ * @return array List of utilities.
941
+ */
942
+ public static function getUtilities()
943
+ {
944
+ return self::$utilities;
945
+ }
946
+
947
+ /**
948
+ * Method gets the mobile detection rules. This method is used for the magic methods $detect->is*().
949
+ *
950
+ * @deprecated since version 2.6.9
951
+ *
952
+ * @return array All the rules (but not extended).
953
+ */
954
+ public static function getMobileDetectionRules()
955
+ {
956
+ static $rules;
957
+
958
+ if (!$rules) {
959
+ $rules = array_merge(
960
+ self::$phoneDevices,
961
+ self::$tabletDevices,
962
+ self::$operatingSystems,
963
+ self::$browsers
964
+ );
965
+ }
966
+
967
+ return $rules;
968
+
969
+ }
970
+
971
+ /**
972
+ * Method gets the mobile detection rules + utilities.
973
+ * The reason this is separate is because utilities rules
974
+ * don't necessary imply mobile. This method is used inside
975
+ * the new $detect->is('stuff') method.
976
+ *
977
+ * @deprecated since version 2.6.9
978
+ *
979
+ * @return array All the rules + extended.
980
+ */
981
+ public function getMobileDetectionRulesExtended()
982
+ {
983
+ static $rules;
984
+
985
+ if (!$rules) {
986
+ // Merge all rules together.
987
+ $rules = array_merge(
988
+ self::$phoneDevices,
989
+ self::$tabletDevices,
990
+ self::$operatingSystems,
991
+ self::$browsers,
992
+ self::$utilities
993
+ );
994
+ }
995
+
996
+ return $rules;
997
+ }
998
+
999
+ /**
1000
+ * Retrieve the current set of rules.
1001
+ *
1002
+ * @deprecated since version 2.6.9
1003
+ *
1004
+ * @return array
1005
+ */
1006
+ public function getRules()
1007
+ {
1008
+ if ($this->detectionType == self::DETECTION_TYPE_EXTENDED) {
1009
+ return self::getMobileDetectionRulesExtended();
1010
+ } else {
1011
+ return self::getMobileDetectionRules();
1012
+ }
1013
+ }
1014
+
1015
+ /**
1016
+ * Retrieve the list of mobile operating systems.
1017
+ *
1018
+ * @return array The list of mobile operating systems.
1019
+ */
1020
+ public static function getOperatingSystems()
1021
+ {
1022
+ return self::$operatingSystems;
1023
+ }
1024
+
1025
+ /**
1026
+ * Check the HTTP headers for signs of mobile.
1027
+ * This is the fastest mobile check possible; it's used
1028
+ * inside isMobile() method.
1029
+ *
1030
+ * @return bool
1031
+ */
1032
+ public function checkHttpHeadersForMobile()
1033
+ {
1034
+
1035
+ foreach ($this->getMobileHeaders() as $mobileHeader => $matchType) {
1036
+ if (isset($this->httpHeaders[$mobileHeader])) {
1037
+ if (is_array($matchType['matches'])) {
1038
+ foreach ($matchType['matches'] as $_match) {
1039
+ if (strpos($this->httpHeaders[$mobileHeader], $_match) !== false) {
1040
+ return true;
1041
+ }
1042
+ }
1043
+
1044
+ return false;
1045
+ } else {
1046
+ return true;
1047
+ }
1048
+ }
1049
+ }
1050
+
1051
+ return false;
1052
+
1053
+ }
1054
+
1055
+ /**
1056
+ * Magic overloading method.
1057
+ *
1058
+ * @method boolean is[...]()
1059
+ * @param string $name
1060
+ * @param array $arguments
1061
+ * @return mixed
1062
+ * @throws BadMethodCallException when the method doesn't exist and doesn't start with 'is'
1063
+ */
1064
+ public function __call($name, $arguments)
1065
+ {
1066
+ // make sure the name starts with 'is', otherwise
1067
+ if (substr($name, 0, 2) !== 'is') {
1068
+ throw new BadMethodCallException("No such method exists: $name");
1069
+ }
1070
+
1071
+ $this->setDetectionType(self::DETECTION_TYPE_MOBILE);
1072
+
1073
+ $key = substr($name, 2);
1074
+
1075
+ return $this->matchUAAgainstKey($key);
1076
+ }
1077
+
1078
+ /**
1079
+ * Find a detection rule that matches the current User-agent.
1080
+ *
1081
+ * @param null $userAgent deprecated
1082
+ * @return boolean
1083
+ */
1084
+ protected function matchDetectionRulesAgainstUA($userAgent = null)
1085
+ {
1086
+ // Begin general search.
1087
+ foreach ($this->getRules() as $_regex) {
1088
+ if (empty($_regex)) {
1089
+ continue;
1090
+ }
1091
+
1092
+ if ($this->match($_regex, $userAgent)) {
1093
+ return true;
1094
+ }
1095
+ }
1096
+
1097
+ return false;
1098
+ }
1099
+
1100
+ /**
1101
+ * Search for a certain key in the rules array.
1102
+ * If the key is found then try to match the corresponding
1103
+ * regex against the User-Agent.
1104
+ *
1105
+ * @param string $key
1106
+ *
1107
+ * @return boolean
1108
+ */
1109
+ protected function matchUAAgainstKey($key)
1110
+ {
1111
+ // Make the keys lowercase so we can match: isIphone(), isiPhone(), isiphone(), etc.
1112
+ $key = strtolower($key);
1113
+ if (false === isset($this->cache[$key])) {
1114
+
1115
+ // change the keys to lower case
1116
+ $_rules = array_change_key_case($this->getRules());
1117
+
1118
+ if (false === empty($_rules[$key])) {
1119
+ $this->cache[$key] = $this->match($_rules[$key]);
1120
+ }
1121
+
1122
+ if (false === isset($this->cache[$key])) {
1123
+ $this->cache[$key] = false;
1124
+ }
1125
+ }
1126
+
1127
+ return $this->cache[$key];
1128
+ }
1129
+
1130
+ /**
1131
+ * Check if the device is mobile.
1132
+ * Returns true if any type of mobile device detected, including special ones
1133
+ * @param null $userAgent deprecated
1134
+ * @param null $httpHeaders deprecated
1135
+ * @return bool
1136
+ */
1137
+ public function isMobile($userAgent = null, $httpHeaders = null)
1138
+ {
1139
+
1140
+ if ($httpHeaders) {
1141
+ $this->setHttpHeaders($httpHeaders);
1142
+ }
1143
+
1144
+ if ($userAgent) {
1145
+ $this->setUserAgent($userAgent);
1146
+ }
1147
+
1148
+ // Check specifically for cloudfront headers if the useragent === 'Amazon CloudFront'
1149
+ if ($this->getUserAgent() === 'Amazon CloudFront') {
1150
+ $cfHeaders = $this->getCfHeaders();
1151
+ if(array_key_exists('HTTP_CLOUDFRONT_IS_MOBILE_VIEWER', $cfHeaders) && $cfHeaders['HTTP_CLOUDFRONT_IS_MOBILE_VIEWER'] === 'true') {
1152
+ return true;
1153
+ }
1154
+ }
1155
+
1156
+ $this->setDetectionType(self::DETECTION_TYPE_MOBILE);
1157
+
1158
+ if ($this->checkHttpHeadersForMobile()) {
1159
+ return true;
1160
+ } else {
1161
+ return $this->matchDetectionRulesAgainstUA();
1162
+ }
1163
+
1164
+ }
1165
+
1166
+ /**
1167
+ * Check if the device is a tablet.
1168
+ * Return true if any type of tablet device is detected.
1169
+ *
1170
+ * @param string $userAgent deprecated
1171
+ * @param array $httpHeaders deprecated
1172
+ * @return bool
1173
+ */
1174
+ public function isTablet($userAgent = null, $httpHeaders = null)
1175
+ {
1176
+ // Check specifically for cloudfront headers if the useragent === 'Amazon CloudFront'
1177
+ if ($this->getUserAgent() === 'Amazon CloudFront') {
1178
+ $cfHeaders = $this->getCfHeaders();
1179
+ if(array_key_exists('HTTP_CLOUDFRONT_IS_TABLET_VIEWER', $cfHeaders) && $cfHeaders['HTTP_CLOUDFRONT_IS_TABLET_VIEWER'] === 'true') {
1180
+ return true;
1181
+ }
1182
+ }
1183
+
1184
+ $this->setDetectionType(self::DETECTION_TYPE_MOBILE);
1185
+
1186
+ foreach (self::$tabletDevices as $_regex) {
1187
+ if ($this->match($_regex, $userAgent)) {
1188
+ return true;
1189
+ }
1190
+ }
1191
+
1192
+ return false;
1193
+ }
1194
+
1195
+ /**
1196
+ * This method checks for a certain property in the
1197
+ * userAgent.
1198
+ * @todo: The httpHeaders part is not yet used.
1199
+ *
1200
+ * @param string $key
1201
+ * @param string $userAgent deprecated
1202
+ * @param string $httpHeaders deprecated
1203
+ * @return bool|int|null
1204
+ */
1205
+ public function is($key, $userAgent = null, $httpHeaders = null)
1206
+ {
1207
+ // Set the UA and HTTP headers only if needed (eg. batch mode).
1208
+ if ($httpHeaders) {
1209
+ $this->setHttpHeaders($httpHeaders);
1210
+ }
1211
+
1212
+ if ($userAgent) {
1213
+ $this->setUserAgent($userAgent);
1214
+ }
1215
+
1216
+ $this->setDetectionType(self::DETECTION_TYPE_EXTENDED);
1217
+
1218
+ return $this->matchUAAgainstKey($key);
1219
+ }
1220
+
1221
+ /**
1222
+ * Some detection rules are relative (not standard),
1223
+ * because of the diversity of devices, vendors and
1224
+ * their conventions in representing the User-Agent or
1225
+ * the HTTP headers.
1226
+ *
1227
+ * This method will be used to check custom regexes against
1228
+ * the User-Agent string.
1229
+ *
1230
+ * @param $regex
1231
+ * @param string $userAgent
1232
+ * @return bool
1233
+ *
1234
+ * @todo: search in the HTTP headers too.
1235
+ */
1236
+ public function match($regex, $userAgent = null)
1237
+ {
1238
+ $match = (bool) preg_match(sprintf('#%s#is', $regex), (false === empty($userAgent) ? $userAgent : $this->userAgent), $matches);
1239
+ // If positive match is found, store the results for debug.
1240
+ if ($match) {
1241
+ $this->matchingRegex = $regex;
1242
+ $this->matchesArray = $matches;
1243
+ }
1244
+
1245
+ return $match;
1246
+ }
1247
+
1248
+ /**
1249
+ * Get the properties array.
1250
+ *
1251
+ * @return array
1252
+ */
1253
+ public static function getProperties()
1254
+ {
1255
+ return self::$properties;
1256
+ }
1257
+
1258
+ /**
1259
+ * Prepare the version number.
1260
+ *
1261
+ * @todo Remove the error supression from str_replace() call.
1262
+ *
1263
+ * @param string $ver The string version, like "2.6.21.2152";
1264
+ *
1265
+ * @return float
1266
+ */
1267
+ public function prepareVersionNo($ver)
1268
+ {
1269
+ $ver = str_replace(array('_', ' ', '/'), '.', $ver);
1270
+ $arrVer = explode('.', $ver, 2);
1271
+
1272
+ if (isset($arrVer[1])) {
1273
+ $arrVer[1] = @str_replace('.', '', $arrVer[1]); // @todo: treat strings versions.
1274
+ }
1275
+
1276
+ return (float) implode('.', $arrVer);
1277
+ }
1278
+
1279
+ /**
1280
+ * Check the version of the given property in the User-Agent.
1281
+ * Will return a float number. (eg. 2_0 will return 2.0, 4.3.1 will return 4.31)
1282
+ *
1283
+ * @param string $propertyName The name of the property. See self::getProperties() array
1284
+ * keys for all possible properties.
1285
+ * @param string $type Either self::VERSION_TYPE_STRING to get a string value or
1286
+ * self::VERSION_TYPE_FLOAT indicating a float value. This parameter
1287
+ * is optional and defaults to self::VERSION_TYPE_STRING. Passing an
1288
+ * invalid parameter will default to the this type as well.
1289
+ *
1290
+ * @return string|float The version of the property we are trying to extract.
1291
+ */
1292
+ public function version($propertyName, $type = self::VERSION_TYPE_STRING)
1293
+ {
1294
+ if (empty($propertyName)) {
1295
+ return false;
1296
+ }
1297
+
1298
+ // set the $type to the default if we don't recognize the type
1299
+ if ($type !== self::VERSION_TYPE_STRING && $type !== self::VERSION_TYPE_FLOAT) {
1300
+ $type = self::VERSION_TYPE_STRING;
1301
+ }
1302
+
1303
+ $properties = self::getProperties();
1304
+
1305
+ // Check if the property exists in the properties array.
1306
+ if (true === isset($properties[$propertyName])) {
1307
+
1308
+ // Prepare the pattern to be matched.
1309
+ // Make sure we always deal with an array (string is converted).
1310
+ $properties[$propertyName] = (array) $properties[$propertyName];
1311
+
1312
+ foreach ($properties[$propertyName] as $propertyMatchString) {
1313
+
1314
+ $propertyPattern = str_replace('[VER]', self::VER, $propertyMatchString);
1315
+
1316
+ // Identify and extract the version.
1317
+ preg_match(sprintf('#%s#is', $propertyPattern), $this->userAgent, $match);
1318
+
1319
+ if (false === empty($match[1])) {
1320
+ $version = ($type == self::VERSION_TYPE_FLOAT ? $this->prepareVersionNo($match[1]) : $match[1]);
1321
+
1322
+ return $version;
1323
+ }
1324
+
1325
+ }
1326
+
1327
+ }
1328
+
1329
+ return false;
1330
+ }
1331
+
1332
+ /**
1333
+ * Retrieve the mobile grading, using self::MOBILE_GRADE_* constants.
1334
+ *
1335
+ * @return string One of the self::MOBILE_GRADE_* constants.
1336
+ */
1337
+ public function mobileGrade()
1338
+ {
1339
+ $isMobile = $this->isMobile();
1340
+
1341
+ if (
1342
+ // Apple iOS 4-7.0 – Tested on the original iPad (4.3 / 5.0), iPad 2 (4.3 / 5.1 / 6.1), iPad 3 (5.1 / 6.0), iPad Mini (6.1), iPad Retina (7.0), iPhone 3GS (4.3), iPhone 4 (4.3 / 5.1), iPhone 4S (5.1 / 6.0), iPhone 5 (6.0), and iPhone 5S (7.0)
1343
+ $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT) >= 4.3 ||
1344
+ $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) >= 4.3 ||
1345
+ $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) >= 4.3 ||
1346
+
1347
+ // Android 2.1-2.3 - Tested on the HTC Incredible (2.2), original Droid (2.2), HTC Aria (2.1), Google Nexus S (2.3). Functional on 1.5 & 1.6 but performance may be sluggish, tested on Google G1 (1.5)
1348
+ // Android 3.1 (Honeycomb) - Tested on the Samsung Galaxy Tab 10.1 and Motorola XOOM
1349
+ // Android 4.0 (ICS) - Tested on a Galaxy Nexus. Note: transition performance can be poor on upgraded devices
1350
+ // Android 4.1 (Jelly Bean) - Tested on a Galaxy Nexus and Galaxy 7
1351
+ ( $this->version('Android', self::VERSION_TYPE_FLOAT)>2.1 && $this->is('Webkit') ) ||
1352
+
1353
+ // Windows Phone 7.5-8 - Tested on the HTC Surround (7.5), HTC Trophy (7.5), LG-E900 (7.5), Nokia 800 (7.8), HTC Mazaa (7.8), Nokia Lumia 520 (8), Nokia Lumia 920 (8), HTC 8x (8)
1354
+ $this->version('Windows Phone OS', self::VERSION_TYPE_FLOAT) >= 7.5 ||
1355
+
1356
+ // Tested on the Torch 9800 (6) and Style 9670 (6), BlackBerry® Torch 9810 (7), BlackBerry Z10 (10)
1357
+ $this->is('BlackBerry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 6.0 ||
1358
+ // Blackberry Playbook (1.0-2.0) - Tested on PlayBook
1359
+ $this->match('Playbook.*Tablet') ||
1360
+
1361
+ // Palm WebOS (1.4-3.0) - Tested on the Palm Pixi (1.4), Pre (1.4), Pre 2 (2.0), HP TouchPad (3.0)
1362
+ ( $this->version('webOS', self::VERSION_TYPE_FLOAT) >= 1.4 && $this->match('Palm|Pre|Pixi') ) ||
1363
+ // Palm WebOS 3.0 - Tested on HP TouchPad
1364
+ $this->match('hp.*TouchPad') ||
1365
+
1366
+ // Firefox Mobile 18 - Tested on Android 2.3 and 4.1 devices
1367
+ ( $this->is('Firefox') && $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 18 ) ||
1368
+
1369
+ // Chrome for Android - Tested on Android 4.0, 4.1 device
1370
+ ( $this->is('Chrome') && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 4.0 ) ||
1371
+
1372
+ // Skyfire 4.1 - Tested on Android 2.3 device
1373
+ ( $this->is('Skyfire') && $this->version('Skyfire', self::VERSION_TYPE_FLOAT) >= 4.1 && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 ) ||
1374
+
1375
+ // Opera Mobile 11.5-12: Tested on Android 2.3
1376
+ ( $this->is('Opera') && $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11.5 && $this->is('AndroidOS') ) ||
1377
+
1378
+ // Meego 1.2 - Tested on Nokia 950 and N9
1379
+ $this->is('MeeGoOS') ||
1380
+
1381
+ // Tizen (pre-release) - Tested on early hardware
1382
+ $this->is('Tizen') ||
1383
+
1384
+ // Samsung Bada 2.0 - Tested on a Samsung Wave 3, Dolphin browser
1385
+ // @todo: more tests here!
1386
+ $this->is('Dolfin') && $this->version('Bada', self::VERSION_TYPE_FLOAT) >= 2.0 ||
1387
+
1388
+ // UC Browser - Tested on Android 2.3 device
1389
+ ( ($this->is('UC Browser') || $this->is('Dolfin')) && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 ) ||
1390
+
1391
+ // Kindle 3 and Fire - Tested on the built-in WebKit browser for each
1392
+ ( $this->match('Kindle Fire') ||
1393
+ $this->is('Kindle') && $this->version('Kindle', self::VERSION_TYPE_FLOAT) >= 3.0 ) ||
1394
+
1395
+ // Nook Color 1.4.1 - Tested on original Nook Color, not Nook Tablet
1396
+ $this->is('AndroidOS') && $this->is('NookTablet') ||
1397
+
1398
+ // Chrome Desktop 16-24 - Tested on OS X 10.7 and Windows 7
1399
+ $this->version('Chrome', self::VERSION_TYPE_FLOAT) >= 16 && !$isMobile ||
1400
+
1401
+ // Safari Desktop 5-6 - Tested on OS X 10.7 and Windows 7
1402
+ $this->version('Safari', self::VERSION_TYPE_FLOAT) >= 5.0 && !$isMobile ||
1403
+
1404
+ // Firefox Desktop 10-18 - Tested on OS X 10.7 and Windows 7
1405
+ $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 10.0 && !$isMobile ||
1406
+
1407
+ // Internet Explorer 7-9 - Tested on Windows XP, Vista and 7
1408
+ $this->version('IE', self::VERSION_TYPE_FLOAT) >= 7.0 && !$isMobile ||
1409
+
1410
+ // Opera Desktop 10-12 - Tested on OS X 10.7 and Windows 7
1411
+ $this->version('Opera', self::VERSION_TYPE_FLOAT) >= 10 && !$isMobile
1412
+ ){
1413
+ return self::MOBILE_GRADE_A;
1414
+ }
1415
+
1416
+ if (
1417
+ $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT)<4.3 ||
1418
+ $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT)<4.3 ||
1419
+ $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT)<4.3 ||
1420
+
1421
+ // Blackberry 5.0: Tested on the Storm 2 9550, Bold 9770
1422
+ $this->is('Blackberry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 5 && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT)<6 ||
1423
+
1424
+ //Opera Mini (5.0-6.5) - Tested on iOS 3.2/4.3 and Android 2.3
1425
+ ($this->version('Opera Mini', self::VERSION_TYPE_FLOAT) >= 5.0 && $this->version('Opera Mini', self::VERSION_TYPE_FLOAT) <= 7.0 &&
1426
+ ($this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 || $this->is('iOS')) ) ||
1427
+
1428
+ // Nokia Symbian^3 - Tested on Nokia N8 (Symbian^3), C7 (Symbian^3), also works on N97 (Symbian^1)
1429
+ $this->match('NokiaN8|NokiaC7|N97.*Series60|Symbian/3') ||
1430
+
1431
+ // @todo: report this (tested on Nokia N71)
1432
+ $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11 && $this->is('SymbianOS')
1433
+ ){
1434
+ return self::MOBILE_GRADE_B;
1435
+ }
1436
+
1437
+ if (
1438
+ // Blackberry 4.x - Tested on the Curve 8330
1439
+ $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) <= 5.0 ||
1440
+ // Windows Mobile - Tested on the HTC Leo (WinMo 5.2)
1441
+ $this->match('MSIEMobile|Windows CE.*Mobile') || $this->version('Windows Mobile', self::VERSION_TYPE_FLOAT) <= 5.2 ||
1442
+
1443
+ // Tested on original iPhone (3.1), iPhone 3 (3.2)
1444
+ $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT) <= 3.2 ||
1445
+ $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) <= 3.2 ||
1446
+ $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) <= 3.2 ||
1447
+
1448
+ // Internet Explorer 7 and older - Tested on Windows XP
1449
+ $this->version('IE', self::VERSION_TYPE_FLOAT) <= 7.0 && !$isMobile
1450
+ ){
1451
+ return self::MOBILE_GRADE_C;
1452
+ }
1453
+
1454
+ // All older smartphone platforms and featurephones - Any device that doesn't support media queries
1455
+ // will receive the basic, C grade experience.
1456
+ return self::MOBILE_GRADE_C;
1457
+ }
1458
+ }
trunk/gallery.php ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <style type="text/css">
2
+ .ig-gallery-wrap .theme-browser .theme{
3
+ border-radius: 5px;
4
+ border: none;
5
+ margin-bottom: 5%;
6
+ box-shadow: 1px 3px 10px 0 rgba(0,0,0,0.15);
7
+ }
8
+ .ig-gallery-wrap .theme-browser .theme:hover{
9
+ box-shadow: 1px 3px 10px 0 rgba(0,0,0,0.2);
10
+ }
11
+ .ig-gallery-wrap.wrap > h2:first-child{
12
+ padding-left: 0 !important;
13
+ }
14
+ .ig-gallery-wrap .theme-browser .theme .theme-screenshot{
15
+ border-radius: 5px;
16
+ }
17
+ .ig-gallery-wrap .theme-browser .theme .theme-screenshot img{
18
+ height: 100%;
19
+ }
20
+ .ig-gallery-wrap .theme-browser .theme .theme-installed{
21
+ width: 2em;
22
+ padding: 0;
23
+ height: 2em;
24
+ }
25
+ .ig-gallery-wrap .theme-browser .theme .theme-installed:before{
26
+ font-size: 30px;
27
+ top:-2px;
28
+ left:-4px;
29
+ }
30
+ .expanded .wp-full-overlay-footer.ig-get-pro-footer{
31
+ position: fixed;
32
+ bottom: 60px;
33
+ left: 0;
34
+ height: 24px;
35
+ background: #ece788;
36
+ text-align: center;
37
+ padding-top: 0.2em;
38
+ border-top: 1px dashed #ddd;
39
+ border-bottom: 1px dashed #ddd;
40
+ }
41
+ .expanded .wp-full-overlay-footer.ig-get-pro-footer span{
42
+ color: #900101;
43
+ }
44
+ </style>
45
+ <div class="wrap ig-gallery-wrap">
46
+ <h2><?php esc_html_e( 'Icegram design templates' ); ?></h2>
47
+ <div class="ig-gal-description"><?php _e('Here\'s a collection of some ','icegram') ?><strong><?php _e('beautiful, powerful ready-to-use Icegram Campaigns.','icegram') ?></strong></div>
48
+ <div><?php _e('No coding or special skills required. Simply click to ' ,'icegram')?><strong><?php _e(' Use This ','icegram')?></strong><?php _e('and the campaign will automatically appear in your Icegram dashboard.','icegram')?></div>
49
+ <br/>
50
+ <div class="wp-filter hide-if-no-js">
51
+ <div class="filter-count">
52
+ <span class="count theme-count"></span>
53
+ </div>
54
+
55
+ <ul class="filter-links">
56
+ <li><a href="#" data-sort="all"><?php _ex( 'All', 'themes' ); ?></a></li>
57
+ <li><a href="#" data-sort="17"><?php _ex( 'Optin', 'themes' ); ?></a></li>
58
+ <li><a href="#" data-sort="19"><?php _ex( 'Offer', 'themes' ); ?></a></li>
59
+ <li><a href="#" data-sort="20"><?php _ex( 'Social', 'themes' ); ?></a></li>
60
+ </ul>
61
+
62
+ <!-- <button type="button" class="button drawer-toggle" aria-expanded="false"><?php _e( 'Feature Filter' ); ?></button> -->
63
+
64
+ <form class="search-form"></form>
65
+
66
+
67
+ </div>
68
+
69
+ <div class="theme-browser">
70
+ <div class="themes wp-clearfix"></div>
71
+ </div>
72
+ <div class="theme-install-overlay wp-full-overlay expanded"></div>
73
+ <!-- <div class="theme-overlay"></div> -->
74
+ </div><!-- .wrap -->
75
+ <script id="tmpl-theme" type="text/template">
76
+ <# if ( data.image ) { #>
77
+ <div class="theme-screenshot">
78
+ <img src="{{ data.image.guid }}" alt="" />
79
+ </div>
80
+ <# } else { #>
81
+ <div class="theme-screenshot blank"></div>
82
+ <# } #>
83
+ <span class="more-details" id="{{ data.id }}-action"><?php _e( 'Preview' ); ?></span>
84
+ <div class="theme-author"><?php printf( __( 'By %s' ), '{{{ data.id }}}' ); ?></div>
85
+ </script>
86
+ <!-- TODO:: Remove it if not required -->
87
+
88
+ <script id="tmpl-theme-preview" type="text/template">
89
+ <div class="wp-full-overlay-sidebar">
90
+ <div class="wp-full-overlay-header">
91
+ <a href="#" class="close-full-overlay"><span class="screen-reader-text"><?php _e( 'Close' ); ?></span></a>
92
+ <a href="#" class="previous-theme"><span class="screen-reader-text"><?php _ex( 'Previous', 'Button label for a theme' ); ?></span></a>
93
+ <a href="#" class="next-theme"><span class="screen-reader-text"><?php _ex( 'Next', 'Button label for a theme' ); ?></span></a>
94
+ <a href="?action=fetch_messages&campaign_id={{data.campaign_id}}&gallery_item={{data.slug}}" class="button button-primary theme-install" style="display:none"><?php _e( 'Use This', 'icegram' ); ?></a>
95
+ <a href="https://www.icegram.com/pricing/" target="_blank" class="button button-primary ig-get-pro " style="display:none">
96
+ <# if(data.plan === '3') { #>
97
+ <span><?php _e("Get The Max Plan", 'icegram') ?></span>
98
+ <# } else if(data.plan === '2') { #>
99
+ <span><?php _e("Get The Pro Plan", 'icegram') ?></span>
100
+ <# } #>
101
+ </a>
102
+ </div>
103
+ <div class="wp-full-overlay-sidebar-content">
104
+ <div class="install-theme-info">
105
+ <h3 class="theme-name">{{ data.title.rendered }}</h3>
106
+ <span class="theme-by"><?php printf( __( 'By %s' ), 'Icegram' ); ?></span>
107
+
108
+ <img class="theme-screenshot" src="{{ data.image.guid }}" alt="" />
109
+
110
+ <div class="theme-details">
111
+ <!--
112
+ <# if ( data.rating && data.rating > 0 ) { #>
113
+ <div class="theme-rating">
114
+ {{{ data.stars }}}
115
+ <span class="num-ratings">Rating : {{ data.rating }}</span>
116
+ </div>
117
+ <# } else { #>
118
+ <span class="no-rating"><?php _e( 'This theme has not been rated yet.' ); ?></span>
119
+ <# } #>
120
+ <div class="theme-version"><?php printf( __( 'Version: %s' ), '{{ data.version }}' ); ?></div> -->
121
+ <div class="theme-description">{{{ data.description }}}</div>
122
+ <!-- <div class="theme-info">Liked this template? <br/>Here's how you can customize it further </div> -->
123
+ <div class="theme-info" style="padding:0.2em"><?php _e( 'Want to personalize this template to fit your brand?', 'icegram' );?><br/> <a href="https://www.icegram.com/documentation/customize-icegrams-gallery-templates/?utm_source=ig_gallery&utm_medium=ig_inapp_promo&utm_campaign=ig_custom_css" target="_blank" class="" style="margin-top:0.4em"><?php _e( 'Personalize It Now' , 'icegram'); ?></a></div>
124
+ </div>
125
+ </div>
126
+ </div>
127
+ <div class="wp-full-overlay-footer ig-get-pro ig-get-pro-footer " style="display:none">
128
+ <# if(data.plan === '3') { #>
129
+ <span><?php _e("This template is available in the 'Max Plan'", 'icegram') ?></span>
130
+ <# } else if(data.plan === '2') { #>
131
+ <span><?php _e("This template is available in the 'Pro Plan'", 'icegram') ?></span>
132
+ <# } #>
133
+ </div>
134
+ <div class="wp-full-overlay-footer">
135
+ <button type="button" class="collapse-sidebar button-secondary" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>">
136
+ <span class="collapse-sidebar-arrow"></span>
137
+ <span class="collapse-sidebar-label"><?php _e( 'Collapse' ); ?></span>
138
+ </button>
139
+ </div>
140
+ </div>
141
+ <div class="wp-full-overlay-main">
142
+ <iframe src="{{ data.link }}?utm_source=ig_inapp&utm_campaign=ig_gallery&utm_medium={{data.campaign_id}}" title="<?php esc_attr_e( 'Preview' ); ?>" />
143
+ </div>
144
+ </script>
trunk/icegram.php ADDED
@@ -0,0 +1,1677 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Plugin Name: Icegram - Popups, Optins, CTAs & lot more...
4
+ * Plugin URI: https://www.icegram.com/
5
+ * Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
6
+ * Version: 1.10.15
7
+ * Author: icegram
8
+ * Author URI: https://www.icegram.com/
9
+ * Copyright (c) 2014-16 Icegram
10
+ * License: GPLv3
11
+ * License URI: http://www.gnu.org/licenses/gpl-3.0.html
12
+ *
13
+ * Text Domain: icegram
14
+ * Domain Path: /lang/
15
+ */
16
+
17
+ /**
18
+ * Main class Icegram
19
+ */
20
+ class Icegram {
21
+
22
+ var $plugin_url;
23
+ var $plugin_path;
24
+ var $version;
25
+ var $_wpautop_tags;
26
+ var $message_types;
27
+ var $message_type_objs;
28
+ var $shortcode_instances;
29
+ var $available_headlines;
30
+ var $mode;
31
+ var $cache_compatibility;
32
+
33
+ public static $current_page_id;
34
+
35
+ function __construct() {
36
+
37
+ $this->version = "1.10.15";
38
+ $this->shortcode_instances = array();
39
+ $this->mode = 'local';
40
+ $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
41
+ $this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );
42
+ $this->include_classes();
43
+ $this->cache_compatibility = get_option('icegram_cache_compatibility', 'no');
44
+
45
+ if( is_admin() && current_user_can( 'edit_posts' ) ) {
46
+ $ig_campaign_admin = Icegram_Campaign_Admin::getInstance();
47
+ $ig_message_admin = Icegram_Message_Admin::getInstance();
48
+ add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_admin_styles_and_scripts' ) );
49
+ add_action( 'admin_print_styles', array( &$this, 'remove_preview_button' ) );
50
+ add_filter( 'post_row_actions', array( &$this , 'remove_row_actions' ), 10, 2 );
51
+
52
+ add_action( 'admin_menu', array( &$this, 'admin_menus') );
53
+ add_action( 'admin_init', array( &$this, 'welcome' ) );
54
+ add_action( 'admin_init', array( &$this, 'dismiss_admin_notice' ) );
55
+
56
+ add_action( 'admin_init', array( &$this, 'import_gallery_item' ) );
57
+
58
+ add_action( 'icegram_settings_after', array( &$this, 'klawoo_subscribe_form' ) );
59
+ add_action( 'icegram_about_changelog', array( &$this, 'klawoo_subscribe_form' ) );
60
+ add_action( 'icegram_settings_after', array( &$this, 'icegram_houskeeping' ) );
61
+ add_action( 'admin_notices', array( &$this,'add_admin_notices'));
62
+ add_filter( 'plugin_action_links', array($this, 'ig_plugin_settings_link'), 10, 2);
63
+ } else {
64
+ add_action( 'wp_footer', array( &$this, 'icegram_load_data' ));
65
+ }
66
+ if($this->cache_compatibility === 'no'){
67
+ add_action( 'wp_footer', array( &$this, 'display_messages' ) );
68
+ }
69
+ add_shortcode( 'icegram', array( &$this, 'execute_shortcode' ) );
70
+ add_shortcode( 'ig_form', array( &$this, 'execute_form_shortcode' ) );
71
+ // WPML compatibility
72
+ add_filter( 'icegram_identify_current_page', array( &$this, 'wpml_get_parent_id' ), 10 );
73
+
74
+ add_filter( 'icegram_branding_data', array( &$this , 'branding_data_remove' ), 10 );
75
+ add_action( 'wp_enqueue_scripts', array( &$this, 'identify_current_page' ) );
76
+ add_filter( 'icegram_get_valid_campaigns_sql', array( &$this , 'append_to_valid_campaigns_sql' ), 10, 2 );
77
+ add_action( 'icegram_print_js_css_data', array( &$this, 'print_js_css_data' ), 10, 1);
78
+ // common
79
+ add_action( 'init', array( &$this, 'register_campaign_post_type' ) );
80
+ add_action( 'init', array( &$this, 'register_message_post_type' ) );
81
+
82
+ add_action( 'icegram_loaded', array( &$this, 'load_compat_classes') );
83
+
84
+ // execute shortcode in sidebar
85
+ add_filter( 'widget_text', array(&$this, 'ig_widget_text_filter') );
86
+
87
+ add_filter( 'rainmaker_validate_request', array(&$this,'form_submission_validate_request'), 10, 2);
88
+ add_filter( 'icegram_data', array( $this, 'two_step_mobile_popup' ), 100, 1);
89
+
90
+ add_action ( 'wp_ajax_ig_submit_survey', array(&$this,'ig_submit_survey' ));
91
+
92
+ if ( defined( 'DOING_AJAX' ) ) {
93
+ if($this->cache_compatibility === 'yes'){
94
+ add_action( 'wp_ajax_display_messages', array( &$this, 'display_messages' ) );
95
+ add_action( 'wp_ajax_nopriv_display_messages', array( &$this, 'display_messages' ) );
96
+ }
97
+ add_action( 'wp_ajax_icegram_event_track', array( &$this, 'icegram_event_track' ) );
98
+ add_action( 'wp_ajax_nopriv_icegram_event_track', array( &$this, 'icegram_event_track' ) );
99
+ add_action( 'wp_ajax_klawoo_subscribe', array( &$this, 'klawoo_subscribe' ) );
100
+ add_action( 'wp_ajax_icegram_run_housekeeping', array( &$this, 'run_housekeeping' ) );
101
+
102
+ }
103
+
104
+ }
105
+ function ig_plugin_settings_link($links, $file){
106
+ if ($file == plugin_basename(__FILE__)){
107
+ $settings_link = '<a href="edit.php?post_type=ig_campaign&page=icegram-settings">'.__('Settings', 'icegram').'</a>';
108
+ $support_link = '<a href="edit.php?post_type=ig_campaign&page=icegram-support">'.__('Support', 'icegram').'</a>';
109
+ array_unshift($links, $support_link);
110
+ array_unshift($links, $settings_link);
111
+ }
112
+ return $links;
113
+
114
+ }
115
+
116
+ public function load_compat_classes() {
117
+
118
+ $compat_classes = (array) glob( $this->plugin_path . '/classes/compat/class-icegram-compat-*.php' );
119
+ if (empty($compat_classes)) {
120
+ return;
121
+ }
122
+
123
+ $active_plugins = (array) get_option('active_plugins', array());
124
+ if (is_multisite()) {
125
+ $active_plugins = array_merge($active_plugins, get_site_option('active_sitewide_plugins', array()));
126
+ }
127
+ $active_plugins = array_unique( array_merge( array_values($active_plugins), array_keys($active_plugins)) );
128
+ $active_plugins_with_slugs = array();
129
+ foreach ($active_plugins as $key => $value) {
130
+ $slug = dirname( $value );
131
+ if ($slug == '.') {
132
+ unset($active_plugins[$key]);
133
+ } else {
134
+ $active_plugins[ $key ] = $slug;
135
+ }
136
+ }
137
+
138
+ foreach ($compat_classes as $file) {
139
+ if (is_file ( $file )) {
140
+ $slug = str_replace('class-icegram-compat-', '', str_replace(".php", "", basename( $file )) );
141
+ if ( in_array($slug, $active_plugins)) {
142
+ include_once( $file );
143
+ $class_name = 'Icegram_Compat_'. str_replace('-', '_', $slug);
144
+ if ( class_exists( $class_name ) ) {
145
+ new $class_name();
146
+ }
147
+ }
148
+ }
149
+ }
150
+ }
151
+ public function add_admin_notices(){
152
+ $screen = get_current_screen();
153
+ if ( !in_array( $screen->id, array( 'ig_campaign', 'ig_message','edit-ig_message','edit-ig_campaign' ), true ) ) return;
154
+ $timezone_format = _x('Y-m-d', 'timezone date format');
155
+ $ig_current_date = strtotime(date_i18n($timezone_format));
156
+ $ig_offer_start = strtotime("2017-12-18");
157
+ $ig_offer_end = strtotime("2017-12-26");
158
+ if(($ig_current_date >= $ig_offer_start) && ($ig_current_date <= $ig_offer_end)) {
159
+ include_once('ig-offer.php');
160
+ }
161
+ }
162
+ public function dismiss_admin_notice(){
163
+ if(isset($_GET['ig_dismiss_admin_notice']) && $_GET['ig_dismiss_admin_notice'] == '1' && isset($_GET['ig_option_name'])){
164
+ $option_name = sanitize_text_field($_GET['ig_option_name']);
165
+ update_option($option_name.'_icegram', true);
166
+ header("Location: https://www.icegram.com/?utm_source=in_app&utm_medium=ig_banner&utm_campaign=christmas2017_30");
167
+ exit();
168
+ }
169
+ }
170
+
171
+ public function klawoo_subscribe_form() {
172
+ ?>
173
+ <div class="wrap">
174
+ <?php
175
+ if ( stripos(get_current_screen()->base, 'settings') !== false ) {
176
+ echo "<h2>".__( 'Free Add-ons, Proven Marketing Tricks and Updates', 'icegram' )."</h2>";
177
+ }
178
+ ?>
179
+ <table class="form-table">
180
+ <tr>
181
+ <th scope="row"><?php _e( 'Get add-ons and tips...', 'icegram' ) ?></th>
182
+ <td>
183
+ <form name="klawoo_subscribe" action="#" method="POST" accept-charset="utf-8">
184
+ <input class="ltr" type="text" name="name" id="name" placeholder="Name"/>
185
+ <input class="regular-text ltr" type="text" name="email" id="email" placeholder="Email"/>
186
+ <input type="hidden" name="list" value="7I763v6Ldrs3YhJeee5EOgFA"/>
187
+ <input type="submit" name="submit" id="submit" class="button button-primary" value="Subscribe">
188
+ <br/>
189
+ <div id="klawoo_response"></div>
190
+ </form>
191
+ </td>
192
+ </tr>
193
+ </table>
194
+ </div>
195
+ <script type="text/javascript">
196
+ jQuery(function () {
197
+ jQuery("form[name=klawoo_subscribe]").submit(function (e) {
198
+ e.preventDefault();
199
+
200
+ jQuery('#klawoo_response').html('');
201
+ params = jQuery("form[name=klawoo_subscribe]").serializeArray();
202
+ params.push( {name: 'action', value: 'klawoo_subscribe' });
203
+
204
+ jQuery.ajax({
205
+ method: 'POST',
206
+ type: 'text',
207
+ url: "<?php echo admin_url( 'admin-ajax.php' ); ?>",
208
+ data: params,
209
+ success: function(response) {
210
+ if (response != '') {
211
+ jQuery('#klawoo_response').html(response);
212
+ } else {
213
+ jQuery('#klawoo_response').html('error!');
214
+ }
215
+ }
216
+ });
217
+ });
218
+ });
219
+ </script>
220
+ <?php
221
+ }
222
+
223
+
224
+ public function klawoo_subscribe() {
225
+ $url = 'http://app.klawoo.com/subscribe';
226
+
227
+ if( !empty( $_POST ) ) {
228
+ $params = $_POST;
229
+ } else {
230
+ exit();
231
+ }
232
+ $method = 'POST';
233
+ $qs = http_build_query( $params );
234
+
235
+ $options = array(
236
+ 'timeout' => 15,
237
+ 'method' => $method
238
+ );
239
+
240
+ if ( $method == 'POST' ) {
241
+ $options['body'] = $qs;
242
+ } else {
243
+ if ( strpos( $url, '?' ) !== false ) {
244
+ $url .= '&'.$qs;
245
+ } else {
246
+ $url .= '?'.$qs;
247
+ }
248
+ }
249
+
250
+ $response = wp_remote_request( $url, $options );
251
+ if ( wp_remote_retrieve_response_code( $response ) == 200 ) {
252
+ $data = $response['body'];
253
+ if ( $data != 'error' ) {
254
+
255
+ $message_start = substr( $data, strpos( $data,'<body>' ) + 6 );
256
+ $remove = substr( $message_start, strpos( $message_start,'</body>' ) );
257
+ $message = trim( str_replace( $remove, '', $message_start ) );
258
+ echo ( $message );
259
+ exit();
260
+ }
261
+ }
262
+ exit();
263
+ }
264
+
265
+ public function icegram_houskeeping(){
266
+ ?>
267
+ <div class="wrap">
268
+ <?php
269
+ if ( stripos(get_current_screen()->base, 'settings') !== false ) {
270
+ ?>
271
+ <form name="icegram_housekeeping" action="#" method="POST" accept-charset="utf-8">
272
+ <h2><?php _e( 'Housekeeping', 'icegram' ) ?></h2>
273
+ <p class="ig_housekeeping">
274
+ <label for="icegram_remove_shortcodes">
275
+ <input type="checkbox" name="icegram_remove_shortcodes" value="yes" />
276
+ <?php _e( 'Remove all Icegram shortcodes', 'icegram' ); ?>
277
+ </label>
278
+ <br/><br/>
279
+ <label for="icegram_remove_all_data">
280
+ <input type="checkbox" name="icegram_remove_all_data" value="yes" />
281
+ <?php _e( 'Remove all Icegram campaigns and messages', 'icegram' ); ?>
282
+ </label>
283
+ <br/><br/>
284
+ <img alt="" src="<?php echo admin_url( 'images/wpspin_light.gif' ) ?>" class="ig_loader" style="vertical-align:middle;display:none" />
285
+ <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e( 'Clean Up', 'icegram' ); ?>">
286
+ <div id="icegram_housekeeping_response"></div>
287
+ </p>
288
+ </form>
289
+
290
+ </div>
291
+ <script type="text/javascript">
292
+ jQuery(function () {
293
+ jQuery("form[name=icegram_housekeeping]").submit(function (e) {
294
+ if(confirm("<?php _e( 'You won\'t be able to recover this data once you proceed. Do you really want to perform this action?', 'icegram' ); ?>") == true){
295
+ e.preventDefault();
296
+ jQuery('.ig_loader').show();
297
+ jQuery('#icegram_housekeeping_response').text("");
298
+ params = jQuery("form[name=icegram_housekeeping]").serializeArray();
299
+ params.push( {name: 'action', value: 'icegram_run_housekeeping' });
300
+ params.push( {name: 'security', value: '<?php echo wp_create_nonce('ig_run_housekeeping'); ?> '});
301
+
302
+ jQuery.ajax({
303
+ method: 'POST',
304
+ type: 'text',
305
+ url: "<?php echo admin_url( 'admin-ajax.php' ); ?>",
306
+ data: params,
307
+ success: function(response) {
308
+ jQuery('.ig_loader').hide();
309
+ jQuery('#icegram_housekeeping_response').text("<?php _e('Done!', 'icegram'); ?>");
310
+ }
311
+ });
312
+ }
313
+ });
314
+ });
315
+ </script>
316
+ <?php
317
+ }
318
+ }
319
+ public function run_housekeeping() {
320
+ check_ajax_referer('ig_run_housekeeping', 'security');
321
+ global $wpdb, $current_user;
322
+ $params = $_POST;
323
+ $_POST = array();
324
+ if(current_user_can( 'manage_options' ) && !empty($params['icegram_remove_shortcodes']) && $params['icegram_remove_shortcodes'] == 'yes') {
325
+ // first get all posts with [icegram] shortcode in them
326
+ $sql = "SELECT * FROM `$wpdb->posts` WHERE `post_content` LIKE '%[icegram %]%' and `post_type` != 'revision' ";
327
+ $posts = $wpdb->get_results($sql, OBJECT);
328
+ if ( !empty($posts) && is_array($posts) ) {
329
+ foreach ($posts as $post) {
330
+ $post_content = $post->post_content;
331
+ // remove shortcode with regexp now
332
+ $re = "/\\[icegram(.)*\\]/i";
333
+ $post_content = preg_replace($re, '', $post_content);
334
+ // save post content back
335
+ if ($post_content && $post_content != $post->post_content) {
336
+ wp_update_post( array ( 'ID' => $post->ID,
337
+ 'post_content' => $post_content
338
+ ) );
339
+ }
340
+ }
341
+ }
342
+ }
343
+
344
+ if(!empty($params['icegram_remove_all_data']) && $params['icegram_remove_all_data'] == 'yes') {
345
+ $posts = get_posts( array( 'post_type' => array( 'ig_campaign', 'ig_message' ) ) );
346
+ if ( !empty($posts) && is_array($posts) ) {
347
+ foreach ($posts as $post) {
348
+ wp_delete_post( $post->ID, true);
349
+ }
350
+ }
351
+ do_action('icegram_remove_all_data');
352
+ }
353
+ $_POST = $params;
354
+ }
355
+
356
+ public function icegram_event_track() {
357
+ if( !empty($_POST['ig_local_url_cs']) && isset($_SERVER['HTTP_ORIGIN']) ){
358
+ $parts = parse_url($_POST['ig_local_url_cs']);
359
+ $base_url = $parts["scheme"] . "://" . $parts["host"];
360
+ header('Access-Control-Allow-Origin: '.$base_url);
361
+ header('Access-Control-Allow-Credentials: true');
362
+ }
363
+
364
+ if( !empty( $_POST['event_data'] ) ) {
365
+ foreach ( $_POST['event_data'] as $event ) {
366
+ switch ($event['type']) {
367
+ case 'shown':
368
+ if (is_array($event['params']) && !empty($event['params']['message_id'])) {
369
+ $messages_shown[] = $event['params']['message_id'];
370
+ if(!empty($event['params']['expiry_time'])){
371
+ if($event['params']['expiry_time'] =='today'){
372
+ $event['params']['expiry_time'] = strtotime('+1 day', mktime(0, 0, 0));
373
+ }else if($event['params']['expiry_time'] == 'current_session'){
374
+ $event['params']['expiry_time'] = 0;
375
+ }else{
376
+ $event['params']['expiry_time'] = strtotime($event['params']['expiry_time']);
377
+ }
378
+
379
+ $event['default'] = true;
380
+ $event = apply_filters('icegram_check_event_track', $event);
381
+ if($event['default']){
382
+ setcookie('icegram_campaign_shown_'.floor($event['params']['campaign_id']),true , $event['params']['expiry_time'] , '/');
383
+ }
384
+ }
385
+ }
386
+ break;
387
+ case 'clicked':
388
+ if (is_array($event['params']) && !empty($event['params']['message_id'])) {
389
+ $messages_clicked[] = $event['params']['message_id'];
390
+ if(!empty($event['params']['expiry_time_clicked'])){
391
+ if($event['params']['expiry_time_clicked'] =='today'){
392
+ $event['params']['expiry_time_clicked'] = strtotime('+1 day', mktime(0, 0, 0));
393
+ }else if($event['params']['expiry_time_clicked'] == 'current_session'){
394
+ $event['params']['expiry_time_clicked'] = 0;
395
+ }else{
396
+ $event['params']['expiry_time_clicked'] = strtotime($event['params']['expiry_time_clicked']);
397
+ }
398
+ //setcookie('icegram_messages_clicked_'.$event['params']['message_id'],true , $event['params']['expiry_time_clicked'] , '/' );
399
+ setcookie('icegram_campaign_clicked_'.floor($event['params']['campaign_id']),true , $event['params']['expiry_time_clicked'] , '/' );
400
+ }
401
+ }
402
+ break;
403
+
404
+ default:
405
+ break;
406
+ }
407
+
408
+ // Emit event for other plugins to handle it
409
+ do_action('icegram_event_track', $event);
410
+ do_action('icegram_event_track_'.$event['type'], $event['params']);
411
+ }
412
+ }
413
+ exit();
414
+ }
415
+
416
+ static function install() {
417
+ // Redirect to welcome screen
418
+ delete_option( '_icegram_activation_redirect' );
419
+ add_option( '_icegram_activation_redirect', 'pending' );
420
+ }
421
+
422
+ public function welcome() {
423
+
424
+ $this->db_update();
425
+ // Bail if no activation redirect transient is set
426
+ if ( false === get_option( '_icegram_activation_redirect' ) )
427
+ return;
428
+
429
+ // Delete the redirect transient
430
+ delete_option( '_icegram_activation_redirect' );
431
+
432
+ wp_redirect( admin_url( 'edit.php?post_type=ig_campaign&page=icegram-support' ) );
433
+ exit;
434
+ }
435
+
436
+ function db_update() {
437
+ $current_db_version = get_option( 'icegram_db_version' );
438
+ if ( !$current_db_version || version_compare( $current_db_version, '1.2', '<' ) ) {
439
+ include( 'updates/icegram-update-1.2.php' );
440
+ }
441
+ }
442
+
443
+ public function admin_menus() {
444
+
445
+ $welcome_page_title = __( 'Welcome to Icegram', 'icegram' );
446
+ $gallery_page_title = '<span style="color:#f18500;font-weight:bolder;">' . __( 'Gallery', 'icegram' ).'<span>';
447
+ $gallery = add_submenu_page( 'edit.php?post_type=ig_campaign', $gallery_page_title, $gallery_page_title, 'manage_options', 'icegram-gallery', array( $this, 'gallery_screen' ) );
448
+ $settings_page_title = __( 'Settings', 'icegram' );
449
+ $upgrade_page_title = '<span style="color:#f18500;font-weight:bolder;">'.__( 'Upgrade', 'icegram' ) .'</span>';
450
+
451
+ $menu_title = __( 'Docs & Support', 'icegram' );
452
+ $about = add_submenu_page( 'edit.php?post_type=ig_campaign', $welcome_page_title, $menu_title, 'manage_options', 'icegram-support', array( $this, 'about_screen' ) );
453
+ $settings = add_submenu_page( 'edit.php?post_type=ig_campaign', $settings_page_title, $settings_page_title, 'manage_options', 'icegram-settings', array( $this, 'settings_screen' ) );
454
+ $upgrade = add_submenu_page( 'edit.php?post_type=ig_campaign', $upgrade_page_title, $upgrade_page_title, 'manage_options', 'icegram-upgrade', array( $this, 'upgrade_screen' ) );
455
+
456
+
457
+ add_action( 'admin_print_styles-'. $about, array( $this, 'admin_css' ) );
458
+ add_action( 'admin_print_styles-'. $settings, array( $this, 'admin_css' ) );
459
+ add_action( 'admin_print_styles-'. $upgrade, array( $this, 'admin_css' ) );
460
+
461
+ }
462
+
463
+ public function admin_css() {
464
+ wp_enqueue_style( 'icegram-activation', $this->plugin_url . '/assets/css/admin.min.css' );
465
+ }
466
+
467
+ public function about_screen() {
468
+
469
+ // Import data if not done already
470
+ if( false === get_option( 'icegram_sample_data_imported' ) ) {
471
+ $this->import_sample_data( $this->get_sample_data() );
472
+ }
473
+
474
+ include ( 'about-icegram.php' );
475
+ }
476
+
477
+ public function settings_screen() {
478
+ include ( 'settings.php' );
479
+ }
480
+
481
+ public function upgrade_screen() {
482
+ include ( 'addons.php' );
483
+ }
484
+
485
+ public static function gallery_screen() {
486
+ global $icegram;
487
+ include ( 'gallery.php' );
488
+ wp_register_script('ig_gallery_js', $icegram->plugin_url . '/assets/js/gallery.min.js', array ( 'jquery', 'backbone', 'wp-backbone', 'wp-a11y', 'wp-util' ), $icegram->version, true);
489
+ if( !wp_script_is( 'ig_gallery_js' ) ) {
490
+ wp_enqueue_script( 'ig_gallery_js' );
491
+ $imported_gallery_items = get_option('ig_imported_gallery_items',true);
492
+ $ig_plan = get_option('ig_engage_plan');
493
+ $ig_plan = (!empty($ig_plan)) ? (($ig_plan == 'plus') ? 1 :(($ig_plan == 'pro') ? 2 : (($ig_plan == 'max') ? 3 : 0))) : 0;
494
+ wp_localize_script( 'ig_gallery_js', '_wpThemeSettings', array(
495
+ 'themes' => array(),
496
+ 'settings' => array(
497
+ 'canInstall' => ( ! is_multisite() && ( 'install_themes' ) ),
498
+ 'isInstall' => true,
499
+ 'installURI' => ( ! is_multisite() && ( 'install_themes' ) ) ? admin_url( 'theme-install.php' ) : null,
500
+ 'confirmDelete' => __( "Are you sure you want to delete this theme?\n\nClick 'Cancel' to go back, 'OK' to confirm the delete." ),
501
+ 'adminUrl' => parse_url( admin_url(), PHP_URL_PATH ),
502
+ 'ig_plan' => $ig_plan
503
+ ),
504
+ 'l10n' => array(
505
+ 'addNew' => __( 'Add New Gallery Item' ),
506
+ 'search' => __( 'Search Gallery Item' ),
507
+ 'searchPlaceholder' => __( 'Search Gallery Item...' ), // placeholder (no ellipsis)
508
+ 'themesFound' => __( 'Number of Gallery Item found: %d' ),
509
+ 'noThemesFound' => __( 'No Gallery Item found. Try a different search.' ),
510
+ ),
511
+ 'installedThemes' => $imported_gallery_items
512
+ ) );
513
+ }
514
+ }
515
+
516
+ public function branding_data_remove( $icegram_branding_data ) {
517
+ if( !empty( $icegram_branding_data ) && 'yes' != get_option('icegram_share_love', 'no') ) {
518
+ $icegram_branding_data['powered_by_logo'] = '';
519
+ $icegram_branding_data['powered_by_text'] = '';
520
+ }
521
+ return $icegram_branding_data;
522
+ }
523
+
524
+ //Execute Form shortcode
525
+ function execute_form_shortcode( $atts = array() ) {
526
+ return '<div class="ig_form_container layout_inline"></div>';
527
+ }
528
+
529
+ function execute_shortcode( $atts = array() , $content = null ) {
530
+ // When shortcode is called, it will only prepare an array with conditions
531
+ // And add a placeholder div
532
+ // Display will happen in footer via display_messages()
533
+ $i = count($this->shortcode_instances);
534
+ $this->shortcode_instances[ $i ] = shortcode_atts( array(
535
+ 'campaigns' => '',
536
+ 'messages' => '',
537
+ 'skip_others' => 'no'
538
+ ), $atts );
539
+
540
+ $class[] = "ig_shortcode_container";
541
+ $html[] = "<div id='icegram_shortcode_{$i}'";
542
+ if(!empty($atts['campaigns']) && !empty($content)){
543
+ $this->shortcode_instances[ $i ]['with_content'] = true;
544
+ $class[] = "trigger_onclick";
545
+ }
546
+ foreach ($atts as $key => $value) {
547
+ $value = str_replace(",", " ", $value);
548
+ $html[] = " data-{$key}=\"".htmlentities($value)."\" ";
549
+ }
550
+ $class = implode(" ", $class);
551
+ $html[] = "class='".$class."' >".$content."</div>";
552
+ return implode(" ", $html);
553
+ }
554
+
555
+ // Do not index Icegram campaigns / messages...
556
+ // Not using currently - made custom post types non public...
557
+ function icegram_load_data() {
558
+ global $post;
559
+ $icegram_pre_data['ajax_url'] = admin_url( 'admin-ajax.php' );
560
+ $icegram_pre_data['post_obj'] = $_GET;
561
+ $icegram_pre_data['post_obj']['is_home'] = (is_home() || is_front_page()) ? true : false;
562
+ $icegram_pre_data['post_obj']['page_id'] = is_object($post) && isset($post->ID) ? $post->ID : 0;
563
+ $icegram_pre_data['post_obj']['action'] = 'display_messages';
564
+ $icegram_pre_data['post_obj']['shortcodes'] = $this->shortcode_instances;
565
+ $icegram_pre_data['post_obj']['cache_compatibility'] = $this->cache_compatibility;
566
+ $icegram_pre_data['post_obj']['device'] = $this->get_platform();
567
+ wp_register_script('icegram_main_js', $this->plugin_url . '/assets/js/main.min.js', array ( 'jquery' ), $this->version, true);
568
+ if( !wp_script_is( 'icegram_main_js' ) ) {
569
+ wp_enqueue_script( 'icegram_main_js' );
570
+ wp_localize_script( 'icegram_main_js', 'icegram_pre_data', $icegram_pre_data);
571
+ }
572
+ }
573
+
574
+ function display_messages() {
575
+
576
+ $skip_others = $preview_mode = false;
577
+ $campaign_ids = $message_ids = array();
578
+ $this->shortcode_instances = ($this->cache_compatibility == 'yes' && !empty($_REQUEST['shortcodes'])) ? $_REQUEST['shortcodes'] : $this->shortcode_instances;
579
+ // Pull in message and campaign IDs from shortcodes - if set
580
+ if( !empty( $this->shortcode_instances ) ) {
581
+ foreach ($this->shortcode_instances as $i => $value) {
582
+ $cids = array_map( 'trim', (array) explode( ',', $value['campaigns'] ) );
583
+ $mids = array_map( 'trim', (array) explode( ',', $value['messages'] ) );
584
+ if (!empty($value['skip_others']) && $value['skip_others'] == 'yes' && (!empty($cids) || !empty($mids))) {
585
+ $skip_others = true;
586
+ }
587
+ $campaign_ids = array_merge($campaign_ids, $cids);
588
+ $message_ids = array_merge($message_ids, $mids);
589
+ }
590
+ }
591
+ if( !empty( $_REQUEST['campaign_preview_id'] ) && ( 'edit_posts' ) ) {
592
+ $campaign_ids = array( $_REQUEST['campaign_preview_id'] );
593
+ $preview_mode = true;
594
+ }
595
+
596
+
597
+ $messages = $this->get_valid_messages( $message_ids, $campaign_ids, $preview_mode, $skip_others );
598
+
599
+ if( empty( $messages ) ) {
600
+ //wp_die(0);
601
+ return;
602
+ }
603
+
604
+ $messages_to_show_ids = array();
605
+ foreach ( $messages as $key => $message_data ) {
606
+
607
+ if( !is_array( $message_data ) || empty( $message_data ) ) {
608
+ continue;
609
+ }
610
+
611
+ // Don't show a seen message again - if needed
612
+ // change to campaign targetting in v1.9.1
613
+ if( !empty( $message_data['id'] ) &&
614
+ empty( $_GET['campaign_preview_id'] ) &&
615
+ !empty( $message_data['retargeting'] ) &&
616
+ $message_data['retargeting'] == 'yes'
617
+ ) {
618
+ if(!empty($_COOKIE['icegram_messages_shown_'.$message_data['id']]) || !empty($_COOKIE['icegram_campaign_shown_'.floor($message_data['campaign_id'])])){
619
+ unset( $messages[$key] );
620
+ continue;
621
+ }
622
+ }
623
+ if( !empty( $message_data['id'] ) &&
624
+ empty( $_GET['campaign_preview_id'] ) &&
625
+ !empty( $message_data['retargeting_clicked'] ) &&
626
+ $message_data['retargeting_clicked'] == 'yes'
627
+ ) {
628
+ if(!empty($_COOKIE['icegram_messages_clicked_'.$message_data['id']]) || !empty($_COOKIE['icegram_campaign_clicked_'.floor($message_data['campaign_id'])])){
629
+ unset( $messages[$key] );
630
+ continue;
631
+ }
632
+ }
633
+
634
+ // Avoid showing the same message twice
635
+ if (in_array($message_data['id'], $messages_to_show_ids)) {
636
+ unset ( $messages[$key] );
637
+ continue;
638
+ } else {
639
+ $messages_to_show_ids[] = $message_data['id'];
640
+ }
641
+
642
+ $this->process_message_body($messages[$key]);
643
+ }
644
+ if( empty( $messages ) )
645
+ return;
646
+ $icegram_default = apply_filters( 'icegram_branding_data',
647
+ array ( 'icon' => $this->plugin_url . '/assets/images/icegram-logo-branding-64-grey.png',
648
+ 'powered_by_logo' => $this->plugin_url . '/assets/images/icegram-logo-branding-64-grey.png',
649
+ 'powered_by_text' => __( 'Powered by Icegram', 'icegram' )
650
+ ) );
651
+ $messages = apply_filters( 'icegram_messages_to_show', $messages );
652
+ $icegram_data = apply_filters( 'icegram_data', array ( 'messages' => array_values( $messages ),
653
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
654
+ 'preview_id' => !empty( $_GET['campaign_preview_id'] ) ? $_GET['campaign_preview_id'] : '',
655
+ 'defaults' => $icegram_default
656
+ ));
657
+ if (empty($icegram_data['preview_id'])) {
658
+ unset($icegram_data['preview_id']);
659
+ }
660
+
661
+ do_action('icegram_print_js_css_data', $icegram_data);
662
+
663
+ do_action('icegram_data_printed');
664
+ }
665
+
666
+ function two_step_mobile_popup( $icegram_data ) {
667
+
668
+ $temp = array();
669
+ foreach ($icegram_data['messages'] as $message_id => $message) {
670
+
671
+ if(!empty($message['ig_mobile_popup']) && $message['ig_mobile_popup'] == true){
672
+ $action_bar = $message;
673
+ $action_bar['type'] = 'action-bar';
674
+ $action_bar['theme'] = 'hello';
675
+ $action_bar['position'] = '21';
676
+ $action_bar['message'] = '';
677
+ $action_bar['label'] = __('Show More', 'icegram');
678
+ $action_bar['id'] = $action_bar['id'].'_00';
679
+ $action_bar['use_custom_code'] = 'yes';
680
+ $action_bar['form_html'] = '';
681
+ $action_bar['form_html_original'] = '';
682
+ $action_bar['rainmaker_form_code'] = '';
683
+ $action_bar['link'] = '';
684
+ $action_bar['redirect_to_link'] = '';
685
+ $action_bar['cta'] = '';
686
+ $action_bar['alt_cta'] = '';
687
+ $action_bar['add_alt_cta'] = '';
688
+ $action_bar['custom_css'] = '#ig_this_message .ig_close{display:none;}';
689
+ $action_bar['custom_js'] = "<script type='text/javascript'>jQuery('#icegram_message_".$action_bar['id']."').on('click', '.ig_button', function(){icegram.get_message_by_id('".$action_bar['id']."').hide(); icegram.get_message_by_id('".$message['id']."').show(); });</script>";
690
+ unset($action_bar['ig_mobile_popup']);
691
+ $temp[] = $action_bar;
692
+ }
693
+ }
694
+ $icegram_data['messages'] = array_merge($icegram_data['messages'], $temp);
695
+ unset($temp);
696
+
697
+ return $icegram_data;
698
+ }
699
+
700
+
701
+ function print_js_css_data( $icegram_data ) {
702
+
703
+ $this->collect_js_and_css($icegram_data);
704
+ if($this->cache_compatibility === 'yes'){
705
+ echo json_encode($icegram_data);
706
+ wp_die();
707
+ }else{
708
+ wp_localize_script('icegram_main_js', 'icegram_data', $icegram_data);
709
+ }
710
+ }
711
+
712
+ function collect_js_and_css(&$icegram_data){
713
+
714
+ $types_shown = array();
715
+ $scripts = array();
716
+ $css = array();
717
+ foreach ($icegram_data['messages'] as $key => $message_data) {
718
+ $types_shown[] = $message_data['type'];
719
+ }
720
+
721
+ $types_shown = array_unique($types_shown);
722
+ $ver_psfix = '?var=' .$this->version;
723
+
724
+ $scripts[] = $this->plugin_url ."/assets/js/icegram.min.js". $ver_psfix;
725
+ $css[] = $this->plugin_url ."/assets/css/frontend.min.css". $ver_psfix;
726
+ //minify and combine only for default msg type
727
+ $ig_core_message_types = array('popup', 'action-bar', 'toast', 'messenger');
728
+ // Load JS and default CSS
729
+ foreach ($types_shown as $message_type) {
730
+ if(!in_array($message_type, $ig_core_message_types)){
731
+ $scripts[] = $this->message_types[$message_type]['baseurl'] ."main.js". $ver_psfix;
732
+ $css[] = $this->message_types[$message_type]['baseurl'] . "default.css". $ver_psfix;
733
+ }else{
734
+ $css[] = $this->message_types[$message_type]['baseurl'].'themes/'. $message_type. ".min.css". $ver_psfix;
735
+ }
736
+ }
737
+
738
+ //TODO :: add theme pack theme css files too.
739
+ // Load theme CSS
740
+ foreach ($icegram_data['messages'] as $key => $message) {
741
+ if ( !empty( $this->message_types[ $message['type'] ]['themes'][ $message['theme'] ]) ) {
742
+ $theme = $this->message_types[ $message['type'] ]['themes'][ $message['theme'] ]['baseurl'] . $message['theme'].'.css'. $ver_psfix;
743
+ }else{
744
+ $theme_default = $this->message_types[ $message['type']] ['settings']['theme']['default'];
745
+ $theme = $this->message_types[ $message['type'] ]['themes'][ $theme_default]['baseurl'] . $theme_default.'.css'. $ver_psfix;
746
+ $icegram_data['messages'][$key]['theme'] = $theme_default;
747
+ }
748
+ if(!preg_match('/icegram\/message-types/i', $theme)){
749
+ $css [] = $theme;
750
+ }
751
+ }
752
+ $css = array_unique($css);
753
+ $icegram_data['scripts'] = apply_filters('add_icegram_script' , $scripts);
754
+ $icegram_data['css'] = apply_filters('add_icegram_css' , $css);
755
+ return $icegram_data;
756
+ }
757
+
758
+ // Process
759
+ function process_message_body(&$message_data){
760
+ global $wp_scripts;
761
+ global $wp_styles;
762
+
763
+ if($this->cache_compatibility == 'yes'){
764
+ $q_script = !empty($wp_scripts->queue) ? $wp_scripts->queue : array();
765
+ $q_style = !empty($wp_styles->queue) ? $wp_styles->queue : array();
766
+ }
767
+ $content = $message_data['message'];
768
+ $content = convert_chars(convert_smilies( wptexturize( $content )));
769
+ if(isset($GLOBALS['wp_embed'])) {
770
+ $content = $GLOBALS['wp_embed']->autoembed($content);
771
+ }
772
+ $content = $this->after_wpautop( wpautop( $this->before_wpautop( $content ) ) );
773
+ $content = do_shortcode( shortcode_unautop( $content ) );
774
+ $message_data['message'] = $content;
775
+
776
+ //do_shortcode in headline
777
+ $message_data['headline'] = do_shortcode( shortcode_unautop( $message_data['headline'] ) );
778
+ //shortcode support for Third party forms and Rainmaker
779
+ $form_html_original = !empty($message_data["rainmaker_form_code"])
780
+ ? ('[rainmaker_form id="'. $message_data["rainmaker_form_code"] .'"]')
781
+ :(!empty($message_data['form_html_original']) ? $message_data['form_html_original'] : '');
782
+ if(!empty($form_html_original)){
783
+ $message_data['form_html'] = do_shortcode( shortcode_unautop( $form_html_original) );
784
+ }
785
+ //TODO :: Handle case for inline style and script
786
+ if($this->cache_compatibility == 'yes'){
787
+ $handles = !empty($wp_scripts->queue) ? array_diff($wp_scripts->queue, $q_script) : array();
788
+ unset($q_script);
789
+ if(!empty($handles)){
790
+ if(empty($message_data['assets']))
791
+ $message_data['assets'] = array();
792
+
793
+ ob_start();
794
+ $wp_scripts->do_items($handles);
795
+ $message_data['assets']['scripts'] = array_filter(explode('<script', ob_get_clean()));
796
+ }
797
+
798
+ //TODO :: do_items if required
799
+ $handles = !empty($wp_styles->queue) ? array_diff($wp_styles->queue, $q_style) : array();
800
+ unset($q_style);
801
+ if(!empty($handles)){
802
+ if(empty($message_data['assets']))
803
+ $message_data['assets'] = array();
804
+
805
+ foreach ($handles as $handle) {
806
+ ob_start();
807
+ $wp_styles->do_item($handle);
808
+ $message_data['assets']['styles'][$handle] = ob_get_clean();
809
+ }
810
+ }
811
+ }
812
+ }
813
+
814
+ function enqueue_admin_styles_and_scripts() {
815
+
816
+ $screen = get_current_screen();
817
+ if ( !in_array( $screen->id, array( 'ig_campaign', 'ig_message', 'edit-ig_campaign' ), true ) ) return;
818
+
819
+ // Register scripts
820
+ wp_register_script( 'icegram_writepanel', $this->plugin_url . '/assets/js/admin.min.js', array ( 'jquery', 'wp-color-picker' ), $this->version );
821
+
822
+ wp_enqueue_script( 'icegram_writepanel' );
823
+
824
+ $icegram_writepanel_params = array ( 'ajax_url' => admin_url( 'admin-ajax.php' ), 'search_message_nonce' => wp_create_nonce( "search-messages" ), 'home_url' => home_url( '/' ) );
825
+ $this->available_headlines = apply_filters( 'icegram_available_headlines', array() );
826
+ $icegram_writepanel_params = array_merge( $icegram_writepanel_params, array( 'available_headlines' => $this->available_headlines ) );
827
+
828
+ wp_localize_script( 'icegram_writepanel', 'icegram_writepanel_params', $icegram_writepanel_params );
829
+
830
+ wp_enqueue_style( 'dashicons' );
831
+ wp_enqueue_style( 'wp-color-picker' );
832
+ wp_enqueue_style( 'icegram_admin_styles', $this->plugin_url . '/assets/css/admin.min.css', array(), $this->version );
833
+
834
+ if ( !wp_script_is( 'jquery-ui-datepicker' ) ) {
835
+ wp_enqueue_script( 'jquery-ui-datepicker' );
836
+ }
837
+
838
+ }
839
+
840
+ //execute shortcode in text widget
841
+ function ig_widget_text_filter($content){
842
+ if ( ! preg_match( '/\[[\r\n\t ]*icegram?[\r\n\t ].*?\]/', $content ) )
843
+ return $content;
844
+
845
+ $content = do_shortcode( $content );
846
+
847
+ return $content;
848
+ }
849
+
850
+ public static function get_platform() {
851
+ $mobile_detect = new Ig_Mobile_Detect();
852
+ $mobile_detect->setUserAgent();
853
+ if($mobile_detect->isMobile()){
854
+ return ($mobile_detect->isTablet()) ? 'tablet' : 'mobile';
855
+ }else if($mobile_detect->isTablet()){
856
+ return 'tablet';
857
+ }
858
+ return 'laptop';
859
+ }
860
+
861
+ function get_message_data( $message_ids = array(), $preview = false ) {
862
+ global $wpdb;
863
+ $message_data = array();
864
+ $original_message_id_map = array();
865
+ $meta_key = $preview ? 'icegram_message_preview_data' : 'icegram_message_data';
866
+ $message_data_query = "SELECT post_id, meta_value FROM {$wpdb->prefix}postmeta WHERE meta_key LIKE '$meta_key'";
867
+ if ( !empty( $message_ids ) && is_array( $message_ids ) ) {
868
+ // For WPML compatibility
869
+ if ( function_exists('icl_object_id') ) {
870
+ $wpml_settings = get_option('icl_sitepress_settings');
871
+ $original_if_missing = (is_array($wpml_settings) && array_key_exists('show_untranslated_blog_posts', $wpml_settings) && !empty($wpml_settings['show_untranslated_blog_posts']) ) ? true : false;
872
+
873
+ foreach ($message_ids as $i=>$id ) {
874
+ $translated = icl_object_id( $id, 'ig_message', $original_if_missing );
875
+ $message_ids[ $i ] = $translated;
876
+ $original_message_id_map[ $translated ] = $id;
877
+ }
878
+ }
879
+ $message_ids = array_filter(array_unique($message_ids));
880
+ if ( !empty( $message_ids ) ) {
881
+ $message_data_query .= " AND post_id IN ( " . implode( ',', $message_ids ) . " )";
882
+ $message_data_results = $wpdb->get_results( $message_data_query, 'ARRAY_A' );
883
+ foreach ( $message_data_results as $message_data_result ) {
884
+ $data = maybe_unserialize( $message_data_result['meta_value'] );
885
+ if (!empty($data)) {
886
+ $message_data[$message_data_result['post_id']] = $data;
887
+ // For WPML compatibility
888
+ if (!empty( $original_message_id_map[ $message_data_result['post_id'] ])) {
889
+ $message_data[$message_data_result['post_id']]['original_message_id'] = $original_message_id_map[ $message_data_result['post_id'] ];
890
+ }
891
+ }
892
+ }
893
+ }
894
+ }
895
+
896
+ return $message_data;
897
+ }
898
+
899
+ function get_valid_messages( $message_ids = array(), $campaign_ids = array(), $preview_mode = false, $skip_others = false) {
900
+ list($message_ids, $campaign_ids, $preview_mode, $skip_others) = apply_filters('icegram_get_valid_messages_params', array( $message_ids, $campaign_ids, $preview_mode, $skip_others));
901
+
902
+ $valid_messages = $valid_campaigns = $message_campaign_map = array();
903
+
904
+ $campaign_ids = array_filter(array_unique( (array) $campaign_ids));
905
+ $message_ids = array_filter(array_unique( (array) $message_ids));
906
+ if ( !empty( $campaign_ids ) ) {
907
+ $valid_campaigns = $this->get_valid_campaigns( $campaign_ids, true ,$preview_mode);
908
+ }
909
+
910
+ // When skip_others is true, we won't load campaigns / messages from db
911
+ if (!$skip_others && !$preview_mode) {
912
+ $campaigns = $this->get_valid_campaigns();
913
+ if (!empty($campaigns)) {
914
+ foreach ($campaigns as $id => $campaign) {
915
+ if (!array_key_exists($id, $valid_campaigns)) {
916
+ $valid_campaigns[ $id ] = $campaign;
917
+ }
918
+ }
919
+ }
920
+ }
921
+
922
+ // Create a map to look up campaign id for a given message
923
+ if( !empty( $valid_campaigns ) ) {
924
+ foreach ($valid_campaigns as $id => $campaign) {
925
+ if ($preview_mode) {
926
+ $campaign->messages = get_post_meta( $id, 'campaign_preview', true );
927
+ }
928
+ if( !empty( $campaign->messages ) ) {
929
+ foreach( $campaign->messages as $msg) {
930
+ $message_ids[] = $msg['id'];
931
+ if (!array_key_exists( $msg['id'], $message_campaign_map)) {
932
+ $message_campaign_map[ $msg['id'] ] = $id;
933
+ }
934
+ }
935
+ }
936
+ }
937
+ }
938
+
939
+ // We don't display same message twice...
940
+ $message_ids = array_unique($message_ids);
941
+
942
+ if( empty( $message_ids ) ) {
943
+ return array();
944
+ }
945
+ $valid_messages = $this->get_message_data( $message_ids, $preview_mode );
946
+
947
+ foreach ($valid_messages as $id => $message_data) {
948
+ // Remove message if required fields are missing
949
+ if (empty($message_data) || empty($message_data['type'])) {
950
+ unset( $valid_messages[$id] );
951
+ continue;
952
+ }
953
+ // Remove message if message type is uninstalled
954
+ $class_name = 'Icegram_Message_Type_' . str_replace(' ', '_', ucwords(str_replace('-', ' ', $message_data['type'])));
955
+ if( !class_exists( $class_name ) ) {
956
+ unset( $valid_messages[$id] );
957
+ continue;
958
+ }
959
+ $message_data['delay_time'] = 0;
960
+ $message_data['retargeting'] = '';
961
+ $message_data['campaign_id'] = ($preview_mode) ? $_REQUEST['campaign_preview_id'] : '';
962
+
963
+ // Pull display time and retargeting rule from campaign if possible
964
+ $message_id = (!empty($message_data['original_message_id'])) ? $message_data['original_message_id'] : $id;
965
+ if (!empty($message_campaign_map[ $message_id ])) {
966
+ //modify campaign id
967
+ $message_data['campaign_id'] = apply_filters('modify_campaing_id' , $message_campaign_map[ $message_id ] , $message_id) ;
968
+ $campaign = $valid_campaigns[ floor($message_data['campaign_id']) ];
969
+ if (!empty($campaign) && $campaign instanceof Icegram_Campaign) {
970
+ $message_meta_from_campaign = $campaign->get_message_meta_by_id( $message_id );
971
+ if (!empty($message_meta_from_campaign['time'])) {
972
+ $message_data['delay_time'] = $message_meta_from_campaign['time'];
973
+ }
974
+
975
+ //check if campaign is targeted to mobile at zero
976
+ $device_rule = $campaign->get_rule_value('device');
977
+ if($this->get_platform() !== 'laptop' && !empty($device_rule['mobile']) && $device_rule['mobile'] == 'yes'&& $message_data['delay_time'] == 0 && $message_data['type'] == 'popup'){
978
+ $message_data['ig_mobile_popup'] = true;
979
+ if(!empty($message_data['triggers']) && !empty($message_data['triggers']['when_to_show'])){
980
+ $message_data['ig_mobile_popup'] = ($message_data['triggers']['when_to_show'] == 'duration_on_page' && $message_data['triggers']['duration_on_page'] == 0 ) ? true : false;
981
+ }
982
+ }
983
+ //set delay time -1 if shortcode with content
984
+ foreach ($this->shortcode_instances as $i => $value) {
985
+ $campaign_ids = explode( ',', $value['campaigns']);
986
+ if(!empty($value['with_content']) && in_array($message_data['campaign_id'], $campaign_ids)){
987
+ $message_data['delay_time'] = -1;
988
+ }
989
+ }
990
+ $rule_value = $campaign->get_rule_value('retargeting');
991
+ $message_data['retargeting'] = !empty( $rule_value['retargeting'] ) ? $rule_value['retargeting'] : '';
992
+ $message_data['expiry_time'] = !empty( $rule_value['retargeting'] ) ? $rule_value['expiry_time'] : '';
993
+ $rule_value_retargeting_clicked = $campaign->get_rule_value('retargeting_clicked');
994
+ $message_data['retargeting_clicked'] = !empty( $rule_value_retargeting_clicked['retargeting_clicked'] ) ? $rule_value_retargeting_clicked['retargeting_clicked'] : '';
995
+ $message_data['expiry_time_clicked'] = !empty( $rule_value_retargeting_clicked['retargeting_clicked'] ) ? $rule_value_retargeting_clicked['expiry_time_clicked'] : '';
996
+
997
+ }
998
+ }
999
+ $valid_messages[$id] = $message_data;
1000
+ }
1001
+ $valid_messages = apply_filters( 'icegram_valid_messages', $valid_messages );
1002
+
1003
+ return $valid_messages;
1004
+ }
1005
+
1006
+ function get_valid_campaigns( $campaign_ids = array(), $skip_page_check = false ,$preview_mode = false) {
1007
+ global $wpdb;
1008
+ if ( empty( $campaign_ids ) ) {
1009
+ $sql = "SELECT pm.post_id
1010
+ FROM {$wpdb->prefix}posts AS p
1011
+ LEFT JOIN {$wpdb->prefix}postmeta AS pm ON ( pm.post_id = p.ID )
1012
+ WHERE p.post_status = 'publish' ";
1013
+ // Filter handler within this file (and possibly others) will append to this SQL
1014
+ // and provide arguments for wpdb->prepare if needed.
1015
+ // First element in the array is SQL, remaining are values for placeholders in SQL
1016
+ $sql_params = apply_filters( 'icegram_get_valid_campaigns_sql', array($sql), array() );
1017
+ $campaign_ids = $wpdb->get_col( $wpdb->prepare( array_shift($sql_params), $sql_params ) );
1018
+ }
1019
+ $valid_campaigns = array();
1020
+ foreach ( (array) $campaign_ids as $campaign_id ) {
1021
+ $campaign = new Icegram_Campaign( $campaign_id );
1022
+ if ( $preview_mode || $campaign->is_valid( array('skip_page_check' => $skip_page_check) ) ) {
1023
+ $valid_campaigns[$campaign_id] = $campaign;
1024
+ } else {
1025
+ // Campgain is invalid!
1026
+ }
1027
+
1028
+ }
1029
+ $valid_campaigns = apply_filters('icegram_valid_campaigns', $valid_campaigns);
1030
+ return $valid_campaigns;
1031
+ }
1032
+
1033
+ function append_to_valid_campaigns_sql( $sql_params = array(), $options = array() ) {
1034
+ // Page check conditions
1035
+ //$pid = $_GET['page_id'];
1036
+ $pid = Icegram::get_current_page_id();
1037
+ $sql = " AND (
1038
+ pm.meta_key = 'icegram_campaign_target_rules' AND (
1039
+ ( pm.meta_value LIKE '%%%s%%' )
1040
+ OR ( pm.meta_value LIKE '%%%s%%' AND pm.meta_value LIKE '%%%s%%' AND pm.meta_value LIKE '%%%s%%' )
1041
+ ";
1042
+ $sql_params[] = 's:8:"sitewide";s:3:"yes";';
1043
+ $sql_params[] = 's:10:"other_page";s:3:"yes";';
1044
+ $sql_params[] = 's:7:"page_id";a:';
1045
+ $sql_params[] = serialize( (string) $pid );
1046
+ //local url
1047
+ $sql .= " OR ( pm.meta_value LIKE '%%%s%%' )";
1048
+ $sql_params[] = 's:9:"local_url";s:3:"yes";';
1049
+ if(!empty($_REQUEST['cache_compatibility']) && $_REQUEST['cache_compatibility'] == 'yes'){
1050
+ $is_home = (!empty($_REQUEST['is_home']) && $_REQUEST['is_home'] === 'true') ? true : false ;
1051
+ }else{
1052
+ $is_home = (is_home() || is_front_page()) ? true : false;
1053
+ }
1054
+ if ($is_home === true ) {
1055
+ $sql .= " OR ( pm.meta_value LIKE '%%%s%%' )";
1056
+ $sql_params[] = 's:8:"homepage";s:3:"yes";';
1057
+ }
1058
+ $sql .=" ) )";
1059
+
1060
+ $sql_params[0] .= $sql;
1061
+ //s:9:"logged_in";s:3:"all";
1062
+
1063
+ return $sql_params;
1064
+ }
1065
+
1066
+ // Include all classes required for Icegram plugin
1067
+ function include_classes() {
1068
+
1069
+ $classes = glob( $this->plugin_path . '/classes/*.php' );
1070
+ foreach ( $classes as $file ) {
1071
+ // Files with 'admin' in their name are included only for admin section
1072
+ if ( is_file( $file ) && ( (strpos($file, '-admin') >= 0 && is_admin()) || (strpos($file, '-admin') === false) ) ) {
1073
+ include_once $file;
1074
+ }
1075
+ }
1076
+
1077
+ // Load built in message types
1078
+ $icegram_message_type_basedirs = glob( $this->plugin_path . '/message-types/*' );
1079
+ // Allow other plugins to add new message types
1080
+ $icegram_message_type_basedirs = apply_filters( 'icegram_message_type_basedirs', $icegram_message_type_basedirs );
1081
+ // Set up different message type classes
1082
+ foreach ( $icegram_message_type_basedirs as $dir ) {
1083
+ $type = basename ( $dir );
1084
+ $class_file = $dir . "/main.php";
1085
+ if( is_file( $class_file ) ) {
1086
+ include_once( $class_file );
1087
+ }
1088
+ $class_name = 'Icegram_Message_Type_' . str_replace(' ', '_', ucwords(str_replace('-', ' ', $type)));
1089
+ if (class_exists($class_name)) {
1090
+ $this->message_type_objs[ $type ] = new $class_name();
1091
+ }
1092
+ }
1093
+ do_action('ig_file_include');
1094
+ $this->message_types = apply_filters( 'icegram_message_types', array() );
1095
+ }
1096
+
1097
+ // Register Campaign post type
1098
+ function register_campaign_post_type() {
1099
+ $labels = array(
1100
+ 'name' => __( 'Campaigns', 'icegram' ),
1101
+ 'singular_name' => __( 'Campaign', 'icegram' ),
1102
+ 'add_new' => __( 'Add New Campaign', 'icegram' ),
1103
+ 'add_new_item' => __( 'Add New Campaign', 'icegram' ),
1104
+ 'edit_item' => __( 'Edit Campaign', 'icegram' ),
1105
+ 'new_item' => __( 'New Campaign', 'icegram' ),
1106
+ 'all_items' => __( 'Campaigns', 'icegram' ),
1107
+ 'view_item' => __( 'View Campaign', 'icegram' ),
1108
+ 'search_items' => __( 'Search Campaigns', 'icegram' ),
1109
+ 'not_found' => __( 'No campaigns found', 'icegram' ),
1110
+ 'not_found_in_trash' => __( 'No campaigns found in Trash', 'icegram' ),
1111
+ 'parent_item_colon' => __( '', 'icegram' ),
1112
+ 'menu_name' => __( 'Icegram', 'icegram' )
1113
+ );
1114
+
1115
+ $args = array(
1116
+ 'labels' => $labels,
1117
+ // 'menu_icon' => 'dashicons-info',
1118
+ 'public' => false,
1119
+ 'publicly_queryable' => false,
1120
+ 'show_ui' => true,
1121
+ 'show_in_menu' => true,
1122
+ 'query_var' => true,
1123
+ 'rewrite' => array( 'slug' => 'ig_campaign' ),
1124
+ 'capability_type' => 'post',
1125
+ 'has_archive' => false,
1126
+ 'hierarchical' => false,
1127
+ 'menu_position' => null,
1128
+ 'menu_icon' => $this->plugin_url . '/assets/images/icegram-logo-branding-18-white.png' ,
1129
+ 'supports' => array( 'title', 'editor' )
1130
+ );
1131
+
1132
+ register_post_type( 'ig_campaign', $args );
1133
+ }
1134
+
1135
+ // Register Message post type
1136
+ function register_message_post_type() {
1137
+ $labels = array(
1138
+ 'name' => __( 'Messages', 'icegram' ),
1139
+ 'singular_name' => __( 'Message', 'icegram' ),
1140
+ 'add_new' => __( 'Create New', 'icegram' ),
1141
+ 'add_new_item' => __( 'Create New Message', 'icegram' ),
1142
+ 'edit_item' => __( 'Edit Message', 'icegram' ),
1143
+ 'new_item' => __( 'New Message', 'icegram' ),
1144
+ 'all_items' => __( 'Messages', 'icegram' ),
1145
+ 'view_item' => __( 'View Message', 'icegram' ),
1146
+ 'search_items' => __( 'Search Messages', 'icegram' ),
1147
+ 'not_found' => __( 'No messages found', 'icegram' ),
1148
+ 'not_found_in_trash' => __( 'No messages found in Trash', 'icegram' ),
1149
+ 'parent_item_colon' => __( '', 'icegram' ),
1150
+ 'menu_name' => __( 'Messages', 'icegram' )
1151
+ );
1152
+
1153
+ $args = array(
1154
+ 'labels' => $labels,
1155
+ 'public' => false,
1156
+ 'publicly_queryable' => false,
1157
+ 'show_ui' => true,
1158
+ 'show_in_menu' => 'edit.php?post_type=ig_campaign',
1159
+ 'query_var' => true,
1160
+ 'rewrite' => array( 'slug' => 'ig_message' ),
1161
+ 'capability_type' => 'post',
1162
+ 'has_archive' => false,
1163
+ 'hierarchical' => false,
1164
+ 'menu_position' => null,
1165
+ 'supports' => array( 'title' )
1166
+ );
1167
+
1168
+ register_post_type( 'ig_message', $args );
1169
+ }
1170
+
1171
+
1172
+ function import( $data = array() ) {
1173
+ if ( empty( $data['campaigns'] ) && empty( $data['messages'] ) ) return;
1174
+
1175
+ $default_theme = $default_type = '';
1176
+ $first_message_type = current( $this->message_types );
1177
+
1178
+ if( is_array( $first_message_type ) ) {
1179
+ $default_type = $first_message_type['type'];
1180
+ if( !empty( $first_message_type['themes'] ) ) {
1181
+ $default_theme = key( $first_message_type['themes'] );
1182
+ }
1183
+ }
1184
+
1185
+ $new_campaign_ids = array();
1186
+ foreach ( (array) $data['campaigns'] as $campaign ) {
1187
+
1188
+ $args = array(
1189
+ 'post_content' => ( !empty( $campaign['post_content'] ) ) ? esc_attr( $campaign['post_content'] ) : '',
1190
+ 'post_name' => ( !empty( $campaign['post_title'] ) ) ? sanitize_title( $campaign['post_title'] ) : '',
1191
+ 'post_title' => ( !empty( $campaign['post_title'] ) ) ? $campaign['post_title'] : '',
1192
+ 'post_status' => ( !empty( $campaign['post_status'] ) ) ? $campaign['post_status'] : 'draft',
1193
+ 'post_type' => 'ig_campaign'
1194
+ );
1195
+
1196
+ $new_campaign_id = wp_insert_post( $args );
1197
+ $new_campaign_ids[] = $new_campaign_id;
1198
+
1199
+ if ( !empty( $campaign['target_rules'] ) ) {
1200
+
1201
+ $defaults = array (
1202
+ 'homepage' => 'yes',
1203
+ 'when' => 'always',
1204
+ 'from' => '',
1205
+ 'to' => '',
1206
+ 'mobile' => 'yes',
1207
+ 'tablet' => 'yes',
1208
+ 'laptop' => 'yes',
1209
+ 'logged_in' => 'all'
1210
+ );
1211
+
1212
+ $target_rules = wp_parse_args( $campaign['target_rules'], $defaults );
1213
+ update_post_meta( $new_campaign_id, 'icegram_campaign_target_rules', $target_rules );
1214
+ }
1215
+
1216
+ if ( !empty( $campaign['messages'] ) ) {
1217
+
1218
+ $messages = array();
1219
+
1220
+ foreach ( $campaign['messages'] as $message ) {
1221
+
1222
+ if ( !is_array( $message ) ) continue;
1223
+
1224
+ $args = array(
1225
+ 'post_content' => ( !empty( $message['message'] ) ) ? esc_attr( $message['message'] ) : '',
1226
+ 'post_name' => ( !empty( $message['post_title'] ) ) ? sanitize_title( $message['post_title'] ) : '',
1227
+ 'post_title' => ( !empty( $message['post_title'] ) ) ? $message['post_title'] : '',
1228
+ 'post_status' => ( !empty( $message['post_status'] ) ) ? $message['post_status'] : 'publish',
1229
+ 'post_type' => 'ig_message'
1230
+ );
1231
+
1232
+ $new_message_id = wp_insert_post( $args );
1233
+ $new_message = array(
1234
+ 'id' => $new_message_id,
1235
+ 'time' => ( !empty( $message['time'] ) ) ? $message['time'] : 0
1236
+ );
1237
+ //for gallery + CTA another message
1238
+ if(!empty($message['cta']) && $message['cta'] == 'cta_another_message' && !empty($message['cta_linked_message_id']) && $message['cta_linked_message_id'] == 'auto'){
1239
+ $prev_message = end($messages);
1240
+ $message['cta_linked_message_id'] = $prev_message['id'];
1241
+ array_pop($messages);
1242
+ }
1243
+ $messages[] = $new_message;
1244
+
1245
+ unset( $message['post_content'] );
1246
+ unset( $message['time'] );
1247
+
1248
+ $message['id'] = $new_message_id;
1249
+
1250
+ $defaults = array (
1251
+ 'post_title' => '',
1252
+ 'type' => $default_type,
1253
+ 'theme' => $default_theme,
1254
+ 'animation' => '',
1255
+ 'headline' => '',
1256
+ 'label' => '',
1257
+ 'link' => '',
1258
+ 'icon' => '',
1259
+ 'message' => '',
1260
+ 'position' => '',
1261
+ 'text_color' => '#000000',
1262
+ 'bg_color' => '#ffffff',
1263
+ 'custom_code' => '',
1264
+ 'id' => ''
1265
+ );
1266
+ $icegram_message_data = wp_parse_args( $message, $defaults );
1267
+ if ( !empty( $icegram_message_data ) ) {
1268
+ update_post_meta( $new_message_id, 'icegram_message_data', $icegram_message_data );
1269
+ update_post_meta( $new_message_id, 'icegram_message_preview_data', $icegram_message_data );
1270
+ }
1271
+ }//foreach
1272
+
1273
+ if ( !empty( $campaign['messages'] ) ) {
1274
+ update_post_meta( $new_campaign_id, 'messages', $messages );
1275
+ update_post_meta( $new_campaign_id, 'campaign_preview', $messages );
1276
+ }
1277
+ }//if
1278
+ }
1279
+ return $new_campaign_ids;
1280
+
1281
+ }
1282
+
1283
+ function import_gallery_item(){
1284
+ if(!empty($_REQUEST['action']) && $_REQUEST['action'] == 'fetch_messages' && !empty($_REQUEST['campaign_id']) && !empty($_REQUEST['gallery_item'])){
1285
+ $params = $_REQUEST;
1286
+ $imported_gallery_items = array();
1287
+ $url = 'https://www.icegram.com/gallery/wp-admin/admin-ajax.php?utm_source=ig_inapp&utm_campaign=ig_gallery&utm_medium='.$_REQUEST['campaign_id'];
1288
+ $options = array(
1289
+ 'timeout' => 15,
1290
+ 'method' => 'POST',
1291
+ 'body' => http_build_query( $params )
1292
+ );
1293
+ $response = wp_remote_request( $url, $options );
1294
+ $response_code = wp_remote_retrieve_response_code( $response );
1295
+ if ( $response_code == 200 ) {
1296
+ $new_campaign_ids = $this->import(json_decode($response['body'] ,true));
1297
+ if(!empty($new_campaign_ids)){
1298
+ $imported_gallery_items = get_option('ig_imported_gallery_items');
1299
+ $imported_gallery_items[] = $_REQUEST['campaign_id'];
1300
+ update_option( 'ig_imported_gallery_items', $imported_gallery_items);
1301
+ $location = admin_url( 'post.php?post='.$new_campaign_ids[0].'&action=edit');
1302
+ header('Location:'.$location);
1303
+ exit;
1304
+ }else{
1305
+ wp_safe_redirect($_SERVER['HTTP_REFERER']);
1306
+ }
1307
+ }
1308
+ }
1309
+ }
1310
+
1311
+ function import_sample_data ($data = array() ){
1312
+ $new_campaign_ids = $this->import($data);
1313
+ if( !empty( $new_campaign_ids ) ) {
1314
+ update_option( 'icegram_sample_data_imported', $new_campaign_ids );
1315
+ }
1316
+ }
1317
+
1318
+
1319
+
1320
+
1321
+ function get_sample_data() {
1322
+
1323
+ return array(
1324
+ 'campaigns' => array(
1325
+ array(
1326
+ 'post_name' => '',
1327
+ 'post_title' => 'My First Icegram Campaign',
1328
+ 'target_rules' => array (
1329
+ 'homepage' => 'yes',
1330
+ 'when' => 'always',
1331
+ 'from' => '',
1332
+ 'to' => '',
1333
+ 'mobile' => 'yes',
1334
+ 'tablet' => 'yes',
1335
+ 'laptop' => 'yes',
1336
+ 'logged_in' => 'all'
1337
+ ),
1338
+ 'messages' => array(
1339
+ array (
1340
+ 'post_title' => 'Get 2x more Contacts with Your Website',
1341
+ 'post_status' => 'publish',
1342
+ 'time' => '0',
1343
+ 'type' => 'action-bar',
1344
+ 'theme' => 'hello',
1345
+ 'headline' => 'Get 2x more Contacts with Your Website',
1346
+ 'label' => 'Show Me How',
1347
+ 'link' => '',
1348
+ 'icon' => '',
1349
+ 'message' => 'Instant Results Guaranteed',
1350
+ 'position' => '01',
1351
+ 'text_color' => '#000000',
1352
+ 'bg_color' => '#eb593c'
1353
+ ),
1354
+ array (
1355
+ 'post_title' => '20% Off Coupon',
1356
+ 'post_status' => 'publish',
1357
+ 'time' => '4',
1358
+ 'type' => 'messenger',
1359
+ 'theme' => 'social',
1360
+ 'animation' => 'slide',
1361
+ 'headline' => '20% Off - for you',
1362
+ 'label' => '',
1363
+ 'link' => '',
1364
+ 'icon' => '',
1365
+ 'message' => "Hey there! We are running a <strong>special 20% off this week</strong> for registered users - like you.
1366
+
1367
+ Use coupon <code>LOYALTY20</code> during checkout.",
1368
+ 'position' => '22',
1369
+ 'text_color' => '#000000',
1370
+ 'bg_color' => '#ffffff'
1371
+ ),
1372
+ array (
1373
+ 'post_title' => 'How this blog makes over $34,800 / month for FREE.',
1374
+ 'post_status' => 'publish',
1375
+ 'time' => '10',
1376
+ 'type' => 'popup',
1377
+ 'theme' => 'air-mail',
1378
+ 'headline' => 'How this blog makes over $34,800 / month for FREE.',
1379
+ 'label' => 'FREE INSTANT ACCESS',
1380
+ 'link' => '',
1381
+ 'icon' => '',
1382
+ 'message' => "This website earns over $30,000 every month, every single month, almost on autopilot. I have 4 other sites with similar results. All I do is publish new regular content every week.
1383
+
1384
+ <strong>Download my free kit to learn how I do this.</strong>
1385
+
1386
+ <ul>
1387
+ <li>How to choose blog topics that create long term value</li>
1388
+ <li>The type of blog post that will make your site go viral</li>
1389
+ <li>How to free yourself from the routine tasks</li>
1390
+ <li>Resources and tips to get started quickly</li>
1391
+ <li>Private members club to connect with fellow owners</li>
1392
+ </ul>",
1393
+ 'text_color' => '#000000',
1394
+ 'bg_color' => '#ffffff'
1395
+
1396
+ ),
1397
+ array (
1398
+ 'post_title' => 'Exclusive Marketing Report',
1399
+ 'post_status' => 'publish',
1400
+ 'time' => '6',
1401
+ 'type' => 'toast',
1402
+ 'theme' => 'stand-out',
1403
+ 'animation' => 'pop',
1404
+ 'headline' => 'Exclusive Marketing Report',
1405
+ 'label' => '',
1406
+ 'link' => '',
1407
+ 'icon' => '',
1408
+ 'message' => 'FREE for every subscriber. Click here to download it.',
1409
+ 'position' => '02',
1410
+ 'text_color' => '#000000',
1411
+ 'bg_color' => '#ffffff'
1412
+ )
1413
+
1414
+ )
1415
+ )
1416
+ )
1417
+ );
1418
+ }
1419
+
1420
+ function remove_preview_button() {
1421
+ global $post_type;
1422
+ if( $post_type == 'ig_message' || $post_type == 'ig_campaign' ) {
1423
+ ?>
1424
+ <style type="text/css">
1425
+ #message.updated.below-h2{ display: none; }
1426
+ #preview-action { display:none; }
1427
+ </style>
1428
+ <?php
1429
+ }
1430
+ }
1431
+
1432
+
1433
+ function remove_row_actions( $actions, $post ) {
1434
+
1435
+ if ( empty( $post->post_type ) || ( $post->post_type != 'ig_campaign' && $post->post_type != 'ig_message' ) ) return $actions;
1436
+
1437
+ unset( $actions['inline hide-if-no-js'] );
1438
+ unset( $actions['view'] );
1439
+
1440
+ return $actions;
1441
+
1442
+ }
1443
+
1444
+ function identify_current_page() {
1445
+ global $post, $wpdb;
1446
+
1447
+ $obj = get_queried_object();
1448
+ $id = 0;
1449
+ if( !empty( $obj->has_archive ) ) {
1450
+ $id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_name = %s AND post_type='page'", $obj->has_archive ) );
1451
+ } elseif( is_object( $post ) && isset( $post->ID ) ) {
1452
+ $id = $post->ID;
1453
+ }
1454
+ $id = apply_filters('icegram_identify_current_page', $id );
1455
+ self::$current_page_id = $id;
1456
+ }
1457
+
1458
+ static function get_current_page_id() {
1459
+ global $post;
1460
+ if (!empty($_REQUEST['page_id']) && is_numeric($_REQUEST['page_id'])) {
1461
+ $post = get_post($_REQUEST['page_id']);
1462
+ setup_postdata( $post );
1463
+ // WPML check
1464
+ $id = apply_filters('icegram_identify_current_page', $post->ID );
1465
+ self::$current_page_id = $id;
1466
+ }
1467
+ return self::$current_page_id;
1468
+ }
1469
+ static function get_current_page_url() {
1470
+ if(!empty($_REQUEST['cache_compatibility']) && $_REQUEST['cache_compatibility'] == 'yes'){
1471
+ $pageURL = (!empty($_REQUEST['referral_url'])) ? $_REQUEST['referral_url'] : '';
1472
+ }else{
1473
+ $pageURL = 'http';
1474
+ if( isset($_SERVER["HTTPS"]) ) {
1475
+ if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
1476
+ }
1477
+ $pageURL .= "://";
1478
+ if ($_SERVER["SERVER_PORT"] != "80") {
1479
+ $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
1480
+ } else {
1481
+ $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
1482
+ }
1483
+ }
1484
+ return $pageURL;
1485
+ }
1486
+
1487
+ function wpml_get_parent_id( $id ) {
1488
+ global $post;
1489
+ if (function_exists('icl_object_id') && function_exists('icl_get_default_language') ) {
1490
+ $id = icl_object_id($id, $post->post_type, true, icl_get_default_language() );
1491
+ }
1492
+ return $id;
1493
+ }
1494
+
1495
+
1496
+ /**
1497
+ * Our implementation of wpautop to preserve script and style tags
1498
+ */
1499
+ function before_wpautop($pee) {
1500
+ if ( trim($pee) === '' ) {
1501
+ $this->_wpautop_tags = array();
1502
+ return '';
1503
+ }
1504
+
1505
+ $tags = array();
1506
+ // Pull out tags and add placeholders
1507
+ list( $pee, $tags['pre'] ) = $this->_wpautop_add_tag_placeholders( $pee, 'pre' );
1508
+ list( $pee, $tags['script'] ) = $this->_wpautop_add_tag_placeholders( $pee, 'script' );
1509
+ list( $pee, $tags['style'] ) = $this->_wpautop_add_tag_placeholders( $pee, 'style' );
1510
+ $this->_wpautop_tags = $tags;
1511
+
1512
+ if( !empty( $pre_tags ) )
1513
+ $pee = $this->_wpautop_replace_tag_placeholders( $pee, $pre_tags );
1514
+ if( !empty( $script_tags ) )
1515
+ $pee = $this->_wpautop_replace_tag_placeholders( $pee, $script_tags );
1516
+ if( !empty( $style_tags ) )
1517
+ $pee = $this->_wpautop_replace_tag_placeholders( $pee, $style_tags );
1518
+
1519
+ return $pee;
1520
+ }
1521
+
1522
+ function after_wpautop($pee) {
1523
+ if ( trim($pee) === '' || empty($this->_wpautop_tags) )
1524
+ return '';
1525
+
1526
+ // Replace placeholders with original content
1527
+ if (!empty($this->_wpautop_tags['pre'])) {
1528
+ $pee = $this->_wpautop_replace_tag_placeholders( $pee, $this->_wpautop_tags['pre'] );
1529
+ }
1530
+ if (!empty($this->_wpautop_tags['script'])) {
1531
+ $pee = $this->_wpautop_replace_tag_placeholders( $pee, $this->_wpautop_tags['script'] );
1532
+ }
1533
+ if (!empty($this->_wpautop_tags['style'])) {
1534
+ $pee = $this->_wpautop_replace_tag_placeholders( $pee, $this->_wpautop_tags['style'] );
1535
+ }
1536
+
1537
+ $this->_wpautop_tags = array();
1538
+
1539
+ return $pee;
1540
+ }
1541
+
1542
+ function _wpautop_add_tag_placeholders( $pee, $tag ) {
1543
+ $tags = array();
1544
+
1545
+ if ( false !== strpos( $pee, "<{$tag}" ) ) {
1546
+ $pee_parts = explode( "</{$tag}>", $pee );
1547
+ $last_pee = array_pop( $pee_parts );
1548
+ $pee = '';
1549
+ $i = 0;
1550
+
1551
+ foreach ( $pee_parts as $pee_part ) {
1552
+ $start = strpos( $pee_part, "<{$tag}" );
1553
+
1554
+ // Malformed html?
1555
+ if ( false === $start ) {
1556
+ $pee .= $pee_part;
1557
+ continue;
1558
+ }
1559
+
1560
+ $name = "<{$tag} wp-{$tag}-tag-$i></{$tag}>";
1561
+ $tags[ $name ] = substr( $pee_part, $start ) . "</{$tag}>";
1562
+
1563
+ $pee .= substr( $pee_part, 0, $start ) . $name;
1564
+ $i++;
1565
+ }
1566
+
1567
+ $pee .= $last_pee;
1568
+ }
1569
+
1570
+ return array( $pee, $tags );
1571
+ }
1572
+
1573
+ function _wpautop_replace_tag_placeholders( $pee, $tags ) {
1574
+ if ( ! empty( $tags ) ) {
1575
+ $pee = str_replace( array_keys( $tags ), array_values( $tags ), $pee );
1576
+ }
1577
+
1578
+ return $pee;
1579
+ }
1580
+
1581
+ static function duplicate_in_db( $original_id){
1582
+ // Get access to the database
1583
+ global $wpdb;
1584
+ // Get the post as an array
1585
+ $duplicate = get_post( $original_id, 'ARRAY_A' );
1586
+ // Modify some of the elements
1587
+ $duplicate['post_title'] = $duplicate['post_title'].' '.__('Copy', 'icegram');
1588
+ $duplicate['post_status'] = 'draft';
1589
+ // Set the post date
1590
+ $timestamp = current_time('timestamp', 0);
1591
+
1592
+ $duplicate['post_date'] = date('Y-m-d H:i:s', $timestamp);
1593
+
1594
+ // Remove some of the keys
1595
+ unset( $duplicate['ID'] );
1596
+ unset( $duplicate['guid'] );
1597
+ unset( $duplicate['comment_count'] );
1598
+
1599
+ // Insert the post into the database
1600
+ $duplicate_id = wp_insert_post( $duplicate );
1601
+
1602
+ // Duplicate all taxonomies/terms
1603
+ $taxonomies = get_object_taxonomies( $duplicate['post_type'] );
1604
+
1605
+ foreach( $taxonomies as $taxonomy ) {
1606
+ $terms = wp_get_post_terms( $original_id, $taxonomy, array('fields' => 'names') );
1607
+ wp_set_object_terms( $duplicate_id, $terms, $taxonomy );
1608
+ }
1609
+
1610
+ // Duplicate all custom fields
1611
+ $custom_fields = get_post_custom( $original_id );
1612
+ foreach ( $custom_fields as $key => $value ) {
1613
+ if($key === 'messages'){
1614
+ $messages = unserialize($value[0]);
1615
+ foreach ($messages as &$message) {
1616
+ $clone_msg_id = Icegram::duplicate_in_db($message['id']);
1617
+ $message['id'] = $clone_msg_id;
1618
+ }
1619
+ $value[0] = serialize($messages);
1620
+ }
1621
+ add_post_meta( $duplicate_id, $key, maybe_unserialize($value[0]) );
1622
+ }
1623
+ return $duplicate_id;
1624
+ }
1625
+
1626
+ static function duplicate( $original_id){
1627
+ $duplicate_id = Icegram::duplicate_in_db($original_id);
1628
+ $location = admin_url( 'post.php?post='.$duplicate_id.'&action=edit');
1629
+ header('Location:'.$location);
1630
+ exit;
1631
+ }
1632
+
1633
+ public static function form_submission_validate_request($request_data){
1634
+ if(!empty($request_data)){
1635
+ // Check for Remote Rainmaker form submission request
1636
+ $request_data['ig_is_remote'] = false;
1637
+ $request_data['is_remote'] = false;
1638
+ if(!empty($request_data['ig_mode']) && $request_data['ig_mode'] === 'remote'){
1639
+ $ig_remote_url = $request_data['ig_remote_url'];
1640
+ if(!empty($request_data['ig_campaign_id'])){
1641
+ $rules = get_post_meta( $request_data['ig_campaign_id'], 'icegram_campaign_target_rules', true );
1642
+ if( !empty($rules['remote_urls']) && is_array($rules['remote_urls']) ){
1643
+ foreach ($rules['remote_urls'] as $remote_url_pattern) {
1644
+ $valid = Icegram_Campaign::is_valid_url($remote_url_pattern , $ig_remote_url);
1645
+ if( $valid ){
1646
+ $request_data['ig_is_remote'] = true;
1647
+ $request_data['is_remote'] = true;
1648
+ break;
1649
+ }
1650
+ }
1651
+ //TODO :: discard the the remote request and data
1652
+ // if($request_data['ig_is_remote'] == false){
1653
+ // return array();
1654
+ // }
1655
+ }
1656
+
1657
+ }
1658
+ }
1659
+ }
1660
+ return $request_data;
1661
+ }
1662
+
1663
+ }
1664
+
1665
+
1666
+ function initialize_icegram() {
1667
+ global $icegram;
1668
+
1669
+ // i18n / l10n - load translations
1670
+ load_plugin_textdomain( 'icegram', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
1671
+
1672
+ $icegram = new Icegram();
1673
+ do_action('icegram_loaded');
1674
+ }
1675
+
1676
+ add_action( 'plugins_loaded', 'initialize_icegram' );
1677
+ register_activation_hook( __FILE__, array( 'Icegram', 'install' ) );
trunk/ig-offer.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if( get_option('ig_offer_christmas_done_icegram') == 1 ) return;
3
+ ?>
4
+ <style type="text/css">
5
+ .ig_offer{
6
+ width: 90%;
7
+ height: auto;
8
+ margin: 1em auto;
9
+ text-align: center;
10
+ background-color: #00003a;
11
+ font-size: 1.2em;
12
+ /*font-family: sans-serif;*/
13
+ letter-spacing: 3px;
14
+ line-height: 1.2em;
15
+ padding: 2em;
16
+ background-image: url('<?php echo $this->plugin_url ?>/assets/images/christmas.png');
17
+ background-repeat: no-repeat;
18
+ background-size: contain;
19
+ background-position: left;
20
+ }
21
+ .ig_offer_heading{
22
+ color: #64badd;
23
+ color: #64ddc1;
24
+ padding: 1em 0;
25
+ line-height: 1.2em;
26
+ }
27
+ .ig_main_heading {
28
+ font-size: 3em;
29
+ color: #FFFFFF;
30
+ font-weight: 600;
31
+ margin-bottom: 0.6em;
32
+ line-height: 1.2em;
33
+ position: relative;
34
+ }
35
+
36
+ .ig_text{
37
+ font-size: 0.9em;
38
+ }
39
+ .ig_left_text{
40
+ padding: 0.6em 5.4em 0.6em;
41
+ color: #8a8a8a;
42
+ }
43
+ .ig_right_text{
44
+ color: #FFFFFF;
45
+ font-weight: 600;
46
+ max-width: 50%;
47
+ padding: 10px 56px;
48
+ width: auto;
49
+ margin: 0;
50
+ display: inline-block;
51
+ text-decoration: none;
52
+ background: #b70f0f;
53
+ }
54
+ .ig_right_text:hover, .ig_right_text:active{
55
+ color: inherit;
56
+ }
57
+ .ig_offer_content{
58
+ margin-left: 15%;
59
+ }
60
+ </style>
61
+ <div class="ig_offer">
62
+ <div style="float:right;"><img src="<?php echo $this->plugin_url ?>/assets/images/icegram-logo-16bit-gray-30.png"/></div>
63
+ <div class="ig_offer_content">
64
+ <div class="ig_offer_heading">It's time to be merry! </div>
65
+ <div class="ig_main_heading">Grab FLAT 20% OFF Storewide </div>
66
+ <div class="ig_text">
67
+ <div class="ig_left_text" style="font-size:1.1em;">Offer applicable on all premium plans of <span style="color:#64ddc1;font-weight:bold">Icegram, Rainmaker & Email Subscribers</span></div>
68
+ <a href="?ig_dismiss_admin_notice=1&ig_option_name=ig_offer_christmas_done" target="_blank" class="ig_right_text">Start Shopping</a>
69
+ <div class="ig_left_text">Offer ends on 26th December, 2017 - so hurry.. </div>
70
+ </div>
71
+ </div>
72
+ </div>
trunk/lang/icegram-de_DE.mo ADDED
Binary file
trunk/lang/icegram-de_DE.po ADDED
@@ -0,0 +1,1125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Icegram 1.1.1\n"
4
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/icegram\n"
5
+ "POT-Creation-Date: 2015-09-24 12:56+0100\n"
6
+ "PO-Revision-Date: 2015-12-30 16:49+0100\n"
7
+ "Last-Translator: Alessandro Massasso <alessandro.massasso@drivek.it>\n"
8
+ "Language-Team: Icegram Team <hello@icegram.com>\n"
9
+ "Language: de_DE\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
16
+ "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
17
+ "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
18
+ "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
19
+ "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
20
+ "X-Poedit-Basepath: .\n"
21
+ "X-Generator: Poedit 1.8.6\n"
22
+ "X-Loco-Target-Locale: it_IT\n"
23
+ "X-Poedit-SearchPath-0: ../.\n"
24
+
25
+ #: .././about-icegram.php:128 .././classes/class-icegram-campaign-admin.php:453
26
+ msgid "Name"
27
+ msgstr "Name"
28
+
29
+ #: .././about-icegram.php:132
30
+ msgid "E-mail"
31
+ msgstr "Email"
32
+
33
+ #: .././about-icegram.php:136
34
+ msgid "Subject"
35
+ msgstr "Betreff"
36
+
37
+ #: .././about-icegram.php:140 .././icegram.php:1015
38
+ #: .././classes/class-icegram-campaign-admin.php:47
39
+ #: .././classes/class-icegram-campaign-admin.php:64
40
+ msgid "Message"
41
+ msgstr "Nachricht"
42
+
43
+ #: .././about-icegram.php:167 .././icegram.php:417
44
+ msgid "Welcome to Icegram"
45
+ msgstr "Wilkommen zu Icegram"
46
+
47
+ #: .././about-icegram.php:169
48
+ msgid ""
49
+ "Your sample campaign is ready. We've added a few messages for you to test."
50
+ msgstr ""
51
+ "Ihre Probe-Kampagne ist fertig. Wir haben ein paar Nachrichten für Sie zum "
52
+ "testen hinzugefügt."
53
+
54
+ #: .././about-icegram.php:177
55
+ msgid "Edit & Publish it"
56
+ msgstr "Editieren & Veröffentlichen"
57
+
58
+ #: .././about-icegram.php:178
59
+ msgid "OR"
60
+ msgstr "oder"
61
+
62
+ #: .././about-icegram.php:179
63
+ msgid "Preview Campaign"
64
+ msgstr "Vorschau Kampagne"
65
+
66
+ #: .././about-icegram.php:184
67
+ #, php-format
68
+ msgid "Version: %s"
69
+ msgstr "Version: %s"
70
+
71
+ #: .././about-icegram.php:187
72
+ msgid "Questions? Need Help?"
73
+ msgstr "Fragen? Brauchen Sie Hilfe?"
74
+
75
+ #: .././about-icegram.php:188 .././about-icegram.php:295
76
+ msgid "Contact Us"
77
+ msgstr "Kontaktieren Sie uns."
78
+
79
+ #: .././about-icegram.php:198
80
+ msgid ""
81
+ "Do read Icegram's core concepts below to understand how you can use Icegram "
82
+ "to inspire, convert and engage your audience."
83
+ msgstr ""
84
+ "Sie lesen unten die Kernkonzepte von Icegram, um zu verstehen, wie Sie "
85
+ "Icegram verwenden, um zu inspirieren und um sich für ihre Zielgruppe "
86
+ "engagieren."
87
+
88
+ #: .././about-icegram.php:203 .././icegram.php:1014 .././icegram.php:1020
89
+ #: .././icegram.php:1026
90
+ msgid "Messages"
91
+ msgstr "Nachrichten"
92
+
93
+ #: .././about-icegram.php:204
94
+ msgid "A 'Message' is a communication you want to deliver to your audience."
95
+ msgstr ""
96
+ "Eine 'Nachricht' ist ein Text den Sie brauchen, wenn Sie ihr Publikum "
97
+ "beliefern möchten."
98
+
99
+ #: .././about-icegram.php:205
100
+ msgid "And Icegram comes with not one, but four message types."
101
+ msgstr "Icegram kommt nicht mit einen Nachrichtentyp, sondern mit vier."
102
+
103
+ #: .././about-icegram.php:206
104
+ msgid ""
105
+ "Different message types look and behave differently, but they all have many "
106
+ "common characteristics. For instance, most message types will allow you to "
107
+ "set a headline, a body text, label for the ‘call to action’ button, a link "
108
+ "for that button, theme and styling options, animation effect and position on "
109
+ "screen where that message should show."
110
+ msgstr ""
111
+ "Unterschiedliche Nachrichtentypen zu schauen und sich anders verhalten, aber "
112
+ "sie alle haben viele gemeinsame Merkmale. Zum Beispiel werden die meisten "
113
+ "Nachrichtentypen können Sie eine Überschrift, ein Textkörper, Bezeichnung "
114
+ "für die Schaltfläche \"Aufruf zum Handeln\", einen Link für diese Taste, "
115
+ "Thema und Styling-Optionen, Animationseffekt und die Position auf dem "
116
+ "Bildschirm festgelegt, wo die Nachricht sollte zeigen ."
117
+
118
+ #: .././about-icegram.php:210
119
+ msgid "Action Bar"
120
+ msgstr "Aktionsleiste"
121
+
122
+ #: .././about-icegram.php:212
123
+ msgid ""
124
+ "An action bar is a proven attention grabber. It shows up as a solid bar "
125
+ "either at top or bottom. Use it for your most important messages or time "
126
+ "sensitive announcements. Put longer content in it and it acts like a "
127
+ "collapsible panel!"
128
+ msgstr ""
129
+ "Eine Aktionsleiste erregt erwiesenen die Aufmerksamkeit. Sie zeigt sich als "
130
+ "eine solide Leiste entweder oben oder unten. Verwenden Sie es für Ihre "
131
+ "wichtigsten Nachrichten oder zeitkritische Ankündigungen. Setzen Sie mehr "
132
+ "Inhalte und es wirkt wie ein zusammenklappbare Tafel!"
133
+
134
+ #: .././about-icegram.php:213
135
+ msgid "Messenger"
136
+ msgstr "Messenger"
137
+
138
+ #: .././about-icegram.php:215
139
+ msgid ""
140
+ "A messenger is best used to invoke interest while your visitor is reading "
141
+ "your content. Users perceive it as something new, important and urgent and "
142
+ "are highly likely to click on it."
143
+ msgstr ""
144
+ "Ein Messenger wird am besten verwendet um Interesse zu erzeugen, während die "
145
+ "Besucher dabei sind den Inhalt der Seite zu lesen. Benutzer sehen es als "
146
+ "etwas Neues, wichtiges und dringendes und mit hoher Wahrscheinlichkeit "
147
+ "werden Sie darauf klicken."
148
+
149
+ #: .././about-icegram.php:219
150
+ msgid "Toast Notification"
151
+ msgstr "Toast Benachrichtigung"
152
+
153
+ #: .././about-icegram.php:221
154
+ msgid ""
155
+ "Want to alert your visitor about some news, an update from your blog, a "
156
+ "social proof or an offer? Use Icegram’s unique toast notification, it will "
157
+ "catch their attention, let them click on the message, and disappear after a "
158
+ "while."
159
+ msgstr ""
160
+ "Möchten Sie Ihre Besucher benachrichtigen über neue News, ein Update von "
161
+ "Ihrem Blog, einen sozialen Beweis oder ein Angebot aufmerksam machen? "
162
+ "Verwenden Icegram einzigartige Toast Benachrichtigung sie wird ihre "
163
+ "Aufmerksamkeit erregen, lassen Sie sie auf die Nachricht klicken, und nach "
164
+ "einer Weile verschwinden."
165
+
166
+ #: .././about-icegram.php:222
167
+ msgid "Popup"
168
+ msgstr "Popup"
169
+
170
+ #: .././about-icegram.php:224
171
+ msgid ""
172
+ "Lightbox popup windows are most widely used for lead capture, promotions and "
173
+ "additional content display. Ask visitors to sign up to your newsletter, or "
174
+ "like you on social networks, or tell them about a special offer..."
175
+ msgstr ""
176
+ "Lightbox Popup-Fenster werden am häufigsten für die Lead-Erfassung, Aktionen "
177
+ "und zusätzliche Inhalte verwendet. Forden Sie den Besucher auf Ihrem "
178
+ "Newsletter zu unterzeichnen, oder wie Sie in sozialen Netzwerken reden, oder "
179
+ "was Sie über ein spezielles Angebot zu ihnen sagen..."
180
+
181
+ #: .././about-icegram.php:234 .././icegram.php:977 .././icegram.php:983
182
+ msgid "Campaigns"
183
+ msgstr "Kampagnen"
184
+
185
+ #: .././about-icegram.php:235
186
+ msgid "Campaign = Messages + Rules"
187
+ msgstr "Kampagne = Nachricht + Regeln"
188
+
189
+ #: .././about-icegram.php:236
190
+ msgid ""
191
+ "A campaign allows sequencing multiple messages and defining targeting rules. "
192
+ "Create different campaigns for different marketing goals. Icegram supports "
193
+ "showing multiple campaigns on any page."
194
+ msgstr ""
195
+ "Eine Kampagne ermöglicht die Sequenzierung mehrerer Nachrichten und "
196
+ "Definieren Targeting-Regeln. Erstellen Sie verschiedene Kampagnen für "
197
+ "verschiedene Marketingziele. Icegram unterstützt mehrere Kampagnen auf einer "
198
+ "beliebigen Seite."
199
+
200
+ #: .././about-icegram.php:237
201
+ msgid ""
202
+ "You can always preview your campaign to ensure campaign works the way you "
203
+ "want, before making it live."
204
+ msgstr ""
205
+ "Sie können jederzeit eine Vorschau Ihrer Kampagne machen, damit Sie "
206
+ "sicherstellen wie diese aussieht."
207
+
208
+ #: .././about-icegram.php:241
209
+ msgid "Multiple Messages & Sequencing"
210
+ msgstr "Mehrere Nachrichten & Sequenzierung"
211
+
212
+ #: .././about-icegram.php:243
213
+ msgid ""
214
+ "Add one or as many messages to a campaign as you want. Also choose the "
215
+ "number of seconds after which each message should show up. Showing multiple "
216
+ "messages for same goal, but with slightly different content / presentation, "
217
+ "greatly improves conversions."
218
+ msgstr ""
219
+ "Fügen Sie eine oder mehrere Nachrichten zu einer Kampagne, ganz wie Sie "
220
+ "wollen. Wählen Sie auch die Anzahl der Sekunden, nach der jede Nachricht "
221
+ "erscheinen soll. Mehrere Nachrichten zum gleichen Ziel, aber mit etwas "
222
+ "anderen Inhalt / Gestaltung verbessert die Conversions-Rate."
223
+
224
+ #: .././about-icegram.php:247 .././classes/class-icegram-campaign-admin.php:49
225
+ msgid "Targeting Rules"
226
+ msgstr "Ziel Regeln"
227
+
228
+ #: .././about-icegram.php:249
229
+ msgid ""
230
+ "You can control who sees a campaign – and on what device, which pages does "
231
+ "it show on, and what time period will it stay active for. You can run "
232
+ "different campaigns with different rules to maximize engagement."
233
+ msgstr ""
234
+ "Sie können steuern, wer eine Kampagne sieht, auf welchem Gerät, auf welchen "
235
+ "Seiten sie zu zeigen ist, und für was für einen Zeitraum sie aktiv bleiben. "
236
+ "Sie können verschiedene Kampagnen mit unterschiedlichen Regeln ausführen um "
237
+ "das Engagement zu maximieren."
238
+
239
+ #: .././about-icegram.php:259
240
+ msgid "FAQ / Common Problems"
241
+ msgstr "FAQ / Häufige Probleme"
242
+
243
+ #: .././about-icegram.php:261
244
+ msgid "Messages look broken / formatting is weird..."
245
+ msgstr "Nachrichten sehen defekt aus / Formatierung ist seltsam ..."
246
+
247
+ #: .././about-icegram.php:262
248
+ msgid ""
249
+ "This is most likely due to CSS conflicts with current theme. We suggest "
250
+ "using simple formatting for messages. You can also write custom CSS in your "
251
+ "theme to fix any problems."
252
+ msgstr ""
253
+ "Dies sind wahrscheinlich CSS Konflikte mit dem aktuellen Theme . Wir "
254
+ "schlagen einfachen Formatierungen für Nachrichten vor. Sie können auch "
255
+ "benutzerdefinierte CSS in Ihrem Theme schreiben um Probleme zu beheben."
256
+
257
+ #: .././about-icegram.php:264
258
+ msgid "Extra Line Breaks / Paragraphs in messages..."
259
+ msgstr "Zusätzliche Zeilenumbrüche / Absätze in Nachrichten..."
260
+
261
+ #: .././about-icegram.php:265
262
+ msgid ""
263
+ "Go to HTML mode in content editor and pull your custom HTML code all "
264
+ "together in one line. Don't leave blank lines between two tags. That should "
265
+ "fix it."
266
+ msgstr ""
267
+ "Gehen Sie zum HTML-Modus in Content-Editor, und ziehen Sie Ihre "
268
+ "benutzerdefinierte HTML Code zusammen in eine Zeile. Keine Leerzeilen "
269
+ "zwischen zwei Tag lassen. Das sollte es beheben."
270
+
271
+ #: .././about-icegram.php:267
272
+ msgid "How do I add custom CSS for messages?"
273
+ msgstr "Wie kann ich benutzerdefinierte CSS für Nachrichten hinzufügen?"
274
+
275
+ #: .././about-icegram.php:268
276
+ msgid ""
277
+ "You can use custom CSS/JS inline in your message HTML. You can also use your "
278
+ "theme's custom JS / CSS feature to add your changes."
279
+ msgstr ""
280
+ "Sie können benutzerdefinierte CSS / JS inline in Ihrem Beitrag HTML "
281
+ "verwenden. Sie können auch benutzerdefinierte JS / CSS-Funktion Ihres Theme "
282
+ "verwenden um Änderungen hinzuzufügen."
283
+
284
+ #: .././about-icegram.php:270
285
+ msgid "Optin Forms / Mailing service integration..."
286
+ msgstr "Optin Formulare / Mailing Service-Integration..."
287
+
288
+ # ?
289
+ #: .././about-icegram.php:271
290
+ msgid ""
291
+ "You can embed any optin / subscription form to your Icegram messages using "
292
+ "'Embed Form' button above text editor. Paste in form HTML code and let "
293
+ "Icegram clean it up! You may even use a shortcode if you are using a WP "
294
+ "plugin from your newsletter / lead capture service."
295
+ msgstr ""
296
+ "Sie können beliebige optin / Anmeldeformulare, Icegram Nachrichten mit "
297
+ "'Embed Formular \" mit dem Button oben im Texteditor einbetten. Einfügen in "
298
+ "Form HTML Code und dann lassen Icegram aufräumen! Sie können sogar mit einem "
299
+ "Shortcode, wenn Sie mit einer WP Plugin von Ihrem Newsletter / Lead Capture "
300
+ "Service arbeiten verwenden."
301
+
302
+ #: .././about-icegram.php:273
303
+ msgid "How many messages should I show on a page?"
304
+ msgstr "Wie viele Nachrichten sollte ich auf eine Seite zu zeigen?"
305
+
306
+ #: .././about-icegram.php:274
307
+ msgid ""
308
+ "While Icegram provides you lots of different message types and ability to "
309
+ "add multiple messages to a campaign, we discourage you to go overboard. "
310
+ "We've observed two messages on a page work well, but YMMV!"
311
+ msgstr ""
312
+ "Icegram bietet Ihnen viele verschiedene Nachrichtentypen und die Fähigkeit, "
313
+ "mehrere Nachrichten zu einer Kampagne hinzuzufügen, aber mit zu vielen "
314
+ "werden über Sie Bord gehen. Wir haben zwei Nachrichten auf einer Seite "
315
+ "beobachtet was sich als gut erwiesen hat."
316
+
317
+ #: .././about-icegram.php:280
318
+ msgid "Preview does not work / not refreshing..."
319
+ msgstr "Vorschau funktioniert nicht / nicht aktualisiert..."
320
+
321
+ #: .././about-icegram.php:281
322
+ msgid ""
323
+ "Doing a browser refresh while previewing will not show your most recent "
324
+ "changes. Click 'Preview' button to see a preview with your latest changes."
325
+ msgstr ""
326
+ "Machen Sie eine Aktualisierung des Browsers wenn die Vorschau Ihre letzten "
327
+ "Änderungen nicht zeigt. Klicken Sie auf 'Vorschau', um eine Vorschau mit der "
328
+ "neuesten Änderungen zu sehen."
329
+
330
+ #: .././about-icegram.php:283
331
+ msgid "Can I use shortcodes in a message?"
332
+ msgstr "Kann ich Shortcodes in einer Nachricht verwenden?"
333
+
334
+ #: .././about-icegram.php:284
335
+ msgid ""
336
+ "Yes! Messages support shortcodes. You may need to adjust CSS so the "
337
+ "shortcode output looks good in your message."
338
+ msgstr ""
339
+ "Ja! Mitteilungen unterstützen Shortcodes. Möglicherweise müssen Sie die CSS "
340
+ "anpassen, so dass die Shortcode- Ausgabe gut in Ihrer Nachricht aussieht."
341
+
342
+ #: .././about-icegram.php:286
343
+ msgid "WPML / Multilingual usage..."
344
+ msgstr "WPML / Mehrsprachige Nutzung..."
345
+
346
+ #: .././about-icegram.php:287
347
+ msgid ""
348
+ "Go to <code>Messages</code> from Icegram menu. Edit a message and translate "
349
+ "it like any other post. Icegram will show translated message where possible. "
350
+ "Choose <code>All posts</code> under WPML Language setting - Blog Posts to "
351
+ "display, to fall back to default language messages."
352
+ msgstr ""
353
+ "Gehen Sie zu <code>Nachrichten</code> aus Icegram Menü. Bearbeiten Sie eine "
354
+ "Nachricht und übersetzen sie sie wie jede andere Nachricht. Icegram wird die "
355
+ "Nachricht wenn möglich übersetzen. Wählen Sie <code>Alle Einträge </code> "
356
+ "unter WPML Spracheinstellung - Blogeinträge damit diese angezeigt werden um "
357
+ "auf die Standardsprach Meldungen zurückgreifen."
358
+
359
+ #: .././about-icegram.php:291
360
+ msgid "I can't find a way to do X..."
361
+ msgstr "Ich kann keinen Weg zu X finden..."
362
+
363
+ #: .././about-icegram.php:292
364
+ msgid ""
365
+ "Icegram is actively developed. If you can't find your favorite feature (or "
366
+ "have a suggestion) contact us. We'd love to hear from you."
367
+ msgstr ""
368
+ "Icegram wird aktiv entwickelt. Wenn Sie Ihre Lieblings-Feature nicht finden "
369
+ "können (oder einen Vorschlag haben) kontaktieren Sie uns. Wir würden uns "
370
+ "freuen von Ihnen zu hören."
371
+
372
+ #: .././about-icegram.php:294
373
+ msgid "I'm facing a problem and can't find a way out..."
374
+ msgstr "Ich bin vor einem Problem und kann keinen Ausweg finden .."
375
+
376
+ #: .././about-icegram.php:295
377
+ msgid ""
378
+ ", provide as much detail of the problem as you can. We will try to solve the "
379
+ "problem ASAP."
380
+ msgstr ""
381
+ ", beschreiben Sie so viele Details des Problems wie möglich. Wir werden "
382
+ "versuchen, das Problem so schnell wie möglich zu lösen."
383
+
384
+ #: .././icegram.php:157
385
+ msgid "Free Add-ons, Proven Marketing Tricks and Updates"
386
+ msgstr "Kostenlose Add-ons, bewährte Marketing-Tricks und Updates"
387
+
388
+ #: .././icegram.php:162
389
+ msgid "Get add-ons and tips..."
390
+ msgstr "Holen Sie sich Add-ons und Tipps..."
391
+
392
+ #: .././icegram.php:253
393
+ msgid "Housekeeping"
394
+ msgstr "Haushaltung"
395
+
396
+ #: .././icegram.php:257
397
+ msgid "Remove all Icegram shortcodes"
398
+ msgstr "Entferne alle Icegram Shortcodes"
399
+
400
+ #: .././icegram.php:262
401
+ msgid "Remove all Icegram campaigns and messages"
402
+ msgstr "Entferne alle Icegram Kampagnen und Nachrichten"
403
+
404
+ #: .././icegram.php:266
405
+ msgid "Clean Up"
406
+ msgstr "Reinigen"
407
+
408
+ #: .././icegram.php:275
409
+ msgid ""
410
+ "You won't be able to recover this data once you proceed. Do you really want "
411
+ "to perform this action?"
412
+ msgstr ""
413
+ "Wenn Sie hier fortfahren werden Sie nicht in der Lage sein, diese Daten "
414
+ "wiederherzustellen. Wollen Sie wirklich diese Aktion durchführen?"
415
+
416
+ #: .././icegram.php:289
417
+ msgid "Done!"
418
+ msgstr "Fertig!"
419
+
420
+ #: .././icegram.php:418
421
+ msgid "Settings"
422
+ msgstr "Einstellungen"
423
+
424
+ #: .././icegram.php:419
425
+ msgid "Add-ons"
426
+ msgstr "Add-ons"
427
+
428
+ #: .././icegram.php:432
429
+ msgid "Docs & Support"
430
+ msgstr "Dokumente & Support"
431
+
432
+ #: .././icegram.php:621
433
+ msgid "Powered by Icegram"
434
+ msgstr "Powered by Icegram"
435
+
436
+ #: .././icegram.php:978
437
+ msgid "Campaign"
438
+ msgstr "Kampagne"
439
+
440
+ #: .././icegram.php:979 .././icegram.php:980
441
+ msgid "Add New Campaign"
442
+ msgstr "Kampagne hinzufügen"
443
+
444
+ #: .././icegram.php:981
445
+ msgid "Edit Campaign"
446
+ msgstr "Kampagne ändern"
447
+
448
+ #: .././icegram.php:982
449
+ msgid "New Campaign"
450
+ msgstr "Neue Kampagne"
451
+
452
+ #: .././icegram.php:984
453
+ msgid "View Campaign"
454
+ msgstr "Kampagne anzeigen"
455
+
456
+ #: .././icegram.php:985
457
+ msgid "Search Campaigns"
458
+ msgstr "Kampagne suchen"
459
+
460
+ #: .././icegram.php:986
461
+ msgid "No campaigns found"
462
+ msgstr "Keine Kampagne gefunden"
463
+
464
+ #: .././icegram.php:987
465
+ msgid "No campaigns found in Trash"
466
+ msgstr "Keine Kampagnen im Papierkorb gefunden"
467
+
468
+ #: .././icegram.php:989
469
+ msgid "Icegram"
470
+ msgstr "Icegram"
471
+
472
+ #: .././icegram.php:1016
473
+ msgid "Create New"
474
+ msgstr "Neue"
475
+
476
+ #: .././icegram.php:1017
477
+ msgid "Create New Message"
478
+ msgstr "Neue Nachricht anlegen"
479
+
480
+ #: .././icegram.php:1018 .././classes/class-icegram-campaign-admin.php:103
481
+ #: .././classes/class-icegram-campaign-admin.php:502
482
+ msgid "Edit Message"
483
+ msgstr "Nachricht ändern"
484
+
485
+ #: .././icegram.php:1019
486
+ msgid "New Message"
487
+ msgstr "Neue Nachricht"
488
+
489
+ #: .././icegram.php:1021
490
+ msgid "View Message"
491
+ msgstr "Nachricht anzeigen"
492
+
493
+ #: .././icegram.php:1022
494
+ msgid "Search Messages"
495
+ msgstr "Nachricht suchen"
496
+
497
+ #: .././icegram.php:1023
498
+ msgid "No messages found"
499
+ msgstr "Keine Nachricht gefunden"
500
+
501
+ #: .././icegram.php:1024
502
+ msgid "No messages found in Trash"
503
+ msgstr "Keine Nachricht im Papierkorp gefunden"
504
+
505
+ #: .././icegram.php:1422
506
+ msgid "Copy"
507
+ msgstr "Kopieren"
508
+
509
+ #: .././settings.php:19
510
+ msgid "Icegram Settings"
511
+ msgstr "Icegram Einstellungen"
512
+
513
+ #: .././settings.php:23
514
+ msgid "Share Icegram"
515
+ msgstr "Teile Icegram"
516
+
517
+ #: .././settings.php:27
518
+ msgid "Show \"Powered by\" link"
519
+ msgstr "Zeige \"Powered by\" Link"
520
+
521
+ #: .././settings.php:32
522
+ msgid "Cache Friendly?"
523
+ msgstr "Cache freundlich?"
524
+
525
+ #: .././settings.php:36
526
+ msgid ""
527
+ "Turn on \"Lazy Load\" - load Icegram scripts and messages after page load to "
528
+ "avoid caching problems."
529
+ msgstr ""
530
+ "Schalten Sie \"Lazy Load\" - Icegram Skripte und Nachrichten nach dem Laden "
531
+ "der Seite um Caching Probleme zu vermeiden."
532
+
533
+ #: .././addons.php:13
534
+ msgid "Icegram Add-ons"
535
+ msgstr "Icegram Add-ons"
536
+
537
+ #: .././addons.php:47
538
+ msgid "Sorry! No Add-ons available currently."
539
+ msgstr "Es tut uns leid! Derzeit keine verfügbaren Add-ons."
540
+
541
+ #: .././classes/class-icegram-message-admin.php:41
542
+ msgid "Message Settings"
543
+ msgstr "Nachrichten Einstellungen"
544
+
545
+ #: .././classes/class-icegram-message-admin.php:113
546
+ #: .././classes/class-icegram-message-admin.php:520
547
+ #: .././classes/class-icegram-campaign-admin.php:452
548
+ msgid "Type"
549
+ msgstr "Type"
550
+
551
+ #: .././classes/class-icegram-message-admin.php:129
552
+ #: .././classes/class-icegram-message-admin.php:521
553
+ msgid "Theme"
554
+ msgstr "Theme"
555
+
556
+ #: .././classes/class-icegram-message-admin.php:146
557
+ msgid "Animation"
558
+ msgstr "Animation"
559
+
560
+ #: .././classes/class-icegram-message-admin.php:161
561
+ msgid "Headline"
562
+ msgstr "Headline"
563
+
564
+ #: .././classes/class-icegram-message-admin.php:162
565
+ msgid ""
566
+ "Shown with highest prominence. Click on idea button on right to get a new "
567
+ "headline."
568
+ msgstr ""
569
+ "Dargestellt mit höchster Prominenz. Klicken Sie auf die Idee Taste auf "
570
+ "Recht, eine neue Schlagzeile zu bekommen."
571
+
572
+ #: .././classes/class-icegram-message-admin.php:168
573
+ msgid "Give Me Another Headline"
574
+ msgstr "Gib mir noch eine Überschrift"
575
+
576
+ #: .././classes/class-icegram-message-admin.php:174
577
+ msgid "Icon / Avatar Image"
578
+ msgstr "Symbol / Profilbild"
579
+
580
+ #: .././classes/class-icegram-message-admin.php:175
581
+ msgid "This image will appear in message content."
582
+ msgstr "Dieses Bild wird im Nachrichteninhalt angezeigt."
583
+
584
+ #: .././classes/class-icegram-message-admin.php:178
585
+ msgid "Upload / Select an image"
586
+ msgstr "Upload / Wählen Sie ein Bild"
587
+
588
+ #: .././classes/class-icegram-message-admin.php:178
589
+ msgid "Upload / Select Image"
590
+ msgstr "Upload / Bild auswählen"
591
+
592
+ #: .././classes/class-icegram-message-admin.php:194
593
+ msgid "Message Body"
594
+ msgstr "Body Nachricht"
595
+
596
+ #: .././classes/class-icegram-message-admin.php:225
597
+ msgid "Form"
598
+ msgstr "Form"
599
+
600
+ #: .././classes/class-icegram-message-admin.php:226
601
+ msgid "Use Opt-in / Subscription / Lead capture form"
602
+ msgstr "Verwenden Sie Opt-in / Abonnement / Lead Capture-Form"
603
+
604
+ #: .././classes/class-icegram-message-admin.php:251
605
+ #: .././classes/class-icegram-message-admin.php:253
606
+ msgid "Left"
607
+ msgstr "Links"
608
+
609
+ #: .././classes/class-icegram-message-admin.php:258
610
+ #: .././classes/class-icegram-message-admin.php:260
611
+ msgid "Right"
612
+ msgstr "Rechts"
613
+
614
+ #: .././classes/class-icegram-message-admin.php:265
615
+ #: .././classes/class-icegram-message-admin.php:267
616
+ msgid "Bottom"
617
+ msgstr "Unten"
618
+
619
+ #: .././classes/class-icegram-message-admin.php:282
620
+ #: .././classes/class-icegram-message-admin.php:284
621
+ msgid "Inline"
622
+ msgstr "In Zeile"
623
+
624
+ #: .././classes/class-icegram-message-admin.php:296
625
+ msgid "Background Color"
626
+ msgstr "Hintergrundfarbe"
627
+
628
+ #: .././classes/class-icegram-message-admin.php:297
629
+ msgid "Text Color"
630
+ msgstr "Textfarbe"
631
+
632
+ #: .././classes/class-icegram-message-admin.php:308
633
+ msgid "Text / HTML to show before the form"
634
+ msgstr "Text / HTML vor dem Formular zeigen"
635
+
636
+ #: .././classes/class-icegram-message-admin.php:312
637
+ msgid "Form Embed Code"
638
+ msgstr "Form Embed Code"
639
+
640
+ #: .././classes/class-icegram-message-admin.php:314
641
+ msgid "Paste HTML / shortcode of your form here..."
642
+ msgstr "Fügen Sie HTML / Shortcode in das Formular ein..."
643
+
644
+ # ?
645
+ #: .././classes/class-icegram-message-admin.php:318
646
+ msgid "Show labels above fields"
647
+ msgstr "Zeige die Beschriftung über den Feldern"
648
+
649
+ #: .././classes/class-icegram-message-admin.php:325
650
+ msgid "Text / HTML to show after the form"
651
+ msgstr "Text / HTML nach dem Formular zeigen"
652
+
653
+ #: .././classes/class-icegram-message-admin.php:329
654
+ msgid ""
655
+ "Insert <code>[ig_form]</code> where you want to show this form in message "
656
+ "body."
657
+ msgstr ""
658
+ "Fügen Sie <code>[ig_form] </code> in das Formular in dem der "
659
+ "Nachrichtentext angezeigt werden sollen ein."
660
+
661
+ #: .././classes/class-icegram-message-admin.php:336
662
+ msgid "Button Label"
663
+ msgstr "Button Beschriftung"
664
+
665
+ #: .././classes/class-icegram-message-admin.php:337
666
+ msgid "Your call to action text. Something unusual will increase conversions."
667
+ msgstr "Ihr CTA Text. Etwas ungewöhnliches wird Conversion steigern."
668
+
669
+ #: .././classes/class-icegram-message-admin.php:347
670
+ msgid "Target Link"
671
+ msgstr "Ziel Link"
672
+
673
+ #: .././classes/class-icegram-message-admin.php:348
674
+ msgid "Enter destination URL here. Clicking will redirect to this link."
675
+ msgstr ""
676
+ "Geben Sie hier die Ziel-URL ein. Ein Klick leitet Sieauf diesen Link weiter."
677
+
678
+ #: .././classes/class-icegram-message-admin.php:371
679
+ msgid "Body"
680
+ msgstr "Body"
681
+
682
+ #: .././classes/class-icegram-message-admin.php:372
683
+ #: .././classes/class-icegram-message-admin.php:378
684
+ msgid "Background"
685
+ msgstr "Hintergrund"
686
+
687
+ #: .././classes/class-icegram-message-admin.php:373
688
+ #: .././classes/class-icegram-message-admin.php:379
689
+ msgid "Text"
690
+ msgstr "Text"
691
+
692
+ #: .././classes/class-icegram-message-admin.php:377
693
+ msgid "Button"
694
+ msgstr "Button"
695
+
696
+ #: .././classes/class-icegram-message-admin.php:384
697
+ msgid "Colors"
698
+ msgstr "Farben"
699
+
700
+ #: .././classes/class-icegram-message-admin.php:385
701
+ msgid "Use theme's default colors"
702
+ msgstr "Verwenden Sie die Standardfarben Theme"
703
+
704
+ #: .././classes/class-icegram-message-admin.php:391
705
+ msgid "Position"
706
+ msgstr "Position"
707
+
708
+ #: .././classes/class-icegram-message-admin.php:450
709
+ #, php-format
710
+ msgid "You may add <code>[%s]</code> where you want to show this message."
711
+ msgstr ""
712
+ "Sie können <code>[% s]</code> einfügen wo diese Nachricht angezeigt werden "
713
+ "soll."
714
+
715
+ #: .././classes/class-icegram-message-admin.php:522
716
+ msgid "Thumbnail"
717
+ msgstr "Thumbnail"
718
+
719
+ #: .././classes/class-icegram-message-admin.php:664
720
+ msgid "Here Is A Method That Is Helping ____ To ____"
721
+ msgstr "Hier ist eine Methode die hilft ____ um ____"
722
+
723
+ #: .././classes/class-icegram-message-admin.php:665
724
+ msgid "__ Little Known Ways To ____"
725
+ msgstr "__ wenig bekannte Wege um ____"
726
+
727
+ #: .././classes/class-icegram-message-admin.php:666
728
+ msgid "Get Rid Of ____ Once And For All"
729
+ msgstr "Beseitige ____ ein für alle Mal"
730
+
731
+ #: .././classes/class-icegram-message-admin.php:667
732
+ msgid "How To ____ So You Can ____"
733
+ msgstr "Wie man ____ Sie können ____"
734
+
735
+ #: .././classes/class-icegram-message-admin.php:668
736
+ msgid "They Didn't Think I Could ____, But I Did"
737
+ msgstr "Sie wussten nicht, dass ich ____, aber ich habe"
738
+
739
+ #: .././classes/class-icegram-message-admin.php:669
740
+ msgid "How ____ Made Me ____"
741
+ msgstr "Wie ____ machte ich mich ____"
742
+
743
+ #: .././classes/class-icegram-message-admin.php:670
744
+ msgid "Are You ____ ?"
745
+ msgstr "Bist du ____ ?"
746
+
747
+ #: .././classes/class-icegram-message-admin.php:671
748
+ msgid "Warning: ____ !"
749
+ msgstr "Warnung: ____ !"
750
+
751
+ #: .././classes/class-icegram-message-admin.php:672
752
+ msgid "Do You Make These Mistakes With ____ ?"
753
+ msgstr "Machst du diese Fehler mit ____?"
754
+
755
+ #: .././classes/class-icegram-message-admin.php:673
756
+ msgid "7 Ways To ____"
757
+ msgstr "7 Wege zum ____"
758
+
759
+ #: .././classes/class-icegram-message-admin.php:674
760
+ msgid "If You're ____, You Can ____"
761
+ msgstr "Wenn Sie ____, können Sie ____"
762
+
763
+ #: .././classes/class-icegram-message-admin.php:675
764
+ msgid "Turn your ____ into a ____"
765
+ msgstr "Verwandeln Sie Ihren ____ in ____ ein"
766
+
767
+ #: .././classes/class-icegram-message-admin.php:676
768
+ msgid "Want To Be A ____?"
769
+ msgstr "Möchten Sie ein ____?"
770
+
771
+ #: .././classes/class-icegram-message-admin.php:677
772
+ msgid "The Ugly Truth About Your Beautiful ____"
773
+ msgstr "Die nackte Wahrheit über Ihre Schöne ____"
774
+
775
+ #: .././classes/class-icegram-message-admin.php:678
776
+ msgid "The Secret to ____ Is Simply ____!"
777
+ msgstr "Das Geheimnis für ____ ist einfach ____!"
778
+
779
+ #: .././classes/class-icegram-message-admin.php:679
780
+ msgid "The Quickest Way I Know To ____"
781
+ msgstr "Der schnellste Weg den ixh weiß um ____"
782
+
783
+ # La traduzione letterale non rendeva in italiano. Creato un titolo diverso.
784
+ #: .././classes/class-icegram-message-admin.php:680
785
+ msgid "The Lazy Man's Way To ____"
786
+ msgstr "Die Faule Weg um ____"
787
+
788
+ # La traduzione in italiano non rende. Suggerimenti?
789
+ #: .././classes/class-icegram-message-admin.php:681
790
+ msgid ""
791
+ "The Amazing Story Of ____ That Requires So Little Of ____ You Could ____"
792
+ msgstr ""
793
+ "Die erstaunliche Geschichte ____ Das ist so wenig benötigen von ____ Sie "
794
+ "könnten ____ "
795
+
796
+ # La traduzione in italiano non rende. Suggerimenti?
797
+ #: .././classes/class-icegram-message-admin.php:682
798
+ msgid "The Amazing Secret Of The ____ Genius Who Is Afraid Of ____"
799
+ msgstr "Das erstaunliche Geheimnis der ____ Genius Wer hat Angst vor ____"
800
+
801
+ #: .././classes/class-icegram-message-admin.php:683
802
+ msgid "The 10 Wackiest Ideas That ____... And How You Can Too!"
803
+ msgstr "Die 10 verrücktesten Ideen Das ____... Und wie kannst du das auch!"
804
+
805
+ # La traduzione in italiano non rende. Ho creato un altro titolo. Altri suggerimenti?
806
+ #: .././classes/class-icegram-message-admin.php:684
807
+ msgid "The Inside Secrets To ____ With Crazy, Outlandish And Outrageous ____"
808
+ msgstr ""
809
+ "Die innere Geheimnisse zu ____ Mit verrückt, ausgefallen und empörend ____"
810
+
811
+ #: .././classes/class-icegram-message-admin.php:685
812
+ msgid "____ Like A ____"
813
+ msgstr "____ gleich wie ____"
814
+
815
+ #: .././classes/class-icegram-message-admin.php:686
816
+ msgid "Remember When You Could Have ____, And You Didn't?"
817
+ msgstr "Denken Sie daran, wenn Sie hätten ____, Und ihr habt nicht?"
818
+
819
+ # La trsduzione letterale non rendeva in italiano. Creata nuova frase.
820
+ #: .././classes/class-icegram-message-admin.php:687
821
+ msgid "Is The ____ Worth $x To You?"
822
+ msgstr "Ist ____ im Wert von $x für Sie?"
823
+
824
+ #: .././classes/class-icegram-message-admin.php:688
825
+ msgid "Increase your ____, reduce ____, maintain ____ and ____ with ____"
826
+ msgstr ""
827
+ "Steigern Sie Ihren ____, ____ reduzieren Sie, halten ____ und ____ mit ____"
828
+
829
+ #: .././classes/class-icegram-message-admin.php:689
830
+ msgid "If You Can ____ You Can ____"
831
+ msgstr "Wenn Sie können ____ Sie können ____"
832
+
833
+ #: .././classes/class-icegram-message-admin.php:690
834
+ msgid "I Discovered How To ____... Now I'm Revealing My Secret"
835
+ msgstr "Ich entdeckte, wie man ____... Ich enthülle meine Geheimnisse"
836
+
837
+ #: .././classes/class-icegram-message-admin.php:691
838
+ msgid "How To Turn Your ____ Into The Most ____"
839
+ msgstr "Wie man ____ wandelt ____ in die meist ____"
840
+
841
+ # La traduzione letterale non rendeva in italiano. Creata nuova frase.
842
+ #
843
+ #
844
+ #: .././classes/class-icegram-message-admin.php:692
845
+ msgid "How To Take The Headache Out Of ____"
846
+ msgstr "Wie man den Kopfschmerz aus ____"
847
+
848
+ #: .././classes/class-icegram-message-admin.php:693
849
+ msgid "How To ____ ... Legally"
850
+ msgstr "Wie man ____ ... Rechtlich"
851
+
852
+ #: .././classes/class-icegram-message-admin.php:694
853
+ msgid "How To ____ That ____"
854
+ msgstr "Wie man das ____"
855
+
856
+ #: .././classes/class-icegram-message-admin.php:695
857
+ msgid "How To Discover The ____ That Lies Hidden In Your ____"
858
+ msgstr "Wie Sie entdecken ____ Das liegt versteckt in ihrer ____"
859
+
860
+ #: .././classes/class-icegram-message-admin.php:696
861
+ msgid "How To ____ Even When Your Not ____"
862
+ msgstr "Wie man ____ auch wenn Sie nicht ____"
863
+
864
+ #: .././classes/class-icegram-message-admin.php:697
865
+ msgid "____ With No ____!"
866
+ msgstr "____ Ohne ____!"
867
+
868
+ #: .././classes/class-icegram-message-admin.php:698
869
+ msgid "Greatest Goldmine of ____ Ever Jammed Into One Big ____"
870
+ msgstr "Größten Goldminen von ____ Blockierte immer in eine große ____"
871
+
872
+ #: .././classes/class-icegram-message-admin.php:699
873
+ msgid "Free ____ Tells How To Get Better ____"
874
+ msgstr "Kostenlose ____ erklärt, wie man besser ____"
875
+
876
+ #: .././classes/class-icegram-message-admin.php:700
877
+ msgid ""
878
+ "FREE ____ Worth $____ for the first 100 People to take Advantage of this "
879
+ "Offer"
880
+ msgstr ""
881
+ "Kostenlose ____ im Wert von $____ für die ersten 100 Leute, um von diesem "
882
+ "Angebot Gebrauch zu nehmen"
883
+
884
+ #: .././classes/class-icegram-message-admin.php:701
885
+ msgid "Don't Try This With Any Other ____"
886
+ msgstr "Versuchen nicht dieses mit jeder anderen ____"
887
+
888
+ #: .././classes/class-icegram-message-admin.php:702
889
+ msgid "Do You Honestly Want To ____?"
890
+ msgstr "Wollen Sie ehrlich ____?"
891
+
892
+ #: .././classes/class-icegram-message-admin.php:703
893
+ msgid "Discover The Magic ____ That Will Bring You ____ & ____!"
894
+ msgstr "Entdecken Sie den Zauber ____ Das bringt Sie ____ & ____!"
895
+
896
+ #: .././classes/class-icegram-message-admin.php:704
897
+ msgid "____ Man Reveals A Short-Cut To ____"
898
+ msgstr "____ Man zeigt einen Short-Cut zu ____"
899
+
900
+ #: .././classes/class-icegram-message-admin.php:705
901
+ msgid "Confessions Of A ____"
902
+ msgstr "Bekenntnis einer ____"
903
+
904
+ #: .././classes/class-icegram-message-admin.php:706
905
+ msgid "Are You Ready To ____?"
906
+ msgstr "Bist du bereit für ____?"
907
+
908
+ #: .././classes/class-icegram-message-admin.php:707
909
+ msgid "An Open Letter To Everyone Who ____ More Than ____ Per ____"
910
+ msgstr "Ein offener Brief an alle, die mehr als ____ per"
911
+
912
+ #: .././classes/class-icegram-message-admin.php:708
913
+ msgid "An Amazing ____ You Can Carry In Your ____"
914
+ msgstr "Ein erstaunliches ____ können Sie ____ tragen"
915
+
916
+ #: .././classes/class-icegram-message-admin.php:709
917
+ msgid "21 Secret ____ that will ____... NOW!"
918
+ msgstr "21 Geheimnise ____ die JETZT ____... werden!"
919
+
920
+ #: .././classes/class-icegram-message-admin.php:716
921
+ #: .././classes/class-icegram-campaign-admin.php:661
922
+ msgid "Duplicate"
923
+ msgstr "Duplikat"
924
+
925
+ #: .././classes/class-icegram-campaign-admin.php:56
926
+ msgid "Search to add / Create new&hellip;"
927
+ msgstr "Suche hinzufügen / Neues&hellip;"
928
+
929
+ #: .././classes/class-icegram-campaign-admin.php:59
930
+ #: .././classes/class-icegram-campaign-admin.php:439
931
+ msgid "Create new"
932
+ msgstr "Neue"
933
+
934
+ #: .././classes/class-icegram-campaign-admin.php:62
935
+ msgid "Preview"
936
+ msgstr "Vorschau"
937
+
938
+ #: .././classes/class-icegram-campaign-admin.php:95
939
+ #: .././classes/class-icegram-campaign-admin.php:495
940
+ msgid "Give this message a name for your own reference"
941
+ msgstr "Geben Sie diese Nachricht einen Namen für die eigene Referenz"
942
+
943
+ #: .././classes/class-icegram-campaign-admin.php:100
944
+ #: .././classes/class-icegram-campaign-admin.php:499
945
+ msgid " sec"
946
+ msgstr "sec"
947
+
948
+ #: .././classes/class-icegram-campaign-admin.php:104
949
+ #: .././classes/class-icegram-campaign-admin.php:503
950
+ msgid "Remove from Campaign"
951
+ msgstr "Von Kampagne entfernen"
952
+
953
+ #: .././classes/class-icegram-campaign-admin.php:122
954
+ msgid ""
955
+ "No messages yet. Use search / create bar above to add messages to this "
956
+ "campaign."
957
+ msgstr ""
958
+ "Noch keine Nachrichten. Verwenden Sie Suche / erstelle eine Leiste über die "
959
+ "Nachrichten um diese Kampagne hinzuzufügen."
960
+
961
+ #: .././classes/class-icegram-campaign-admin.php:160
962
+ msgid "Where?"
963
+ msgstr "Wo?"
964
+
965
+ #: .././classes/class-icegram-campaign-admin.php:163
966
+ msgid "Sitewide"
967
+ msgstr "Seitenweit"
968
+
969
+ #: .././classes/class-icegram-campaign-admin.php:165
970
+ #, php-format
971
+ msgid ""
972
+ "Additionally you can insert <code>[%s]</code> wherever you want to run this "
973
+ "campaign."
974
+ msgstr ""
975
+ "Zusätzlich können Sie den <code>[% s]</code> einfügen, wo immer Sie diese "
976
+ "Kampagne ausgeführt werden soll."
977
+
978
+ #: .././classes/class-icegram-campaign-admin.php:172
979
+ msgid "Select pages to exclude&hellip;"
980
+ msgstr "Wählen Sie Seiten um diese auszuschliessen&hellip;"
981
+
982
+ #: .././classes/class-icegram-campaign-admin.php:187
983
+ msgid "Homepage"
984
+ msgstr "Homepage"
985
+
986
+ #: .././classes/class-icegram-campaign-admin.php:194
987
+ msgid "Selected pages"
988
+ msgstr "Ausgewählte Seiten"
989
+
990
+ #: .././classes/class-icegram-campaign-admin.php:200
991
+ msgid "Select a page&hellip;"
992
+ msgstr "Wählen Sie eine Seite&hellip;"
993
+
994
+ #: .././classes/class-icegram-campaign-admin.php:215
995
+ msgid "Specific URLs on this site"
996
+ msgstr "Bestimmte URLs auf dieser Seite"
997
+
998
+ #: .././classes/class-icegram-campaign-admin.php:231
999
+ msgid " Add another"
1000
+ msgstr "Neu hinzufügen"
1001
+
1002
+ #: .././classes/class-icegram-campaign-admin.php:241
1003
+ msgid "When?"
1004
+ msgstr "Wann?"
1005
+
1006
+ #: .././classes/class-icegram-campaign-admin.php:244
1007
+ msgid "Always"
1008
+ msgstr "Immer"
1009
+
1010
+ #: .././classes/class-icegram-campaign-admin.php:251
1011
+ msgid "Schedule"
1012
+ msgstr "Zeitplan"
1013
+
1014
+ #: .././classes/class-icegram-campaign-admin.php:254
1015
+ msgid "From&hellip;"
1016
+ msgstr "Von&hellip;"
1017
+
1018
+ #: .././classes/class-icegram-campaign-admin.php:257
1019
+ msgid "To&hellip;"
1020
+ msgstr "Bis&hellip;"
1021
+
1022
+ #: .././classes/class-icegram-campaign-admin.php:265
1023
+ msgid "Device?"
1024
+ msgstr "Gerät?"
1025
+
1026
+ #: .././classes/class-icegram-campaign-admin.php:266
1027
+ msgid "Mobile / Smartphones"
1028
+ msgstr "Mobile / Smartphones"
1029
+
1030
+ #: .././classes/class-icegram-campaign-admin.php:270
1031
+ msgid "Tablet"
1032
+ msgstr "Tablet"
1033
+
1034
+ #: .././classes/class-icegram-campaign-admin.php:274
1035
+ msgid "Desktop / Laptop"
1036
+ msgstr "Desktop /Laptop"
1037
+
1038
+ #: .././classes/class-icegram-campaign-admin.php:282
1039
+ msgid "Who?"
1040
+ msgstr "Wer?"
1041
+
1042
+ #: .././classes/class-icegram-campaign-admin.php:285
1043
+ msgid "All users"
1044
+ msgstr "Alle Nutzer"
1045
+
1046
+ #: .././classes/class-icegram-campaign-admin.php:292
1047
+ msgid "Logged in users only"
1048
+ msgstr "Nur angemeldete Benutzer"
1049
+
1050
+ #: .././classes/class-icegram-campaign-admin.php:311
1051
+ msgid "Select a user role&hellip;"
1052
+ msgstr "Wählen Sie eine Benutzerrolle&hellip;"
1053
+
1054
+ #: .././classes/class-icegram-campaign-admin.php:327
1055
+ msgid "Not Logged in users"
1056
+ msgstr "Nicht angemeldete Benutzer"
1057
+
1058
+ #: .././classes/class-icegram-campaign-admin.php:331
1059
+ #: .././classes/class-icegram-campaign-admin.php:341
1060
+ msgid "Current Session"
1061
+ msgstr "Akt. Sitzung"
1062
+
1063
+ #: .././classes/class-icegram-campaign-admin.php:332
1064
+ #: .././classes/class-icegram-campaign-admin.php:340
1065
+ msgid "Never"
1066
+ msgstr "Nie"
1067
+
1068
+ #: .././classes/class-icegram-campaign-admin.php:333
1069
+ #: .././classes/class-icegram-campaign-admin.php:342
1070
+ msgid "Today"
1071
+ msgstr "Heute"
1072
+
1073
+ #: .././classes/class-icegram-campaign-admin.php:334
1074
+ #: .././classes/class-icegram-campaign-admin.php:343
1075
+ msgid "One week"
1076
+ msgstr "1 Woche"
1077
+
1078
+ #: .././classes/class-icegram-campaign-admin.php:335
1079
+ #: .././classes/class-icegram-campaign-admin.php:344
1080
+ msgid "Two weeks"
1081
+ msgstr "2 Wochen"
1082
+
1083
+ #: .././classes/class-icegram-campaign-admin.php:336
1084
+ #: .././classes/class-icegram-campaign-admin.php:345
1085
+ msgid "One Month "
1086
+ msgstr "1 Monat"
1087
+
1088
+ #: .././classes/class-icegram-campaign-admin.php:337
1089
+ #: .././classes/class-icegram-campaign-admin.php:346
1090
+ msgid "Three Months "
1091
+ msgstr "3 Monate"
1092
+
1093
+ #: .././classes/class-icegram-campaign-admin.php:338
1094
+ #: .././classes/class-icegram-campaign-admin.php:347
1095
+ msgid "One year"
1096
+ msgstr "1 Jahr"
1097
+
1098
+ #: .././classes/class-icegram-campaign-admin.php:339
1099
+ #: .././classes/class-icegram-campaign-admin.php:348
1100
+ msgid "Two Years"
1101
+ msgstr "2 Jahre"
1102
+
1103
+ #: .././classes/class-icegram-campaign-admin.php:353
1104
+ msgid "Retargeting"
1105
+ msgstr "Retargeting"
1106
+
1107
+ #: .././classes/class-icegram-campaign-admin.php:356
1108
+ msgid "Once shown, do NOT show this campaign again for"
1109
+ msgstr "Sobald gezeigt, diese Kampagne nicht wieder zeigen für"
1110
+
1111
+ #: .././classes/class-icegram-campaign-admin.php:371
1112
+ msgid "Once CTA is clicked, do NOT show this campaign again for"
1113
+ msgstr "Sobald CTA geklickt wird, diese Kampa. nicht zeigen für"
1114
+
1115
+ #: .././classes/class-icegram-campaign-admin.php:435
1116
+ msgid "- - - - - - - - - - - - - - - - - - - - - - - - - -"
1117
+ msgstr "- - - - - - - - - - - - - - - - - - - - - - - - - -"
1118
+
1119
+ #: .././classes/class-icegram-campaign-admin.php:454
1120
+ msgid "Show after"
1121
+ msgstr "Zeige später"
1122
+
1123
+ #: .././classes/class-icegram-campaign-admin.php:455
1124
+ msgid "Actions"
1125
+ msgstr "Aktionen"
trunk/lang/icegram-it_IT.mo ADDED
Binary file
trunk/lang/icegram-it_IT.po ADDED
@@ -0,0 +1,1134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Icegram 1.1.1\n"
4
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/icegram\n"
5
+ "POT-Creation-Date: 2015-09-24 12:56+0100\n"
6
+ "PO-Revision-Date: 2015-09-24 12:57+0100\n"
7
+ "Last-Translator: Alessandro Massasso <alessandro.massasso@drivek.it>\n"
8
+ "Language-Team: Icegram Team <hello@icegram.com>\n"
9
+ "Language: Italian\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
16
+ "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
17
+ "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
18
+ "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
19
+ "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
20
+ "X-Poedit-Basepath: .\n"
21
+ "X-Generator: Poedit 1.5.4\n"
22
+ "X-Loco-Target-Locale: it_IT\n"
23
+ "X-Poedit-SearchPath-0: ../.\n"
24
+
25
+ #: .././about-icegram.php:128
26
+ #: .././classes/class-icegram-campaign-admin.php:453
27
+ msgid "Name"
28
+ msgstr "Nome"
29
+
30
+ #: .././about-icegram.php:132
31
+ msgid "E-mail"
32
+ msgstr "Email"
33
+
34
+ #: .././about-icegram.php:136
35
+ msgid "Subject"
36
+ msgstr "Oggetto"
37
+
38
+ #: .././about-icegram.php:140 .././icegram.php:1015
39
+ #: .././classes/class-icegram-campaign-admin.php:47
40
+ #: .././classes/class-icegram-campaign-admin.php:64
41
+ msgid "Message"
42
+ msgstr "Messaggio"
43
+
44
+ #: .././about-icegram.php:167 .././icegram.php:417
45
+ msgid "Welcome to Icegram"
46
+ msgstr "Benvenuto in Icegram"
47
+
48
+ #: .././about-icegram.php:169
49
+ msgid ""
50
+ "Your sample campaign is ready. We've added a few messages for you to test."
51
+ msgstr ""
52
+ "La tua campagna di prova è pronta. Abbiamo aggiunto dei messaggi in modo che "
53
+ "tu possa testarne il funzionamento."
54
+
55
+ #: .././about-icegram.php:177
56
+ msgid "Edit & Publish it"
57
+ msgstr "Imposta e Pubblica"
58
+
59
+ #: .././about-icegram.php:178
60
+ msgid "OR"
61
+ msgstr "oppure"
62
+
63
+ #: .././about-icegram.php:179
64
+ msgid "Preview Campaign"
65
+ msgstr "Anteprima campagna"
66
+
67
+ #: .././about-icegram.php:184
68
+ #, php-format
69
+ msgid "Version: %s"
70
+ msgstr "Versione: %s"
71
+
72
+ #: .././about-icegram.php:187
73
+ msgid "Questions? Need Help?"
74
+ msgstr "Domande? Hai bisogno di aiuto?"
75
+
76
+ #: .././about-icegram.php:188 .././about-icegram.php:295
77
+ msgid "Contact Us"
78
+ msgstr "Contattaci"
79
+
80
+ #: .././about-icegram.php:198
81
+ msgid ""
82
+ "Do read Icegram's core concepts below to understand how you can use Icegram "
83
+ "to inspire, convert and engage your audience."
84
+ msgstr ""
85
+ "Leggi le principali funzionalità di Icegram riportate qui sotto per capire "
86
+ "in che modo puoi utilizzare Icegram per attirare, convertire e coinvolgere "
87
+ "il tuo pubblico."
88
+
89
+ #: .././about-icegram.php:203 .././icegram.php:1014 .././icegram.php:1020
90
+ #: .././icegram.php:1026
91
+ msgid "Messages"
92
+ msgstr "Messaggi"
93
+
94
+ #: .././about-icegram.php:204
95
+ msgid "A 'Message' is a communication you want to deliver to your audience."
96
+ msgstr ""
97
+ "Un \"Messaggio\" è una comunicazione che vuoi veicolare al tuo pubblico"
98
+
99
+ #: .././about-icegram.php:205
100
+ msgid "And Icegram comes with not one, but four message types."
101
+ msgstr "Icegram ha non uno, ma ben quattro tipologie di messaggi differenti."
102
+
103
+ #: .././about-icegram.php:206
104
+ msgid ""
105
+ "Different message types look and behave differently, but they all have many "
106
+ "common characteristics. For instance, most message types will allow you to "
107
+ "set a headline, a body text, label for the ‘call to action’ button, a link "
108
+ "for that button, theme and styling options, animation effect and position on "
109
+ "screen where that message should show."
110
+ msgstr ""
111
+ "Ogni tipo di messaggio, pur avendo un aspetto e un comportamento differente, "
112
+ "presenta delle caratteristiche comuni. Per esempio, la maggior parte dei "
113
+ "messaggi ti dà la possibilità di impostare una intestazione, un corpo di "
114
+ "testo, un'etichetta per il pulsante della \"call to action\", un link "
115
+ "associato al pulsante. Potrai anche decidere le opzioni per i temi, lo stile "
116
+ "dei messaggi, gli effetti animati e la posizione sullo schermo in cui "
117
+ "verranno mostrati i tuoi messaggi."
118
+
119
+ #: .././about-icegram.php:210
120
+ msgid "Action Bar"
121
+ msgstr "Action Bar"
122
+
123
+ #: .././about-icegram.php:212
124
+ msgid ""
125
+ "An action bar is a proven attention grabber. It shows up as a solid bar "
126
+ "either at top or bottom. Use it for your most important messages or time "
127
+ "sensitive announcements. Put longer content in it and it acts like a "
128
+ "collapsible panel!"
129
+ msgstr ""
130
+ "L' \"action bar\" ti permette di catturare l'interesse degli utenti. Viene "
131
+ "mostrata come una barra nella parte superiore o inferiore della schermata. "
132
+ "Usala per i tuoi messaggi importanti o per particolari annunci temporanei. "
133
+ "Se inserisci all'interno della bar un contenuto molto lungo, la barra si "
134
+ "espanderà fino a diventare un pannello a discesa. "
135
+
136
+ #: .././about-icegram.php:213
137
+ msgid "Messenger"
138
+ msgstr "Messenger"
139
+
140
+ #: .././about-icegram.php:215
141
+ msgid ""
142
+ "A messenger is best used to invoke interest while your visitor is reading "
143
+ "your content. Users perceive it as something new, important and urgent and "
144
+ "are highly likely to click on it."
145
+ msgstr ""
146
+ "\"Messenger\" è utilizzato soprattutto per catturare l'attenzione dei "
147
+ "visitatori mentre stanno leggendo un contenuto sul tuo sito web. Gli utenti "
148
+ "percepiranno questo messaggio come qualcosa di nuovo, importante e urgente e "
149
+ "saranno più propensi a cliccare su questo banner."
150
+
151
+ #: .././about-icegram.php:219
152
+ msgid "Toast Notification"
153
+ msgstr "Toast Notification"
154
+
155
+ #: .././about-icegram.php:221
156
+ msgid ""
157
+ "Want to alert your visitor about some news, an update from your blog, a "
158
+ "social proof or an offer? Use Icegram’s unique toast notification, it will "
159
+ "catch their attention, let them click on the message, and disappear after a "
160
+ "while."
161
+ msgstr ""
162
+ "Vuoi comunicare ai tuoi visitatori la presenza di novità, un aggiornamento "
163
+ "dal tuo blog o una nuova offerta? Usa le notifiche di Icegram! Ti "
164
+ "permetteranno di catturare la loro attenzione e fare in modo che clicchino "
165
+ "sul messaggio, che scomparirà dopo poco."
166
+
167
+ #: .././about-icegram.php:222
168
+ msgid "Popup"
169
+ msgstr "Popup"
170
+
171
+ #: .././about-icegram.php:224
172
+ msgid ""
173
+ "Lightbox popup windows are most widely used for lead capture, promotions and "
174
+ "additional content display. Ask visitors to sign up to your newsletter, or "
175
+ "like you on social networks, or tell them about a special offer..."
176
+ msgstr ""
177
+ "Le finestre popup sono ampiamente usate per mostrare promozioni, contenuti o "
178
+ "per generare contatti. Puoi chiedere ai tuoi visitatori di iscriversi alla "
179
+ "newsletter, mettere \"Mi piace\" sui tuoi profili social oppure puoi usare "
180
+ "il popup per comunicare una speciale offerta... "
181
+
182
+ #: .././about-icegram.php:234 .././icegram.php:977 .././icegram.php:983
183
+ msgid "Campaigns"
184
+ msgstr "Campagne"
185
+
186
+ #: .././about-icegram.php:235
187
+ msgid "Campaign = Messages + Rules"
188
+ msgstr "Campagna = Messaggi + Regole"
189
+
190
+ #: .././about-icegram.php:236
191
+ msgid ""
192
+ "A campaign allows sequencing multiple messages and defining targeting rules. "
193
+ "Create different campaigns for different marketing goals. Icegram supports "
194
+ "showing multiple campaigns on any page."
195
+ msgstr ""
196
+ "In una campagna puoi impostare sequenze di messaggi multipli e regole di "
197
+ "targeting definite. Crea differenti campagne per raggiungere specifici "
198
+ "obiettivi di marketing. Icegram ti aiuterà a mostrare campagne multiple in "
199
+ "qualunque pagina del tuo sito. "
200
+
201
+ #: .././about-icegram.php:237
202
+ msgid ""
203
+ "You can always preview your campaign to ensure campaign works the way you "
204
+ "want, before making it live."
205
+ msgstr ""
206
+ "Visualizza sempre l'anteprima della campagne per assicurarti che funzioni "
207
+ "nel modo desiderato prima di pubblicarla."
208
+
209
+ #: .././about-icegram.php:241
210
+ msgid "Multiple Messages & Sequencing"
211
+ msgstr "Messaggi multipli & in sequenza"
212
+
213
+ #: .././about-icegram.php:243
214
+ msgid ""
215
+ "Add one or as many messages to a campaign as you want. Also choose the "
216
+ "number of seconds after which each message should show up. Showing multiple "
217
+ "messages for same goal, but with slightly different content / presentation, "
218
+ "greatly improves conversions."
219
+ msgstr ""
220
+ "Aggiungi uno o tutti i messaggi che vuoi all'interno di una campagna. Scegli "
221
+ "dopo quanti secondi mostrare il messaggio. Mostrare messaggi multipli per "
222
+ "raggiungere lo stesso obiettivo (ma con piccole varianti di contenuto e "
223
+ "presentazione) ti permetterà di aumentare in modo significativo le "
224
+ "conversioni."
225
+
226
+ #: .././about-icegram.php:247 .././classes/class-icegram-campaign-admin.php:49
227
+ msgid "Targeting Rules"
228
+ msgstr "Regole per definire il tuo pubblico"
229
+
230
+ #: .././about-icegram.php:249
231
+ msgid ""
232
+ "You can control who sees a campaign – and on what device, which pages does "
233
+ "it show on, and what time period will it stay active for. You can run "
234
+ "different campaigns with different rules to maximize engagement."
235
+ msgstr ""
236
+ "Puoi monitorare chi vede una campagna - e da quale dispositivo, da quale "
237
+ "pagina ha visto l'ha vista e per quanto tempo è rimasta attiva. Puoi "
238
+ "attivare differenti campagne con regole diverse per massimizzare il "
239
+ "coinvolgimento"
240
+
241
+ #: .././about-icegram.php:259
242
+ msgid "FAQ / Common Problems"
243
+ msgstr "FAQ/Problemi ricorrenti"
244
+
245
+ #: .././about-icegram.php:261
246
+ msgid "Messages look broken / formatting is weird..."
247
+ msgstr "Il messaggio risulta rotto /la formattazione risulta strana"
248
+
249
+ #: .././about-icegram.php:262
250
+ msgid ""
251
+ "This is most likely due to CSS conflicts with current theme. We suggest "
252
+ "using simple formatting for messages. You can also write custom CSS in your "
253
+ "theme to fix any problems."
254
+ msgstr ""
255
+ "Potrebbe essere causato da un conflitto tra il CSS e il tema corrente. Ti "
256
+ "consigliamo ti usare una formattazione semplice per il tuo messaggio. In "
257
+ "alternativa, potrai scrivere un CSS personalizzato nel tema per risolvere il "
258
+ "problema."
259
+
260
+ #: .././about-icegram.php:264
261
+ msgid "Extra Line Breaks / Paragraphs in messages..."
262
+ msgstr "Interruzioni di riga / paragrafi nei messaggi"
263
+
264
+ #: .././about-icegram.php:265
265
+ msgid ""
266
+ "Go to HTML mode in content editor and pull your custom HTML code all "
267
+ "together in one line. Don't leave blank lines between two tags. That should "
268
+ "fix it."
269
+ msgstr ""
270
+ "Vai alla sezione HTML nell'editor dei contenuti e incolla il tuo codice HTML "
271
+ "personalizzato in un'unica riga. Non lasciare spazi bianchi tra un tag e "
272
+ "l'altro."
273
+
274
+ #: .././about-icegram.php:267
275
+ msgid "How do I add custom CSS for messages?"
276
+ msgstr "Come aggiungere un CSS personaizzato ai messaggi?"
277
+
278
+ #: .././about-icegram.php:268
279
+ msgid ""
280
+ "You can use custom CSS/JS inline in your message HTML. You can also use your "
281
+ "theme's custom JS / CSS feature to add your changes."
282
+ msgstr ""
283
+ "Puoi usare un CSS o JS inline personalizzato nei tuoi messaggi HTML. Potrai "
284
+ "anche utilizzare il JS/CSS del tuo tema per aggiungere le tue modifiche."
285
+
286
+ #: .././about-icegram.php:270
287
+ msgid "Optin Forms / Mailing service integration..."
288
+ msgstr "Form opt-in / Servizi mail integrati"
289
+
290
+ # ?
291
+ #: .././about-icegram.php:271
292
+ msgid ""
293
+ "You can embed any optin / subscription form to your Icegram messages using "
294
+ "'Embed Form' button above text editor. Paste in form HTML code and let "
295
+ "Icegram clean it up! You may even use a shortcode if you are using a WP "
296
+ "plugin from your newsletter / lead capture service."
297
+ msgstr ""
298
+ "Puoi incorporare qualsiasi opt-in/form di iscrizione nelle campagne di "
299
+ "Icegram usando il pulsante \"Incorpora form\" sopra all'editor di testo. "
300
+ "Incolla il codice HTML del form e lascia che Icegram lo ripulisca!\n"
301
+ "Puoi anche usare uno shortcode se utilizzi già un plugin WP per le tue "
302
+ "newsletter/attività di lead generation"
303
+
304
+ #: .././about-icegram.php:273
305
+ msgid "How many messages should I show on a page?"
306
+ msgstr "Quanti messaggi dovrei far mostrare in una pagina?"
307
+
308
+ #: .././about-icegram.php:274
309
+ msgid ""
310
+ "While Icegram provides you lots of different message types and ability to "
311
+ "add multiple messages to a campaign, we discourage you to go overboard. "
312
+ "We've observed two messages on a page work well, but YMMV!"
313
+ msgstr ""
314
+ "Sebbene Icegram offra diversi tipi di messaggi e la possibilità di inserire "
315
+ "sequenze multiple in una stessa campagna, ti consigliamo di NON esagerare. "
316
+ "Secondo la nostra esperienza, due messaggi in una pagina danno buoni "
317
+ "risultati, ma...lasciamo decidere a te!"
318
+
319
+ #: .././about-icegram.php:280
320
+ msgid "Preview does not work / not refreshing..."
321
+ msgstr "L'anteprima non funziona/non si ricarica"
322
+
323
+ #: .././about-icegram.php:281
324
+ msgid ""
325
+ "Doing a browser refresh while previewing will not show your most recent "
326
+ "changes. Click 'Preview' button to see a preview with your latest changes."
327
+ msgstr ""
328
+ "Se fai un refresh della pagina per visualizzare l'anteprima con le "
329
+ "modifiche, non potrai visualizzare i cambiamenti recenti che hai effettuato. "
330
+ "Clicca sul pulsante \"Anteprima\" per vedere l'anteprima del messaggio con i "
331
+ "cambiamenti che hai appena apportato. "
332
+
333
+ #: .././about-icegram.php:283
334
+ msgid "Can I use shortcodes in a message?"
335
+ msgstr "Posso usare degli shortcode in un messaggio?"
336
+
337
+ #: .././about-icegram.php:284
338
+ msgid ""
339
+ "Yes! Messages support shortcodes. You may need to adjust CSS so the "
340
+ "shortcode output looks good in your message."
341
+ msgstr ""
342
+ "Sì! I messaggi supportano gli shortcode. Potresti aver bisogni di agire sul "
343
+ "CSS per far sì che contenuti incorporati tramite lo shortcode mantengano una "
344
+ "buona resa all'interno del messaggio."
345
+
346
+ #: .././about-icegram.php:286
347
+ msgid "WPML / Multilingual usage..."
348
+ msgstr "WPML/Multilingua..."
349
+
350
+ #: .././about-icegram.php:287
351
+ msgid ""
352
+ "Go to <code>Messages</code> from Icegram menu. Edit a message and translate "
353
+ "it like any other post. Icegram will show translated message where possible. "
354
+ "Choose <code>All posts</code> under WPML Language setting - Blog Posts to "
355
+ "display, to fall back to default language messages."
356
+ msgstr ""
357
+ "Clicca su\n"
358
+ "<code>Messaggi</code> dal menu di Icegram. Imposta un messaggio e traducilo "
359
+ "come qualunque altro post. Icegram mostrerà i messaggi tradotti dove "
360
+ "possibile. Scegli \n"
361
+ "<code>Tutti i post</code> sotto a Impostazioni Lingua WPML - Mostra i Post "
362
+ "del blog, per ritornare al messaggio nella lingua originaria. "
363
+
364
+ #: .././about-icegram.php:291
365
+ msgid "I can't find a way to do X..."
366
+ msgstr "Non trovo un modo per fare X..."
367
+
368
+ #: .././about-icegram.php:292
369
+ msgid ""
370
+ "Icegram is actively developed. If you can't find your favorite feature (or "
371
+ "have a suggestion) contact us. We'd love to hear from you."
372
+ msgstr ""
373
+ "Icegram è in continuo sviluppo. Se non riesci a trovare qualche funzionalità "
374
+ "(o se hai dei suggerimenti) contattaci. Saremo lieti di ascoltare i tuoi "
375
+ "consigli. "
376
+
377
+ #: .././about-icegram.php:294
378
+ msgid "I'm facing a problem and can't find a way out..."
379
+ msgstr "Sto riscontrando un problema e non trovo una soluzione"
380
+
381
+ #: .././about-icegram.php:295
382
+ msgid ""
383
+ ", provide as much detail of the problem as you can. We will try to solve the "
384
+ "problem ASAP."
385
+ msgstr ""
386
+ ", ti preghiamo di comunicarci le problematiche che riscontri in maniera "
387
+ "dettagliata. Cercheremo di risolverle appena possibile."
388
+
389
+ #: .././icegram.php:157
390
+ msgid "Free Add-ons, Proven Marketing Tricks and Updates"
391
+ msgstr "Add-on gratuiti, trucchi di Marketing e aggiornamenti"
392
+
393
+ #: .././icegram.php:162
394
+ msgid "Get add-ons and tips..."
395
+ msgstr "Trova add-ons e suggerimenti"
396
+
397
+ #: .././icegram.php:253
398
+ msgid "Housekeeping"
399
+ msgstr "Rimuovi"
400
+
401
+ #: .././icegram.php:257
402
+ msgid "Remove all Icegram shortcodes"
403
+ msgstr "Rimuovi tutti gli shortcode Icegram"
404
+
405
+ #: .././icegram.php:262
406
+ msgid "Remove all Icegram campaigns and messages"
407
+ msgstr "Rimuovi tutte le campagne e i messaggi di Icegram"
408
+
409
+ #: .././icegram.php:266
410
+ msgid "Clean Up"
411
+ msgstr "Pulisci"
412
+
413
+ #: .././icegram.php:275
414
+ msgid ""
415
+ "You won't be able to recover this data once you proceed. Do you really want "
416
+ "to perform this action?"
417
+ msgstr ""
418
+ "Non potrai più recuperare questi dati una volta continuato. Vuoi davvero "
419
+ "proseguire?"
420
+
421
+ #: .././icegram.php:289
422
+ msgid "Done!"
423
+ msgstr "Fatto!"
424
+
425
+ #: .././icegram.php:418
426
+ msgid "Settings"
427
+ msgstr "Impostazioni "
428
+
429
+ #: .././icegram.php:419
430
+ msgid "Add-ons"
431
+ msgstr "Add-ons"
432
+
433
+ #: .././icegram.php:432
434
+ msgid "Docs & Support"
435
+ msgstr "Doc & Supporto"
436
+
437
+ #: .././icegram.php:621
438
+ msgid "Powered by Icegram"
439
+ msgstr "Powered by Icegram"
440
+
441
+ #: .././icegram.php:978
442
+ msgid "Campaign"
443
+ msgstr "Campagna"
444
+
445
+ #: .././icegram.php:979 .././icegram.php:980
446
+ msgid "Add New Campaign"
447
+ msgstr "Aggiungi nuova campagna"
448
+
449
+ #: .././icegram.php:981
450
+ msgid "Edit Campaign"
451
+ msgstr "Imposta la campagna"
452
+
453
+ #: .././icegram.php:982
454
+ msgid "New Campaign"
455
+ msgstr "Nuova campagna"
456
+
457
+ #: .././icegram.php:984
458
+ msgid "View Campaign"
459
+ msgstr "Guarda la campagna"
460
+
461
+ #: .././icegram.php:985
462
+ msgid "Search Campaigns"
463
+ msgstr "Ricerca una campagna"
464
+
465
+ #: .././icegram.php:986
466
+ msgid "No campaigns found"
467
+ msgstr "Nessuna campagna trovata"
468
+
469
+ #: .././icegram.php:987
470
+ msgid "No campaigns found in Trash"
471
+ msgstr "Non ci sono camapgne nel cestino"
472
+
473
+ #: .././icegram.php:989
474
+ msgid "Icegram"
475
+ msgstr "Icegram"
476
+
477
+ #: .././icegram.php:1016
478
+ msgid "Create New"
479
+ msgstr "Crea nuovo"
480
+
481
+ #: .././icegram.php:1017
482
+ msgid "Create New Message"
483
+ msgstr "Crea un nuovo messaggio"
484
+
485
+ #: .././icegram.php:1018 .././classes/class-icegram-campaign-admin.php:103
486
+ #: .././classes/class-icegram-campaign-admin.php:502
487
+ msgid "Edit Message"
488
+ msgstr "Imposta una messaggio"
489
+
490
+ #: .././icegram.php:1019
491
+ msgid "New Message"
492
+ msgstr "Nuovo mesaggio"
493
+
494
+ #: .././icegram.php:1021
495
+ msgid "View Message"
496
+ msgstr "Guarda i messaggi"
497
+
498
+ #: .././icegram.php:1022
499
+ msgid "Search Messages"
500
+ msgstr "Ricerca i messaggi"
501
+
502
+ #: .././icegram.php:1023
503
+ msgid "No messages found"
504
+ msgstr "Nessun messaggio trovato"
505
+
506
+ #: .././icegram.php:1024
507
+ msgid "No messages found in Trash"
508
+ msgstr "Nessun messaggio nel cestino"
509
+
510
+ #: .././icegram.php:1422
511
+ msgid "Copy"
512
+ msgstr "Copia"
513
+
514
+ #: .././settings.php:19
515
+ msgid "Icegram Settings"
516
+ msgstr "Impostazioni di Icegram"
517
+
518
+ #: .././settings.php:23
519
+ msgid "Share Icegram"
520
+ msgstr "Condividi Icegram"
521
+
522
+ #: .././settings.php:27
523
+ msgid "Show \"Powered by\" link"
524
+ msgstr "Mostra \"Powered by\" link"
525
+
526
+ #: .././settings.php:32
527
+ msgid "Cache Friendly?"
528
+ msgstr "Cache Friendly?"
529
+
530
+ #: .././settings.php:36
531
+ msgid ""
532
+ "Turn on \"Lazy Load\" - load Icegram scripts and messages after page load to "
533
+ "avoid caching problems."
534
+ msgstr ""
535
+ "Passa a \"Lazy Load\" - carica gli script e i messaggi di Icegram dopo aver "
536
+ "caricato la pagina per evitare problemi di cache."
537
+
538
+ #: .././addons.php:13
539
+ msgid "Icegram Add-ons"
540
+ msgstr "Add-ons Icegram"
541
+
542
+ #: .././addons.php:47
543
+ msgid "Sorry! No Add-ons available currently."
544
+ msgstr "Ci dispiace! Nessun add-on disponibile al momento."
545
+
546
+ #: .././classes/class-icegram-message-admin.php:41
547
+ msgid "Message Settings"
548
+ msgstr "Impostazioni messaggio"
549
+
550
+ #: .././classes/class-icegram-message-admin.php:113
551
+ #: .././classes/class-icegram-message-admin.php:520
552
+ #: .././classes/class-icegram-campaign-admin.php:452
553
+ msgid "Type"
554
+ msgstr "Tipologia"
555
+
556
+ #: .././classes/class-icegram-message-admin.php:129
557
+ #: .././classes/class-icegram-message-admin.php:521
558
+ msgid "Theme"
559
+ msgstr "Temi"
560
+
561
+ #: .././classes/class-icegram-message-admin.php:146
562
+ msgid "Animation"
563
+ msgstr "Animazioni"
564
+
565
+ #: .././classes/class-icegram-message-admin.php:161
566
+ msgid "Headline"
567
+ msgstr "Intestazione"
568
+
569
+ #: .././classes/class-icegram-message-admin.php:162
570
+ msgid ""
571
+ "Shown with highest prominence. Click on idea button on right to get a new "
572
+ "headline."
573
+ msgstr ""
574
+ "Viene mostrata quella più rilevante. Clicca il bottone dei suggerimenti "
575
+ "sulla destra per ottenere una nuova intestazione."
576
+
577
+ #: .././classes/class-icegram-message-admin.php:168
578
+ msgid "Give Me Another Headline"
579
+ msgstr "Dammi un'altra intestazione"
580
+
581
+ #: .././classes/class-icegram-message-admin.php:174
582
+ msgid "Icon / Avatar Image"
583
+ msgstr "Immagine di Icona/Avatar"
584
+
585
+ #: .././classes/class-icegram-message-admin.php:175
586
+ msgid "This image will appear in message content."
587
+ msgstr "Questa immagine apparirà nel contenuto dei messaggi."
588
+
589
+ #: .././classes/class-icegram-message-admin.php:178
590
+ msgid "Upload / Select an image"
591
+ msgstr "Carica/Seleziona un'immagine"
592
+
593
+ #: .././classes/class-icegram-message-admin.php:178
594
+ msgid "Upload / Select Image"
595
+ msgstr "Carica/Seleziona l'immagine"
596
+
597
+ #: .././classes/class-icegram-message-admin.php:194
598
+ msgid "Message Body"
599
+ msgstr "Corpo del messaggio"
600
+
601
+ #: .././classes/class-icegram-message-admin.php:225
602
+ msgid "Form"
603
+ msgstr "Form"
604
+
605
+ #: .././classes/class-icegram-message-admin.php:226
606
+ msgid "Use Opt-in / Subscription / Lead capture form"
607
+ msgstr "Usa opt-in/form di iscrizione/form di contatto"
608
+
609
+ #: .././classes/class-icegram-message-admin.php:251
610
+ #: .././classes/class-icegram-message-admin.php:253
611
+ msgid "Left"
612
+ msgstr "Sinistra"
613
+
614
+ #: .././classes/class-icegram-message-admin.php:258
615
+ #: .././classes/class-icegram-message-admin.php:260
616
+ msgid "Right"
617
+ msgstr "Destra"
618
+
619
+ #: .././classes/class-icegram-message-admin.php:265
620
+ #: .././classes/class-icegram-message-admin.php:267
621
+ msgid "Bottom"
622
+ msgstr "Pulsante"
623
+
624
+ #: .././classes/class-icegram-message-admin.php:282
625
+ #: .././classes/class-icegram-message-admin.php:284
626
+ msgid "Inline"
627
+ msgstr "Interno al testo"
628
+
629
+ #: .././classes/class-icegram-message-admin.php:296
630
+ msgid "Background Color"
631
+ msgstr "Colore di sfondo"
632
+
633
+ #: .././classes/class-icegram-message-admin.php:297
634
+ msgid "Text Color"
635
+ msgstr "Colore del testo"
636
+
637
+ #: .././classes/class-icegram-message-admin.php:308
638
+ msgid "Text / HTML to show before the form"
639
+ msgstr "Testo/HTML da mostrare prima del form"
640
+
641
+ #: .././classes/class-icegram-message-admin.php:312
642
+ msgid "Form Embed Code"
643
+ msgstr "Codice del form incorporato"
644
+
645
+ #: .././classes/class-icegram-message-admin.php:314
646
+ msgid "Paste HTML / shortcode of your form here..."
647
+ msgstr "Incolla HTML/shortcode del tuo form qui..."
648
+
649
+ # ?
650
+ #: .././classes/class-icegram-message-admin.php:318
651
+ msgid "Show labels above fields"
652
+ msgstr "Mostra le etichette sopra ai campi"
653
+
654
+ #: .././classes/class-icegram-message-admin.php:325
655
+ msgid "Text / HTML to show after the form"
656
+ msgstr "Testo/HTML da mostrare dopo il form"
657
+
658
+ #: .././classes/class-icegram-message-admin.php:329
659
+ msgid ""
660
+ "Insert <code>[ig_form]</code> where you want to show this form in message "
661
+ "body."
662
+ msgstr ""
663
+ "Inserisci <code>\n"
664
+ "[ig_form]\n"
665
+ "</code> dove vuoi che venga mostrato il form nel corpo del messaggio."
666
+
667
+ #: .././classes/class-icegram-message-admin.php:336
668
+ msgid "Button Label"
669
+ msgstr "Titolo del pulsante"
670
+
671
+ #: .././classes/class-icegram-message-admin.php:337
672
+ msgid "Your call to action text. Something unusual will increase conversions."
673
+ msgstr ""
674
+ "Inserisci il testo per la call to action. Usa un testo impattante per "
675
+ "aumentare le conversioni"
676
+
677
+ #: .././classes/class-icegram-message-admin.php:347
678
+ msgid "Target Link"
679
+ msgstr "URL della pagina di destinazione "
680
+
681
+ #: .././classes/class-icegram-message-admin.php:348
682
+ msgid "Enter destination URL here. Clicking will redirect to this link."
683
+ msgstr ""
684
+ "Inserisci qui l'URL di destinazione. Al clic, verrai reindirizzato a questo "
685
+ "link."
686
+
687
+ #: .././classes/class-icegram-message-admin.php:371
688
+ msgid "Body"
689
+ msgstr "Corpo"
690
+
691
+ #: .././classes/class-icegram-message-admin.php:372
692
+ #: .././classes/class-icegram-message-admin.php:378
693
+ msgid "Background"
694
+ msgstr "Sfondo"
695
+
696
+ #: .././classes/class-icegram-message-admin.php:373
697
+ #: .././classes/class-icegram-message-admin.php:379
698
+ msgid "Text"
699
+ msgstr "Testo"
700
+
701
+ #: .././classes/class-icegram-message-admin.php:377
702
+ msgid "Button"
703
+ msgstr "Pulsante"
704
+
705
+ #: .././classes/class-icegram-message-admin.php:384
706
+ msgid "Colors"
707
+ msgstr "Colori"
708
+
709
+ #: .././classes/class-icegram-message-admin.php:385
710
+ msgid "Use theme's default colors"
711
+ msgstr "Usa i colori di default del tema"
712
+
713
+ #: .././classes/class-icegram-message-admin.php:391
714
+ msgid "Position"
715
+ msgstr "Posizione"
716
+
717
+ #: .././classes/class-icegram-message-admin.php:450
718
+ #, php-format
719
+ msgid "You may add <code>[%s]</code> where you want to show this message."
720
+ msgstr ""
721
+ "In aggiunta, puoi inserire <code>[%s]</code> ovunque tu voglia attivare "
722
+ "questa campagna."
723
+
724
+ #: .././classes/class-icegram-message-admin.php:522
725
+ msgid "Thumbnail"
726
+ msgstr "Miniatura"
727
+
728
+ #: .././classes/class-icegram-message-admin.php:664
729
+ msgid "Here Is A Method That Is Helping ____ To ____"
730
+ msgstr "Ecco un metodo che aiuterà ____ a _____"
731
+
732
+ #: .././classes/class-icegram-message-admin.php:665
733
+ msgid "__ Little Known Ways To ____"
734
+ msgstr "___ piccoli modi per ______"
735
+
736
+ #: .././classes/class-icegram-message-admin.php:666
737
+ msgid "Get Rid Of ____ Once And For All"
738
+ msgstr "Liberati di ____ una volta per tutte!"
739
+
740
+ #: .././classes/class-icegram-message-admin.php:667
741
+ msgid "How To ____ So You Can ____"
742
+ msgstr "Come ____ per ___"
743
+
744
+ #: .././classes/class-icegram-message-admin.php:668
745
+ msgid "They Didn't Think I Could ____, But I Did"
746
+ msgstr "Non pensavano che io potessi_______, ma l'ho fatto"
747
+
748
+ #: .././classes/class-icegram-message-admin.php:669
749
+ msgid "How ____ Made Me ____"
750
+ msgstr "Come ____ mi farà diventare ______"
751
+
752
+ #: .././classes/class-icegram-message-admin.php:670
753
+ msgid "Are You ____ ?"
754
+ msgstr "Sei____?"
755
+
756
+ #: .././classes/class-icegram-message-admin.php:671
757
+ msgid "Warning: ____ !"
758
+ msgstr "Attenzione: ____!"
759
+
760
+ #: .././classes/class-icegram-message-admin.php:672
761
+ msgid "Do You Make These Mistakes With ____ ?"
762
+ msgstr "Ti capita di fare errori quando ___?"
763
+
764
+ #: .././classes/class-icegram-message-admin.php:673
765
+ msgid "7 Ways To ____"
766
+ msgstr "7 modi per ____"
767
+
768
+ #: .././classes/class-icegram-message-admin.php:674
769
+ msgid "If You're ____, You Can ____"
770
+ msgstr "Se sei ____, puoi____"
771
+
772
+ #: .././classes/class-icegram-message-admin.php:675
773
+ msgid "Turn your ____ into a ____"
774
+ msgstr "Rendi i tuoi _______"
775
+
776
+ #: .././classes/class-icegram-message-admin.php:676
777
+ msgid "Want To Be A ____?"
778
+ msgstr "Vuoi essere un ____?"
779
+
780
+ #: .././classes/class-icegram-message-admin.php:677
781
+ msgid "The Ugly Truth About Your Beautiful ____"
782
+ msgstr "La triste verità del tuo ____"
783
+
784
+ #: .././classes/class-icegram-message-admin.php:678
785
+ msgid "The Secret to ____ Is Simply ____!"
786
+ msgstr "Il segreto per ____ è semplicemente ___!"
787
+
788
+ #: .././classes/class-icegram-message-admin.php:679
789
+ msgid "The Quickest Way I Know To ____"
790
+ msgstr "Il modo più veloce che io conosca è ____"
791
+
792
+ # La traduzione letterale non rendeva in italiano. Creato un titolo diverso.
793
+ #: .././classes/class-icegram-message-admin.php:680
794
+ msgid "The Lazy Man's Way To ____"
795
+ msgstr "____modi davvero semplici per____"
796
+
797
+ # La traduzione in italiano non rende. Suggerimenti?
798
+ #: .././classes/class-icegram-message-admin.php:681
799
+ msgid ""
800
+ "The Amazing Story Of ____ That Requires So Little Of ____ You Could ____"
801
+ msgstr ""
802
+ "L'incredibile storia di _____ che ti permetterà di _______ con un piccolo "
803
+ "sforzo ______"
804
+
805
+ # La traduzione in italiano non rende. Suggerimenti?
806
+ #: .././classes/class-icegram-message-admin.php:682
807
+ msgid "The Amazing Secret Of The ____ Genius Who Is Afraid Of ____"
808
+ msgstr "L'incredibile storia di ______ che aveva paura di _______"
809
+
810
+ #: .././classes/class-icegram-message-admin.php:683
811
+ msgid "The 10 Wackiest Ideas That ____... And How You Can Too!"
812
+ msgstr "Le 10 idee più stravaganti che ___ Ed ecco come puoi farlo anche tu!"
813
+
814
+ # La traduzione in italiano non rende. Ho creato un altro titolo. Altri suggerimenti?
815
+ #: .././classes/class-icegram-message-admin.php:684
816
+ msgid "The Inside Secrets To ____ With Crazy, Outlandish And Outrageous ____"
817
+ msgstr "Ecco il nostro segreto per ________ in maniera innovativa _______"
818
+
819
+ #: .././classes/class-icegram-message-admin.php:685
820
+ msgid "____ Like A ____"
821
+ msgstr "____ come ____"
822
+
823
+ #: .././classes/class-icegram-message-admin.php:686
824
+ msgid "Remember When You Could Have ____, And You Didn't?"
825
+ msgstr "Ricordi quando avresti potuto ____ e non l'hai fatto?"
826
+
827
+ # La trsduzione letterale non rendeva in italiano. Creata nuova frase.
828
+ #: .././classes/class-icegram-message-admin.php:687
829
+ msgid "Is The ____ Worth $x To You?"
830
+ msgstr "Vuoi guadagnare con _____?"
831
+
832
+ #: .././classes/class-icegram-message-admin.php:688
833
+ msgid "Increase your ____, reduce ____, maintain ____ and ____ with ____"
834
+ msgstr "Aumenta _____, riduci _____, mantieni _____ e_____ con____"
835
+
836
+ #: .././classes/class-icegram-message-admin.php:689
837
+ msgid "If You Can ____ You Can ____"
838
+ msgstr "Se puoi _______ puoi______"
839
+
840
+ #: .././classes/class-icegram-message-admin.php:690
841
+ msgid "I Discovered How To ____... Now I'm Revealing My Secret"
842
+ msgstr "Ho scoperto come _____ Ora, voglio rivelarvi il mio segreto"
843
+
844
+ #: .././classes/class-icegram-message-admin.php:691
845
+ msgid "How To Turn Your ____ Into The Most ____"
846
+ msgstr "Come far sì che i tuoi __________ diventino i più_____________"
847
+
848
+ # La traduzione letterale non rendeva in italiano. Creata nuova frase.
849
+ #
850
+ #
851
+ #: .././classes/class-icegram-message-admin.php:692
852
+ msgid "How To Take The Headache Out Of ____"
853
+ msgstr "Come risolvere una volta per tutte _____"
854
+
855
+ #: .././classes/class-icegram-message-admin.php:693
856
+ msgid "How To ____ ... Legally"
857
+ msgstr "Come ____ legalmente"
858
+
859
+ #: .././classes/class-icegram-message-admin.php:694
860
+ msgid "How To ____ That ____"
861
+ msgstr "Come ____ per____"
862
+
863
+ #: .././classes/class-icegram-message-admin.php:695
864
+ msgid "How To Discover The ____ That Lies Hidden In Your ____"
865
+ msgstr "Come scoprire ______ che giacciono nel profondo del tuo_____"
866
+
867
+ #: .././classes/class-icegram-message-admin.php:696
868
+ msgid "How To ____ Even When Your Not ____"
869
+ msgstr "Come ____ anche quando non ____"
870
+
871
+ #: .././classes/class-icegram-message-admin.php:697
872
+ msgid "____ With No ____!"
873
+ msgstr "______senza _____!"
874
+
875
+ #: .././classes/class-icegram-message-admin.php:698
876
+ msgid "Greatest Goldmine of ____ Ever Jammed Into One Big ____"
877
+ msgstr "La più grande miniera di _____ in cui ti sei mai imbattuto _______"
878
+
879
+ #: .././classes/class-icegram-message-admin.php:699
880
+ msgid "Free ____ Tells How To Get Better ____"
881
+ msgstr "Questa _____ gratuita ti mostrerà come migliorare ______"
882
+
883
+ #: .././classes/class-icegram-message-admin.php:700
884
+ msgid ""
885
+ "FREE ____ Worth $____ for the first 100 People to take Advantage of this "
886
+ "Offer"
887
+ msgstr ""
888
+ "_____ gratuito del valore di _____ per le prime 100 persone che approfittano "
889
+ "di questa offerta"
890
+
891
+ #: .././classes/class-icegram-message-admin.php:701
892
+ msgid "Don't Try This With Any Other ____"
893
+ msgstr "Non provare ______con nessun altro _____"
894
+
895
+ #: .././classes/class-icegram-message-admin.php:702
896
+ msgid "Do You Honestly Want To ____?"
897
+ msgstr "Vuoi davvero ____?"
898
+
899
+ #: .././classes/class-icegram-message-admin.php:703
900
+ msgid "Discover The Magic ____ That Will Bring You ____ & ____!"
901
+ msgstr "Scopri la magia di ____ che ti porterà ____ &_____!"
902
+
903
+ #: .././classes/class-icegram-message-admin.php:704
904
+ msgid "____ Man Reveals A Short-Cut To ____"
905
+ msgstr "____ "
906
+
907
+ #: .././classes/class-icegram-message-admin.php:705
908
+ msgid "Confessions Of A ____"
909
+ msgstr "Le confessioni di un____"
910
+
911
+ #: .././classes/class-icegram-message-admin.php:706
912
+ msgid "Are You Ready To ____?"
913
+ msgstr "Sei pronto per ___?"
914
+
915
+ #: .././classes/class-icegram-message-admin.php:707
916
+ msgid "An Open Letter To Everyone Who ____ More Than ____ Per ____"
917
+ msgstr "Una lettera aperta a tutti quelli che ____ più di____"
918
+
919
+ #: .././classes/class-icegram-message-admin.php:708
920
+ msgid "An Amazing ____ You Can Carry In Your ____"
921
+ msgstr "Un fantastico ______ che puoi utilizzare nel tuo______"
922
+
923
+ #: .././classes/class-icegram-message-admin.php:709
924
+ msgid "21 Secret ____ that will ____... NOW!"
925
+ msgstr "21 segreti _______ che ti permetteranno di _____...ORA!"
926
+
927
+ #: .././classes/class-icegram-message-admin.php:716
928
+ #: .././classes/class-icegram-campaign-admin.php:661
929
+ msgid "Duplicate"
930
+ msgstr "Duplica"
931
+
932
+ #: .././classes/class-icegram-campaign-admin.php:56
933
+ msgid "Search to add / Create new&hellip;"
934
+ msgstr "Cerca per aggiungere/Creare nuovo..."
935
+
936
+ #: .././classes/class-icegram-campaign-admin.php:59
937
+ #: .././classes/class-icegram-campaign-admin.php:439
938
+ msgid "Create new"
939
+ msgstr "Crea nuovo"
940
+
941
+ #: .././classes/class-icegram-campaign-admin.php:62
942
+ msgid "Preview"
943
+ msgstr "Anteprima"
944
+
945
+ #: .././classes/class-icegram-campaign-admin.php:95
946
+ #: .././classes/class-icegram-campaign-admin.php:495
947
+ msgid "Give this message a name for your own reference"
948
+ msgstr ""
949
+ "Dai a questo messaggio un nome per identificarlo (questo nome NON verrà "
950
+ "visualizzato dagli utenti)"
951
+
952
+ #: .././classes/class-icegram-campaign-admin.php:100
953
+ #: .././classes/class-icegram-campaign-admin.php:499
954
+ msgid " sec"
955
+ msgstr "sec"
956
+
957
+ #: .././classes/class-icegram-campaign-admin.php:104
958
+ #: .././classes/class-icegram-campaign-admin.php:503
959
+ msgid "Remove from Campaign"
960
+ msgstr "Rimuovi dalla campagna"
961
+
962
+ #: .././classes/class-icegram-campaign-admin.php:122
963
+ msgid ""
964
+ "No messages yet. Use search / create bar above to add messages to this "
965
+ "campaign."
966
+ msgstr ""
967
+ "Nessun messaggio. Usa la barra cerca/crea per aggiungere messaggi a questa "
968
+ "campagna."
969
+
970
+ #: .././classes/class-icegram-campaign-admin.php:160
971
+ msgid "Where?"
972
+ msgstr "Dove?"
973
+
974
+ #: .././classes/class-icegram-campaign-admin.php:163
975
+ msgid "Sitewide"
976
+ msgstr "Tutte le pagine del sito"
977
+
978
+ #: .././classes/class-icegram-campaign-admin.php:165
979
+ #, php-format
980
+ msgid ""
981
+ "Additionally you can insert <code>[%s]</code> wherever you want to run this "
982
+ "campaign."
983
+ msgstr ""
984
+ "In aggiunta, puoi inserire <code>[%s]</code> ovunque tu voglia attivare "
985
+ "questa campagna."
986
+
987
+ #: .././classes/class-icegram-campaign-admin.php:172
988
+ msgid "Select pages to exclude&hellip;"
989
+ msgstr "Seleziona una pagina da escludere..."
990
+
991
+ #: .././classes/class-icegram-campaign-admin.php:187
992
+ msgid "Homepage"
993
+ msgstr "Homepage"
994
+
995
+ #: .././classes/class-icegram-campaign-admin.php:194
996
+ msgid "Selected pages"
997
+ msgstr "Pagine selezionate"
998
+
999
+ #: .././classes/class-icegram-campaign-admin.php:200
1000
+ msgid "Select a page&hellip;"
1001
+ msgstr "Seleziona una pagina..."
1002
+
1003
+ #: .././classes/class-icegram-campaign-admin.php:215
1004
+ msgid "Specific URLs on this site"
1005
+ msgstr "Specifiche URL del sito"
1006
+
1007
+ #: .././classes/class-icegram-campaign-admin.php:231
1008
+ msgid " Add another"
1009
+ msgstr "Aggiungi "
1010
+
1011
+ #: .././classes/class-icegram-campaign-admin.php:241
1012
+ msgid "When?"
1013
+ msgstr "Quando?"
1014
+
1015
+ #: .././classes/class-icegram-campaign-admin.php:244
1016
+ msgid "Always"
1017
+ msgstr "Sempre"
1018
+
1019
+ #: .././classes/class-icegram-campaign-admin.php:251
1020
+ msgid "Schedule"
1021
+ msgstr "Pianifica"
1022
+
1023
+ #: .././classes/class-icegram-campaign-admin.php:254
1024
+ msgid "From&hellip;"
1025
+ msgstr "Da..."
1026
+
1027
+ #: .././classes/class-icegram-campaign-admin.php:257
1028
+ msgid "To&hellip;"
1029
+ msgstr "A..."
1030
+
1031
+ #: .././classes/class-icegram-campaign-admin.php:265
1032
+ msgid "Device?"
1033
+ msgstr "Dispositivo?"
1034
+
1035
+ #: .././classes/class-icegram-campaign-admin.php:266
1036
+ msgid "Mobile / Smartphones"
1037
+ msgstr "Mobile/ Smartphones"
1038
+
1039
+ #: .././classes/class-icegram-campaign-admin.php:270
1040
+ msgid "Tablet"
1041
+ msgstr "Tablet"
1042
+
1043
+ #: .././classes/class-icegram-campaign-admin.php:274
1044
+ msgid "Desktop / Laptop"
1045
+ msgstr "Desktop/Laptop"
1046
+
1047
+ #: .././classes/class-icegram-campaign-admin.php:282
1048
+ msgid "Who?"
1049
+ msgstr "Chi?"
1050
+
1051
+ #: .././classes/class-icegram-campaign-admin.php:285
1052
+ msgid "All users"
1053
+ msgstr "Tutti gli utenti"
1054
+
1055
+ #: .././classes/class-icegram-campaign-admin.php:292
1056
+ msgid "Logged in users only"
1057
+ msgstr "Solo per utenti loggati"
1058
+
1059
+ #: .././classes/class-icegram-campaign-admin.php:311
1060
+ msgid "Select a user role&hellip;"
1061
+ msgstr "Seleziona un ruolo utente..."
1062
+
1063
+ #: .././classes/class-icegram-campaign-admin.php:327
1064
+ msgid "Not Logged in users"
1065
+ msgstr "Utenti non loggati"
1066
+
1067
+ #: .././classes/class-icegram-campaign-admin.php:331
1068
+ #: .././classes/class-icegram-campaign-admin.php:341
1069
+ msgid "Current Session"
1070
+ msgstr "Sessione corrente"
1071
+
1072
+ #: .././classes/class-icegram-campaign-admin.php:332
1073
+ #: .././classes/class-icegram-campaign-admin.php:340
1074
+ msgid "Never"
1075
+ msgstr "Mai"
1076
+
1077
+ #: .././classes/class-icegram-campaign-admin.php:333
1078
+ #: .././classes/class-icegram-campaign-admin.php:342
1079
+ msgid "Today"
1080
+ msgstr "Oggi"
1081
+
1082
+ #: .././classes/class-icegram-campaign-admin.php:334
1083
+ #: .././classes/class-icegram-campaign-admin.php:343
1084
+ msgid "One week"
1085
+ msgstr "Una settimana"
1086
+
1087
+ #: .././classes/class-icegram-campaign-admin.php:335
1088
+ #: .././classes/class-icegram-campaign-admin.php:344
1089
+ msgid "Two weeks"
1090
+ msgstr "Due settimane"
1091
+
1092
+ #: .././classes/class-icegram-campaign-admin.php:336
1093
+ #: .././classes/class-icegram-campaign-admin.php:345
1094
+ msgid "One Month "
1095
+ msgstr "Un mese"
1096
+
1097
+ #: .././classes/class-icegram-campaign-admin.php:337
1098
+ #: .././classes/class-icegram-campaign-admin.php:346
1099
+ msgid "Three Months "
1100
+ msgstr "Tre mesi"
1101
+
1102
+ #: .././classes/class-icegram-campaign-admin.php:338
1103
+ #: .././classes/class-icegram-campaign-admin.php:347
1104
+ msgid "One year"
1105
+ msgstr "Un anno"
1106
+
1107
+ #: .././classes/class-icegram-campaign-admin.php:339
1108
+ #: .././classes/class-icegram-campaign-admin.php:348
1109
+ msgid "Two Years"
1110
+ msgstr "Due anni"
1111
+
1112
+ #: .././classes/class-icegram-campaign-admin.php:353
1113
+ msgid "Retargeting"
1114
+ msgstr "Retargeting"
1115
+
1116
+ #: .././classes/class-icegram-campaign-admin.php:356
1117
+ msgid "Once shown, do NOT show this campaign again for"
1118
+ msgstr "Una volta mostrata, NON mostrare ancora la campagna per"
1119
+
1120
+ #: .././classes/class-icegram-campaign-admin.php:371
1121
+ msgid "Once CTA is clicked, do NOT show this campaign again for"
1122
+ msgstr "Una volta cliccata la CTA, NON mostrare ancora questa campagna per"
1123
+
1124
+ #: .././classes/class-icegram-campaign-admin.php:435
1125
+ msgid "- - - - - - - - - - - - - - - - - - - - - - - - - -"
1126
+ msgstr "- - - - - - - - - - - - - - - - - - - - - - - - - -"
1127
+
1128
+ #: .././classes/class-icegram-campaign-admin.php:454
1129
+ msgid "Show after"
1130
+ msgstr "Mostra in seguito"
1131
+
1132
+ #: .././classes/class-icegram-campaign-admin.php:455
1133
+ msgid "Actions"
1134
+ msgstr "Azioni"
trunk/lang/src/icegram.pot ADDED
@@ -0,0 +1,1248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2014 Icegram
2
+ # This file is distributed under the same license as the Icegram package.
3
+ # Loco Gettext template
4
+ #, fuzzy
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: Icegram 1.1.1\n"
8
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/icegram\n"
9
+ "POT-Creation-Date: 2014-06-10 06:09:11+00:00\n"
10
+ "POT-Revision-Date: Tue Aug 02 2016 12:36:40 GMT+0530 (IST)\n"
11
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: Icegram Team <hello@icegram.com>\n"
13
+ "Language-Team: Icegram Team <hello@icegram.com>\n"
14
+ "Language: \n"
15
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION\n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=UTF-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+ "X-Poedit-SourceCharset: UTF-8\n"
20
+ "X-Poedit-Basepath: .\n"
21
+ "X-Poedit-SearchPath-0: ../..\n"
22
+ "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
23
+ "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
24
+ "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
25
+ "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
26
+ "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
27
+ "X-Generator: Loco - https://localise.biz/"
28
+
29
+ #: ../../gallery.php:22
30
+ msgid "Gallery items"
31
+ msgstr ""
32
+
33
+ #: ../../gallery.php:23
34
+ msgid "Here's a collection of some "
35
+ msgstr ""
36
+
37
+ #: ../../gallery.php:23
38
+ msgid "beautiful, powerful ready-to-use Icegram Campaigns."
39
+ msgstr ""
40
+
41
+ #: ../../gallery.php:24
42
+ msgid "No coding or special skills required. Simply click to"
43
+ msgstr ""
44
+
45
+ #: ../../gallery.php:24
46
+ msgid " Use This "
47
+ msgstr ""
48
+
49
+ #: ../../gallery.php:24
50
+ msgid "and the campaign will automatically appear in your Icegram dashboard."
51
+ msgstr ""
52
+
53
+ #: ../../gallery.php:40 ../../gallery.php:83 ../../classes/class-icegram-campaign-
54
+ #: admin.php:63 ../../classes/class-icegram-campaign-admin.php:673
55
+ msgid "Preview"
56
+ msgstr ""
57
+
58
+ #: ../../gallery.php:41 ../../gallery.php:56
59
+ #, php-format
60
+ msgid "By %s"
61
+ msgstr ""
62
+
63
+ #: ../../gallery.php:48
64
+ msgid "Close"
65
+ msgstr ""
66
+
67
+ #: ../../gallery.php:49
68
+ msgctxt "Button label for a theme"
69
+ msgid "Previous"
70
+ msgstr ""
71
+
72
+ #: ../../gallery.php:50
73
+ msgctxt "Button label for a theme"
74
+ msgid "Next"
75
+ msgstr ""
76
+
77
+ #: ../../gallery.php:51
78
+ msgid "Use This"
79
+ msgstr ""
80
+
81
+ #: ../../gallery.php:68
82
+ msgid "This theme has not been rated yet."
83
+ msgstr ""
84
+
85
+ #: ../../gallery.php:70 ../../about-icegram.php:182
86
+ #, php-format
87
+ msgid "Version: %s"
88
+ msgstr ""
89
+
90
+ #: ../../gallery.php:76
91
+ msgid "Collapse Sidebar"
92
+ msgstr ""
93
+
94
+ #: ../../gallery.php:78
95
+ msgid "Collapse"
96
+ msgstr ""
97
+
98
+ #. Name of the plugin
99
+ msgid "Icegram - Popups, Optins, CTAs & lot more..."
100
+ msgstr ""
101
+
102
+ #. URI of the plugin
103
+ msgid "https://www.icegram.com"
104
+ msgstr ""
105
+
106
+ #. Description of the plugin/theme
107
+ msgid ""
108
+ "All in one solution to inspire, convert and engage your audiences. Action "
109
+ "bars, Popup windows, Messengers, Toast notifications and more. Awesome "
110
+ "themes and powerful rules."
111
+ msgstr ""
112
+
113
+ #. Author of the plugin
114
+ msgid "icegram"
115
+ msgstr ""
116
+
117
+ #: ../../icegram.php:106
118
+ msgid "Addons"
119
+ msgstr ""
120
+
121
+ #: ../../icegram.php:107 ../../icegram.php:518
122
+ msgid "Settings"
123
+ msgstr ""
124
+
125
+ #: ../../icegram.php:108
126
+ msgid "Support"
127
+ msgstr ""
128
+
129
+ #: ../../icegram.php:196
130
+ msgid "No, I don't like offers..."
131
+ msgstr ""
132
+
133
+ #: ../../icegram.php:204
134
+ msgid "No, I don't want to save money "
135
+ msgstr ""
136
+
137
+ #: ../../icegram.php:205
138
+ msgid "No, I will buy at full price later"
139
+ msgstr ""
140
+
141
+ #: ../../icegram.php:206
142
+ msgid "No, I don't like insider deals"
143
+ msgstr ""
144
+
145
+ #: ../../icegram.php:223
146
+ msgid "Begin installation"
147
+ msgstr ""
148
+
149
+ #: ../../icegram.php:223
150
+ msgid "No, I don't need it"
151
+ msgstr ""
152
+
153
+ #: ../../icegram.php:247
154
+ msgid "Free Add-ons, Proven Marketing Tricks and Updates"
155
+ msgstr ""
156
+
157
+ #: ../../icegram.php:252
158
+ msgid "Get add-ons and tips..."
159
+ msgstr ""
160
+
161
+ #: ../../icegram.php:343
162
+ msgid "Housekeeping"
163
+ msgstr ""
164
+
165
+ #: ../../icegram.php:347
166
+ msgid "Remove all Icegram shortcodes"
167
+ msgstr ""
168
+
169
+ #: ../../icegram.php:352
170
+ msgid "Remove all Icegram campaigns and messages"
171
+ msgstr ""
172
+
173
+ #: ../../icegram.php:356
174
+ msgid "Clean Up"
175
+ msgstr ""
176
+
177
+ #: ../../icegram.php:365
178
+ msgid ""
179
+ "You won't be able to recover this data once you proceed. Do you really want "
180
+ "to perform this action?"
181
+ msgstr ""
182
+
183
+ #: ../../icegram.php:380
184
+ msgid "Done!"
185
+ msgstr ""
186
+
187
+ #: ../../icegram.php:516
188
+ msgid "Welcome to Icegram"
189
+ msgstr ""
190
+
191
+ #: ../../icegram.php:517
192
+ msgid "Gallery"
193
+ msgstr ""
194
+
195
+ #: ../../icegram.php:519
196
+ msgid "Add-ons"
197
+ msgstr ""
198
+
199
+ #: ../../icegram.php:532
200
+ msgid "Docs & Support"
201
+ msgstr ""
202
+
203
+ #: ../../icegram.php:577
204
+ msgid ""
205
+ "Are you sure you want to delete this theme?\n"
206
+ "\n"
207
+ "Click 'Cancel' to go back, 'OK' to confirm the delete."
208
+ msgstr ""
209
+
210
+ #: ../../icegram.php:581
211
+ msgid "Add New Gallery Item"
212
+ msgstr ""
213
+
214
+ #: ../../icegram.php:582
215
+ msgid "Search Installed Gallery Item"
216
+ msgstr ""
217
+
218
+ #: ../../icegram.php:583
219
+ msgid "Search installed Gallery Item..."
220
+ msgstr ""
221
+
222
+ #: ../../icegram.php:584
223
+ #, php-format
224
+ msgid "Number of Gallery Item found: %d"
225
+ msgstr ""
226
+
227
+ #: ../../icegram.php:585
228
+ msgid "No Gallery Item found. Try a different search."
229
+ msgstr ""
230
+
231
+ #: ../../icegram.php:754
232
+ msgid "Powered by Icegram"
233
+ msgstr ""
234
+
235
+ #: ../../icegram.php:1164 ../../icegram.php:1170 ../../about-icegram.php:231
236
+ msgid "Campaigns"
237
+ msgstr ""
238
+
239
+ #: ../../icegram.php:1165
240
+ msgid "Campaign"
241
+ msgstr ""
242
+
243
+ #: ../../icegram.php:1166 ../../icegram.php:1167
244
+ msgid "Add New Campaign"
245
+ msgstr ""
246
+
247
+ #: ../../icegram.php:1168
248
+ msgid "Edit Campaign"
249
+ msgstr ""
250
+
251
+ #: ../../icegram.php:1169
252
+ msgid "New Campaign"
253
+ msgstr ""
254
+
255
+ #: ../../icegram.php:1171
256
+ msgid "View Campaign"
257
+ msgstr ""
258
+
259
+ #: ../../icegram.php:1172
260
+ msgid "Search Campaigns"
261
+ msgstr ""
262
+
263
+ #: ../../icegram.php:1173
264
+ msgid "No campaigns found"
265
+ msgstr ""
266
+
267
+ #: ../../icegram.php:1174
268
+ msgid "No campaigns found in Trash"
269
+ msgstr ""
270
+
271
+ #. #-#-#-#-# plugin.pot (Icegram 1.1) #-#-#-#-#
272
+ #. Plugin Name of the plugin/theme
273
+ #. #-#-#-#-# plugin.pot (Icegram 1.1) #-#-#-#-#
274
+ #. Author of the plugin/theme
275
+ #: ../../icegram.php:1176
276
+ msgid "Icegram"
277
+ msgstr ""
278
+
279
+ #: ../../icegram.php:1202 ../../icegram.php:1208 ../../icegram.php:1214 ../..
280
+ #: /about-icegram.php:200
281
+ msgid "Messages"
282
+ msgstr ""
283
+
284
+ #: ../../icegram.php:1203 ../../classes/class-icegram-campaign-admin.php:48 ../..
285
+ #: /classes/class-icegram-campaign-admin.php:65 ../../about-icegram.php:137
286
+ msgid "Message"
287
+ msgstr ""
288
+
289
+ #: ../../icegram.php:1204
290
+ msgid "Create New"
291
+ msgstr ""
292
+
293
+ #: ../../icegram.php:1205
294
+ msgid "Create New Message"
295
+ msgstr ""
296
+
297
+ #: ../../icegram.php:1206 ../../classes/class-icegram-campaign-admin.php:105 ../..
298
+ #: /classes/class-icegram-campaign-admin.php:512
299
+ msgid "Edit Message"
300
+ msgstr ""
301
+
302
+ #: ../../icegram.php:1207
303
+ msgid "New Message"
304
+ msgstr ""
305
+
306
+ #: ../../icegram.php:1209
307
+ msgid "View Message"
308
+ msgstr ""
309
+
310
+ #: ../../icegram.php:1210
311
+ msgid "Search Messages"
312
+ msgstr ""
313
+
314
+ #: ../../icegram.php:1211
315
+ msgid "No messages found"
316
+ msgstr ""
317
+
318
+ #: ../../icegram.php:1212
319
+ msgid "No messages found in Trash"
320
+ msgstr ""
321
+
322
+ #: ../../icegram.php:1648
323
+ msgid "Copy"
324
+ msgstr ""
325
+
326
+ #: ../../classes/class-icegram-campaign-admin.php:50 ../../about-icegram.php:245
327
+ msgid "Targeting Rules"
328
+ msgstr ""
329
+
330
+ #: ../../classes/class-icegram-campaign-admin.php:57
331
+ msgid "Search to add / Create new&hellip;"
332
+ msgstr ""
333
+
334
+ #: ../../classes/class-icegram-campaign-admin.php:60 ../../classes/class-icegram-
335
+ #: campaign-admin.php:449
336
+ msgid "Create new"
337
+ msgstr ""
338
+
339
+ #: ../../classes/class-icegram-campaign-admin.php:97 ../../classes/class-icegram-
340
+ #: campaign-admin.php:505
341
+ msgid "Give this message a name for your own reference"
342
+ msgstr ""
343
+
344
+ #: ../../classes/class-icegram-campaign-admin.php:102 ../../classes/class-icegram-
345
+ #: campaign-admin.php:509
346
+ msgid " sec"
347
+ msgstr ""
348
+
349
+ #: ../../classes/class-icegram-campaign-admin.php:106 ../../classes/class-icegram-
350
+ #: campaign-admin.php:513
351
+ msgid "Remove from Campaign"
352
+ msgstr ""
353
+
354
+ #: ../../classes/class-icegram-campaign-admin.php:124
355
+ msgid ""
356
+ "No messages yet. Use search / create bar above to add messages to this "
357
+ "campaign."
358
+ msgstr ""
359
+
360
+ #: ../../classes/class-icegram-campaign-admin.php:162
361
+ msgid "Where?"
362
+ msgstr ""
363
+
364
+ #: ../../classes/class-icegram-campaign-admin.php:165
365
+ msgid "Sitewide"
366
+ msgstr ""
367
+
368
+ #: ../../classes/class-icegram-campaign-admin.php:171
369
+ msgid "Select pages to exclude&hellip;"
370
+ msgstr ""
371
+
372
+ #: ../../classes/class-icegram-campaign-admin.php:186
373
+ msgid "Homepage"
374
+ msgstr ""
375
+
376
+ #: ../../classes/class-icegram-campaign-admin.php:193
377
+ msgid "Selected pages"
378
+ msgstr ""
379
+
380
+ #: ../../classes/class-icegram-campaign-admin.php:199
381
+ msgid "Select a page&hellip;"
382
+ msgstr ""
383
+
384
+ #: ../../classes/class-icegram-campaign-admin.php:214
385
+ msgid "Specific URLs on this site"
386
+ msgstr ""
387
+
388
+ #: ../../classes/class-icegram-campaign-admin.php:230
389
+ msgid " Add another"
390
+ msgstr ""
391
+
392
+ #: ../../classes/class-icegram-campaign-admin.php:239
393
+ #, php-format
394
+ msgid ""
395
+ "Additionally you can insert <code>[%s]</code> wherever you want to run this "
396
+ "campaign."
397
+ msgstr ""
398
+
399
+ #: ../../classes/class-icegram-campaign-admin.php:246
400
+ msgid "When?"
401
+ msgstr ""
402
+
403
+ #: ../../classes/class-icegram-campaign-admin.php:249
404
+ msgid "Always"
405
+ msgstr ""
406
+
407
+ #: ../../classes/class-icegram-campaign-admin.php:256
408
+ msgid "Schedule"
409
+ msgstr ""
410
+
411
+ #: ../../classes/class-icegram-campaign-admin.php:259
412
+ msgid "From&hellip;"
413
+ msgstr ""
414
+
415
+ #: ../../classes/class-icegram-campaign-admin.php:262
416
+ msgid "To&hellip;"
417
+ msgstr ""
418
+
419
+ #: ../../classes/class-icegram-campaign-admin.php:273
420
+ msgid "Device?"
421
+ msgstr ""
422
+
423
+ #: ../../classes/class-icegram-campaign-admin.php:274
424
+ msgid "Mobile / Smartphones"
425
+ msgstr ""
426
+
427
+ #: ../../classes/class-icegram-campaign-admin.php:278
428
+ msgid "Tablet"
429
+ msgstr ""
430
+
431
+ #: ../../classes/class-icegram-campaign-admin.php:282
432
+ msgid "Desktop / Laptop"
433
+ msgstr ""
434
+
435
+ #: ../../classes/class-icegram-campaign-admin.php:290
436
+ msgid "Who?"
437
+ msgstr ""
438
+
439
+ #: ../../classes/class-icegram-campaign-admin.php:293
440
+ msgid "All users"
441
+ msgstr ""
442
+
443
+ #: ../../classes/class-icegram-campaign-admin.php:300
444
+ msgid "Logged in users only"
445
+ msgstr ""
446
+
447
+ #: ../../classes/class-icegram-campaign-admin.php:319
448
+ msgid "Select a user role&hellip;"
449
+ msgstr ""
450
+
451
+ #: ../../classes/class-icegram-campaign-admin.php:335
452
+ msgid "Not Logged in users"
453
+ msgstr ""
454
+
455
+ #: ../../classes/class-icegram-campaign-admin.php:339 ../../classes/class-icegram-
456
+ #: campaign-admin.php:349
457
+ msgid "Current Session"
458
+ msgstr ""
459
+
460
+ #: ../../classes/class-icegram-campaign-admin.php:340 ../../classes/class-icegram-
461
+ #: campaign-admin.php:348
462
+ msgid "Never"
463
+ msgstr ""
464
+
465
+ #: ../../classes/class-icegram-campaign-admin.php:341 ../../classes/class-icegram-
466
+ #: campaign-admin.php:350
467
+ msgid "Today"
468
+ msgstr ""
469
+
470
+ #: ../../classes/class-icegram-campaign-admin.php:342 ../../classes/class-icegram-
471
+ #: campaign-admin.php:351
472
+ msgid "One week"
473
+ msgstr ""
474
+
475
+ #: ../../classes/class-icegram-campaign-admin.php:343 ../../classes/class-icegram-
476
+ #: campaign-admin.php:352
477
+ msgid "Two weeks"
478
+ msgstr ""
479
+
480
+ #: ../../classes/class-icegram-campaign-admin.php:344 ../../classes/class-icegram-
481
+ #: campaign-admin.php:353
482
+ msgid "One Month "
483
+ msgstr ""
484
+
485
+ #: ../../classes/class-icegram-campaign-admin.php:345 ../../classes/class-icegram-
486
+ #: campaign-admin.php:354
487
+ msgid "Three Months "
488
+ msgstr ""
489
+
490
+ #: ../../classes/class-icegram-campaign-admin.php:346 ../../classes/class-icegram-
491
+ #: campaign-admin.php:355
492
+ msgid "One year"
493
+ msgstr ""
494
+
495
+ #: ../../classes/class-icegram-campaign-admin.php:347 ../../classes/class-icegram-
496
+ #: campaign-admin.php:356
497
+ msgid "Two Years"
498
+ msgstr ""
499
+
500
+ #: ../../classes/class-icegram-campaign-admin.php:362
501
+ msgid "Retargeting"
502
+ msgstr ""
503
+
504
+ #: ../../classes/class-icegram-campaign-admin.php:365
505
+ msgid " Once shown, do NOT show this campaign again for "
506
+ msgstr ""
507
+
508
+ #: ../../classes/class-icegram-campaign-admin.php:381
509
+ msgid "Once CTA is clicked, do NOT show this campaign again for"
510
+ msgstr ""
511
+
512
+ #: ../../classes/class-icegram-campaign-admin.php:445
513
+ msgid "- - - - - - - - - - - - - - - - - - - - - - - - - -"
514
+ msgstr ""
515
+
516
+ #: ../../classes/class-icegram-campaign-admin.php:462 ../../classes/class-icegram-
517
+ #: message-admin.php:113 ../../classes/class-icegram-message-admin.php:556
518
+ msgid "Type"
519
+ msgstr ""
520
+
521
+ #: ../../classes/class-icegram-campaign-admin.php:463 ../../about-icegram.php:125
522
+ msgid "Name"
523
+ msgstr ""
524
+
525
+ #: ../../classes/class-icegram-campaign-admin.php:464
526
+ msgid "Show after"
527
+ msgstr ""
528
+
529
+ #: ../../classes/class-icegram-campaign-admin.php:465
530
+ msgid "Actions"
531
+ msgstr ""
532
+
533
+ #: ../../classes/class-icegram-campaign-admin.php:671 ../../classes/class-icegram-
534
+ #: message-admin.php:753
535
+ msgid "Duplicate"
536
+ msgstr ""
537
+
538
+ #: ../../classes/class-icegram-message-admin.php:41
539
+ msgid "Message Settings"
540
+ msgstr ""
541
+
542
+ #: ../../classes/class-icegram-message-admin.php:130 ../../classes/class-icegram-
543
+ #: message-admin.php:557
544
+ msgid "Theme"
545
+ msgstr ""
546
+
547
+ #: ../../classes/class-icegram-message-admin.php:147
548
+ msgid "Animation"
549
+ msgstr ""
550
+
551
+ #: ../../classes/class-icegram-message-admin.php:162
552
+ msgid "Headline"
553
+ msgstr ""
554
+
555
+ #: ../../classes/class-icegram-message-admin.php:163
556
+ msgid ""
557
+ "Shown with highest prominence. Click on idea button on right to get a new "
558
+ "headline."
559
+ msgstr ""
560
+
561
+ #: ../../classes/class-icegram-message-admin.php:169
562
+ msgid "Give Me Another Headline"
563
+ msgstr ""
564
+
565
+ #: ../../classes/class-icegram-message-admin.php:175
566
+ msgid "Icon / Avatar Image"
567
+ msgstr ""
568
+
569
+ #: ../../classes/class-icegram-message-admin.php:176
570
+ msgid "This image will appear in message content."
571
+ msgstr ""
572
+
573
+ #: ../../classes/class-icegram-message-admin.php:179
574
+ msgid "Upload / Select an image"
575
+ msgstr ""
576
+
577
+ #: ../../classes/class-icegram-message-admin.php:179
578
+ msgid "Upload / Select Image"
579
+ msgstr ""
580
+
581
+ #: ../../classes/class-icegram-message-admin.php:195
582
+ msgid "Message Body"
583
+ msgstr ""
584
+
585
+ #: ../../classes/class-icegram-message-admin.php:226
586
+ msgid "Form"
587
+ msgstr ""
588
+
589
+ #: ../../classes/class-icegram-message-admin.php:227
590
+ msgid "Use Opt-in / Subscription / Lead capture form"
591
+ msgstr ""
592
+
593
+ #: ../../classes/class-icegram-message-admin.php:249 ../../classes/class-icegram-
594
+ #: message-admin.php:251
595
+ msgid "Left"
596
+ msgstr ""
597
+
598
+ #: ../../classes/class-icegram-message-admin.php:256 ../../classes/class-icegram-
599
+ #: message-admin.php:258
600
+ msgid "Right"
601
+ msgstr ""
602
+
603
+ #: ../../classes/class-icegram-message-admin.php:263 ../../classes/class-icegram-
604
+ #: message-admin.php:265
605
+ msgid "Bottom"
606
+ msgstr ""
607
+
608
+ #: ../../classes/class-icegram-message-admin.php:274 ../../classes/class-icegram-
609
+ #: message-admin.php:276
610
+ msgid "Inline"
611
+ msgstr ""
612
+
613
+ #: ../../classes/class-icegram-message-admin.php:286
614
+ msgid "Background Color"
615
+ msgstr ""
616
+
617
+ #: ../../classes/class-icegram-message-admin.php:287
618
+ msgid "Text Color"
619
+ msgstr ""
620
+
621
+ #: ../../classes/class-icegram-message-admin.php:298
622
+ msgid "Text / HTML to show before the form"
623
+ msgstr ""
624
+
625
+ #: ../../classes/class-icegram-message-admin.php:304
626
+ msgid "Add form embed code"
627
+ msgstr ""
628
+
629
+ #: ../../classes/class-icegram-message-admin.php:304
630
+ msgid " or easily embed using "
631
+ msgstr ""
632
+
633
+ #: ../../classes/class-icegram-message-admin.php:308
634
+ msgid "Use Rainmaker form "
635
+ msgstr ""
636
+
637
+ #: ../../classes/class-icegram-message-admin.php:310
638
+ msgid "Select form "
639
+ msgstr ""
640
+
641
+ #: ../../classes/class-icegram-message-admin.php:314
642
+ msgid " or add "
643
+ msgstr ""
644
+
645
+ #: ../../classes/class-icegram-message-admin.php:314
646
+ msgid "form embed code"
647
+ msgstr ""
648
+
649
+ #: ../../classes/class-icegram-message-admin.php:322
650
+ msgid "Paste HTML / shortcode of your form here..."
651
+ msgstr ""
652
+
653
+ #: ../../classes/class-icegram-message-admin.php:326
654
+ msgid "Show labels above fields"
655
+ msgstr ""
656
+
657
+ #: ../../classes/class-icegram-message-admin.php:331
658
+ msgid "Text / HTML to show after the form"
659
+ msgstr ""
660
+
661
+ #: ../../classes/class-icegram-message-admin.php:334
662
+ msgid ""
663
+ "Insert <code>[ig_form]</code> where you want to show this form in message "
664
+ "body."
665
+ msgstr ""
666
+
667
+ #: ../../classes/class-icegram-message-admin.php:341
668
+ msgid "Button Label"
669
+ msgstr ""
670
+
671
+ #: ../../classes/class-icegram-message-admin.php:342
672
+ msgid "Your call to action text. Something unusual will increase conversions."
673
+ msgstr ""
674
+
675
+ #: ../../classes/class-icegram-message-admin.php:352
676
+ msgid "Target Link"
677
+ msgstr ""
678
+
679
+ #: ../../classes/class-icegram-message-admin.php:353
680
+ msgid "Enter destination URL here. Clicking will redirect to this link."
681
+ msgstr ""
682
+
683
+ #: ../../classes/class-icegram-message-admin.php:376
684
+ msgid "Body"
685
+ msgstr ""
686
+
687
+ #: ../../classes/class-icegram-message-admin.php:377 ../../classes/class-icegram-
688
+ #: message-admin.php:383
689
+ msgid "Background"
690
+ msgstr ""
691
+
692
+ #: ../../classes/class-icegram-message-admin.php:378 ../../classes/class-icegram-
693
+ #: message-admin.php:384
694
+ msgid "Text"
695
+ msgstr ""
696
+
697
+ #: ../../classes/class-icegram-message-admin.php:382
698
+ msgid "Button"
699
+ msgstr ""
700
+
701
+ #: ../../classes/class-icegram-message-admin.php:389
702
+ msgid "Colors"
703
+ msgstr ""
704
+
705
+ #: ../../classes/class-icegram-message-admin.php:390
706
+ msgid "Use theme's default colors"
707
+ msgstr ""
708
+
709
+ #: ../../classes/class-icegram-message-admin.php:396
710
+ msgid "Position"
711
+ msgstr ""
712
+
713
+ #: ../../classes/class-icegram-message-admin.php:452
714
+ msgid "Custom Code"
715
+ msgstr ""
716
+
717
+ #: ../../classes/class-icegram-message-admin.php:453
718
+ msgid "Add custom code for this message"
719
+ msgstr ""
720
+
721
+ #: ../../classes/class-icegram-message-admin.php:457
722
+ msgid "CSS"
723
+ msgstr ""
724
+
725
+ #: ../../classes/class-icegram-message-admin.php:463
726
+ msgid "JS"
727
+ msgstr ""
728
+
729
+ #: ../../classes/class-icegram-message-admin.php:466
730
+ msgid "Add Custom javaScript for this message here..."
731
+ msgstr ""
732
+
733
+ #: ../../classes/class-icegram-message-admin.php:486
734
+ #, php-format
735
+ msgid "You may add <code>[%s]</code> where you want to show this message."
736
+ msgstr ""
737
+
738
+ #: ../../classes/class-icegram-message-admin.php:558
739
+ msgid "Thumbnail"
740
+ msgstr ""
741
+
742
+ #: ../../classes/class-icegram-message-admin.php:701
743
+ msgid "Here Is A Method That Is Helping ____ To ____"
744
+ msgstr ""
745
+
746
+ #: ../../classes/class-icegram-message-admin.php:702
747
+ msgid "__ Little Known Ways To ____"
748
+ msgstr ""
749
+
750
+ #: ../../classes/class-icegram-message-admin.php:703
751
+ msgid "Get Rid Of ____ Once And For All"
752
+ msgstr ""
753
+
754
+ #: ../../classes/class-icegram-message-admin.php:704
755
+ msgid "How To ____ So You Can ____"
756
+ msgstr ""
757
+
758
+ #: ../../classes/class-icegram-message-admin.php:705
759
+ msgid "They Didn't Think I Could ____, But I Did"
760
+ msgstr ""
761
+
762
+ #: ../../classes/class-icegram-message-admin.php:706
763
+ msgid "How ____ Made Me ____"
764
+ msgstr ""
765
+
766
+ #: ../../classes/class-icegram-message-admin.php:707
767
+ msgid "Are You ____ ?"
768
+ msgstr ""
769
+
770
+ #: ../../classes/class-icegram-message-admin.php:708
771
+ msgid "Warning: ____ !"
772
+ msgstr ""
773
+
774
+ #: ../../classes/class-icegram-message-admin.php:709
775
+ msgid "Do You Make These Mistakes With ____ ?"
776
+ msgstr ""
777
+
778
+ #: ../../classes/class-icegram-message-admin.php:710
779
+ msgid "7 Ways To ____"
780
+ msgstr ""
781
+
782
+ #: ../../classes/class-icegram-message-admin.php:711
783
+ msgid "If You're ____, You Can ____"
784
+ msgstr ""
785
+
786
+ #: ../../classes/class-icegram-message-admin.php:712
787
+ msgid "Turn your ____ into a ____"
788
+ msgstr ""
789
+
790
+ #: ../../classes/class-icegram-message-admin.php:713
791
+ msgid "Want To Be A ____?"
792
+ msgstr ""
793
+
794
+ #: ../../classes/class-icegram-message-admin.php:714
795
+ msgid "The Ugly Truth About Your Beautiful ____"
796
+ msgstr ""
797
+
798
+ #: ../../classes/class-icegram-message-admin.php:715
799
+ msgid "The Secret to ____ Is Simply ____!"
800
+ msgstr ""
801
+
802
+ #: ../../classes/class-icegram-message-admin.php:716
803
+ msgid "The Quickest Way I Know To ____"
804
+ msgstr ""
805
+
806
+ #: ../../classes/class-icegram-message-admin.php:717
807
+ msgid "The Lazy Man's Way To ____"
808
+ msgstr ""
809
+
810
+ #: ../../classes/class-icegram-message-admin.php:718
811
+ msgid "The Amazing Story Of ____ That Requires So Little Of ____ You Could ____"
812
+ msgstr ""
813
+
814
+ #: ../../classes/class-icegram-message-admin.php:719
815
+ msgid "The Amazing Secret Of The ____ Genius Who Is Afraid Of ____"
816
+ msgstr ""
817
+
818
+ #: ../../classes/class-icegram-message-admin.php:720
819
+ msgid "The 10 Wackiest Ideas That ____... And How You Can Too!"
820
+ msgstr ""
821
+
822
+ #: ../../classes/class-icegram-message-admin.php:721
823
+ msgid "The Inside Secrets To ____ With Crazy, Outlandish And Outrageous ____"
824
+ msgstr ""
825
+
826
+ #: ../../classes/class-icegram-message-admin.php:722
827
+ msgid "____ Like A ____"
828
+ msgstr ""
829
+
830
+ #: ../../classes/class-icegram-message-admin.php:723
831
+ msgid "Remember When You Could Have ____, And You Didn't?"
832
+ msgstr ""
833
+
834
+ #: ../../classes/class-icegram-message-admin.php:724
835
+ msgid "Is The ____ Worth $x To You?"
836
+ msgstr ""
837
+
838
+ #: ../../classes/class-icegram-message-admin.php:725
839
+ msgid "Increase your ____, reduce ____, maintain ____ and ____ with ____"
840
+ msgstr ""
841
+
842
+ #: ../../classes/class-icegram-message-admin.php:726
843
+ msgid "If You Can ____ You Can ____"
844
+ msgstr ""
845
+
846
+ #: ../../classes/class-icegram-message-admin.php:727
847
+ msgid "I Discovered How To ____... Now I'm Revealing My Secret"
848
+ msgstr ""
849
+
850
+ #: ../../classes/class-icegram-message-admin.php:728
851
+ msgid "How To Turn Your ____ Into The Most ____"
852
+ msgstr ""
853
+
854
+ #: ../../classes/class-icegram-message-admin.php:729
855
+ msgid "How To Take The Headache Out Of ____"
856
+ msgstr ""
857
+
858
+ #: ../../classes/class-icegram-message-admin.php:730
859
+ msgid "How To ____ ... Legally"
860
+ msgstr ""
861
+
862
+ #: ../../classes/class-icegram-message-admin.php:731
863
+ msgid "How To ____ That ____"
864
+ msgstr ""
865
+
866
+ #: ../../classes/class-icegram-message-admin.php:732
867
+ msgid "How To Discover The ____ That Lies Hidden In Your ____"
868
+ msgstr ""
869
+
870
+ #: ../../classes/class-icegram-message-admin.php:733
871
+ msgid "How To ____ Even When Your Not ____"
872
+ msgstr ""
873
+
874
+ #: ../../classes/class-icegram-message-admin.php:734
875
+ msgid "____ With No ____!"
876
+ msgstr ""
877
+
878
+ #: ../../classes/class-icegram-message-admin.php:735
879
+ msgid "Greatest Goldmine of ____ Ever Jammed Into One Big ____"
880
+ msgstr ""
881
+
882
+ #: ../../classes/class-icegram-message-admin.php:736
883
+ msgid "Free ____ Tells How To Get Better ____"
884
+ msgstr ""
885
+
886
+ #: ../../classes/class-icegram-message-admin.php:737
887
+ msgid ""
888
+ "FREE ____ Worth $____ for the first 100 People to take Advantage of this "
889
+ "Offer"
890
+ msgstr ""
891
+
892
+ #: ../../classes/class-icegram-message-admin.php:738
893
+ msgid "Don't Try This With Any Other ____"
894
+ msgstr ""
895
+
896
+ #: ../../classes/class-icegram-message-admin.php:739
897
+ msgid "Do You Honestly Want To ____?"
898
+ msgstr ""
899
+
900
+ #: ../../classes/class-icegram-message-admin.php:740
901
+ msgid "Discover The Magic ____ That Will Bring You ____ & ____!"
902
+ msgstr ""
903
+
904
+ #: ../../classes/class-icegram-message-admin.php:741
905
+ msgid "____ Man Reveals A Short-Cut To ____"
906
+ msgstr ""
907
+
908
+ #: ../../classes/class-icegram-message-admin.php:742
909
+ msgid "Confessions Of A ____"
910
+ msgstr ""
911
+
912
+ #: ../../classes/class-icegram-message-admin.php:743
913
+ msgid "Are You Ready To ____?"
914
+ msgstr ""
915
+
916
+ #: ../../classes/class-icegram-message-admin.php:744
917
+ msgid "An Open Letter To Everyone Who ____ More Than ____ Per ____"
918
+ msgstr ""
919
+
920
+ #: ../../classes/class-icegram-message-admin.php:745
921
+ msgid "An Amazing ____ You Can Carry In Your ____"
922
+ msgstr ""
923
+
924
+ #: ../../classes/class-icegram-message-admin.php:746
925
+ msgid "21 Secret ____ that will ____... NOW!"
926
+ msgstr ""
927
+
928
+ #: ../../addons.php:54
929
+ msgid "Icegram Add-ons"
930
+ msgstr ""
931
+
932
+ #: ../../addons.php:58
933
+ msgid "All"
934
+ msgstr ""
935
+
936
+ #: ../../addons.php:59
937
+ msgid "Installed"
938
+ msgstr ""
939
+
940
+ #: ../../addons.php:60
941
+ msgid "Message Type"
942
+ msgstr ""
943
+
944
+ #: ../../addons.php:61
945
+ msgid "Themes"
946
+ msgstr ""
947
+
948
+ #: ../../addons.php:62
949
+ msgid "Targeting"
950
+ msgstr ""
951
+
952
+ #: ../../addons.php:63
953
+ msgid "Reporting"
954
+ msgstr ""
955
+
956
+ #: ../../addons.php:84
957
+ msgid "Get This Addon"
958
+ msgstr ""
959
+
960
+ #: ../../addons.php:87
961
+ msgid "Already Installed"
962
+ msgstr ""
963
+
964
+ #: ../../addons.php:99
965
+ msgid "Sorry! No Add-ons available currently."
966
+ msgstr ""
967
+
968
+ #: ../../about-icegram.php:129
969
+ msgid "E-mail"
970
+ msgstr ""
971
+
972
+ #: ../../about-icegram.php:133
973
+ msgid "Subject"
974
+ msgstr ""
975
+
976
+ #: ../../about-icegram.php:167
977
+ msgid "Welcome to Icegram."
978
+ msgstr ""
979
+
980
+ #: ../../about-icegram.php:168
981
+ msgid " Your sample campaign is ready!"
982
+ msgstr ""
983
+
984
+ #: ../../about-icegram.php:176
985
+ msgid "Preview Your First Campaign"
986
+ msgstr ""
987
+
988
+ #: ../../about-icegram.php:177
989
+ msgid "OR"
990
+ msgstr ""
991
+
992
+ #: ../../about-icegram.php:178
993
+ msgid "Edit & Publish it."
994
+ msgstr ""
995
+
996
+ #: ../../about-icegram.php:185
997
+ msgid "Questions? Need Help?"
998
+ msgstr ""
999
+
1000
+ #: ../../about-icegram.php:186 ../../about-icegram.php:293
1001
+ msgid "Contact Us"
1002
+ msgstr ""
1003
+
1004
+ #: ../../about-icegram.php:194
1005
+ msgid ""
1006
+ "Do read Icegram's core concepts below to understand how you can use Icegram "
1007
+ "to "
1008
+ msgstr ""
1009
+
1010
+ #: ../../about-icegram.php:195
1011
+ msgid "inspire, convert and engage"
1012
+ msgstr ""
1013
+
1014
+ #: ../../about-icegram.php:196
1015
+ msgid "your audience."
1016
+ msgstr ""
1017
+
1018
+ #: ../../about-icegram.php:202
1019
+ msgid "A 'Message' is a communication you want to deliver to your audience."
1020
+ msgstr ""
1021
+
1022
+ #: ../../about-icegram.php:203
1023
+ msgid "And Icegram comes with not one, but four message types."
1024
+ msgstr ""
1025
+
1026
+ #: ../../about-icegram.php:204
1027
+ msgid ""
1028
+ "Different message types look and behave differently, but they all have many "
1029
+ "common characteristics. For instance, most message types will allow you to "
1030
+ "set a headline, a body text, label for the ‘call to action’ button, a link "
1031
+ "for that button, theme and styling options, animation effect and position on "
1032
+ "screen where that message should show."
1033
+ msgstr ""
1034
+
1035
+ #: ../../about-icegram.php:208
1036
+ msgid "Action Bar"
1037
+ msgstr ""
1038
+
1039
+ #: ../../about-icegram.php:210
1040
+ msgid ""
1041
+ "An action bar is a proven attention grabber. It shows up as a solid bar "
1042
+ "either at top or bottom. Use it for your most important messages or time "
1043
+ "sensitive announcements. Put longer content in it and it acts like a "
1044
+ "collapsible panel!"
1045
+ msgstr ""
1046
+
1047
+ #: ../../about-icegram.php:211
1048
+ msgid "Messenger"
1049
+ msgstr ""
1050
+
1051
+ #: ../../about-icegram.php:213
1052
+ msgid ""
1053
+ "A messenger is best used to invoke interest while your visitor is reading "
1054
+ "your content. Users perceive it as something new, important and urgent and "
1055
+ "are highly likely to click on it."
1056
+ msgstr ""
1057
+
1058
+ #: ../../about-icegram.php:217
1059
+ msgid "Toast Notification"
1060
+ msgstr ""
1061
+
1062
+ #: ../../about-icegram.php:219
1063
+ msgid ""
1064
+ "Want to alert your visitor about some news, an update from your blog, a "
1065
+ "social proof or an offer? Use Icegram’s unique toast notification, it will "
1066
+ "catch their attention, let them click on the message, and disappear after a "
1067
+ "while."
1068
+ msgstr ""
1069
+
1070
+ #: ../../about-icegram.php:220
1071
+ msgid "Popup"
1072
+ msgstr ""
1073
+
1074
+ #: ../../about-icegram.php:222
1075
+ msgid ""
1076
+ "Lightbox popup windows are most widely used for lead capture, promotions and "
1077
+ "additional content display. Ask visitors to sign up to your newsletter, or "
1078
+ "like you on social networks, or tell them about a special offer..."
1079
+ msgstr ""
1080
+
1081
+ #: ../../about-icegram.php:233
1082
+ msgid "Campaign = Messages + Rules"
1083
+ msgstr ""
1084
+
1085
+ #: ../../about-icegram.php:234
1086
+ msgid ""
1087
+ "A campaign allows sequencing multiple messages and defining targeting rules. "
1088
+ "Create different campaigns for different marketing goals. Icegram supports "
1089
+ "showing multiple campaigns on any page."
1090
+ msgstr ""
1091
+
1092
+ #: ../../about-icegram.php:235
1093
+ msgid ""
1094
+ "You can always preview your campaign to ensure campaign works the way you "
1095
+ "want, before making it live."
1096
+ msgstr ""
1097
+
1098
+ #: ../../about-icegram.php:239
1099
+ msgid "Multiple Messages & Sequencing"
1100
+ msgstr ""
1101
+
1102
+ #: ../../about-icegram.php:241
1103
+ msgid ""
1104
+ "Add one or as many messages to a campaign as you want. Also choose the "
1105
+ "number of seconds after which each message should show up. Showing multiple "
1106
+ "messages for same goal, but with slightly different content / presentation, "
1107
+ "greatly improves conversions."
1108
+ msgstr ""
1109
+
1110
+ #: ../../about-icegram.php:247
1111
+ msgid ""
1112
+ "You can control who sees a campaign – and on what device, which pages does "
1113
+ "it show on, and what time period will it stay active for. You can run "
1114
+ "different campaigns with different rules to maximize engagement."
1115
+ msgstr ""
1116
+
1117
+ #: ../../about-icegram.php:256
1118
+ msgid "FAQ / Common Problems"
1119
+ msgstr ""
1120
+
1121
+ #: ../../about-icegram.php:259
1122
+ msgid "Messages look broken / formatting is weird..."
1123
+ msgstr ""
1124
+
1125
+ #: ../../about-icegram.php:260
1126
+ msgid ""
1127
+ "This is most likely due to CSS conflicts with current theme. We suggest "
1128
+ "using simple formatting for messages. You can also write custom CSS in your "
1129
+ "theme to fix any problems."
1130
+ msgstr ""
1131
+
1132
+ #: ../../about-icegram.php:262
1133
+ msgid "Extra Line Breaks / Paragraphs in messages..."
1134
+ msgstr ""
1135
+
1136
+ #: ../../about-icegram.php:263
1137
+ msgid ""
1138
+ "Go to HTML mode in content editor and pull your custom HTML code all "
1139
+ "together in one line. Don't leave blank lines between two tags. That should "
1140
+ "fix it."
1141
+ msgstr ""
1142
+
1143
+ #: ../../about-icegram.php:265
1144
+ msgid "How do I add custom CSS for messages?"
1145
+ msgstr ""
1146
+
1147
+ #: ../../about-icegram.php:266
1148
+ msgid ""
1149
+ "You can use custom CSS/JS inline in your message HTML. You can also use your "
1150
+ "theme's custom JS / CSS feature to add your changes."
1151
+ msgstr ""
1152
+
1153
+ #: ../../about-icegram.php:268
1154
+ msgid "Optin Forms / Mailing service integration..."
1155
+ msgstr ""
1156
+
1157
+ #: ../../about-icegram.php:269
1158
+ msgid ""
1159
+ "You can embed any optin / subscription form to your Icegram messages using "
1160
+ "'Embed Form' button above text editor. Paste in form HTML code and let "
1161
+ "Icegram clean it up! You may even use a shortcode if you are using a WP "
1162
+ "plugin from your newsletter / lead capture service."
1163
+ msgstr ""
1164
+
1165
+ #: ../../about-icegram.php:271
1166
+ msgid "How many messages should I show on a page?"
1167
+ msgstr ""
1168
+
1169
+ #: ../../about-icegram.php:272
1170
+ msgid ""
1171
+ "While Icegram provides you lots of different message types and ability to "
1172
+ "add multiple messages to a campaign, we discourage you to go overboard. "
1173
+ "We've observed two messages on a page work well, but YMMV!"
1174
+ msgstr ""
1175
+
1176
+ #: ../../about-icegram.php:278
1177
+ msgid "Preview does not work / not refreshing..."
1178
+ msgstr ""
1179
+
1180
+ #: ../../about-icegram.php:279
1181
+ msgid ""
1182
+ "Doing a browser refresh while previewing will not show your most recent "
1183
+ "changes. Click 'Preview' button to see a preview with your latest changes."
1184
+ msgstr ""
1185
+
1186
+ #: ../../about-icegram.php:281
1187
+ msgid "Can I use shortcodes in a message?"
1188
+ msgstr ""
1189
+
1190
+ #: ../../about-icegram.php:282
1191
+ msgid ""
1192
+ "Yes! Messages support shortcodes. You may need to adjust CSS so the "
1193
+ "shortcode output looks good in your message."
1194
+ msgstr ""
1195
+
1196
+ #: ../../about-icegram.php:284
1197
+ msgid "WPML / Multilingual usage..."
1198
+ msgstr ""
1199
+
1200
+ #: ../../about-icegram.php:285
1201
+ msgid ""
1202
+ "Go to <code>Messages</code> from Icegram menu. Edit a message and translate "
1203
+ "it like any other post. Icegram will show translated message where possible. "
1204
+ "Choose <code>All posts</code> under WPML Language setting - Blog Posts to "
1205
+ "display, to fall back to default language messages."
1206
+ msgstr ""
1207
+
1208
+ #: ../../about-icegram.php:289
1209
+ msgid "I can't find a way to do X..."
1210
+ msgstr ""
1211
+
1212
+ #: ../../about-icegram.php:290
1213
+ msgid ""
1214
+ "Icegram is actively developed. If you can't find your favorite feature (or "
1215
+ "have a suggestion) contact us. We'd love to hear from you."
1216
+ msgstr ""
1217
+
1218
+ #: ../../about-icegram.php:292
1219
+ msgid "I'm facing a problem and can't find a way out..."
1220
+ msgstr ""
1221
+
1222
+ #: ../../about-icegram.php:293
1223
+ msgid ""
1224
+ ", provide as much detail of the problem as you can. We will try to solve the "
1225
+ "problem ASAP."
1226
+ msgstr ""
1227
+
1228
+ #: ../../settings.php:19
1229
+ msgid "Icegram Settings"
1230
+ msgstr ""
1231
+
1232
+ #: ../../settings.php:23
1233
+ msgid "Share Icegram"
1234
+ msgstr ""
1235
+
1236
+ #: ../../settings.php:27
1237
+ msgid "Show \"Powered by\" link"
1238
+ msgstr ""
1239
+
1240
+ #: ../../settings.php:32
1241
+ msgid "Cache Friendly?"
1242
+ msgstr ""
1243
+
1244
+ #: ../../settings.php:36
1245
+ msgid ""
1246
+ "Turn on \"Lazy Load\" - load Icegram scripts and messages after page load to "
1247
+ "avoid caching problems."
1248
+ msgstr ""
trunk/message-types/action-bar/default.css ADDED
@@ -0,0 +1 @@
 
1
+ /* File for backward compatibility. */
trunk/message-types/action-bar/main.js ADDED
@@ -0,0 +1 @@
 
1
+ /* File for backward compatibility. */
trunk/message-types/action-bar/main.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+ if ( class_exists( 'Icegram_Message_Type_Action_Bar' ) ) return;
4
+
5
+ /**
6
+ * Class Icegram Action Bar
7
+ */
8
+ class Icegram_Message_Type_Action_Bar extends Icegram_Message_Type {
9
+
10
+ function __construct() {
11
+ parent::__construct( dirname( __FILE__ ), plugins_url( '/', __FILE__ ) );
12
+ add_filter( 'icegram_message_type_params_action-bar', array( $this, 'set_admin_style' ) );
13
+ }
14
+
15
+ function define_settings() {
16
+ parent::define_settings();
17
+ $this->settings['position']['values'] = array( '01', '21' );
18
+ $this->settings['position']['default'] = '01';
19
+ $this->settings['form_layout']['values'] = array( 'left', 'right', 'bottom', 'inline' );
20
+ $this->settings['form_layout']['default'] = 'bottom';
21
+ $this->settings['theme']['default'] = 'hello';
22
+ $this->settings['bg_color']['default'] = ''; //#eb593c
23
+ $this->settings['text_color']['default'] = ''; //#ffffff
24
+ unset ($this->settings['icon']
25
+ );
26
+ }
27
+
28
+ function set_admin_style( $params ) {
29
+
30
+ $params['admin_style'] = array( 'label_bg_color' => '#DF6B00',
31
+ 'theme_header_height' => '6em',
32
+ 'thumbnail_width' => '92%',
33
+ 'thumbnail_height' => '4.5em'
34
+ );
35
+ return $params;
36
+ }
37
+ }
trunk/message-types/action-bar/themes/action-bar.min.css ADDED
@@ -0,0 +1 @@
 
1
+ #ig_body_pushdown{display:none;position:relative;height:0;visibility:hidden;width:100%}.ig_action_bar,.ig_action_bar div{box-sizing:border-box}.ig_action_bar.ig_container{z-index:9999999;position:fixed;width:100%;padding:0;margin:0;display:none;left:0;line-height:1.5}.ig_action_bar.ig_container.ig_top{top:0}.ig_action_bar.ig_container.ig_bottom{position:fixed;bottom:0}.ig_action_bar.ig_hide.ig_bottom{-ms-transform:translateY(100%);-webkit-transform:translateY(100%);transform:translateY(100%)}.ig_action_bar.ig_hide.ig_top{-ms-transform:translateY(-100%);-webkit-transform:translateY(-100%);transform:translateY(-100%)}.ig_action_bar .ig_content{float:left;text-align:center;width:100%;padding:0 2.5em 0 0}.ig_action_bar .ig_data{text-align:center;padding:.3em 1em .3em .7em;display:inline-block;line-height:1.5;vertical-align:middle;margin:0}.ig_action_bar.ig_has_pwby .ig_data{padding-left:2.5em}.ig_action_bar .ig_headline{display:inline-block;font-size:1em;line-height:1.25;font-weight:700;padding:0}.ig_action_bar .ig_message{display:inline-block;font-size:.85em;line-height:1.2;padding:.2em 0 0}.ig_action_bar .ig_button,.ig_action_bar input[type=submit],.ig_action_bar input[type=button]{border:none;color:#FFF;cursor:pointer;display:inline-block;font-size:1em;font-weight:700;letter-spacing:.05em;vertical-align:middle;text-align:center;padding:.3em 1.5em;margin:.5em 0;float:none;background-image:none}.ig_action_bar .ig_powered_by{vertical-align:top;opacity:.5;display:inline-block;float:left;z-index:22;position:absolute;margin-top:0}.ig_action_bar .ig_powered_by img{width:1.5em;margin:.3em 0 0 .5em}.ig_action_bar .ig_close{z-index:1000000;cursor:pointer;position:absolute;right:0;width:36px;height:36px;box-sizing:border-box}.ig_action_bar .ig_close>span{background-image:url(../../../assets/images/sprite_1.png);background-repeat:no-repeat;width:30px;height:100%;opacity:.7;display:inline-block}.ig_action_bar .ig_close:hover>span{opacity:1}.ig_action_bar.ig_show .ig_close{background-color:transparent!important}.ig_action_bar.ig_hide .ig_close{position:fixed;border:none;right:.2em}.ig_action_bar.ig_hide.ig_top .ig_close{top:100%}.ig_action_bar.ig_hide.ig_bottom .ig_close{bottom:100%}.ig_action_bar.ig_hide.ig_bottom .ig_close>span,.ig_action_bar.ig_show.ig_top .ig_close>span{background-position:-80px center}.ig_action_bar.ig_hide.ig_top .ig_close>span,.ig_action_bar.ig_show.ig_bottom .ig_close>span{background-position:-120px center}@media only screen and (max-width:768px){.ig_action_bar .ig_content{padding-right:0}.ig_action_bar .ig_data{width:100%;max-width:100%!important;padding-right:2.5em}.ig_action_bar .ig_button,.ig_action_bar input[type=submit],.ig_action_bar input[type=button]{max-width:100%;margin:.3em 0}.ig_action_bar.ig_show .ig_close{top:0}.ig_action_bar{font-size:18px}.ig_action_bar .ig_form_container .ig_embed_form_container{width:80%;margin:0 auto;font-size:.85em}}.ig_action_bar .ig_form_container{width:20%;float:left}.ig_action_bar.ig_form_bottom .ig_content,.ig_action_bar.ig_form_inline .ig_content,.ig_action_bar.ig_form_left .ig_content,.ig_action_bar.ig_form_right .ig_content{padding:0}.ig_action_bar.ig_form_left .ig_data,.ig_action_bar.ig_form_right .ig_data{width:79%;max-width:79%!important;float:left}.ig_action_bar.ig_form_left.ig_has_pwby .ig_data{width:79%;max-width:79%!important;padding-left:1em}.ig_action_bar.ig_form_bottom.ig_has_pwby .ig_form_container.layout_bottom,.ig_action_bar.ig_form_left.ig_has_pwby .ig_form_container.layout_left{padding-left:2.5em}.ig_action_bar.ig_form_bottom .ig_data{float:left}.ig_action_bar.ig_form_bottom .ig_data,.ig_action_bar.ig_form_inline .ig_data{width:100%;max-width:100%!important;padding-right:2.5em}.ig_action_bar.ig_form_right .ig_form_container.layout_right{float:right;padding-right:2.5em}.ig_action_bar.ig_form_bottom .ig_form_container.layout_bottom{padding-right:2.5em}.ig_action_bar.ig_form_inline .ig_form_container.layout_inline{padding-right:0}.ig_action_bar.ig_form_bottom .ig_form_container.layout_bottom .ig_embed_form_container,.ig_action_bar.ig_form_bottom .ig_form_container.layout_bottom .ig_form_footer,.ig_action_bar.ig_form_bottom .ig_form_container.layout_bottom .ig_form_header,.ig_action_bar.ig_form_inline .ig_form_container.layout_inline .ig_embed_form_container,.ig_action_bar.ig_form_inline .ig_form_container.layout_inline .ig_form_footer,.ig_action_bar.ig_form_inline .ig_form_container.layout_inline .ig_form_header{text-align:center}.ig_action_bar.ig_form_left.ig_form_style_4 .ig_data{padding-left:2em}.ig_action_bar.ig_form_right.ig_form_style_4 .ig_data{padding-right:2em}.ig_action_bar.ig_form_bottom.ig_form_style_4 .ig_form_container.layout_bottom{padding-top:0;padding-bottom:0;margin-top:1em}.ig_action_bar.ig_form_style_4.ig_hide .ig_form_container:before{display:none}@media only screen and (max-width:768px){.ig_action_bar.ig_form_left .ig_form_container.layout_left,.ig_action_bar.ig_form_right .ig_form_container.layout_right{display:none}.ig_action_bar.ig_form_bottom .ig_form_container.layout_bottom,.ig_action_bar.ig_form_left .ig_form_container.layout_bottom,.ig_action_bar.ig_form_right .ig_form_container.layout_bottom{display:block;width:100%;padding:.7em 1em;height:auto!important}.ig_action_bar.ig_form_bottom.ig_has_pwby .ig_form_container.layout_bottom,.ig_action_bar.ig_form_left.ig_has_pwby .ig_form_container.layout_bottom,.ig_action_bar.ig_form_right.ig_has_pwby .ig_form_container.layout_bottom{padding:.7em 1em}.ig_action_bar.ig_form_bottom .ig_data,.ig_action_bar.ig_form_left .ig_data,.ig_action_bar.ig_form_right .ig_data{width:100%;max-width:100%!important;padding-right:2.3em}.ig_action_bar.ig_form_left.ig_has_pwby .ig_data,.ig_action_bar.ig_form_right.ig_has_pwby .ig_data{padding-left:2.3em}.ig_action_bar .ig_form_container .ig_embed_form_container{width:60%;margin:0 auto;font-size:.85em}.ig_action_bar .ig_form_container .ig_embed_form_container.ig_half{width:100%}.ig_action_bar .ig_form_container.layout_bottom .ig_full .ig_form_els,.ig_action_bar .ig_form_container.layout_bottom .ig_half .ig_form_els,.ig_action_bar .ig_form_container.layout_bottom .ig_quater .ig_form_els,.ig_action_bar .ig_form_container.layout_bottom .ig_third .ig_form_els,.ig_action_bar .ig_form_container.layout_inline .ig_full .ig_form_els,.ig_action_bar .ig_form_container.layout_inline .ig_half .ig_form_els,.ig_action_bar .ig_form_container.layout_inline .ig_quater .ig_form_els,.ig_action_bar .ig_form_container.layout_inline .ig_third .ig_form_els{width:99%;display:inline-block;float:left;margin:.25em auto}.ig_action_bar .ig_form_container.layout_bottom .ig_half .ig_form_els,.ig_action_bar .ig_form_container.layout_inline .ig_half .ig_form_els{width:49%}.ig_action_bar .ig_form_container.layout_bottom .ig_full .ig_button_label,.ig_action_bar .ig_form_container.layout_bottom .ig_half .ig_button_label,.ig_action_bar .ig_form_container.layout_bottom .ig_quater .ig_button_label,.ig_action_bar .ig_form_container.layout_bottom .ig_third .ig_button_label,.ig_action_bar .ig_form_container.layout_inline .ig_full .ig_button_label,.ig_action_bar .ig_form_container.layout_inline .ig_half .ig_button_label,.ig_action_bar .ig_form_container.layout_inline .ig_quater .ig_button_label,.ig_action_bar .ig_form_container.layout_inline .ig_third .ig_button_label{display:none}.ig_action_bar .ig_form_container.layout_bottom .ig_half .ig_button_label,.ig_action_bar .ig_form_container.layout_inline .ig_half .ig_button_label{display:block;visibility:hidden;opacity:0}.ig_action_bar .ig_form_container.layout_bottom .ig_button,.ig_action_bar .ig_form_container.layout_bottom input[type=submit],.ig_action_bar .ig_form_container.layout_bottom input[type=button],.ig_action_bar .ig_form_container.layout_inline .ig_button,.ig_action_bar .ig_form_container.layout_inline input[type=submit],.ig_action_bar .ig_form_container.layout_inline input[type=button]{margin:0 auto}.ig_action_bar.ig_form_left.ig_form_style_1 .ig_form_container.layout_bottom:before,.ig_action_bar.ig_form_right.ig_form_style_1 .ig_form_container.layout_bottom:before{width:100%;border-top-width:.2em}.ig_action_bar.ig_form_bottom.ig_form_style_1 .ig_form_container.layout_bottom:before{border-top-width:.2em}.ig_action_bar.ig_form_style_2 .ig_form_container .ig_form_els{margin-right:0;margin-left:0}.ig_action_bar.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els input,.ig_action_bar.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els.ig_form_els_first input,.ig_action_bar.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els.ig_form_els_last input,.ig_action_bar.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els input,.ig_action_bar.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_first input,.ig_action_bar.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_last input{border-radius:2em;padding-left:1em;height:2.25em;line-height:2.2em}.ig_action_bar.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els input.ig_button,.ig_action_bar.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els input.ig_button{padding:inherit}.ig_action_bar.ig_form_left.ig_form_style_4 .ig_data,.ig_action_bar.ig_form_style_2 .ig_form_container .ig_half .ig_form_els.ig_form_els_first label,.ig_action_bar.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els label,.ig_action_bar.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els.ig_form_els_first label,.ig_action_bar.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els.ig_form_els_last label,.ig_action_bar.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els label,.ig_action_bar.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_first label,.ig_action_bar.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_last label{padding-left:1em}.ig_action_bar.ig_form_style_2 .ig_form_container .ig_half .ig_form_els.ig_form_els_first input{border-radius:2em 0 0 2em;padding-left:1em;border-right-width:0}.ig_action_bar.ig_form_style_2 .ig_form_container .ig_half .ig_form_els.ig_form_els_last input{border-radius:0 2em 2em 0;border-left-width:0}.ig_action_bar.ig_form_style_2 .ig_form_container .ig_half .ig_form_els .ig_button,.ig_action_bar.ig_form_style_2 .ig_form_container .ig_half .ig_form_els input{width:100%}.ig_action_bar.ig_form_right.ig_form_style_4 .ig_data{padding-right:2.5em}.ig_action_bar.ig_form_left.ig_form_style_4 .ig_form_container,.ig_action_bar.ig_form_right.ig_form_style_4 .ig_form_container{margin-top:1em}.ig_action_bar.ig_form_bottom.ig_form_style_4 .ig_form_container,.ig_action_bar.ig_form_left.ig_form_style_4 .ig_form_container,.ig_action_bar.ig_form_right.ig_form_style_4 .ig_form_container{padding-top:0;padding-bottom:0}}@media only screen and (max-width:644px){.ig_action_bar .ig_form_container .ig_embed_form_container,.ig_action_bar.ig_form_inline .ig_form_container .ig_embed_form_container{width:70%}}@media only screen and (max-width:375px){.ig_action_bar.ig_form_inline .ig_form_container .ig_embed_form_container{width:100%}}.ig_action_bar.ig_air-mail.ig_container{border-style:solid;color:#707070;-moz-border-image:-moz-repeating-linear-gradient(45deg,#a83439,#a83439 10px,#fdfdfd 10px,#fdfdfd 20px,#2f4175 20px,#2f4175 30px,#fdfdfd 30px,#fdfdfd 40px) 8 round;-webkit-border-image:-webkit-repeating-linear-gradient(45deg,#a83439,#a83439 10px,#fdfdfd 10px,#fdfdfd 20px,#2f4175 20px,#2f4175 30px,#fdfdfd 30px,#fdfdfd 40px) 8 round;-o-border-image:-o-repeating-linear-gradient(45deg,#a83439,#a83439 10px,#fdfdfd 10px,#fdfdfd 20px,#2f4175 20px,#2f4175 30px,#fdfdfd 30px,#fdfdfd 40px) 8 round;border-image:repeating-linear-gradient(45deg,#a83439,#a83439 10px,#fdfdfd 10px,#fdfdfd 20px,#2f4175 20px,#2f4175 30px,#fdfdfd 30px,#fdfdfd 40px) 8 round;background-color:#fdfdfd}.ig_action_bar.ig_air-mail.ig_container.ig_top{border-width:0 0 8px}.ig_action_bar.ig_air-mail.ig_container.ig_bottom{border-width:8px 0 0}.ig_action_bar.ig_air-mail .ig_data{max-width:75%;float:left;text-align:left}.ig_action_bar.ig_air-mail .ig_headline{color:#2C4A9D}.ig_action_bar.ig_air-mail .ig_headline,.ig_action_bar.ig_air-mail .ig_message{display:block}.ig_action_bar.ig_air-mail .ig_button,.ig_action_bar.ig_air-mail input[type=submit],.ig_action_bar.ig_air-mail input[type=button]{float:right;background:#D82931;text-transform:uppercase;font-family:"Open Sans",sans-serif;font-weight:600;border-radius:4px;border:none}.ig_action_bar.ig_air-mail .ig_button:hover,.ig_action_bar.ig_air-mail input[type=submit]:hover,.ig_action_bar.ig_air-mail input[type=button]:hover{box-shadow:0 0 4px 0 rgba(0,0,0,.5)}.ig_action_bar.ig_air-mail .ig_button:active,.ig_action_bar.ig_air-mail input[type=submit]:active,.ig_action_bar.ig_air-mail input[type=button]:active{box-shadow:none}.ig_action_bar.ig_air-mail.ig_show.ig_bottom .ig_close>span,.ig_action_bar.ig_air-mail.ig_show.ig_top .ig_close>span{background-position:-520px center;opacity:.4}.ig_action_bar.ig_air-mail.ig_show.ig_bottom .ig_close:hover>span,.ig_action_bar.ig_air-mail.ig_show.ig_top .ig_close:hover>span{background-position:-520px center;opacity:.8}.ig_action_bar.ig_air-mail.ig_hide .ig_close{display:none}.ig_action_bar.ig_form_bottom.ig_air-mail .ig_form_container.layout_bottom .ig_embed_form_container,.ig_action_bar.ig_form_bottom.ig_air-mail .ig_form_container.layout_bottom .ig_form_footer,.ig_action_bar.ig_form_bottom.ig_air-mail .ig_form_container.layout_bottom .ig_form_header,.ig_action_bar.ig_form_inline.ig_air-mail .ig_form_container.layout_inline .ig_embed_form_container,.ig_action_bar.ig_form_inline.ig_air-mail .ig_form_container.layout_inline .ig_form_footer,.ig_action_bar.ig_form_inline.ig_air-mail .ig_form_container.layout_inline .ig_form_header{text-align:left}@media only screen and (max-width:768px){.ig_action_bar.ig_air-mail .ig_button,.ig_action_bar.ig_air-mail input[type=submit],.ig_action_bar.ig_air-mail input[type=button]{float:left;margin-left:.7em}.ig_action_bar.ig_air-mail.ig_has_pwby .ig_button,.ig_action_bar.ig_air-mail.ig_has_pwby input[type=submit],.ig_action_bar.ig_air-mail.ig_has_pwby input[type=button]{margin-left:2.5em}}.ig_action_bar.ig_bold.ig_container{background-color:#BC0933;color:#FFF;border-bottom:solid .2em #F3EEEE;box-shadow:0 0 .6em 0 rgba(0,0,0,.4)}.ig_action_bar.ig_bold.ig_container.ig_bottom{border-bottom:none;border-top:solid .2em #F3EEEE}.ig_action_bar.ig_bold .ig_data{max-width:75%;float:left;text-align:left}.ig_action_bar.ig_bold .ig_headline,.ig_action_bar.ig_bold .ig_message{display:block}.ig_action_bar.ig_bold .ig_button,.ig_action_bar.ig_bold input[type=submit],.ig_action_bar.ig_bold input[type=button]{float:right;background:#00BB58;border-radius:.2em;box-shadow:inset 0 -3px 1px rgba(0,0,0,.35),0 2px 2px rgba(0,0,0,.25);text-shadow:0 0 1px rgba(0,0,0,.1)}.ig_action_bar.ig_bold .ig_button:active,.ig_action_bar.ig_bold input[type=submit]:active,.ig_action_bar.ig_bold input[type=button]:active{position:relative;top:3px;box-shadow:none}.ig_action_bar.ig_bold.ig_hide .ig_close{background-color:#BC0933;border:.2em solid #FFF;border-bottom-width:0;box-shadow:0 0 .3em rgba(0,0,0,.35);border-radius:.3em .3em 0 0}.ig_action_bar.ig_bold.ig_hide.ig_top .ig_close{margin-top:.15em;border-bottom-width:.2em;border-top-width:0;border-radius:0 0 .3em .3em}.ig_action_bar.ig_bold.ig_hide.ig_bottom .ig_close{margin-bottom:.15em}.ig_action_bar.ig_form_bottom.ig_bold .ig_form_container.layout_bottom .ig_embed_form_container,.ig_action_bar.ig_form_bottom.ig_bold .ig_form_container.layout_bottom .ig_form_footer,.ig_action_bar.ig_form_bottom.ig_bold .ig_form_container.layout_bottom .ig_form_header,.ig_action_bar.ig_form_inline.ig_bold .ig_form_container.layout_inline .ig_embed_form_container,.ig_action_bar.ig_form_inline.ig_bold .ig_form_container.layout_inline .ig_form_footer,.ig_action_bar.ig_form_inline.ig_bold .ig_form_container.layout_inline .ig_form_header{text-align:left}@media only screen and (max-width:768px){.ig_action_bar.ig_bold .ig_button,.ig_action_bar.ig_bold input[type=submit],.ig_action_bar.ig_bold input[type=button]{float:left;margin:.3em 0 .3em .7em}.ig_action_bar.ig_bold.ig_has_pwby .ig_button,.ig_action_bar.ig_bold.ig_has_pwby input[type=submit],.ig_action_bar.ig_bold.ig_has_pwby input[type=button]{margin-left:2.5em}}.ig_action_bar.ig_hello.ig_container{background-color:#EB5B31;color:#FFF;line-height:1.5;border-bottom:.2em solid #fff;box-shadow:0 0 .6em 0 rgba(0,0,0,.4)}.ig_action_bar.ig_hello.ig_container.ig_bottom{border-bottom:none;border-top:.2em solid #fff}.ig_action_bar.ig_hello .ig_headline{font-weight:700;margin-right:.5em}.ig_action_bar.ig_hello .ig_message{margin-right:.5em}.ig_action_bar.ig_hello .ig_button,.ig_action_bar.ig_hello input[type=submit],.ig_action_bar.ig_hello input[type=button]{background-color:#4A4844;background-image:linear-gradient(top,transparent 0,rgba(51,51,51,.4) 100%);box-shadow:1px 1px 3px rgba(0,0,0,.28);font-weight:400;border-radius:.25em;float:none;padding:.2em 1.3em}.ig_action_bar.ig_hello .ig_button:hover,.ig_action_bar.ig_hello input[type=submit]:hover,.ig_action_bar.ig_hello input[type=button]:hover{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";filter:alpha(opacity=80);opacity:.8}.ig_action_bar.ig_hello.ig_hide .ig_close{background-color:#EB5B31;border:.2em solid #FFF;border-bottom-width:0;border-radius:.3em .3em 0 0;box-shadow:0 0 .3em rgba(0,0,0,.35)}.ig_action_bar.ig_hello.ig_hide.ig_top .ig_close{margin-top:.15em;border-bottom-width:.2em;border-top-width:0;border-radius:0 0 .3em .3em}.ig_action_bar.ig_hello.ig_hide.ig_bottom .ig_close{margin-bottom:.15em}.ig_action_bar.ig_form_inline.ig_hello .ig_form_container.layout_inline{padding:.2em}.ig_action_bar.ig_form_inline.ig_hello .ig_headline{vertical-align:middle;margin-right:.5em}.ig_action_bar.ig_form_inline.ig_hello .ig_message{vertical-align:middle}.ig_action_bar.ig_solid.ig_container{background-color:#4E3363;color:#FFF}.ig_action_bar.ig_solid .ig_data{max-width:75%;float:left;text-align:left}.ig_action_bar.ig_solid .ig_headline,.ig_action_bar.ig_solid .ig_message{display:block}.ig_action_bar.ig_solid .ig_button,.ig_action_bar.ig_solid input[type=submit],.ig_action_bar.ig_solid input[type=button]{background:#008010;float:right;border-radius:.1em}.ig_action_bar.ig_solid .ig_button:hover,.ig_action_bar.ig_solid input[type=submit]:hover,.ig_action_bar.ig_solid input[type=button]:hover{box-shadow:inset 0 -4em 0 rgba(255,255,255,.15)}.ig_action_bar.ig_solid.ig_hide .ig_close{background-color:#4E3363}.ig_action_bar.ig_form_bottom.ig_solid .ig_form_container.layout_bottom .ig_embed_form_container,.ig_action_bar.ig_form_bottom.ig_solid .ig_form_container.layout_bottom .ig_form_footer,.ig_action_bar.ig_form_bottom.ig_solid .ig_form_container.layout_bottom .ig_form_header,.ig_action_bar.ig_form_inline.ig_solid .ig_form_container.layout_inline .ig_embed_form_container,.ig_action_bar.ig_form_inline.ig_solid .ig_form_container.layout_inline .ig_form_footer,.ig_action_bar.ig_form_inline.ig_solid .ig_form_container.layout_inline .ig_form_header{text-align:left}@media only screen and (max-width:768px){.ig_action_bar.ig_solid .ig_button,.ig_action_bar.ig_solid input[type=submit],.ig_action_bar.ig_solid input[type=button]{float:left;margin:.3em 0 .3em .7em}.ig_action_bar.ig_solid.ig_has_pwby .ig_button,.ig_action_bar.ig_solid.ig_has_pwby input[type=submit],.ig_action_bar.ig_solid.ig_has_pwby input[type=button]{margin-left:2.5em}}
trunk/message-types/action-bar/themes/air-mail.png ADDED
Binary file
trunk/message-types/action-bar/themes/bold.png ADDED
Binary file
trunk/message-types/action-bar/themes/hello.png ADDED
Binary file
trunk/message-types/action-bar/themes/solid.png ADDED
Binary file
trunk/message-types/messenger/default.css ADDED
@@ -0,0 +1 @@
 
1
+ /* File for backward compatibility. */
trunk/message-types/messenger/main.js ADDED
@@ -0,0 +1 @@
 
1
+ /* File for backward compatibility. */
trunk/message-types/messenger/main.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+ if ( class_exists( 'Icegram_Message_Type_Messenger' ) ) return;
4
+
5
+ /**
6
+ * Class Icegram Messenger
7
+ */
8
+ class Icegram_Message_Type_Messenger extends Icegram_Message_Type {
9
+
10
+ function __construct() {
11
+ parent::__construct( dirname( __FILE__ ), plugins_url( '/', __FILE__ ) );
12
+ add_filter( 'icegram_message_type_params_messenger', array( $this, 'set_admin_style' ) );
13
+
14
+ }
15
+
16
+ function define_settings() {
17
+ parent::define_settings();
18
+ $this->settings['position']['values'] = array( '20', '22' );
19
+ $this->settings['position']['default'] = '22';
20
+ $this->settings['theme']['default'] = 'social';
21
+ $this->settings['form_layout']['values'] = array('inline' ); // May be 'bottom'
22
+ $this->settings['form_layout']['default'] = 'inline';
23
+ unset ( $this->settings['text_color'],
24
+ $this->settings['bg_color'],
25
+ $this->settings['label']
26
+ );
27
+ }
28
+
29
+ function set_admin_style( $params ) {
30
+
31
+ $params['admin_style'] = array( 'label_bg_color' => '#883EB0',
32
+ 'theme_header_height' => '7em',
33
+ 'thumbnail_width' => '27.6%',
34
+ 'thumbnail_height' => '13.6em'
35
+ );
36
+ return $params;
37
+ }
38
+ }
trunk/message-types/messenger/themes/canvas.png ADDED
Binary file
trunk/message-types/messenger/themes/clear.png ADDED
Binary file
trunk/message-types/messenger/themes/messenger.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .ig_messenger .ig_body,.ig_messenger .ig_headline{-ms-text-overflow:ellipsis;text-overflow:ellipsis}.ig_messenger.ig_container{display:none;position:fixed;cursor:pointer;background-color:transparent!important;z-index:100000;margin:0;padding:0;font-family:"Lucida Grande",Arial,sans-serif;font-size:16px;overflow:hidden;text-align:left;bottom:.2em}.ig_messenger.ig_container,.ig_messenger.ig_container div{box-sizing:border-box}.ig_messenger.ig_container.ig_left{left:.2em}.ig_messenger.ig_container.ig_right{right:.2em}.ig_messenger .ig_content,.ig_messenger .ig_data{background:0 0!important;position:relative}.ig_messenger .ig_close:after,.ig_messenger .ig_close:before,.ig_messenger .ig_content:before,.ig_messenger .ig_data:after,.ig_messenger .ig_footer:after,.ig_messenger .ig_headline:after,.ig_messenger .ig_headline:before,.ig_messenger .ig_message:after,.ig_messenger .ig_message:before{content:'';position:absolute;display:none;padding:0;width:100%;z-index:10;background-position:0 0;background-repeat:no-repeat;box-sizing:border-box}.ig_messenger .ig_headline{display:block!important;font-weight:700;text-decoration:none;overflow:hidden;white-space:nowrap}.ig_messenger .ig_headline:after{left:0}.ig_messenger .ig_body{overflow-x:hidden;display:block;border-bottom:none;z-index:9}.ig_messenger .ig_footer,.ig_messenger.ig_no_icon .ig_icon{display:none}.ig_messenger .ig_icon{height:2.5em;width:2.5em;position:absolute}.ig_messenger .ig_message{text-align:left;word-wrap:break-word}.ig_messenger .ig_message p{margin-bottom:.25em}.ig_messenger .ig_powered_by{font-size:.62em;z-index:10;position:relative;text-align:right}.ig_messenger .ig_button,.ig_messenger input[type=submit],.ig_messenger input[type=button]{border-bottom:none;cursor:pointer}.ig_messenger .ig_button:active,.ig_messenger input[type=submit]:active,.ig_messenger input[type=button]:active{border-top:none}.ig_messenger .ig_close{position:absolute;z-index:10;height:25px;width:25px}.ig_messenger .ig_close:after{top:6px;left:6px;background-image:url(../../../assets/images/clear-header.png);background-repeat:no-repeat;background-position:0 -195px;display:block;height:13px;width:13px}.ig_messenger.ig_form_bottom .ig_form_container.layout_bottom,.ig_messenger.ig_form_inline .ig_form_container.layout_inline .ig_button_label,.ig_messenger.ig_form_left .ig_form_container.layout_left,.ig_messenger.ig_form_right .ig_form_container.layout_right{display:none}.ig_messenger.ig_form_inline .ig_form_container.layout_inline{float:left;padding:.5em 0}.ig_messenger.ig_form_inline .ig_message p{margin-bottom:0}.ig_messenger.ig_form_inline .ig_form_container.layout_inline .ig_full .ig_form_els,.ig_messenger.ig_form_inline .ig_form_container.layout_inline .ig_half .ig_form_els,.ig_messenger.ig_form_inline .ig_form_container.layout_inline .ig_quater .ig_form_els,.ig_messenger.ig_form_inline .ig_form_container.layout_inline .ig_third .ig_form_els{width:99%;margin:.3em auto}.ig_messenger.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els{margin-right:0;margin-left:0}.ig_messenger.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els input,.ig_messenger.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_first input,.ig_messenger.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_last input{padding-left:1em;border-width:2px;border-radius:2em}.ig_messenger.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els input.ig_button{padding:inherit}.ig_messenger.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els label,.ig_messenger.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_first label,.ig_messenger.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_last label{padding-left:1em}.ig_messenger.ig_canvas.ig_container{max-width:33%}.ig_messenger.ig_canvas .ig_content{border:1px solid #BFBFBF;margin:.6em .6em .1em;padding:.6em;overflow:hidden;box-shadow:0 .15em .35em 0 rgba(0,0,0,.13);background-color:#FFF!important}.ig_messenger.ig_canvas .ig_headline{color:#111;width:100%;font-size:1.5em;line-height:1em;padding:0 1em .1em .2em}.ig_messenger.ig_canvas .ig_body{max-height:21em;overflow-y:auto;padding:0 .5em;margin-top:.5em;line-height:1.3em}.ig_messenger.ig_canvas .ig_icon{float:right;position:relative;border-radius:5%;max-width:6em;margin:.3em;height:auto!important;width:auto!important}.ig_messenger.ig_canvas .ig_message{color:#444;display:inline}.ig_messenger.ig_canvas .ig_close{right:0;top:.5em}.ig_messenger.ig_canvas .ig_powered_by{bottom:0;padding-left:1em;text-align:left}@media only screen and (max-width:850px){.ig_messenger.ig_canvas.ig_container{max-width:50%}}@media only screen and (max-width:644px){.ig_messenger.ig_canvas.ig_container{max-width:70%}}@media only screen and (max-width:415px){.ig_messenger.ig_canvas.ig_container{max-width:90%}}.ig_messenger.ig_clear.ig_container{font-size:13px;width:19.25em;height:20.75em;border-radius:.23em .23em 0 0;border:1px solid #BFBFBF}.ig_messenger.ig_clear .ig_headline:after,.ig_messenger.ig_clear .ig_headline:before{background-size:cover}.ig_messenger.ig_clear .ig_headline:before{display:block;background-image:url(../../../assets/images/clear-header.png);top:.6em;left:.6em;height:1.25em;width:1.25em}.ig_messenger.ig_clear .ig_headline{background:#F9F9F9;color:#333;width:100%;height:2.38em;line-height:2.58em;font-size:1em;padding:0 2.9em 0 2em;border-bottom:1px solid #BFBFBF;box-shadow:inset 0 0 .25em 0 #FFF}.ig_messenger.ig_clear .ig_headline:after{display:block;height:2.12em;top:2.38em;background-image:url(../../../assets/images/clear-option.png)}.ig_messenger.ig_clear .ig_body{background:#FFF;color:#222;font-size:1em;font-family:Arial,Helvetica,sans-serif;position:relative;height:13.35em;top:2.12em;border-top:1px solid #BFBFBF;right:0;line-height:1.25em;padding:.5em .9em 0 .5em;box-shadow:inset 0 0 .25em 0 #FFF}.ig_messenger.ig_clear .ig_message{color:#3E454C;width:100%;padding-left:3em}.ig_messenger.ig_clear.ig_no_icon .ig_message{padding-left:.5em}.ig_messenger.ig_clear .ig_footer{display:block;background-color:inherit;height:2.76em;margin-top:2.12em;border-top:1px solid #BFBFBF;background-image:url(../../../assets/images/clear-footer.png);background-size:cover}.ig_messenger.ig_clear .ig_close{top:.3em;right:0}.ig_messenger.ig_clear .ig_close:before{display:block;background-image:url(../../../assets/images/clear-header.png);background-position:0 -181px;top:6px;height:13px;width:13px;padding:0;right:1.7em}.ig_messenger.ig_clear .ig_powered_by{bottom:1.8em;padding-right:3em;font-size:.8em}@media only screen and (max-width:992px){.ig_messenger.ig_clear.ig_container{font-size:14px}}.ig_messenger.ig_social.ig_container{font-size:11px;width:22.8em;height:23.6em}.ig_messenger.ig_social .ig_headline{background-color:#627BAE;color:#FFF;width:100%;height:2.45em;line-height:2.65em;font-size:1em;padding:0 3.4em 0 .7em;border:1px solid rgba(0,39,121,.3);border-bottom:none}.ig_messenger.ig_social .ig_body{display:block;background-color:#edeff4;color:#3e454c;font-family:"lucida grande",tahoma,verdana,arial,sans-serif;position:relative;height:18em;border:1px solid rgba(0,0,0,.3);border-top:none;border-bottom:none;right:0;padding:5px .5em 0 3.8em}.ig_messenger.ig_social.ig_no_icon .ig_body{padding-left:.5em;line-height:1.37em}.ig_messenger.ig_social .ig_message:before{display:block;width:0;top:11px;margin:0 0 0 -18px;border:8px solid #DFDFDF;border-color:transparent #DFDFDF transparent transparent;z-index:-1}.ig_messenger.ig_social .ig_message:after{display:block;width:0;top:13px;margin:0 0 0 -15px;border:6px solid #FAFAFA;border-color:transparent #FAFAFA transparent transparent}.ig_messenger.ig_social .ig_message{background-color:#F7F7F7;color:#3E454C;background-image:-webkit-linear-gradient(bottom,#F2F2F2,#FFF);width:90%;font-size:1.09em;padding:.3em;border:1px solid rgba(0,0,0,.18);border-bottom-color:rgba(0,0,0,.29);border-radius:.4em;box-shadow:0 1px 0 #DCE0E6}.ig_messenger.ig_social.ig_no_icon .ig_message{margin:0 auto .5em}.ig_messenger.ig_social.ig_no_icon .ig_message:after,.ig_messenger.ig_social.ig_no_icon .ig_message:before{display:none}.ig_messenger.ig_social .ig_icon{margin-left:-3.3em;height:2.54em;width:2.54em}.ig_messenger.ig_social .ig_footer{display:block;height:3em;background-color:#FFF;border:1px solid rgba(0,0,0,.3)}.ig_messenger.ig_social .ig_footer:after{display:block;background-image:url(../../../assets/images/social-img.png);background-position:-269px -137px;width:22px;height:18px;margin-top:.8em;right:.3em}.ig_messenger.ig_social .ig_close{background-image:url(../../../assets/images/social-img.png);background-position:-137px -332px;top:.25em;right:.15em;height:25px;width:21px}.ig_messenger.ig_social .ig_close:before{display:block;background-image:url(../../../assets/images/social-img.png);background-position:-92px -332px;height:100%;width:100%;padding:0;right:1.5em}.ig_messenger.ig_social .ig_close:after{display:none}.ig_messenger.ig_social .ig_powered_by{bottom:1.8em;padding-right:3em;font-size:.9em}@media only screen and (max-width:992px){.ig_messenger.ig_social.ig_container{font-size:13px}}@media only screen and (max-width:320px){.ig_messenger.ig_social.ig_container{font-size:12px;width:20em}}.ig_messenger.ig_talk.ig_container{font-size:12px;width:17.5em;height:21em;border:.1em solid #BFBFBF;border-radius:.5em .5em 0 0}.ig_messenger.ig_talk .ig_body,.ig_messenger.ig_talk .ig_headline{font-size:1em;border-bottom:.1em solid #BFBFBF;box-shadow:inset 0 0 .25em 0 #FFF}.ig_messenger.ig_talk .ig_close,.ig_messenger.ig_talk .ig_close:before,.ig_messenger.ig_talk .ig_data:after,.ig_messenger.ig_talk .ig_headline:after,.ig_messenger.ig_talk .ig_headline:before{background-size:cover}.ig_messenger.ig_talk .ig_headline:before{display:block;background-image:url(../../../assets/images/clear-header.png);top:.5em;left:.6em;height:1.25em;width:1.25em}.ig_messenger.ig_talk .ig_headline{background-color:#F5FAFF;color:#00008B;width:100%;height:2.2em;line-height:2.4em;padding:0 2.9em 0 2em;border-radius:.5em .5em 0 0}.ig_messenger.ig_talk .ig_headline:after{display:block;height:2.5em;top:2.2em;background-image:url(../../../assets/images/talk-header-2.png)}.ig_messenger.ig_talk .ig_body{background:#FFF;color:#222;font-family:Arial,Helvetica,sans-serif;position:relative;height:13.48em;border-top:.1em solid #BFBFBF;top:2.5em;right:0;line-height:1.25em;padding:.5em .8em 0 .5em}.ig_messenger.ig_talk .ig_message{color:#3E454C;width:100%;padding-left:3em}.ig_messenger.ig_talk.ig_no_icon .ig_message{padding-left:.5em}.ig_messenger.ig_talk .ig_footer{display:block;height:2.66em;margin-top:2.5em;background-image:url(../../../assets/images/talk-footer-1.png);background-size:cover}.ig_messenger.ig_talk .ig_close{background-image:url(../../../assets/images/talk-close.png);background-position:0 0;top:.5em;right:.33em;height:1.25em;width:1.25em;z-index:10}.ig_messenger.ig_talk .ig_close:before{display:block;background-image:url(../../../assets/images/talk-header-1.png);height:100%;width:100%;padding:0;right:1.5em}.ig_messenger.ig_talk .ig_close:after{display:none}.ig_messenger.ig_talk .ig_powered_by{bottom:2em;padding-right:2em;font-size:.8em}@media only screen and (max-width:992px){.ig_messenger.ig_talk.ig_container{font-size:14px}}
trunk/message-types/messenger/themes/social.png ADDED
Binary file
trunk/message-types/messenger/themes/talk.png ADDED
Binary file
trunk/message-types/popup/default.css ADDED
@@ -0,0 +1 @@
 
1
+ /* File for backward compatibility. */
trunk/message-types/popup/main.js ADDED
@@ -0,0 +1 @@
 
1
+ /* File for backward compatibility. */
trunk/message-types/popup/main.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+ if ( class_exists( 'Icegram_Message_Type_Popup' ) ) return;
4
+
5
+ /**
6
+ * Class Icegram Popup
7
+ */
8
+ class Icegram_Message_Type_Popup extends Icegram_Message_Type {
9
+ var $popup_default_delay_time;
10
+
11
+ function __construct() {
12
+ parent::__construct( dirname( __FILE__ ), plugins_url( '/', __FILE__ ) );
13
+ $this->popup_default_delay_time = 3;
14
+ add_filter( 'icegram_data', array( $this, 'arrange_proper_delay_time' ), 11);
15
+ add_filter( 'icegram_message_type_params_popup', array( $this, 'set_admin_style' ) );
16
+ }
17
+
18
+ function define_settings() {
19
+ parent::define_settings();
20
+ $this->settings['theme']['default'] = 'persuade';
21
+ $this->settings['form_layout']['values'] = array( 'left', 'right', 'bottom', 'inline' );
22
+ $this->settings['form_layout']['default'] = 'left';
23
+ $this->settings['bg_color']['default'] = '';
24
+ $this->settings['text_color']['default'] = '';
25
+ unset ( $this->settings['position'],
26
+ $this->settings['icon']
27
+ );
28
+ }
29
+
30
+ function arrange_proper_delay_time( $icegram_data ) {
31
+ $popup_delay_times = array();
32
+ foreach ($icegram_data['messages'] as $message_id => $message) {
33
+
34
+ if( $message['type'] == 'popup' && $message['delay_time'] != -1) {
35
+ while( in_array( $message['delay_time'], $popup_delay_times ) ) {
36
+ $message['delay_time'] = $message['delay_time'] + $this->popup_default_delay_time;
37
+ }
38
+ $icegram_data['messages'][$message_id]['delay_time'] = $message['delay_time'];
39
+ $popup_delay_times[] = $message['delay_time'];
40
+ }
41
+
42
+ }
43
+ return $icegram_data;
44
+ }
45
+
46
+ function set_admin_style( $params ) {
47
+ $params['admin_style'] = array( 'label_bg_color' => '#22B189',
48
+ 'theme_header_height' => '6em',
49
+ 'thumbnail_width' => '43%',
50
+ 'thumbnail_height' => '10em'
51
+ );
52
+ return $params;
53
+ }
54
+ }
trunk/message-types/popup/themes/air-mail.png ADDED
Binary file
trunk/message-types/popup/themes/amaze.png ADDED
Binary file
trunk/message-types/popup/themes/compel.png ADDED
Binary file
trunk/message-types/popup/themes/convert.png ADDED
Binary file
trunk/message-types/popup/themes/inspire.png ADDED
Binary file
trunk/message-types/popup/themes/persuade.png ADDED
Binary file
trunk/message-types/popup/themes/popup.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .mfp-bg,.mfp-wrap{z-index:999999;position:fixed;left:0;top:0}.mfp-bg,.mfp-container,.mfp-wrap{height:100%;width:100%}.mfp-container:before,.mfp-figure:after{content:''}.mfp-bg{overflow:hidden;background:#0b0b0b;opacity:.8;filter:alpha(opacity=80)}.mfp-wrap{outline:0!important;-webkit-backface-visibility:hidden}.mfp-container{text-align:center;position:absolute;left:0;top:0;padding:0 8px;box-sizing:border-box}.mfp-container:before{display:inline-block;height:100%;vertical-align:middle}.mfp-align-top .mfp-container:before{display:none}.mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.mfp-close,.mfp-preloader{text-align:center;position:absolute}.mfp-ajax-holder .mfp-content,.mfp-inline-holder .mfp-content{width:100%;cursor:auto}.mfp-ajax-cur{cursor:progress}.mfp-zoom-out-cur,.mfp-zoom-out-cur .mfp-image-holder .mfp-close{cursor:-webkit-zoom-out;cursor:zoom-out}.mfp-zoom{cursor:pointer;cursor:-webkit-zoom-in;cursor:zoom-in}.mfp-auto-cursor .mfp-content{cursor:auto}.mfp-arrow,.mfp-close,.mfp-counter,.mfp-preloader{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none!important}.mfp-preloader{color:#CCC;top:50%;width:auto;margin-top:-.8em;left:8px;right:8px;z-index:1044}.mfp-preloader a{color:#CCC}.mfp-close,.mfp-preloader a:hover{color:#FFF}.mfp-s-error .mfp-content,.mfp-s-ready .mfp-preloader{display:none}button.mfp-arrow,button.mfp-close{overflow:visible;cursor:pointer;background:0 0;border:0;-webkit-appearance:none;display:block;outline:0;padding:0;z-index:1046;box-shadow:none}button::-moz-focus-inner{padding:0;border:0}.mfp-close{width:44px;height:44px;line-height:44px;right:0;top:0;text-decoration:none;opacity:.65;filter:alpha(opacity=65);padding:0 0 18px 10px;font-style:normal;font-size:28px;font-family:Arial,Baskerville,monospace}.mfp-close:focus,.mfp-close:hover{opacity:1;filter:alpha(opacity=100)}.mfp-close:active{top:1px}.mfp-close-btn-in .mfp-close{color:#333}.mfp-iframe-holder .mfp-close,.mfp-image-holder .mfp-close{color:#FFF;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#CCC;font-size:12px;line-height:18px;white-space:nowrap}.mfp-figure,img.mfp-img{line-height:0}.mfp-arrow{position:absolute;opacity:.65;filter:alpha(opacity=65);margin:-55px 0 0;top:50%;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:focus,.mfp-arrow:hover{opacity:1;filter:alpha(opacity=100)}.mfp-arrow .mfp-a,.mfp-arrow .mfp-b,.mfp-arrow:after,.mfp-arrow:before{content:'';display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:inset transparent}.mfp-arrow .mfp-a,.mfp-arrow:after{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow .mfp-b,.mfp-arrow:before{border-top-width:21px;border-bottom-width:21px;opacity:.7}.mfp-arrow-left{left:0}.mfp-arrow-left .mfp-a,.mfp-arrow-left:after{border-right:17px solid #FFF;margin-left:31px}.mfp-arrow-left .mfp-b,.mfp-arrow-left:before{margin-left:25px;border-right:27px solid #3F3F3F}.mfp-arrow-right{right:0}.mfp-arrow-right .mfp-a,.mfp-arrow-right:after{border-left:17px solid #FFF;margin-left:39px}.mfp-arrow-right .mfp-b,.mfp-arrow-right:before{border-left:27px solid #3F3F3F}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-image-holder .mfp-content,img.mfp-img{max-width:100%}.mfp-iframe-holder .mfp-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;box-shadow:0 0 8px rgba(0,0,0,.6);background:#000}.mfp-figure:after,img.mfp-img{width:auto;height:auto;display:block}img.mfp-img{box-sizing:border-box;padding:40px 0;margin:0 auto}.mfp-figure:after{position:absolute;left:0;top:40px;bottom:40px;right:0;z-index:-1;box-shadow:0 0 8px rgba(0,0,0,.6);background:#444}.mfp-figure small{color:#BDBDBD;display:block;font-size:12px;line-height:14px}.mfp-figure figure{margin:0}.mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.mfp-title{text-align:left;line-height:18px;color:#F3F3F3;word-wrap:break-word;padding-right:36px}.mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}@media screen and (max-width:800px) and (orientation:landscape),screen and (max-height:300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .mfp-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,.6);position:fixed;text-align:center;padding:0}}.ig_popup,.ig_popup .ig_bg_overlay,.ig_popup .ig_content{background-color:transparent}@media all and (max-width:900px){.mfp-arrow{-webkit-transform:scale(.75);-ms-transform:scale(.75);transform:scale(.75)}.mfp-arrow-left{-webkit-transform-origin:0;-ms-transform-origin:0;transform-origin:0}.mfp-arrow-right{-webkit-transform-origin:100%;-ms-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}}.mfp-ie7 .mfp-img{padding:0}.mfp-ie7 .mfp-bottom-bar{width:600px;left:50%;margin-left:-300px;margin-top:5px;padding-bottom:5px}.mfp-ie7 .mfp-container{padding:0}.mfp-ie7 .mfp-content{padding-top:44px}.mfp-ie7 .mfp-close{top:0;right:0;padding-top:0}.ig_popup{opacity:1;display:block;z-index:100000;width:58%;margin:32px auto 20px!important;position:relative;font-size:1em}.ig_popup .ig_bg_overlay{width:100%;height:100%;top:0;left:0;margin:0;padding:0;position:absolute;display:none}.ig_popup .ig_headline{text-decoration:none;font-weight:800;font-size:2em;line-height:1.2em}.ig_popup .ig_data{position:relative}.ig_popup .ig_image{margin:0 1em}.ig_popup .ig_message{line-height:1.2em;font-size:1.2em}.ig_popup .ig_close{background-image:url(../../../assets/images/sprite_1.png);background-position:-600px center;background-repeat:no-repeat;height:30px;width:30px;top:-15px;right:-15px;margin:0;cursor:pointer;position:absolute;z-index:20}.ig_popup .ig_close:hover{background-position:-640px center}.ig_popup .ig_button,.ig_popup input[type=submit],.ig_popup input[type=button]{cursor:pointer;display:block;background-image:none;border:none;border-radius:0;box-shadow:none;position:relative}.mfp-wrap .ig_powered_by{position:fixed;bottom:1em;left:1em;font-size:14px;padding:.1em}@media only screen and (min-width:1440px){.ig_popup{max-width:835px}}@media only screen and (max-width:850px){.ig_popup{font-size:14px}.ig_popup .ig_button,.ig_popup input[type=submit],.ig_popup input[type=button]{width:70%!important}}@media only screen and (max-width:644px){.ig_popup{width:75%;font-size:13px}.ig_popup .ig_button,.ig_popup input[type=submit],.ig_popup input[type=button]{width:60%!important}}@media only screen and (max-width:425px){.ig_popup .ig_button,.ig_popup input[type=submit],.ig_popup input[type=button]{width:80%!important}}@media only screen and (max-width:375px){.ig_popup{width:90%}.ig_popup .ig_button,.ig_popup input[type=submit],.ig_popup input[type=button]{width:90%!important}}.ig_popup .ig_form_container{width:30%;float:left}.ig_popup.ig_form_left .ig_data{position:relative}.ig_popup.ig_form_left .ig_data,.ig_popup.ig_form_right .ig_data{width:70%;float:left}.ig_popup.ig_form_right.ig_form_style_4 .ig_close,.ig_popup.ig_form_right.ig_form_style_4 .ig_close:hover{margin:-15px -15px 0 0}@media only screen and (max-width:850px){.ig_popup.ig_form_left .ig_form_container.layout_left,.ig_popup.ig_form_right .ig_form_container.layout_right{display:none}.ig_popup.ig_form_bottom .ig_form_container.layout_bottom,.ig_popup.ig_form_left .ig_form_container.layout_bottom,.ig_popup.ig_form_right .ig_form_container.layout_bottom{display:block;width:100%;font-size:1.3em;height:auto!important}.ig_popup.ig_form_inline .ig_form_container.layout_inline{padding:.6em 0}.ig_popup.ig_form_left .ig_data,.ig_popup.ig_form_right .ig_data{width:100%}.ig_popup .ig_form_container.layout_bottom .ig_full .ig_form_els,.ig_popup .ig_form_container.layout_bottom .ig_half .ig_form_els,.ig_popup .ig_form_container.layout_bottom .ig_quater .ig_form_els,.ig_popup .ig_form_container.layout_bottom .ig_third .ig_form_els,.ig_popup .ig_form_container.layout_inline .ig_full .ig_form_els,.ig_popup .ig_form_container.layout_inline .ig_half .ig_form_els,.ig_popup .ig_form_container.layout_inline .ig_quater .ig_form_els,.ig_popup .ig_form_container.layout_inline .ig_third .ig_form_els{width:99%;margin:.5em auto 0}.ig_popup .ig_form_container.layout_bottom .ig_button_label,.ig_popup .ig_form_container.layout_inline .ig_button_label{display:none}.ig_popup .ig_form_container.layout_bottom .ig_button,.ig_popup .ig_form_container.layout_bottom input[type=submit],.ig_popup .ig_form_container.layout_bottom input[type=button],.ig_popup .ig_form_container.layout_inline .ig_button,.ig_popup .ig_form_container.layout_inline input[type=submit],.ig_popup .ig_form_container.layout_inline input[type=button]{width:99%!important;font-size:1em}.ig_popup.ig_form_bottom .ig_form_container.layout_bottom .ig_form_els.ig_form_el_radio,.ig_popup.ig_form_bottom .ig_form_container.layout_bottom .ig_form_els.ig_form_el_radio label,.ig_popup.ig_form_inline .ig_form_container.layout_inline .ig_form_els.ig_form_el_radio,.ig_popup.ig_form_inline .ig_form_container.layout_inline .ig_form_els.ig_form_el_radio label{display:block}.ig_popup.ig_form_style_1 .ig_form_container:before{border-width:0;border-style:solid;border-color:#000!important;opacity:.3;top:0}.ig_popup.ig_form_left.ig_form_style_1 .ig_form_container.layout_bottom:before,.ig_popup.ig_form_right.ig_form_style_1 .ig_form_container.layout_bottom:before{width:100%;border-top-width:.2em}.ig_popup.ig_form_bottom.ig_form_style_1 .ig_form_container.layout_bottom:before{border-top-width:.2em}.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els{margin-right:0;margin-left:0}.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els input,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els.ig_form_els_first input,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els.ig_form_els_last input,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els input,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_first input,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_last input{border-radius:2em;padding-left:1em}.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els input.ig_button,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els input.ig_button{padding:inherit}.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els label,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els.ig_form_els_first label,.ig_popup.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els.ig_form_els_last label,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els label,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_first label,.ig_popup.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_last label{padding-left:1em}.ig_popup.ig_form_right.ig_form_style_4 .ig_close,.ig_popup.ig_form_right.ig_form_style_4 .ig_close:hover{margin:0}.ig_popup.ig_form_bottom.ig_form_style_4 .ig_message,.ig_popup.ig_form_left.ig_form_style_4 .ig_message,.ig_popup.ig_form_right.ig_form_style_4 .ig_message{padding-bottom:1.5em}}@media only screen and (min-width:645px) and (max-width:850px){.ig_popup.ig_form_bottom .ig_form_container.layout_bottom,.ig_popup.ig_form_left .ig_form_container.layout_bottom,.ig_popup.ig_form_right .ig_form_container.layout_bottom{font-size:1.1em}}.ig_popup.ig_air-mail{position:relative;border-width:8px;border-style:solid;-moz-border-image:-moz-repeating-linear-gradient(45deg,#a83439,#a83439 10px,#fdfdfd 10px,#fdfdfd 20px,#2f4175 20px,#2f4175 30px,#fdfdfd 30px,#fdfdfd 40px) 8 round;-webkit-border-image:-webkit-repeating-linear-gradient(45deg,#a83439,#a83439 10px,#fdfdfd 10px,#fdfdfd 20px,#2f4175 20px,#2f4175 30px,#fdfdfd 30px,#fdfdfd 40px) 8 round;-o-border-image:-o-repeating-linear-gradient(45deg,#a83439,#a83439 10px,#fdfdfd 10px,#fdfdfd 20px,#2f4175 20px,#2f4175 30px,#fdfdfd 30px,#fdfdfd 40px) 8 round;border-image:repeating-linear-gradient(45deg,#a83439,#a83439 10px,#fdfdfd 10px,#fdfdfd 20px,#2f4175 20px,#2f4175 30px,#fdfdfd 30px,#fdfdfd 40px) 8 round;background-color:#fdfdfd;color:#707070}.ig_popup.ig_air-mail .ig_headline{padding:.5em;font-size:2.5em;text-align:center;color:#2C4A9D}.ig_popup.ig_air-mail .ig_image{float:right}.ig_popup.ig_air-mail .ig_message{padding:.2em 2em .8em;font-size:1.2em}.ig_popup.ig_air-mail .ig_close{background-position:-520px center;margin:0;top:0;right:0;opacity:.35}.ig_popup.ig_air-mail .ig_close:hover{background-position:-520px center;opacity:.75}.ig_popup.ig_air-mail .ig_button,.ig_popup.ig_air-mail input[type=submit],.ig_popup.ig_air-mail input[type=button]{background:#D82931;color:#FFF;width:50%;border-radius:4px;border:none;font-size:1.5em;text-transform:uppercase;font-weight:600;text-align:center;margin:.8em auto 1.2em;padding:.5em .15em}.ig_popup.ig_air-mail .ig_button:hover,.ig_popup.ig_air-mail input[type=submit]:hover,.ig_popup.ig_air-mail input[type=button]:hover{box-shadow:0 0 5px 0 rgba(0,0,0,.5)}.ig_popup.ig_air-mail .ig_button:active,.ig_popup.ig_air-mail input[type=submit]:active,.ig_popup.ig_air-mail input[type=button]:active{box-shadow:none}.ig_popup.ig_form_right.ig_air-mail .ig_form_container.layout_right{padding-top:1.5em}@media only screen and (max-width:850px){.ig_popup.ig_form_right.ig_air-mail .ig_form_container.layout_right{padding-top:1em}}.ig_popup.ig_amaze{border:.3em solid #444;background-color:#444;color:#FFF}.ig_popup.ig_amaze .ig_bg_overlay{display:block;background-image:url(../../../assets/images/popup-amaze-bg.jpg);opacity:.5}.ig_popup.ig_amaze .ig_headline{padding:.5em;text-align:center;text-shadow:0 1px 0 rgba(0,0,0,.5);font-size:2em}.ig_popup.ig_amaze .ig_image{float:left}.ig_popup.ig_amaze .ig_message{font-size:1.2em;padding:.5em 1.2em .8em;font-family:Georgia,Times,"Times New Roman",serif;margin:0 2em}.ig_popup.ig_amaze .ig_button,.ig_popup.ig_amaze input[type=submit],.ig_popup.ig_amaze input[type=button]{background:#2ecc70;color:#FFF;font-family:Calibri,Candara,Segoe,"Segoe UI",Optima,Arial,sans-serif;font-size:1.3em;letter-spacing:1px;vertical-align:top;font-weight:700;text-align:center;line-height:1.8em;border-radius:3px;border-bottom:.2em solid rgba(63,63,63,.6);text-shadow:1px 1px 0 rgba(0,0,0,.5);margin:.5em auto 1.2em;width:40%;padding:.3em 1em}.ig_popup.ig_amaze .ig_button:hover,.ig_popup.ig_amaze input[type=submit]:hover,.ig_popup.ig_amaze input[type=button]:hover{box-shadow:0 0 5px 0 rgba(0,0,0,.5)}@media only screen and (max-width:850px){.ig_popup.ig_amaze .ig_message{margin:0 1em}}.ig_popup.ig_compel{background:#FFF;color:#707070;border:4px dashed #c0392b}.ig_popup.ig_compel .ig_headline{padding:.5em 1em .5em .5em;font-size:2em;text-shadow:0 1px 0 rgba(0,0,0,.2);margin-bottom:.2em;text-align:center}.ig_popup.ig_compel .ig_image{float:left;padding-right:1em}.ig_popup.ig_compel .ig_message{padding:.5em 1.25em .8em;font-size:1.25em;font-family:"Lucida Grande","Lucida Sans Unicode","Lucida Sans",Geneva,Verdana,sans-serif;margin:0 .5em .5em}.ig_popup.ig_compel .ig_close{background-position:-520px center;margin:0;top:0;right:0;opacity:.35}.ig_popup.ig_compel .ig_close:hover{background-position:-520px center;opacity:.75}.ig_popup.ig_compel .ig_button,.ig_popup.ig_compel input[type=submit],.ig_popup.ig_compel input[type=button]{background:#e74d3c;color:#FFF;width:50%;border-radius:5px;border-bottom:.18em solid #bf3a2b;font-size:1.2em;text-transform:uppercase;font-weight:600;text-align:center;padding:.8em .15em .62em;margin:.5em auto 1.2em}.ig_popup.ig_compel .ig_button:hover,.ig_popup.ig_compel input[type=submit]:hover,.ig_popup.ig_compel input[type=button]:hover{box-shadow:0 0 5px 0 rgba(0,0,0,.5)}@font-face{font-family:'Goudy Bookletter 1911';font-style:normal;font-weight:400;src:local('Goudy Bookletter 1911'),local('GoudyBookletter1911'),url(https://fonts.gstatic.com/s/goudybookletter1911/v6/l5lwlGTN3pEY5Bf-rQEuIAQibyVIKv8boZ0oFv0g-Lo.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}.ig_popup.ig_convert{background-color:#fffdcc;color:#484747;box-shadow:none;width:50%;border-radius:.3em}.ig_popup.ig_convert .ig_headline{font-size:2.5em;padding:.8em 1.2em .3em;text-align:center;font-family:'Goudy Bookletter 1911',serif}.ig_popup.ig_convert .ig_image{float:right}.ig_popup.ig_convert .ig_message{font-size:1.2em;padding:.8em 1.5em;font-family:Calibri,Candara,Segoe,"Segoe UI",Optima,Arial,sans-serif;vertical-align:baseline;text-align:center}.ig_popup.ig_convert .ig_button,.ig_popup.ig_convert input[type=submit],.ig_popup.ig_convert input[type=button]{background:#cb0606;color:#fcf8f8;font-weight:700;text-decoration:none;font-size:1.75em;border:.2em solid rgba(0,0,0,.2)!important;width:60%;font-family:'Goudy Bookletter 1911',serif;border-radius:3em;text-align:center;line-height:1.5em;padding:.3em 1em;margin:.5em auto 1.2em;clear:both}.ig_popup.ig_convert .ig_button:hover,.ig_popup.ig_convert input[type=submit]:hover,.ig_popup.ig_convert input[type=button]:hover{box-shadow:0 0 8px 0 rgba(0,0,0,.4)}.ig_popup.ig_convert .ig_button:active,.ig_popup.ig_convert input[type=submit]:active,.ig_popup.ig_convert input[type=button]:active{box-shadow:none}.ig_popup.ig_convert .ig_close{background-position:0 center;top:6px;right:6px;opacity:.4}.ig_popup.ig_convert .ig_close:hover{background-position:0 center;opacity:.7}.ig_popup.ig_form_right.ig_convert .ig_form_container.layout_right{padding-top:2.2em}@media only screen and (min-width:1440px){.ig_popup.ig_convert{max-width:600px}}@media only screen and (max-width:850px){.ig_popup.ig_convert{width:65%}.ig_popup.ig_form_right.ig_convert .ig_form_container.layout_right{padding-top:1em}}@media only screen and (max-width:644px){.ig_popup.ig_convert{width:75%}}@media only screen and (max-width:375px){.ig_popup.ig_convert{width:90%}}.ig_popup.ig_inspire{background:#FFF;color:#444}.ig_popup.ig_inspire .ig_headline{color:#82AD23;text-align:center;padding:.8em .8em .3em;font-size:2.5em}.ig_popup.ig_inspire .ig_image{float:left}.ig_popup.ig_inspire .ig_message{padding:.8em 2em;font-size:1.25em;text-align:justify}.ig_popup.ig_inspire .ig_button,.ig_popup.ig_inspire input[type=submit],.ig_popup.ig_inspire input[type=button]{background:#82AD23;color:#fff;vertical-align:middle;font-size:2em;font-weight:700;font-style:normal;text-decoration:none;text-align:center;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";filter:alpha(opacity=100);opacity:1;width:55%;line-height:1.2em;padding:.5em;margin:.5em auto 1em;border-top:none}.ig_popup.ig_inspire .ig_button:hover,.ig_popup.ig_inspire input[type=submit]:hover,.ig_popup.ig_inspire input[type=button]:hover{border-top:none;box-shadow:0 0 8px 0 rgba(0,0,0,.4)}.ig_popup.ig_inspire .ig_button:active,.ig_popup.ig_inspire input[type=submit]:active,.ig_popup.ig_inspire input[type=button]:active{border-top:none;font-weight:400;box-shadow:none}.ig_popup.ig_inspire .ig_close{background-position:-763px center;margin:0;top:0;right:0;opacity:.4;height:24px;width:24px;background-color:rgba(0,0,0,.45)}.ig_popup.ig_inspire .ig_close:hover{opacity:.7}.ig_popup.ig_form_right.ig_inspire .ig_form_container.layout_right{padding-top:2.5em}@media only screen and (max-width:850px){.ig_popup.ig_form_right.ig_inspire .ig_form_container.layout_right{padding-top:1em}}.ig_popup.ig_persuade{background:#ef504e;color:#FFF;border:.4em dashed #FFF;padding-bottom:.1em}.ig_popup.ig_persuade .ig_headline{letter-spacing:0;font-size:2.8em;text-align:center;-webkit-font-smoothing:antialiased;line-height:1em;padding:.7em .7em .5em}.ig_popup.ig_persuade .ig_image{float:left}.ig_popup.ig_persuade .ig_message{padding:.5em 1.5em .8em;font-size:1.5em;font-weight:300;text-align:center;-webkit-font-smoothing:antialiased}.ig_popup.ig_persuade .ig_button,.ig_popup.ig_persuade input[type=submit],.ig_popup.ig_persuade input[type=button]{background:#424242;color:#FFF;text-decoration:none;text-align:center;font-size:2em;font-weight:400;line-height:1.2em;width:55%;margin:.5em auto 1em;padding:.4em;border:none;border-radius:.4em;border-bottom:.28em solid #333;border-bottom:.2em solid rgba(0,0,0,.3)!important;clear:both;box-shadow:0 .3em 1.5em rgba(0,0,0,.6)!important}.ig_popup.ig_persuade .ig_button:hover,.ig_popup.ig_persuade input[type=submit]:hover,.ig_popup.ig_persuade input[type=button]:hover{box-shadow:0 .1em .1em rgba(0,0,0,.3)!important}.ig_popup.ig_persuade .ig_button:active,.ig_popup.ig_persuade input[type=submit]:active,.ig_popup.ig_persuade input[type=button]:active{box-shadow:none!important}
trunk/message-types/toast/default.css ADDED
@@ -0,0 +1 @@
 
1
+ /* File for backward compatibility. */
trunk/message-types/toast/main.js ADDED
@@ -0,0 +1 @@
 
1
+ /* File for backward compatibility. */
trunk/message-types/toast/main.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+ if ( class_exists( 'Icegram_Message_Type_Toast' ) ) return;
4
+
5
+ /**
6
+ * Class Icegram Toast
7
+ */
8
+ class Icegram_Message_Type_Toast extends Icegram_Message_Type {
9
+
10
+ function __construct() {
11
+ parent::__construct( dirname( __FILE__ ), plugins_url( '/', __FILE__ ) );
12
+ add_filter( 'icegram_message_type_params_toast', array( $this, 'set_admin_style' ) );
13
+ }
14
+
15
+ function define_settings() {
16
+ parent::define_settings();
17
+ $this->settings['position']['values'] = array( '00', '01', '02', '11', '20', '21', '22' );
18
+ $this->settings['position']['default'] = '02';
19
+ $this->settings['theme']['default'] = 'announce';
20
+ unset ( $this->settings['text_color'],
21
+ $this->settings['bg_color'],
22
+ $this->settings['label'],
23
+ $this->settings['embed_form']
24
+ );
25
+ }
26
+
27
+ function set_admin_style( $params ) {
28
+
29
+ $params['admin_style'] = array( 'label_bg_color' => '#EDBB00',
30
+ 'theme_header_height' => '5em',
31
+ 'thumbnail_width' => '43%',
32
+ 'thumbnail_height' => '7.5em'
33
+ );
34
+ return $params;
35
+ }
36
+ }
trunk/message-types/toast/themes/announce.png ADDED
Binary file
trunk/message-types/toast/themes/balance.png ADDED
Binary file
trunk/message-types/toast/themes/burnt.png ADDED
Binary file
trunk/message-types/toast/themes/clear.png ADDED
Binary file
trunk/message-types/toast/themes/night-glow.png ADDED
Binary file
trunk/message-types/toast/themes/stand-out.png ADDED
Binary file
trunk/message-types/toast/themes/toast.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .ig_toast.ig_container{display:none}.ig_toast .ig_wrapper{overflow:hidden;padding:5px 5px 5px 50px;position:relative;min-height:34px}.ig_toast .ig_content{overflow:hidden}.ig_toast .ig_headline{display:inline-block;margin:0;text-align:left;position:relative}.ig_toast .ig_icon{overflow:hidden;display:block;max-height:32px;max-width:32px;left:10px;top:10px;position:absolute}.ig_toast .ig_icon img{max-width:32px;max-height:32px;margin:0;padding:0}.ig_toast .ig_message{margin:-3px 0 0 -2px}.ig_toast .ig_message p{margin:.15em}.ig_toast_block{position:fixed;list-style:none;z-index:999999;-ms-word-wrap:break-word;word-wrap:break-word;padding:0;margin:5px}.ig_toast_block *{box-sizing:content-box;text-transform:none}.ig_toast_block .ig_container{margin:10px 0}.ig_toast_block .ig_headline{font-weight:700;clear:none;padding:0}.ig_toast_block .ig_message{font-size:12px;text-align:left;line-height:15px}.ig_toast.ig_announce.ig_container{border-radius:4px;box-shadow:0 2px 5px rgba(0,0,0,.1),inset 0 -1px 0 rgba(255,255,255,.15),0 0 6px rgba(0,0,0,.08),0 0 0 1px rgba(35,47,64,.2);background-image:-webkit-linear-gradient(180deg,rgba(255,255,255,.95) 0,rgba(255,255,105,0) 100%);background-image:-moz-linear-gradient(180deg,rgba(255,255,255,.95) 0,rgba(255,255,105,0) 100%);background-image:linear-gradient(180deg,rgba(255,255,255,.95) 0,rgba(255,255,105,0) 100%);background-color:rgba(255,255,105,.95)!important;color:rgba(67,76,89,.9)!important;text-shadow:0 1px 0 rgba(255,255,255,.85)}.ig_toast.ig_announce.ig_container:hover{border-color:rgba(0,0,0,1)}.ig_toast.ig_announce .ig_wrapper{border:none;border-radius:4px;box-shadow:inset 0 1px 0 rgba(255,255,255,.55)}.ig_toast.ig_announce .ig_content{border:none;color:rgba(67,76,89,.9)!important;background-color:transparent!important;border-radius:4px;box-shadow:inset 0 -3px 2px rgba(58,71,89,.04)}.ig_toast.ig_announce .ig_headline{color:rgba(67,76,89,.9)}.ig_toast.ig_balance.ig_container{border:1px solid #777;color:#141414;text-shadow:0 1px 0 rgba(255,255,255,.7);background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(204,204,204,.75)),to(rgba(240,240,240,1)),color-stop(.4,rgba(139,139,139,.5)))!important;background-image:linear-gradient(to bottom,rgba(204,204,204,.75) 0,rgba(139,139,139,.5) 40%,rgba(240,240,240,1) 100%)!important;background-color:rgba(204,204,204,.8)!important;-webkit-font-smoothing:antialiased}.ig_toast.ig_balance .ig_content{background:0 0!important}.ig_toast.ig_balance .ig_headline{border-bottom:1px solid #777;width:100%}.ig_toast.ig_balance .ig_message{margin-top:5px}.ig_toast.ig_burnt .ig_content,.ig_toast.ig_burnt.ig_container{background-color:transparent!important}.ig_toast.ig_burnt.ig_container{min-height:64px;position:relative;box-sizing:border-box}.ig_toast.ig_burnt .ig_wrapper{padding:5px 5px 5px 65px}.ig_toast.ig_burnt .ig_base{position:absolute;top:0;left:0;bottom:0;right:0;background-color:transparent;background-image:-webkit-linear-gradient(top,rgba(0,0,0,.8),rgba(0,0,0,.88));background-image:-moz-linear-gradient(top,rgba(0,0,0,.8),rgba(0,0,0,.88));background-image:linear-gradient(to bottom,rgba(0,0,0,.8),rgba(0,0,0,.88));border:1px solid #000;box-shadow:inset 0 1px 0 rgba(255,255,255,.07),inset 0 0 0 1px rgba(255,255,255,.1);border-radius:4px;overflow:hidden;z-index:0}.ig_toast.ig_burnt .ig_line{width:1px;height:27px;position:absolute;top:1px;left:58px;background-image:-webkit-linear-gradient(top,rgba(0,0,0,.3),rgba(0,0,0,0));background-image:-moz-linear-gradient(top,rgba(0,0,0,.3),rgba(0,0,0,0));background-image:linear-gradient(to bottom,rgba(0,0,0,.3),rgba(0,0,0,0))}.ig_toast.ig_burnt .ig_line:after{content:"";display:block;width:1px;height:26px;position:absolute;top:1px;left:-1px;background-image:-webkit-linear-gradient(top,rgba(255,255,255,.15),rgba(255,255,255,0));background-image:-moz-linear-gradient(top,rgba(255,255,255,.15),rgba(255,255,255,0));background-image:linear-gradient(to bottom,rgba(255,255,255,.15),rgba(255,255,255,0))}.ig_toast.ig_burnt .ig_headline{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.5);z-index:1}.ig_toast.ig_burnt .ig_icon{max-height:42px;max-width:42px;left:8px;top:5px}.ig_toast.ig_burnt .ig_icon img{width:40px;height:40px;border-radius:3px}.ig_toast.ig_burnt .ig_message{color:rgba(255,255,255,.83);text-shadow:0 -1px 0 rgba(0,0,0,.7);position:relative}.ig_toast.ig_clear.ig_container{border:3px solid rgba(0,0,0,.4);border-radius:.5em;background:#fff!important}.ig_toast.ig_clear .ig_content{background-color:transparent!important}.ig_toast.ig_clear .ig_headline{color:#222;letter-spacing:.7pt;line-height:16px;text-shadow:0 1px 0 rgba(255,255,255,.6)}.ig_toast.ig_clear .ig_message{color:#444;text-align:left;text-shadow:0 1px 0 rgba(255,255,255,.6);line-height:15px}.ig_toast.ig_night-glow.ig_container{border-radius:5px;box-shadow:0 1px 3px rgba(0,0,0,.6);-webkit-font-smoothing:antialiased;background-color:transparent!important;background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.83)),to(rgba(51,51,51,.73)),color-stop(.5,rgba(0,0,0,.83)))!important;background:-moz-linear-gradient(left,rgba(0,0,0,.83) 0,rgba(0,0,0,.83) 50%,rgba(51,51,51,.73) 100%)!important;background:linear-gradient(to bottom,rgba(0,0,0,.83) 0,rgba(0,0,0,.83) 50%,rgba(51,51,51,.73) 100%)!important;border:1px solid rgba(0,0,0,.6);color:rgba(255,255,255,.9);text-shadow:0 -1px 0 #000}.ig_toast.ig_night-glow .ig_wrapper{border-radius:3px;background-image:url(../../../assets/images/toast-glow.png);background-repeat:no-repeat;border-bottom:1px solid rgba(255,255,255,.05)}.ig_toast.ig_night-glow .ig_content{padding-left:8px;border-radius:3px;border-left:1px solid rgba(255,255,255,.1);background-color:transparent!important}.ig_toast.ig_stand-out .ig_wrapper{padding:5px 50px 5px 10px}.ig_toast.ig_stand-out.ig_container{background-color:#1f1f1f!important;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,rgba(0,0,0,.1)),color-stop(1,rgba(255,255,255,.1))),url(../../../assets/images/stand-out.png)!important;background-image:-moz-linear-gradient(bottom,rgba(0,0,0,.1) 0,rgba(255,255,255,.1) 100%),url(../../../assets/images/stand-out.png)!important;background-image:linear-gradient(to top,rgba(0,0,0,.1) 0,rgba(255,255,255,.1) 100%),url(../../../assets/images/stand-out.png)!important;box-shadow:0 1px 0 rgba(255,255,255,.3) inset,0 -1px 0 rgba(255,255,255,.1) inset,0 1px 4px rgba(0,0,0,.7);border-radius:5px;color:rgba(255,255,255,.7);text-shadow:0 1px 0 rgba(0,0,0,.75);border:1px solid #111}.ig_toast.ig_stand-out .ig_content{background-color:transparent!important}.ig_toast.ig_stand-out .ig_icon{right:10px;left:auto;border-radius:3px}.ig_toast.ig_stand-out .ig_headline,.ig_toast.ig_stand-out .ig_message{line-height:15px}
trunk/readme.txt ADDED
@@ -0,0 +1,747 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Popups, Welcome Bar, Optins and Lead Generation Plugin - Icegram ===
2
+ Contributors: icegram, storeapps, niravmehta, sandhyam, ravioza, putler
3
+ Donate link: https://www.icegram.com/
4
+ Tags: popup, Exit-popup, optin-popup, popups, hellobar, optin, lead capture, form, marketing, notification, messenger, targeting, monster, ninja ,wordpress lead generation, wordpress lightbox optin, wordpress lightbox optin form, wordpress lightbox optins, wordpress mobile optin forms, wordpress mobile popup, wordpress mobile popups, wordpress optin form, wordpress overlay popup, wordpress popup, wordpress popup form, wordpress popup plugin, wordpress popup solution, wordpress popups , popups, subscribe, wp popups, optin bars, action grabber, promotion, popup message, leads, lists, builder, action bar, floating bar, footer bar, hellobar alternative, pop over, Popup plugin, aweber, campaign monitor, constant contact, email list, exit-intent, onclick popup, analytics, Hubspot, popup ads, pop-up, Mailing list pop-up, re-targeting, Animation,Popups with Animation ,Responsive Popup, split testing, AB testing
5
+ Requires at least: 3.9
6
+ Tested up to: 4.9.1
7
+ Stable tag: 1.10.15
8
+ License: GPLv3
9
+
10
+ The best WP popup plugin that let's you create a popup within seconds. Customize popup, target popups to show offers, email signups, social buttons etc and instantly increase conversions on your website.
11
+
12
+ == Description ==
13
+
14
+ Icegram is the best plugin to easily create beautiful optins and call to actions of your choice, show them to targeted visitors and convert them to customers and fans.
15
+ Icegram totally eliminates the need to hire a developer. You can easily set it up within minutes and start recording results right away.
16
+ Most similar quality plugins are paid and still offer a lot less. Icegram is full featured, easy to use, trusted by 20,000+ users, and is still free.
17
+
18
+
19
+ = The Only Multi Purpose Plugin - a lot beyond optins =
20
+ Icegram is not the typical optin / list-building / email subscription plugin. You can do a lot more than that!
21
+
22
+ * **Easily Grow Your Subscriber List:**Show attention grabbing, high converting email optin forms and build your subscriber list.
23
+ * **Instantly Drive Traffic** Display powerful call to action (CTA) buttons and drive visitors to any page you like.
24
+ * **Start Engaging and Converting Visitors:**Grab visitors’ attention, make an announcement, engage them to reduce bounce rate or offer them any other call to action.
25
+
26
+ >**Icegram doubled my Optin rates Overnight** - by [Remo Homer](https://wordpress.org/support/profile/remohomer)
27
+ Icegram **doubled our opt-in rates** overnight. Simple as that. It's fast to setup and easy for our client to manage. Support is great, and best of all - FREE!
28
+
29
+
30
+ = Get Multiple Message Styles - popups, header bars and much more =
31
+ Icegram provides not one or two, but four different optin types - **Lightbox Popups, Header & Footer Action Bars, Toast Notifications and Slide in Messengers.**
32
+
33
+ * **Well Timed Popups -** Create time targeted popups / lightboxes that are optimized for conversion. Lots of customization possible.
34
+ * **Sleek Action Bars -** Great for announcements, lead generation and CTAs. Icegram provides both header bars as well as footer bars.
35
+ * **Attention Grabbing Toast Notifications -** Super useful for alerts, invitations, and multi step CTAs.
36
+ * **Appealing Slide-in Messengers -** Welcome new visitors, recommend blog posts, provide links to support resources and more with slide in messengers.
37
+
38
+ If you want more, Icegram also provides eight more innovative message styles - Sidebars, Overlays, After / Before Post and Inlines, Stickies, Badges, Ribbons, Tabs & Interstitials as premium add-ons.[ Check the premium collection here.](https://www.icegram.com/addons/)
39
+
40
+ >Icegram is better than premium plugins! Trust me By [princegift2892](https://profiles.wordpress.org/princegift2892)
41
+ I have used premium plugins too. But this plugin is better than premium one! So many options, customizations, and best support! I am using this plugin on both of my websites ;)
42
+
43
+
44
+ = Lots of Powerful Features =
45
+ * Easy to use, user friendly interface
46
+ * Easily create and target unlimited optin forms and messages
47
+ * Multiple Different Opt-in Form / Message Styles: Popups, Header / Footer bars, Toast notifications, Slide-in Messengers. Plus 8 other premium styles.
48
+ * Multiple Theme Designs: Extensive range of beautiful and fully customizable themes to make your CTA messages and email optin popups look amazing
49
+ * Easy Integrations with Email Marketing Service: MailChimp, Constant Contact, AWeber, Campaign Monitor, GetResponse, InfusionSoft and all other email marketing services
50
+ * Mobile Responsive design
51
+ * Time and sequence different messages
52
+ * Multiple display positions - top, middle, bottom, left, right, center
53
+ * Powerful Display Targeting Rules: Decide where and when to show your campaigns and optin forms- On specific pages, categories or posts; to certain users; on specific schedule, via shortcode - and many other rules.
54
+ * Track results of each optin form
55
+ * Analytics and Reporting: View conversion and impression analytics of all campaigns and messages using a free add-on
56
+ * Extensive Customization for power users - custom HTML, CSS, JS option; extensive JavaScript API; make it suit your needs
57
+ * Split A/B Testing (premium feature): Create variations and automatically determine which messages convert better
58
+ * Exit Intent (premium feature): Target abandoning visitors by showing popups and other messages when they are about to exit your site
59
+ * Unique Headline Generator that creates engaging headlines - so you get a copywriting headstart
60
+ * No compulsion to show Icegram name or branding
61
+ * No need to create an account on our site to use Icegram
62
+ * Automatic Updates
63
+ * Range of premium add-ons to supercharge your results
64
+ * Friendly and Professional Support Team
65
+ * Plus a lot more!!
66
+
67
+ > **I have 20 Different Plugins across 3 websites but Icegram is my go-to plugin** said [JamieTurner1313](https://wordpress.org/support/topic/one-of-the-best-plugins-ive-used-3) from 60 Second Marketer,
68
+ There are plenty of similar plug-ins like this on WordPress, but none of them provide as much bang for the buck as Icegram. I have, I'm guessing, 20 different plugins across 3 websites and this is **my go-to plugin to drive downloads of my e-books**. I especially like the A/B split testing feature. And the customer support has been very prompt. Five stars for sure.
69
+
70
+
71
+ = Create an Optin Form within minutes. No Need to Hire a Developer! =
72
+
73
+ Icegram is easy and you don’t need a developer to figure this out. Icegram lets you create optins and CTA messages in under a minute. You can choose from variety of optin types, customize it as per your liking and target it instantly. Creating an Icegram message is very simple and you don’t need technical knowledge to get it to work.
74
+
75
+
76
+ >
77
+ **Icegram simplified things for a non-programmer like me**
78
+ By [varunjadhav](https://profiles.wordpress.org/varunjadhav),
79
+ Icegram simplified things for a non-programmer startup entrepreneur like me, and has become a tool I recommend to everyone else. It’s a **wonderfully productive On-site Retargeting Plugin!** And it's free. In one week of using Icegram, our **bounce rate went down significantly** and visitor’s time on site went up.
80
+
81
+
82
+ = Choose from Beautiful, Mobile Responsive Design Templates =
83
+
84
+ Icegram provides you with **20 high converting** and very responsive design templates. You can customize the colors of these design templates to match the color pallette of your brand/ website.
85
+
86
+ = Start Growing Your Email Subscriber List Instantly =
87
+ Icegram optins **specialize in converting visitors to subscribers**. Icegram allows you to create high converting subscriber forms and target them strategically at various places on your website.
88
+
89
+
90
+ >
91
+ **I doubled my subscriber list with Icegram within 1 month**
92
+ By [infinity80](https://profiles.wordpress.org/infinity80),
93
+ One month into using icegram, and the **number of subscribers doubled**. This plugin is really great. Icegram messages have given me **phenomenal 60% click through rates** and it never fails to deliver. When you use Icegram, **you don't need to learn all those marketing secrets.. Icegram does that for you…**
94
+
95
+ = Increase Your Optin Conversions with Advanced, Powerful Display Targeting Rules =
96
+ Well targeted optins is a must. Thus, Icegram provides you various **advanced targeting optins.** It allows you to target visitors depending on various factors like:
97
+
98
+ * Page level targeting
99
+ * Time based targeting
100
+ * User based targeting
101
+ * Device based targeting ( 100% Mobile Responsive)
102
+
103
+ = Measure Optins Performance based on Detailed Reports =
104
+
105
+ The most important way of measuring the effect of an optin is checking out the analytics. Icegram provides an easy to understand but in-depth stats of how your optin is performing.
106
+
107
+ >**Track impressions and Conversion for FREE** - by [GroNovaAcademy](https://wordpress.org/support/profile/gronovaacademy)
108
+ An **easy-to-use software** to capture the attention of web visitors, as well to track impressions and conversion rate for free. I also experienced a very **reactive and supportive team.**
109
+
110
+
111
+ = Convert Abandoning Visitors by Showing them Exit Intent Opt-ins =
112
+ Icegram also gives you an excellent option to target optins at exit intent. This is available in Icegram’s paid addon - [Behavior Triggers and Advanced Targeting](https://www.icegram.com/addons/behavior-triggers-advanced-retargeting/). That is, you can show an optin just before the visitor is leaving your website. Such optins are highly converting and are mostly used by Top Internet Marketers to grow their lists.
113
+
114
+ > **This Plugins A Lifesafer!**
115
+ By [_Krucial_](https://profiles.wordpress.org/_krucial_)
116
+ The exit popup addon was just what I needed. I will be using this plugin on many sites, and only have good things to say about it. It is **very very handy** and generous enough to give away features for FREE. **Icegram seriously makes a WP user’s life easy!**
117
+
118
+ = Create and Test out Optin Variations using Split Testing (A/B Testing) =
119
+ Icegram also has a premium addon [Split Testing](https://www.icegram.com/addons/split-testing/) which allows you to split test various aspects of the optins like - content, headlines, cta, color, design templates etc.
120
+
121
+ = Easily integrate with your Email Marketing Service =
122
+ Icegram provides an **easy html based integration** with Email Marketing Services like MailChimp, AWeber, Infusionsoft, GetResponse, ConstantContact, CampaignMonitor, ActiveCampaign, Emma, iContact, MailerLite, MailPoet, MadMimi, Klawoo, e-GOI, SendPress, Email Buddy, My Mail etc.
123
+ Infact any Email Marketing Service which provides an html form code can be easily integrated with any of Icegram’s Optins.
124
+
125
+ = Also, Fully Compatible with Third Party Plugins =
126
+ Not just Email Marketing Services, Icegram is compatible with most third party lead capture/form plugins, themes and CRM like - Jetpack, Gravity, Contact Form 7, Visual Form Builder and many others. Hence, causing no inconsistencies to your WordPress site.
127
+
128
+
129
+ = Get more Features with Premium Addons =Icegram is an open platform. The core is already powerful, but you can do even more with free and premium add-ons.
130
+
131
+ * [Split Testing](https://www.icegram.com/addons/split-testing/) - Split test Icegram campaigns and decide which variation works best for your audience.
132
+ * [Behavior Triggers and Advanced Targeting](https://www.icegram.com/addons/behavior-triggers-advanced-retargeting/) - Show and hide campaigns based on visitors on-page behavior. Like on Exit Intent, Scroll Position, Time Delay, JavaScript, On-click of another message…
133
+ * [Geo Targeting](https://www.icegram.com/addons/geo-targeting/) - target optins based on visitor's location - continent, country, city, region or IP address
134
+ * [CTA Actions](https://www.icegram.com/addons/cta-actions/) - Open link in new window, submit form, AJAX submission, show another message, hide this message... New actions for CTA buttons
135
+ * [Remote](https://www.icegram.com/addons/remote/) - Show Icegram messages on Non - WordPress sites.
136
+ * [Additional optin types](https://www.icegram.com/addons/) - Overlay, Inline, Sidebars, Interstitial, Ribbons, Stickies, Badges, Tabs
137
+
138
+ > **Icegram addons are very handy! Definitely recommended**
139
+ By [vinnymickey](https://profiles.wordpress.org/vinnymickey), January 15, 2016
140
+ Searched around to accomplish what this plugin does with its addons. And **Icegram worked out perfect** for me. Also tested out the support and they were **very helpful** with all my questions :)
141
+
142
+
143
+ = Icegram vs It’s Alternatives - Here’s what you need to know.. =
144
+ We compared Icegram with some similar plugins and here’s the complete one-on-one review.
145
+
146
+ * [Sumo Me vs Icegram - Full Review](https://www.icegram.com/sumo-me-vs-icegram-comparison/)
147
+ * [Optin Monster vs Icegram - Complete Feature Analysis](https://www.icegram.com/optinmonster-vs-icegram-comparison/)
148
+ * [Ninja Popups vs Icegram - Plugin Faceoff](https://www.icegram.com/ninja-popups-vs-icegram-the-better-popup-and-why/)
149
+ * [Hellobar vs Icegram - Comparative Analysis ](https://www.icegram.com/hello-bar-vs-icegram/)
150
+
151
+ >**Icegram is the best of them ALL** by Maurits Heijstek
152
+ I want to say that Icegram is the **best and most simple** solution I have found. I tested everything including Optin Monster, Bloom, Ninja Popup, etc...but Icegram is the best and has the **most potential**.
153
+
154
+ = Website, Demos, Shop, Social, Love =
155
+ * [Official Icegram website](https://www.icegram.com/)
156
+ * [Dozens of Demos](https://www.icegram.com/demos/) of different Icegram messages
157
+ * [Shop for free and paid add-ons](https://www.icegram.com/addons/)
158
+ * [A few customer reviews](https://www.icegram.com/customers/)
159
+ * Follow Icegram on Twitter [@icegram](https://twitter.com/icegram/)
160
+
161
+
162
+ **Some of our other free plugins on WordPress.org**
163
+
164
+ 1. [Rainmaker](https://wordpress.org/plugins/icegram-rainmaker/) - Best Forms Plugin on WordPress
165
+ 1. [Email Subscribers](https://wordpress.org/plugins/email-subscribers/) - complete newsletter plugin
166
+ 3. [Email Subscribers – Group Selector](https://wordpress.org/plugins/email-subscribers-advanced-form/)
167
+ 4. [News Announcement Scroll](https://wordpress.org/plugins/news-announcement-scroll/)
168
+ 5. [Temporary Login Without Password](https://wordpress.org/plugins/temporary-login-without-password/)
169
+
170
+ == Installation ==
171
+
172
+ 1. Unzip and upload contents of the plugin to your /wp-content/plugins/ directory
173
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
174
+ 3. Click on 'Icegram' option within WordPress admin sidebar menu
175
+
176
+ == Frequently Asked Questions ==
177
+
178
+ = Messages look broken / formatting is weird... =
179
+
180
+ This is most likely due to CSS conflicts with current theme. We suggest using simple formatting for messages. You can also write custom CSS in your theme to fix any problems.
181
+
182
+ = Extra Line Breaks / Paragraphs in messages... =
183
+
184
+ Go to HTML mode in content editor and pull your custom HTML code all together in one line. Don't leave blank lines between two tags. That should fix it.
185
+
186
+ = How do I add custom CSS for messages? =
187
+
188
+ You can use custom CSS/JS inline in your message HTML. You can also use your theme's custom JS / CSS feature to add your changes.
189
+
190
+ = Optin Forms / Mailing service integration... =
191
+
192
+ You can embed any optin / subscription form to your Icegram messages using HTML code. You may even use a shortcode if you are using a WP plugin from your newsletter / lead capture service.
193
+
194
+ Use the "Embed Form" button above the text editor to paste in HTML code from your mailing list service and let Icegram automatically "clean it up" for usage in Icegram messages.
195
+
196
+ = Preview does not work / not refreshing... =
197
+
198
+ Doing a browser refresh while previewing will not show your most recent changes. Click 'Preview' button to see a preview with your latest changes.
199
+
200
+ = Can I use shortcodes in a message? =
201
+
202
+ Yes! Messages support shortcodes. You may need to adjust CSS so the shortcode output looks good in your message.
203
+
204
+ = I can't find a way to do X... =
205
+
206
+ Icegram is actively developed. If you can't find your favorite feature (or have a suggestion) contact us. We'd love to hear from you.
207
+
208
+ = I'm facing a problem and can't find a way out... =
209
+
210
+ Contact Us, provide as much detail of the problem as you can. We will try to solve the problem ASAP.
211
+
212
+ == Screenshots ==
213
+ 1. Different Icegram messages
214
+ 2. High converting design templates
215
+ 3. The Icegram workflow
216
+ 4. Editing an Icegram campaign - add multiple messages, edit them, full HTML editor, themes and more
217
+ 5. Target your Icegram message using these display rules
218
+
219
+ == Upgrade Notice ==
220
+ = 1.10.15 =
221
+ Added Christmas Gallery templates
222
+
223
+ = 1.10.14 =
224
+ Compatibility with WordPress 4.9
225
+
226
+ = 1.10.13 =
227
+ Added Black Friday and Cyber Monday Gallery templates
228
+
229
+ = 1.10.12 =
230
+ Compatibility with MailPoet 3
231
+
232
+ = 1.10.11 =
233
+ Added Halloween Gallery templates
234
+
235
+ = 1.10.10 =
236
+ Revised Gallery Templates
237
+
238
+ = 1.10.9.1 =
239
+ Bug Fix release
240
+
241
+ = 1.10.9 =
242
+ Revised Gallery Templates
243
+
244
+ = 1.10.8 =
245
+ compatibility with Contact Form 7(v4.8)
246
+
247
+ = 1.10.7 =
248
+ Added more templates in Gallery
249
+
250
+ = 1.10.6 =
251
+ Search bar, filters added to Icegram's Gallery
252
+
253
+ = 1.10.5 =
254
+ Improvements in Call To Actions
255
+
256
+ = 1.10.4 =
257
+ Directly choose Gallery Template while creating a New Campaign
258
+
259
+ = 1.10.3 =
260
+ Email Subscribers compatibility
261
+
262
+ = 1.10.2 =
263
+ Update mobile Detect library
264
+
265
+ = 1.10.1 =
266
+ Bug Fix release
267
+
268
+ = 1.10 =
269
+ Merge all addons in one
270
+
271
+ = 1.9.24 =
272
+ Small improvements in responsiveness of Popups and Action bars
273
+
274
+ = 1.9.23 =
275
+ Bug Fix release
276
+
277
+ = 1.9.22 =
278
+ No Google penalty for mobile popups, an automatic solution
279
+
280
+ = 1.9.21 =
281
+ Revamp admin UI
282
+
283
+ = 1.9.20.1 =
284
+ Bug Fix release
285
+
286
+ = 1.9.20 =
287
+ Rainmaker compatibility
288
+
289
+ = 1.9.19 =
290
+ Secured Icegram from XSS vulnerability
291
+
292
+ = 1.9.18 =
293
+ Compatibility with Icegram's CTA addon and Rainmaker
294
+
295
+ = 1.9.17 =
296
+ Performance enhancements
297
+
298
+ = 1.9.16 =
299
+ Custom forms imported in Rainmaker
300
+
301
+ = 1.9.15 =
302
+ Added the Gallery of ready to use Icegram Campaigns
303
+
304
+ = 1.9.14 =
305
+ Added quick action for campaign preview.
306
+
307
+ = 1.9.13 =
308
+ revamp of popup themes - Airmail, Convert, Inspire, Persude.
309
+
310
+ = 1.9.12 =
311
+ Add new custom CSS and JS code block.
312
+
313
+ = 1.9.11.1 =
314
+ Remove warning in admin panel.
315
+
316
+ = 1.9.11 =
317
+ Compatibility with Gravity Forms.
318
+
319
+ = 1.9.10 =
320
+ Fix for schedule campaign option
321
+
322
+ = 1.9.9 =
323
+ Compatibility with Contact Form 7.
324
+
325
+ = 1.9.8.1 =
326
+ Added sprite image for close buttons and other fixes.
327
+
328
+ = 1.9.8 =
329
+ Enhanced the top Action bar position
330
+
331
+ = 1.9.7.1 =
332
+ Incorrect plugin name
333
+
334
+ = 1.9.7 =
335
+ Messengers are now responsive.Many small improvements.
336
+
337
+ = 1.9.6 =
338
+ Many small changes and other fixes.
339
+
340
+ = 1.9.5 =
341
+ Added animations for few more message types.Action bars are now responsive.
342
+
343
+ = 1.9.4 =
344
+ Bug fix release for forms.
345
+
346
+ = 1.9.3 =
347
+ Bug fix release for "Target link" not working.
348
+
349
+ = 1.9.2 =
350
+ Shortcode problems solved. New anti-spam mechanism for forms.
351
+
352
+ = 1.9.1 =
353
+ Few improvements in form functionality.
354
+
355
+ = 1.9 =
356
+ Form embed functionality improvements , Added forms styles.
357
+
358
+ = 1.8.10 =
359
+ Fixes for minified js and css. Changes for WP themes compatibility.
360
+
361
+ = 1.8.9 =
362
+ Many small changes. Plus major changes for caching compatibility.
363
+
364
+ = 1.8.8 =
365
+ Improved short code handling, WishList member compatibility and other fixes.
366
+
367
+ = 1.8.7 =
368
+ Popups now support custom background and text colors. And a handful of fixes!
369
+
370
+ = 1.8.6 =
371
+ Fix for "white screen" errors, updated device detection, more readable call to action button colors
372
+
373
+ = 1.8.5 =
374
+ Bug fix release for device targeting, preview before publish not working.
375
+
376
+ = 1.8.4 =
377
+ Popups are now responsive! Plus Visual Composer compatibility and other fixes.
378
+
379
+ = 1.8.3 =
380
+ Campaign and message duplicate feature added. Plus some other improvements.
381
+
382
+ = 1.8.2 =
383
+ Bug fix release for preview not working.
384
+
385
+ = 1.8.1 =
386
+ Recommended upgrade. Many improvements.
387
+
388
+ = 1.8 =
389
+ Target campaigns to any page with wildcard URL support in "Where" conditions and CTA Click based retargeting.
390
+
391
+ = 1.7.1 =
392
+ Dismiss admin notice provision, retargeting compatibility with caches and bug fixes.
393
+
394
+ = 1.7 =
395
+ Improvements in styling, form embeds and retargeting.
396
+
397
+ = 1.6 =
398
+ Improvements in optin form embedding, bug fixes and more. Required update.
399
+
400
+ = 1.5 =
401
+ Easy optin / subscription form parser and many other enhancements. Required update.
402
+
403
+ = 1.4 =
404
+ Many small improvements. Support for analytics added. WordPress 4.0 compatible.
405
+
406
+ = 1.3 =
407
+ 7 premium addons available now. Plus lot of improvements. Recommended upgrade.
408
+
409
+ = 1.2 =
410
+ Lots of enhancements... [WPML](http://wpml.org/?aid=21266&affiliate_key=W1YOdHyWrIjY) support, pluggable architecture, many internal changes. Do upgrade.
411
+
412
+ = 1.1.1 =
413
+ Compatibility with W3TC and Localization
414
+
415
+ = 1.1 =
416
+ First release on WordPress.org
417
+
418
+ = 1.0 =
419
+ Initial Release
420
+
421
+
422
+ == Changelog ==
423
+ = 1.10.15 =
424
+ * New: Added Christmas Gallery templates
425
+
426
+ = 1.10.14 =
427
+ * Update: Compatibility with WordPress 4.9
428
+
429
+ = 1.10.13 =
430
+ * New: Added Black Friday and Cyber Monday Gallery templates
431
+
432
+ = 1.10.12 =
433
+ * Fix: MailPoet 3 anti-spam field was visible with Form embed functionality
434
+
435
+ = 1.10.11 =
436
+ * New: Added Halloween Gallery templates
437
+
438
+ = 1.10.10 =
439
+ * Enhancement: Revised Gallery templates
440
+
441
+ = 1.10.9.1 =
442
+ * Fix: "Blank / White Screen of death" / Fatal error: Can't use function return value in write context
443
+
444
+ = 1.10.9 =
445
+ * Enhancement: Revised Gallery templates
446
+
447
+ = 1.10.8 =
448
+ * Fix: compatibility with Contact Form 7(v4.8)
449
+
450
+ = 1.10.7 =
451
+ * New: Added new templates to Icegram's Gallery
452
+ * Fix: Single gallery template wasn't loading on refresh
453
+
454
+ = 1.10.6 =
455
+ * Enhancement: Search bar, filters added to Icegram's Gallery
456
+
457
+ = 1.10.5 =
458
+ * Enhancement: Small improvements for Call To Actions
459
+
460
+ = 1.10.4 =
461
+ * New: Directly choose Gallery Template while creating a New Campaign
462
+
463
+ = 1.10.3 =
464
+ * Enhancement: [Email Subscribers](https://wordpress.org/plugins/email-subscribers/) form compatibility with Icegram
465
+
466
+ = 1.10.2 =
467
+ * Update: Mobile Detect Library updated to version 2.8.24
468
+ * Fix: Forms that were embedded in mobile popups at "0 seconds"
469
+ * Fix: Resolve conflicts with wordpress themes using Magnific popup library
470
+
471
+ = 1.10.1 =
472
+ * Fix: Action bar was not getting close.
473
+
474
+ = 1.10 =
475
+ * Enhancement: Merged all addons in one
476
+
477
+ = 1.9.24 =
478
+ * Enhancement: Small improvements in responsiveness of Popups and Action bars
479
+
480
+ = 1.9.23 =
481
+ * Fix: Popup with time delay more than "0 seconds" were also converted to action bar if Behavior triggers was installed
482
+
483
+ = 1.9.22 =
484
+ * Enhancement: No Google penalty for mobile popups, an automatic solution
485
+
486
+ = 1.9.21 =
487
+ * New: Revamped the old admin UI and made it more user friendly and simple
488
+
489
+ = 1.9.20.1 =
490
+ * Fix: Solve "Parse error: syntax error, unexpected '&&' (T_BOOLEAN_AND), expecting ')'"
491
+
492
+ = 1.9.20 =
493
+ * Update: Rainmaker form compatibility with Icegram's Remote addon
494
+
495
+ = 1.9.19 =
496
+ * Fix: Secured Icegram from XSS vulnerability(Thanks to Ipstenu (Mika Epstein))
497
+
498
+ = 1.9.18 =
499
+ * Fix: Compatibility with Icegram's CTA addon and Rainmaker
500
+
501
+ = 1.9.17 =
502
+ * Update: Performance enhancements
503
+ * Fix: Gallery is not getting loaded with https site
504
+
505
+ = 1.9.16 =
506
+ * New: [Icegram Rainmaker Form Plugin](https://wordpress.org/plugins/icegram-rainmaker/) is the recommended method of adding forms in Icegram
507
+
508
+ = 1.9.15 =
509
+ * New: Added the Gallery of ready to use Icegram Campaigns
510
+ * Fix: Font was not getting loaded for convert theme(popup)
511
+
512
+ = 1.9.14 =
513
+ * New: Added quick action for campaign preview
514
+ * Fix: For new message delay time -1 were not getting set
515
+
516
+ = 1.9.13 =
517
+ * New: Two step - click triggered - optins
518
+ * Enhancement: Complete revamp of popup themes - Airmail, Convert, Inspire, Persude
519
+ * Fix: Clicks were not getting tracked for button[type=submit] with inner HTML
520
+
521
+ = 1.9.12 =
522
+ * New: Support for custom JS and CSS in message
523
+ * New: Added German translations
524
+ * Enhancement: Revised Addons and Docs page inside plugin
525
+ * Enhancement: Prevent false Impression count on crawling in analytics
526
+ * Fix: For an onclick popup, once the background of popup was clicked it wouldn't open again
527
+ * Fix: Home page targeting was not working properly in "Specific URL on this site" targeting
528
+
529
+ = 1.9.11.1 =
530
+ * Fix: Warning for "Illegal string offset 'option_name'"
531
+ * Fix: 'ReferenceError: icegram is not defined' on page with CF7 and no Icegram
532
+
533
+ = 1.9.11 =
534
+ * Fix: Conditional login of Gravity forms was not working
535
+
536
+ = 1.9.10 =
537
+ * Fix: Campaigns were not getting scheduled according to site's timezone
538
+
539
+ = 1.9.9 =
540
+ * Fix: CF7(Contact Form 7) Ajax submission was not working
541
+ * Fix: CF7 redirection was not working
542
+ * Fix: CF7 was changing URL after form submission
543
+
544
+
545
+ = 1.9.8.1 =
546
+ * Enhancement: Added sprite image for close buttons
547
+ * Fix: Retargeting issues with HTTP and HTTPS
548
+
549
+ = 1.9.8 =
550
+ * New: Added translation for Italian
551
+ * Update: Action Bar does not overlap header/menu of your website
552
+
553
+ = 1.9.7.1 =
554
+ * Fix: Incorrect plugin name
555
+
556
+ = 1.9.7 =
557
+ * New: Messenger messages work beautifully on mobile / small devices now!
558
+ * New: Icegram's shortcodes are now working with Text Widget
559
+ * Update: Mobile Detect Library updated to version 2.8.15
560
+ * Fix: Gravity Forms hidden fields were visible with Form embed functionality
561
+ * Fix: Slide animation was not working with some browsers
562
+ * Fix: Popup message conflicts with some lightbox plugins
563
+
564
+ = 1.9.6 =
565
+ * Fix: Popup was not getting closed when multiple popups were set on a single page
566
+ * Fix: Message was not getting close when a form was submitted in a new window
567
+ * Fix: Default editor was visible while loading campaign setting page
568
+ * Fix: Revised css of the "Support and Docs" page and made it compatibility with WordPress 4.3
569
+
570
+ = 1.9.5 =
571
+ * New: Action bar messages work beautifully on mobile / small devices now!
572
+ * New: Add Animation for few more message types
573
+
574
+ = 1.9.4 =
575
+ * Fix: Ninja Forms was showing two submit buttons with Icegram Form embed functionality
576
+ * Fix: Mailpoet hidden fields were visible with Form embed functionality
577
+ * Fix: Minor issues with form css
578
+ * Fix: Use themes default option was not working in message admin settings
579
+
580
+ = 1.9.3 =
581
+ * Fix: Redirection to "Target Link" was not working in Icegram message
582
+ * Fix: Inline form shortcode not getting preserved for message types with only inline position
583
+
584
+ = 1.9.2 =
585
+ * New: Keep spammers away with new automatic anti-spam bot checking mechanism
586
+ * Fix: Shortcodes not working in Icegram messages
587
+ * Fix: WordPress crash while creating a new post
588
+ * Update: UI improvements for form embedding
589
+
590
+ = 1.9.1 =
591
+ * Update: Retargeting option now work for campaign instead of message
592
+ * Fix: Inline form shortcode not getting preserved in message body
593
+ * Fix: Form style options not getting saved
594
+ * Fix: Minor issues with form css
595
+ * Fix: Compatibility issues of previous embed form functionality with new one
596
+
597
+ = 1.9 =
598
+ * New:Forms now comes with various form styles and multiple positions
599
+ * New:Forms also provides background and text color
600
+ * New:Forms also supports header,footer-text/HTML
601
+ * Update: Updated form embed functionality
602
+ * Fix: Homepage page targeting not working when "Lazy loading" was off
603
+
604
+ = 1.8.10 =
605
+ * Fix: Compatibility for themes with CSS class name conflicts
606
+ * Fix: Compatibility with "auto optimize" and other minification plugins
607
+ * Fix: Local site targeting not working without wildcard character
608
+
609
+ = 1.8.9 =
610
+ * New: Both body and button colors (background and foreground) can now be set
611
+ * Update: Brought back CTA Buttons default colors
612
+ * New: Lazy load Icegram messages for better compatibility with caching plugins
613
+ * Update: Updated all themes to support new theme coloring scheme
614
+ * Fix: Some alignment issues with images in popups
615
+ * Update: Minified all JS and CSS to improve performance
616
+ * Update: Auto correction for CTA links now works with tel: links
617
+
618
+ = 1.8.8 =
619
+ * New: Headlines now support shortcodes!
620
+ * Update: A message shown on click of another (using CTA actions addon), can now contain shortcodes
621
+ * Fix: Compatibility with Wishlist Member plugin
622
+ * Fix: Popup close event not triggered when clicking outside the popup - on its overlay
623
+ * Update: Automatically adds http:// in CTA links if missing
624
+
625
+ = 1.8.7 =
626
+ * New: Can now define custom background and text colors for Popups
627
+ * Fix: Button text color not showing well in some themes
628
+ * Fix: Analytics not getting tracked
629
+ * Update: Revisions to theme packs and many addons
630
+ * New: Support for Split Testing addon
631
+
632
+ = 1.8.6 =
633
+ * Fix: "Blank / White Screen of death" / Fatal error - Cannot redeclare class Mobile_Detect
634
+ * Fix: Warning for undefined index
635
+ * Update: Mobile Detect Library updated to version 2.8.11
636
+ * Update: Improvmetns in complementary colors for call to action button and button text
637
+ * Update: Action Bar's Bold theme - reduced shadow on button text
638
+
639
+ = 1.8.5 =
640
+ * New: Added a link to Form Embed Documentation for easy access
641
+ * Fix: Default mode of content editor set to visual
642
+ * Fix: Popup hiding behind header for some themes
643
+ * Fix: Device targeting rule not working on newer devices
644
+ * Fix: Preview working only after Publishing
645
+
646
+ = 1.8.4 =
647
+ * New: Popup messages work beautifully on mobile / small devices now!
648
+ * Fix: Timing problems with popups triggered via Behavior Trigger addon.
649
+ * Fix: Visual Composer compatibility
650
+
651
+ = 1.8.3 =
652
+ * NEW: Duplicate a Campaign and Message easily now - click 'duplicate' in the list view!
653
+ * Update: Using an image instead of dashicons for action bar arrows
654
+ * Update: Renamed "messenger" css class to "ig_messenger" to avoid potential overlaps
655
+ * Update: Clicking outside the popup (on the dark overlay) will close the popup
656
+
657
+ = 1.8.2 =
658
+ * Fix: Preview not working correctly
659
+
660
+ = 1.8.1 =
661
+ * NEW: Support for Icegram Remote - now run your campaigns on other sites - even non WordPress sites
662
+ * Update: Better wildcard matching in Where targeting rules for URLs
663
+ * Update: Compatibility with Avada theme
664
+ * Update: Misc UI and performance enhancements
665
+
666
+ = 1.8 =
667
+ * NEW: Target campaigns to any page with wildcard URL support in "Where" conditions
668
+ * NEW: CTA Click based retargeting to hide message in a campaign after being clicked
669
+ * NEW: Message shwon retargeting can now hide message forever - after shown once
670
+
671
+ = 1.7.1 =
672
+ * Update: Dismiss button for admin notice about bonus themes and addon
673
+ * Fix: Admin settings CSS changes, for compatibility with some themes
674
+ * Fix: Hello Bar close button not clickable
675
+ * Fix: Retargeting not working with some cache systems
676
+
677
+ = 1.7 =
678
+ * Update: Styling changes to action bar CTA button for alignment
679
+ * Update: Hello Bar styling updates to better handle forms
680
+ * Fix: Hidden field related issue while embeding subscription forms
681
+ * Fix: Retargeting not working correctly in certain cases
682
+ * Fix: Theme thumbnails missing on messages list
683
+
684
+ = 1.6 =
685
+ * Fix: Empty image tag causing display issues in Opera / IE
686
+ * Update: Form embed functionality improvements
687
+ * NEW: "Themes Pack 2014" addon - 17 themes as a bonus - available from Icegram.com
688
+ * Fix: Toast message compatibility with Behavior Triggers
689
+ * Update: JS and CSS URLs include version numbers now - better for caching
690
+ * Fix: Other minor fixes
691
+
692
+ = 1.5 =
693
+ * NEW: "Embed Form" option for easy integration with optin / mailing list / subscription form / CRM services
694
+ * NEW: Retargeting Rule: Do not show again for X number of days
695
+ * NEW: Targeting Rule: "Not Logged In" visitor
696
+ * NEW: Added support for submitting form on CTA click
697
+ * NEW: "CTA Actions" premium addon
698
+
699
+ = 1.4 =
700
+ * NEW: Targeting Rule: "Exclude pages" from a site wide campaign
701
+ * NEW: Options to cleanup Icegram data and remove shortcodes from content
702
+ * NEW: CTA button color is automatically determined based on background color
703
+ * NEW: FREE Analytics add-on (available from www.icegram.com)
704
+ * Update: This version is compatible with WordPress 4.0
705
+
706
+ = 1.3 =
707
+ * NEW: 7 Premium add-ons available
708
+ * Fix: [icegram] shortcode not working for campaigns
709
+ * Update: Improved CTA click handling
710
+ * Update: Internal changes for better performance
711
+ * NEW: Setting display time to -1 will hide the message
712
+ * Fix: Can use quotes and other special characters in headline now
713
+ * Update: #WPML Show default language message only if "Blog posts to display" is set to "All posts"
714
+ * Fix: Hide campaign and messages from public pages / search / search engines
715
+ * Fix: Other plugins adding content to messages (social media links etc)
716
+ * NEW: Clicking on any item with class "ig_cta" will trigger cta click action
717
+ * Fix: Campaigns not working on archive pages (like Shop / Categories...)
718
+ * Fix: Campaigns with multiple target pages not working
719
+ * Fix: #WPML Messages added from Campaigns page not showing on Messages page
720
+ * Update: And then some changes we are forgetting for now...
721
+
722
+ = 1.2 =
723
+ * NEW: Icegram is now fully pluggable. External plugins can add message types and themes.
724
+ * NEW: [WPML](http://wpml.org/?aid=21266&affiliate_key=W1YOdHyWrIjY) support
725
+ * Update: Icegram branding is optional
726
+ * NEW: Setting to show Icegram branding
727
+ * Fix: Popups show correctly on long pages now
728
+ * Fix: Single day schedule for message display is correctly handled now
729
+ * NEW: Rewritten message display system - can even control with JavaScript now
730
+ * Fix: For problems showing a campaign on homepage
731
+ * Update: Simplified CSS and JS
732
+ * Update: Changed custom post type names to ig_message and ig_campaign
733
+ * Update: Compatibility with All in One SEO plugin
734
+ * Update: Newsletter subscription form added
735
+ * Fix: For displaying messages via shortcode
736
+ * Update: And many more!!!
737
+
738
+
739
+ = 1.1.1 =
740
+ * Fix for crash on activation with W3 Total Cache
741
+ * Added localization / translation ability
742
+
743
+ = 1.1 =
744
+ * Loading CSS from own domain instead of Google
745
+
746
+ = 1.0 =
747
+ * Initial Release
trunk/settings.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+
4
+ if( isset( $_POST['submit'] ) ) {
5
+ if( isset( $_POST['icegram_share_love'] ) ) {
6
+ update_option( 'icegram_share_love', sanitize_text_field($_POST['icegram_share_love']) );
7
+ } else {
8
+ update_option( 'icegram_share_love', 'no' );
9
+ }
10
+ if( isset( $_POST['icegram_cache_compatibility'] ) ) {
11
+ update_option( 'icegram_cache_compatibility', sanitize_text_field($_POST['icegram_cache_compatibility']) );
12
+ } else {
13
+ update_option( 'icegram_cache_compatibility', 'no' );
14
+ }
15
+ }
16
+
17
+ ?>
18
+ <div class="wrap">
19
+ <h2><?php _e( "Icegram Settings", "icegram" ) ?></h2>
20
+ <form name="icegram_settings" method="POST" action="<?php echo admin_url(); ?>edit.php?post_type=ig_campaign&page=icegram-settings">
21
+ <table class="form-table">
22
+ <tr>
23
+ <th scope="row"><?php _e( 'Share Icegram', 'icegram' ) ?></th>
24
+ <td>
25
+ <label for="icegram_share_love">
26
+ <input type="checkbox" name="icegram_share_love" id="icegram_share_love"/ value="yes" <?php checked('yes', get_option('icegram_share_love')); ?> />
27
+ <?php _e( 'Show "Powered by" link', 'icegram' ); ?>
28
+ </label>
29
+ </td>
30
+ </tr>
31
+ <tr>
32
+ <th scope="row"><?php _e( 'Cache Friendly?', 'icegram' ) ?></th>
33
+ <td>
34
+ <label for="icegram_cache_compatibility">
35
+ <input type="checkbox" name="icegram_cache_compatibility" id="icegram_cache_compatibility"/ value="yes" <?php checked('yes', get_option('icegram_cache_compatibility')); ?> />
36
+ <?php _e( 'Turn on "Lazy Load" - load Icegram scripts and messages after page load to avoid caching problems.', 'icegram' ); ?>
37
+ </label>
38
+ </td>
39
+ </tr>
40
+ </table>
41
+ <?php submit_button(); ?>
42
+ </form>
43
+ </div>
44
+ <?php do_action( 'icegram_settings_after' ); ?>
trunk/updates/icegram-update-1.2.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ /*
6
+ Proper structuring of message data fields in case of animation and theme key-value
7
+ Changed the array keys
8
+ title -> headline
9
+ promo_image -> icon
10
+ */
11
+ global $wpdb, $wp_rewrite;
12
+
13
+ $results = $wpdb->get_results( "SELECT * FROM {$wpdb->postmeta} WHERE meta_key LIKE 'icegram_message_%'" );
14
+
15
+ foreach ( $results as $result ) {
16
+
17
+ $message_data = unserialize( $result->meta_value );
18
+ if( is_array( $message_data ) && !empty( $message_data ) ) {
19
+ $message_type = $message_data['type'];
20
+ if( isset( $message_data['theme'] ) && is_array( $message_data['theme'] ) && !empty( $message_data['theme'][$message_type] ) ) {
21
+ $message_data['theme'] = $message_data['theme'][$message_type];
22
+ }
23
+ if( isset( $message_data['animation'] ) && is_array( $message_data['animation'] ) ) {
24
+ if( !empty( $message_data['animation'][$message_type] ) ) {
25
+ $message_data['animation'] = $message_data['animation'][$message_type];
26
+ } else {
27
+ unset( $message_data['animation'] );
28
+ }
29
+ }
30
+ if( isset( $message_data['title'] ) ) {
31
+ $message_data['headline'] = $message_data['title'];
32
+ unset( $message_data['title'] );
33
+ }
34
+ if( isset( $message_data['promo_image'] ) ) {
35
+ $message_data['icon'] = $message_data['promo_image'];
36
+ unset( $message_data['promo_image'] );
37
+ }
38
+ update_post_meta( $result->post_id, $result->meta_key, $message_data );
39
+ }
40
+
41
+ }
42
+
43
+ // Change post_type for messages and campaigns
44
+ $old_post_types = array('message', 'campaign');
45
+ foreach ($old_post_types as $type) {
46
+
47
+ $q = 'numberposts=-1&post_status=any&post_type='.$type;
48
+ $items = get_posts($q);
49
+ foreach ($items as $item) {
50
+ $update['ID'] = $item->ID;
51
+ $update['post_type'] = "ig_{$type}";
52
+ wp_update_post( $update );
53
+ }
54
+
55
+ /*
56
+ $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts} SET post_type = REPLACE(post_type, %s, %s)
57
+ WHERE post_type LIKE %s", $type, 'ig_'.$type, $type ) );
58
+ $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts} SET guid = REPLACE(guid, %s, %s)
59
+ WHERE guid LIKE %s", "post_type={$type}", "post_type=ig_{$type}", "%post_type={$type}%" ) );
60
+
61
+ $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts} SET guid = REPLACE(guid, %s, %s)
62
+ WHERE guid LIKE %s", "/{$type}/", "/ig_{$type}/", "%/{$type}/%" ) );
63
+ */
64
+ }
65
+
66
+ if ($wp_rewrite) {
67
+ $wp_rewrite->flush_rules();
68
+ }
69
+
70
+ update_option( 'icegram_db_version', '1.2' );
trunk/wpml-config.xml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <wpml-config>
2
+ <custom-types>
3
+ <custom-type translate="1">ig_message</custom-type>
4
+ <custom-type translate="0">ig_campaign</custom-type>
5
+ </custom-types>
6
+ </wpml-config>