Subscribe2 - Version 10.18.3

Version Description

Download this release

Release Info

Developer tanaylakhani
Plugin Icon 128x128 Subscribe2
Version 10.18.3
Comparing to
See all releases

Code changes from version 10.18.2 to 10.18.3

ChangeLog.txt CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  = 10.18.2 =
2
 
3
  * ReadyGraph Bug Fixes
1
+ = 10.18.3 =
2
+
3
+ * Readygraph premium plan selections
4
+ * Site profile for readygraph promotions
5
+
6
  = 10.18.2 =
7
 
8
  * ReadyGraph Bug Fixes
ReadMe.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Dabelon, wenzhixue, tanaylakhani
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2387904
4
  Tags: posts, subscription, email, subscribe, notify, notification
5
  Requires at least: 3.3
6
- Tested up to: 3.9.1
7
- Stable tag: 10.18.2
8
  License: GPL3
9
 
10
  Sends a list of subscribers an email notification when new posts are published to your blog. Automate user growth through ReadyGraph integration.
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2387904
4
  Tags: posts, subscription, email, subscribe, notify, notification
5
  Requires at least: 3.3
6
+ Tested up to: 4.1
7
+ Stable tag: 10.18.3
8
  License: GPL3
9
 
10
  Sends a list of subscribers an email notification when new posts are published to your blog. Automate user growth through ReadyGraph integration.
extension/readygraph/admin.php CHANGED
@@ -45,14 +45,16 @@ s2_rrmdir($dir);
45
  if (isset($_POST["readygraph_delay"])) update_option('readygraph_delay', 10000);
46
  if (isset($_POST["readygraph_enable_notification"])) update_option('readygraph_enable_notification', 'true');
47
  if (isset($_POST["readygraph_enable_popup"])) update_option('readygraph_enable_popup', 'true');
48
- if (isset($_POST["readygraph_enable_sidebar"])) update_option('readygraph_enable_sidebar', 'false');
49
- if (isset($_POST["readygraph_auto_select_all"])) update_option('readygraph_auto_select_all', 'true');
50
- if (isset($_POST["readygraph_enable_branding"])) update_option('readygraph_enable_branding', 'false');
51
- if (isset($_POST["readygraph_send_blog_updates"])) update_option('readygraph_send_blog_updates', 'true');
52
- if (isset($_POST["readygraph_send_real_time_post_updates"])) update_option('readygraph_send_real_time_post_updates', 'false');
53
- if (isset($_POST["readygraph_popup_template"])) update_option('readygraph_popup_template', 'default-template');
54
  update_option('readygraph_upgrade_notice', 'true');
55
  update_option('readygraph_tutorial',"true");
 
 
56
  }
57
  else {
58
  }
@@ -171,7 +173,7 @@ If you have questions or concerns contact us anytime at <a href="mailto:info@rea
171
  </li>
172
  <li>Basic Settings
173
  <ul>
174
- <li><a href="#">Site Profile</a></li>
175
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
176
  </ul>
177
  </li>
@@ -190,13 +192,31 @@ If you have questions or concerns contact us anytime at <a href="mailto:info@rea
190
  <?php if(get_option('readygraph_tutorial') && get_option('readygraph_tutorial') == "true"){ ?>
191
  <div class="tutorial-true" style="margin: 5% auto;">
192
  <h3 style="font-weight: normal; text-align: center;"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/check.png"/>Congratulations! <?php echo $main_plugin_title; ?>'s ReadyGraph growth engine is now active.</h3>
193
- <h3 style="font-weight: normal; text-align: center;">Consider going premium to grow even faster!</h3>
194
- <div style="width: 60%; margin: 0 auto;"><h4 class="rg-h4"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/round-check.png" class="rg-small-icon"/>Your site promoted to 10,000 New Users Every Month in our Community Email Update</h4>
195
- <h4 class="rg-h4"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/round-check.png" class="rg-small-icon"/>Unlimited Viral Email/Facebook Invites</h4>
196
- <h4 class="rg-h4"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/round-check.png" class="rg-small-icon"/>Unlimited Blog Post Notifications and More!</h4>
197
-
198
- <div class="save-changes" style="font-weight: normal; text-align: center;"><a class="btn btn-large btn-warning save-next" href="https://readygraph.com/accounts/payment/?email=<?php echo get_option('readygraph_email', '') ?>" target="_blank" style="margin: 15px">Learn more about Premium</a><br>
 
 
 
 
 
 
199
  <strong>Or take <a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=signup-popup&source=basic-settings">the tutorial</a> to customize your ReadyGraph settings</strong>
 
 
 
 
 
 
 
 
 
 
 
 
200
  </div></div>
201
  </div>
202
  <?php } else { ?>
@@ -281,6 +301,36 @@ If you have questions or concerns contact us anytime at <a href="mailto:info@rea
281
  </form>
282
  <script type="text/javascript" src="https://readygraph.com/scripts/readygraph.js"></script>
283
  <script type="text/javascript" charset="utf-8">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  function popup_position(n){
285
  <?php $current_url = explode("&", $_SERVER['REQUEST_URI']); ?>
286
  if(n.selectedIndex === 0){
45
  if (isset($_POST["readygraph_delay"])) update_option('readygraph_delay', 10000);
46
  if (isset($_POST["readygraph_enable_notification"])) update_option('readygraph_enable_notification', 'true');
47
  if (isset($_POST["readygraph_enable_popup"])) update_option('readygraph_enable_popup', 'true');
48
+ update_option('readygraph_enable_sidebar', 'false');
49
+ update_option('readygraph_auto_select_all', 'true');
50
+ update_option('readygraph_enable_branding', 'false');
51
+ update_option('readygraph_send_blog_updates', 'true');
52
+ update_option('readygraph_send_real_time_post_updates', 'false');
53
+ update_option('readygraph_popup_template', 'default-template');
54
  update_option('readygraph_upgrade_notice', 'true');
55
  update_option('readygraph_tutorial',"true");
56
+ $site_url = site_url();
57
+ update_option('readygraph_site_url', $site_url);
58
  }
59
  else {
60
  }
173
  </li>
174
  <li>Basic Settings
175
  <ul>
176
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
177
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
178
  </ul>
179
  </li>
192
  <?php if(get_option('readygraph_tutorial') && get_option('readygraph_tutorial') == "true"){ ?>
193
  <div class="tutorial-true" style="margin: 5% auto;">
194
  <h3 style="font-weight: normal; text-align: center;"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/check.png"/>Congratulations! <?php echo $main_plugin_title; ?>'s ReadyGraph growth engine is now active.</h3>
195
+
196
+ <div style="width: 45%; margin: 1% 1% 0 10%; float: left">
197
+ <h3 style="font-weight: normal;color: grey;">Step 1: Choose a plan for exposure to more new users!</h3>
198
+ <div class="rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/round-check.png" class="rg-small-icon"/></div>
199
+ <h4 class="rg-h4">Cross promotion to thousands of users</h4><p class="rg-icon-content">Get promoted through our community emails and your own site SEO page on UserBase.com</p>
200
+ <div class="rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/round-check.png" class="rg-small-icon"/></div>
201
+ <h4 class="rg-h4">Let users vote up your content</h4><p class="rg-icon-content">Add vote buttons in your site post emails. Top voted posts featured on UserBase.com</p>
202
+ <div class="rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/round-check.png" class="rg-small-icon"/></div>
203
+ <h4 class="rg-h4">Content recommendations</h4><p class="rg-icon-content">As a member of our cross promotion network, your users discover valuable content from related sites</p>
204
+ <div class="rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/round-check.png" class="rg-small-icon"/></div>
205
+ <h4 class="rg-h4">Full set of growth tools</h4><p class="rg-icon-content">Optimized signup form, viral invites, site update emails, and more!</p>
206
+ <?php /* ?><!--<div class="save-changes" style="font-weight: normal; text-align: center;"><a class="btn btn-large btn-warning save-next" href="https://readygraph.com/accounts/payment/?email=<?php echo get_option('readygraph_email', '') ?>" target="_blank" style="margin: 15px">Learn more about Premium</a><br>
207
  <strong>Or take <a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=signup-popup&source=basic-settings">the tutorial</a> to customize your ReadyGraph settings</strong>
208
+ </div><?php */ ?> </div>
209
+ <div style="width: 25%; margin: 1% 5% 0 0; float: left; background: #F0F0F0; border-radius: 15px;padding: 1% 2% 1% 1%"><h4 class="rg-h4">Select your plan</h4>
210
+ <div style="margin: 10px;"><div class="rg-icon-thumb"><input type="radio" name="select-plan" value="promote_free" style="font-weight: bold; margin: 12px 0" checked></div><p class="rg-icon-content"><strong>Free - Stick with the Basic Plan</strong> </input><br><span style="margin-top: -12px">Basic tools, Promotion if content ranks highly</span></p></div>
211
+ <div style="margin: 10px;"><div class="rg-icon-thumb"><input type="radio" name="select-plan" value="promote_19" style="font-weight: bold; margin: 12px 0"></div><p class="rg-icon-content"><strong>Get promoted to 2000 users monthly</strong></input><br><span style="margin-top: -12px">$19/month</span></p></div>
212
+ <div style="margin: 10px;"><div class="rg-icon-thumb"><input type="radio" name="select-plan" value="promote_59" style="font-weight: bold; margin: 12px 0"></div><p class="rg-icon-content"><strong>Get promoted to 20,000 users monthly</strong></input><br><span style="margin-top: -12px">$59/month</span></p></div>
213
+ <div style="margin: 10px;"><div class="rg-icon-thumb"><input type="radio" name="select-plan" value="promote_149" style="font-weight: bold; margin: 12px 0"></div><p class="rg-icon-content"><strong>Get promoted to 100,000 users monthly</strong></input><br><span style="margin-top: -12px">$149/month</span></p></div>
214
+ <div style="margin: 10px;"><div class="rg-icon-thumb"><input type="radio" name="select-plan" value="promote_no" style="font-weight: bold; margin: 12px 0"></div><p class="rg-icon-content"><strong>Don't promote my site</strong></input><br><span style="margin-top: -12px">Opt out of cross promotion network</span></p></div>
215
+ <div class="rg-icon-thumb" style="margin: 10px;width:100%"><input type="checkbox" id="plan-type" name="plan-type" value="annual" style="font-weight: bold">&nbsp;&nbsp; Save 20% with an annual plan</input></div>
216
+ <?php /* ?><button type="button" onclick="subscribe_readygraph()">Form gets submitted</button>
217
+ <div class="save-changes" style="font-weight: normal; text-align: center;"><a class="btn btn-large btn-warning save-next" href="https://readygraph.com/accounts/payment/?email=<?php echo get_option('readygraph_email', '') ?>&payment-plan=" target="_blank" style="margin: 15px">Continue</a><br> <?php */ ?>
218
+ <div class="save-changes" style="font-weight: normal; text-align: center;"><a class="btn btn-large btn-warning save-next" href="#" style="margin: 15px" onclick="subscribe_readygraph()">Continue</a><br>
219
+ <?php /* ?><strong>Or take <a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=signup-popup&source=basic-settings">the tutorial</a> to customize your ReadyGraph settings</strong><?php */ ?>
220
  </div></div>
221
  </div>
222
  <?php } else { ?>
301
  </form>
302
  <script type="text/javascript" src="https://readygraph.com/scripts/readygraph.js"></script>
303
  <script type="text/javascript" charset="utf-8">
304
+ function subscribe_readygraph() {
305
+ var radios = document.getElementsByName("select-plan");
306
+ if (document.getElementById('plan-type').checked) {
307
+ annual="true";
308
+ } else {
309
+ annual="false";
310
+ }
311
+
312
+ for (var i = 0; i < radios.length; i++) {
313
+ if (radios[i].checked) {
314
+ plan = radios[i].value;
315
+ //alert(radios[i].value);
316
+ break;
317
+ }
318
+ }
319
+
320
+ var current_url = document.URL;
321
+ var new_url = current_url.slice(0, -28);
322
+ url = 'https://readygraph.com/accounts/payment/?email=<?php echo get_option('readygraph_email', '') ?>&payment_plan='+plan+'&is_annual='+annual+'&redirect_uri='+encodeURIComponent(new_url+'site-profile');
323
+ current_url = new_url+'site-profile';
324
+ if (plan === "promote_free"){
325
+ window.location.href = current_url;
326
+ }
327
+ else{
328
+ var win=window.open(url, '_blank');
329
+ window.open(current_url, '_self');
330
+ window.location.href = current_url;
331
+ win.focus();
332
+ }
333
+ }
334
  function popup_position(n){
335
  <?php $current_url = explode("&", $_SERVER['REQUEST_URI']); ?>
336
  if(n.selectedIndex === 0){
extension/readygraph/assets/css/admin.css CHANGED
@@ -152,4 +152,16 @@ color: #b1c1ca;
152
  }
153
  .rg-signup-icon{
154
  margin: 5px;
 
 
 
 
 
 
 
 
 
 
 
 
155
  }
152
  }
153
  .rg-signup-icon{
154
  margin: 5px;
155
+ }
156
+ .rg-icon-thumb {
157
+ float: left;
158
+ }
159
+ .rg-icon-thumb img {
160
+ display: block;
161
+ }
162
+ .rg-icon-content {
163
+ margin-left: 25px;
164
+ }
165
+ .site_category select{
166
+ margin: 5px;
167
  }
extension/readygraph/assets/js/jquery.dependent-selects.js ADDED
@@ -0,0 +1,278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Generated by CoffeeScript 1.6.3
2
+ /*
3
+ # jQuery Dependent Selects v1.2.2
4
+ # Copyright 2012 Mark J Smith, Simpleweb
5
+ # Details on http://github.com/simpleweb/jquery-dependent-selects
6
+ */
7
+
8
+ (function($) {
9
+ return $.fn.dependentSelects = function(options) {
10
+ var clearAllSelectsByParent, createNewSelect, createSelectId, findSelectParent, hideSelect, insertLabel, insertPlaceholderSelect, labelAtDepth, placeholderOptionAtDepth, placeholderSelectAtDepth, prepareSelect, selectChange, selectPreSelected, selectedOption, showSelect, splitOptionName;
11
+ if (options == null) {
12
+ options = {};
13
+ }
14
+ options = $.extend({
15
+ 'separator': ' > ',
16
+ 'placeholderOption': '',
17
+ 'placeholderSelect': false,
18
+ 'class': false,
19
+ 'labels': false
20
+ }, options);
21
+ createSelectId = function() {
22
+ var int;
23
+ int = parseInt(Math.random() * 1000);
24
+ if ($("[data-dependent-id='" + int + "']").length > 0) {
25
+ return createSelectId();
26
+ } else {
27
+ return int;
28
+ }
29
+ };
30
+ splitOptionName = function($option) {
31
+ var array, i, item, _i, _len;
32
+ array = $.map($option.text().split(options.separator), function(valuePart) {
33
+ return $.trim(valuePart);
34
+ });
35
+ i = 0;
36
+ for (_i = 0, _len = array.length; _i < _len; _i++) {
37
+ item = array[_i];
38
+ if (item === '') {
39
+ array.splice(i, 1);
40
+ i--;
41
+ }
42
+ i++;
43
+ }
44
+ return array;
45
+ };
46
+ placeholderSelectAtDepth = function(depth, $select) {
47
+ var placeholder, text;
48
+ depth--;
49
+ placeholder = options.placeholderSelect;
50
+ if (placeholder) {
51
+ if (placeholder === true) {
52
+ placeholder = $select.data('dependent-select-placeholders');
53
+ }
54
+ if (typeof placeholder === 'object') {
55
+ if (placeholder[depth]) {
56
+ text = placeholder[depth];
57
+ } else {
58
+ text = placeholder[placeholder.length - 1];
59
+ }
60
+ } else {
61
+ text = placeholder;
62
+ }
63
+ return $("<select disabled><option>" + text + "</option></select>").attr({
64
+ 'data-dependent-depth': depth + 1,
65
+ 'data-dependent-placeholder': true,
66
+ 'data-dependent-id': $select.attr('data-dependent-id')
67
+ });
68
+ }
69
+ };
70
+ placeholderOptionAtDepth = function(depth) {
71
+ var placeholder, text;
72
+ depth--;
73
+ placeholder = options.placeholderOption;
74
+ if (typeof placeholder === 'object') {
75
+ if (placeholder[depth]) {
76
+ text = placeholder[depth];
77
+ } else {
78
+ text = placeholder[placeholder.length - 1];
79
+ }
80
+ } else {
81
+ text = placeholder;
82
+ }
83
+ return $("<option>" + text + "</option>");
84
+ };
85
+ labelAtDepth = function(depth, $select) {
86
+ var labels;
87
+ depth--;
88
+ labels = options.labels;
89
+ if (labels) {
90
+ if (labels === true) {
91
+ labels = $select.data('dependent-labels');
92
+ }
93
+ if (labels[depth]) {
94
+ return labels[depth];
95
+ } else {
96
+ return labels[labels.length - 1];
97
+ }
98
+ } else {
99
+ return false;
100
+ }
101
+ };
102
+ hideSelect = function($select) {
103
+ var label, placeholder_select, select_depth, select_id;
104
+ select_id = $select.attr('data-dependent-id');
105
+ select_depth = $select.attr('data-dependent-depth');
106
+ placeholder_select = $("select[data-dependent-placeholder][data-dependent-id='" + select_id + "'][data-dependent-depth='" + select_depth + "']");
107
+ label = $("label[data-dependent-id='" + select_id + "'][data-dependent-depth='" + select_depth + "']").hide();
108
+ if (placeholder_select.length > 0) {
109
+ placeholder_select.show();
110
+ label.show();
111
+ }
112
+ return $select.hide();
113
+ };
114
+ showSelect = function($select) {
115
+ var label, placeholder_select, select_depth, select_id;
116
+ select_id = $select.attr('data-dependent-id');
117
+ select_depth = $select.attr('data-dependent-depth');
118
+ placeholder_select = $("select[data-dependent-placeholder][data-dependent-id='" + select_id + "'][data-dependent-depth='" + select_depth + "']");
119
+ label = $("label[data-dependent-id='" + select_id + "'][data-dependent-depth='" + select_depth + "']").show();
120
+ if (placeholder_select.length > 0) {
121
+ placeholder_select.hide();
122
+ }
123
+ return $select.show();
124
+ };
125
+ insertLabel = function($select, $parent) {
126
+ var $label, label, select_depth, select_id;
127
+ if (label = labelAtDepth($select.attr('data-dependent-depth'), $select)) {
128
+ select_id = $select.attr('data-dependent-id');
129
+ select_depth = $select.attr('data-dependent-depth');
130
+ $label = $("<label>" + label + "</label>").attr({
131
+ 'data-dependent-id': select_id,
132
+ 'data-dependent-depth': select_depth
133
+ });
134
+ if (!($("label[data-dependent-id='" + select_id + "'][data-dependent-depth='" + select_depth + "']").length > 0)) {
135
+ if ($parent) {
136
+ return $parent.after($label);
137
+ } else {
138
+ return $select.before($label);
139
+ }
140
+ }
141
+ }
142
+ };
143
+ insertPlaceholderSelect = function($select, $parent) {
144
+ var $placeholderSelect, depth, select_id;
145
+ if ($placeholderSelect = placeholderSelectAtDepth($select.attr('data-dependent-depth'), $select)) {
146
+ select_id = $select.attr('data-dependent-id');
147
+ depth = $select.attr('data-dependent-depth');
148
+ if (!($("select[data-dependent-placeholder][data-dependent-id='" + select_id + "'][data-dependent-depth='" + depth + "']").length > 0)) {
149
+ return $select.before($placeholderSelect);
150
+ }
151
+ }
152
+ };
153
+ clearAllSelectsByParent = function($parent) {
154
+ return $(".dependent-sub[data-dependent-id='" + ($parent.attr('data-dependent-id')) + "']").each(function() {
155
+ if (parseInt($(this).attr('data-dependent-depth')) > parseInt($parent.attr('data-dependent-depth'))) {
156
+ $(this).find('option:first').attr('selected', 'selected');
157
+ return hideSelect($(this));
158
+ }
159
+ });
160
+ };
161
+ createNewSelect = function(name, $select, depth) {
162
+ var $currentSelect, $labels, $newSelect, select_id;
163
+ select_id = $select.attr('data-dependent-id');
164
+ if (($currentSelect = $("select[data-dependent-parent='" + name + "'][data-dependent-id='" + select_id + "']")).length > 0) {
165
+ return $currentSelect;
166
+ }
167
+ $newSelect = $('<select class="dependent-sub"/>').attr('data-dependent-parent', name).attr('data-dependent-depth', depth).attr('data-dependent-input-name', $select.attr('data-dependent-input-name')).attr('data-dependent-id', select_id).addClass(options["class"]).append(placeholderOptionAtDepth(depth));
168
+ if (options.labels === true) {
169
+ $newSelect.attr('data-dependent-labels', $select.attr('data-dependent-labels'));
170
+ }
171
+ if (options.placeholderSelect === true) {
172
+ $newSelect.attr('data-dependent-select-placeholders', $select.attr('data-dependent-select-placeholders'));
173
+ }
174
+ if (($labels = $("label[data-dependent-id='" + select_id + "'][data-dependent-depth='" + depth + "']")).length > 0) {
175
+ $newSelect.insertAfter($labels);
176
+ } else {
177
+ $newSelect.insertAfter($select);
178
+ }
179
+ insertLabel($newSelect, $select);
180
+ insertPlaceholderSelect($newSelect, $select);
181
+ return hideSelect($newSelect);
182
+ };
183
+ selectChange = function($select) {
184
+ var $sub, select_id, val, valName;
185
+ $("select[data-dependent-id='" + ($select.attr('data-dependent-id')) + "'][name]").removeAttr('name');
186
+ valName = $select.find(':selected').html();
187
+ val = $select.val();
188
+ select_id = $select.attr('data-dependent-id');
189
+ clearAllSelectsByParent($select);
190
+ if (($sub = $(".dependent-sub[data-dependent-parent='" + valName + "'][data-dependent-id='" + select_id + "']")).length > 0) {
191
+ showSelect($sub);
192
+ return $sub.attr('name', $select.attr('data-dependent-input-name'));
193
+ } else {
194
+ return $select.attr('name', $select.attr('data-dependent-input-name'));
195
+ }
196
+ };
197
+ selectedOption = function($select) {
198
+ var $selectedOption, val;
199
+ $selectedOption = $select.find('option:selected');
200
+ val = $selectedOption.val();
201
+ if (!(val === '' || val === placeholderOptionAtDepth($select.attr('data-dependent-depth')).val())) {
202
+ return $select.attr('data-dependent-selected-id', val);
203
+ }
204
+ };
205
+ findSelectParent = function($select) {
206
+ var $all_options, $selects;
207
+ $selects = $("select[data-dependent-id='" + ($select.attr('data-dependent-id')) + "']");
208
+ $all_options = $selects.find('option');
209
+ return $selects.filter(function() {
210
+ var vals;
211
+ vals = [];
212
+ $(this).find('option').each(function() {
213
+ return vals.push($(this).html() === $select.attr('data-dependent-parent'));
214
+ });
215
+ return $.inArray(true, vals) > -1;
216
+ });
217
+ };
218
+ selectPreSelected = function($select) {
219
+ var $all_options, $current_select, $selected_option, $selected_select, $selects, current_option_text, i, selected_id, _i, _ref;
220
+ if ((selected_id = $select.attr('data-dependent-selected-id'))) {
221
+ $selects = $("select[data-dependent-id='" + ($select.attr('data-dependent-id')) + "']");
222
+ $all_options = $selects.find('option');
223
+ $selected_option = $all_options.filter("[value='" + selected_id + "']");
224
+ $selected_select = $selected_option.closest('select');
225
+ $current_select = $selected_select;
226
+ current_option_text = $selected_option.html();
227
+ for (i = _i = _ref = parseInt($selected_select.attr('data-dependent-depth')); _ref <= 0 ? _i <= 0 : _i >= 0; i = _ref <= 0 ? ++_i : --_i) {
228
+ $current_select.find('option').each(function() {
229
+ if ($(this).html() === current_option_text) {
230
+ return $(this).attr('selected', 'selected');
231
+ } else {
232
+ return $(this).removeAttr('selected');
233
+ }
234
+ });
235
+ showSelect($current_select);
236
+ current_option_text = $current_select.attr('data-dependent-parent');
237
+ $current_select = findSelectParent($current_select);
238
+ }
239
+ return $selected_select.trigger('change');
240
+ }
241
+ };
242
+ prepareSelect = function($select, depth, select_id) {
243
+ var $options, name;
244
+ $select.attr('data-dependent-depth', depth).attr('data-dependent-id', select_id);
245
+ $options = $select.children('option');
246
+ $options.each(function() {
247
+ var $newOption, $option, $subSelect, name, val;
248
+ $option = $(this);
249
+ name = splitOptionName($option);
250
+ val = $option.val();
251
+ if (name.length > 1) {
252
+ $subSelect = createNewSelect(name[0], $select, depth + 1);
253
+ $newOption = $option.clone();
254
+ $newOption.html($.trim(splitOptionName($newOption).slice(1).join(options.separator)));
255
+ $subSelect.append($newOption);
256
+ $option.val('').html(name[0]).attr('data-dependent-name', name[0]);
257
+ if ($options.parent().find("[data-dependent-name='" + name[0] + "']").length > 1) {
258
+ $option.remove();
259
+ }
260
+ return prepareSelect($subSelect, depth + 1, select_id);
261
+ }
262
+ });
263
+ name = $select.attr('name');
264
+ selectChange($select);
265
+ return $select.off('change').on('change', function() {
266
+ return selectChange($select);
267
+ });
268
+ };
269
+ return this.each(function() {
270
+ var $select;
271
+ $select = $(this);
272
+ $select.attr('data-dependent-input-name', $select.attr('name'));
273
+ selectedOption($select);
274
+ prepareSelect($select, 0, createSelectId());
275
+ return selectPreSelected($select);
276
+ });
277
+ };
278
+ })(jQuery);
extension/readygraph/customize-emails.php CHANGED
@@ -151,7 +151,7 @@ If you have questions or concerns contact us anytime at <a href="mailto:info@rea
151
  </li>
152
  <li>Basic Settings
153
  <ul>
154
- <li><a href="#">Site Profile</a></li>
155
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
156
  </ul>
157
  </li>
151
  </li>
152
  <li>Basic Settings
153
  <ul>
154
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
155
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
156
  </ul>
157
  </li>
extension/readygraph/deactivate-readygraph.php CHANGED
@@ -185,7 +185,7 @@ If you have questions or concerns contact us anytime at <a href="mailto:info@rea
185
  </li>
186
  <li>Basic Settings
187
  <ul>
188
- <li><a href="#">Site Profile</a></li>
189
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
190
  </ul>
191
  </li>
185
  </li>
186
  <li>Basic Settings
187
  <ul>
188
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
189
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
190
  </ul>
191
  </li>
extension/readygraph/faq.php CHANGED
@@ -144,7 +144,7 @@ If you have questions or concerns contact us anytime at <a href="mailto:info@rea
144
  </li>
145
  <li>Basic Settings
146
  <ul>
147
- <li><a href="#">Site Profile</a></li>
148
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
149
  </ul>
150
  </li>
144
  </li>
145
  <li>Basic Settings
146
  <ul>
147
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
148
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
149
  </ul>
150
  </li>
extension/readygraph/go-premium.php CHANGED
@@ -167,7 +167,7 @@ If you have questions or concerns contact us anytime at <a href="mailto:info@rea
167
  </li>
168
  <li>Basic Settings
169
  <ul>
170
- <li><a href="#">Site Profile</a></li>
171
  <li><a href="<?php $current_url = explode("?", $_SERVER['REQUEST_URI']); echo $current_url[0];?>?page=readygraph-app&ac=feature-settings">Feature Settings</a></li>
172
  </ul>
173
  </li>
167
  </li>
168
  <li>Basic Settings
169
  <ul>
170
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
171
  <li><a href="<?php $current_url = explode("?", $_SERVER['REQUEST_URI']); echo $current_url[0];?>?page=readygraph-app&ac=feature-settings">Feature Settings</a></li>
172
  </ul>
173
  </li>
extension/readygraph/invitation-email-not-used.php CHANGED
@@ -148,7 +148,7 @@ If you have questions or concerns contact us anytime at <a href="mailto:info@rea
148
  </li>
149
  <li>Basic Settings
150
  <ul>
151
- <li><a href="#">Site Profile</a></li>
152
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
153
  </ul>
154
  </li>
148
  </li>
149
  <li>Basic Settings
150
  <ul>
151
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
152
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
153
  </ul>
154
  </li>
extension/readygraph/signup-popup.php CHANGED
@@ -24,7 +24,17 @@ s2_delete_rg_options();
24
  $dir = plugin_dir_path( __FILE__ );
25
  s2_rrmdir($dir);
26
  }
27
-
 
 
 
 
 
 
 
 
 
 
28
  if(isset($_GET["action"]) && base64_decode($_GET["action"]) == "changeaccount")s2_disconnectReadyGraph();
29
  if(isset($_GET["action"]) && base64_decode($_GET["action"]) == "deleteaccount")s2_deleteReadyGraph();
30
  if(isset($_GET["readygraph_upgrade_notice"]) && $_GET["readygraph_upgrade_notice"] == "dismiss") {update_option('readygraph_upgrade_notice', 'false');}
@@ -43,6 +53,13 @@ s2_rrmdir($dir);
43
  if (isset($_POST["readygraph_refresh_token"])) update_option('readygraph_refresh_token', $_POST["readygraph_refresh_token"]);
44
  if (isset($_POST["readygraph_email"])) update_option('readygraph_email', $_POST["readygraph_email"]);
45
  if (isset($_POST["readygraph_application_id"])) update_option('readygraph_application_id', $_POST["readygraph_application_id"]);
 
 
 
 
 
 
 
46
  if (isset($_POST["readygraph_settings"])) update_option('readygraph_settings', $_POST["readygraph_settings"]);
47
  if (isset($_POST["readygraph_delay"])) {
48
  update_option('readygraph_delay', $_POST["delay"]);
@@ -136,7 +153,7 @@ s2_rrmdir($dir);
136
  </li>
137
  <li>Basic Settings
138
  <ul>
139
- <li><a href="#">Site Profile</a></li>
140
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
141
  </ul>
142
  </li>
@@ -240,7 +257,7 @@ s2_rrmdir($dir);
240
  </div>
241
  <div class="save-changes"><?php if(get_option('readygraph_tutorial') && get_option('readygraph_tutorial') == "true"){ ?><button type="submit" class="btn btn-large btn-warning save-next" formaction="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=social-feed&source=signup-popup" style="float: right;margin: 15px">Save Changes & Next</button> <?php } ?>
242
  <button type="submit" class="btn btn-large btn-warning save" formaction="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=signup-popup" style="float: right;margin: 15px">Save Changes</button>
243
- <?php if(get_option('readygraph_tutorial') && get_option('readygraph_tutorial') == "true"){ ?><button type="submit" class="btn btn-large btn-warning save-previous" formaction="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=basic-settings&tutorial=true" style="float: right;margin: 15px">Previous</button> <?php } ?>
244
  </div>
245
  </div>
246
  </div>
24
  $dir = plugin_dir_path( __FILE__ );
25
  s2_rrmdir($dir);
26
  }
27
+ function siteprofile_sync(){
28
+ $app_id = get_option('readygraph_application_id');
29
+ $email = get_option('readygraph_email');
30
+ $site_name = get_option('readygraph_site_name');
31
+ $site_url = get_option('readygraph_site_url');
32
+ $site_description = get_option('readygraph_site_description');
33
+ $site_category = get_option('readygraph_site_category');
34
+ $site_language = get_option('readygraph_site_language');
35
+ $url = 'https://readygraph.com/api/v1/wordpress-sync-siteprofile/';
36
+ $response = wp_remote_post($url, array( 'body' => array('app_id' => $app_id, 'email' => $email, 'site_profile_name' => $site_name, 'site_profile_url' => $site_url, 'site_description' => $site_description, 'site_category' => $site_category, 'site_language' => $site_language)));
37
+ }
38
  if(isset($_GET["action"]) && base64_decode($_GET["action"]) == "changeaccount")s2_disconnectReadyGraph();
39
  if(isset($_GET["action"]) && base64_decode($_GET["action"]) == "deleteaccount")s2_deleteReadyGraph();
40
  if(isset($_GET["readygraph_upgrade_notice"]) && $_GET["readygraph_upgrade_notice"] == "dismiss") {update_option('readygraph_upgrade_notice', 'false');}
53
  if (isset($_POST["readygraph_refresh_token"])) update_option('readygraph_refresh_token', $_POST["readygraph_refresh_token"]);
54
  if (isset($_POST["readygraph_email"])) update_option('readygraph_email', $_POST["readygraph_email"]);
55
  if (isset($_POST["readygraph_application_id"])) update_option('readygraph_application_id', $_POST["readygraph_application_id"]);
56
+
57
+ if (isset($_POST["sitedesceditor"])) update_option('readygraph_site_description', $_POST["sitedesceditor"]);
58
+ if (isset($_POST["site_profile_name"])) update_option('readygraph_site_name', $_POST["site_profile_name"]);
59
+ if (isset($_POST["site_profile_url"])) update_option('readygraph_site_url', $_POST["site_profile_url"]);
60
+ if (isset($_POST["site_category"])) update_option('readygraph_site_category', $_POST["site_category"]);
61
+ if (isset($_POST["site_language"])) {update_option('readygraph_site_language', $_POST["site_language"]);siteprofile_sync();}
62
+
63
  if (isset($_POST["readygraph_settings"])) update_option('readygraph_settings', $_POST["readygraph_settings"]);
64
  if (isset($_POST["readygraph_delay"])) {
65
  update_option('readygraph_delay', $_POST["delay"]);
153
  </li>
154
  <li>Basic Settings
155
  <ul>
156
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
157
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
158
  </ul>
159
  </li>
257
  </div>
258
  <div class="save-changes"><?php if(get_option('readygraph_tutorial') && get_option('readygraph_tutorial') == "true"){ ?><button type="submit" class="btn btn-large btn-warning save-next" formaction="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=social-feed&source=signup-popup" style="float: right;margin: 15px">Save Changes & Next</button> <?php } ?>
259
  <button type="submit" class="btn btn-large btn-warning save" formaction="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=signup-popup" style="float: right;margin: 15px">Save Changes</button>
260
+ <?php if(get_option('readygraph_tutorial') && get_option('readygraph_tutorial') == "true"){ ?><button type="submit" class="btn btn-large btn-warning save-previous" formaction="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile" style="float: right;margin: 15px">Previous</button> <?php } ?>
261
  </div>
262
  </div>
263
  </div>
extension/readygraph/site-profile.php CHANGED
@@ -23,6 +23,17 @@ wp_remote_get( "http://readygraph.com/api/v1/tracking?event=uninstall_readygraph
23
  s2_delete_rg_options();
24
  $dir = plugin_dir_path( __FILE__ );
25
  s2_rrmdir($dir);
 
 
 
 
 
 
 
 
 
 
 
26
  }
27
 
28
  if(isset($_GET["action"]) && base64_decode($_GET["action"]) == "changeaccount")s2_disconnectReadyGraph();
@@ -39,15 +50,29 @@ s2_rrmdir($dir);
39
  if (isset($_POST["readygraph_email"])) update_option('readygraph_email', $_POST["readygraph_email"]);
40
  if (isset($_POST["readygraph_application_id"])) update_option('readygraph_application_id', $_POST["readygraph_application_id"]);
41
  if (isset($_POST["sitedesceditor"])) update_option('readygraph_site_description', $_POST["sitedesceditor"]);
42
- if (isset($_POST["site_name"])) update_option('readygraph_site_name', $_POST["site_name"]);
43
- if (isset($_POST["site_url"])) update_option('readygraph_site_url', $_POST["site_url"]);
44
-
45
-
 
 
 
46
  }
 
47
  ?>
48
 
49
  <link rel="stylesheet" type="text/css" href="<?php echo plugins_url( 'assets/css/admin.css', __FILE__ ) ?>">
50
  <script type="text/javascript" src="<?php echo plugins_url( 'assets/js/admin.js', __FILE__ ) ?>"></script>
 
 
 
 
 
 
 
 
 
 
51
  <form method="post" id="myForm">
52
  <input type="hidden" name="readygraph_access_token" value="<?php echo get_option('readygraph_access_token', '') ?>">
53
  <input type="hidden" name="readygraph_refresh_token" value="<?php echo get_option('readygraph_refresh_token', '') ?>">
@@ -55,6 +80,7 @@ s2_rrmdir($dir);
55
  <input type="hidden" name="readygraph_application_id" value="<?php echo get_option('readygraph_application_id', '') ?>">
56
 
57
 
 
58
  <style>a.help-tooltip {outline:none; }a.help-tooltip strong {line-height:30px;}a.help-tooltip:hover {text-decoration:none;} a.help-tooltip span { z-index:10;display:none; padding:14px 20px; margin-top:40px; margin-left:-150px; width:300px; line-height:16px;}a.help-tooltip:hover span{ display:inline; position:absolute; border:2px solid #FFF; background:#fff; text-align: justify; z-index:1000000000;}.callout {z-index:1000000000;position:absolute;border:0;top:-14px;left:120px;} /*CSS3 extras*/a.help-tooltip span{ border-radius:2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; -moz-box-shadow: 0px 0px 8px 4px #666; -webkit-box-shadow: 0px 0px 8px 4px #666; box-shadow: 0px 0px 8px 4px #666;}</style>
59
  <div class="authenticated" style="display: none;">
60
  <div style="background-color: #2961cb; min-width: 90%; height: 50px;margin-right: 1%;">
@@ -106,7 +132,7 @@ s2_rrmdir($dir);
106
  </li>
107
  <li>Basic Settings
108
  <ul>
109
- <li><a href="#">Site Profile</a></li>
110
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
111
  </ul>
112
  </li>
@@ -130,11 +156,260 @@ s2_rrmdir($dir);
130
  <h3 style="font-weight: normal; text-align: center;">Be sure your site profile is accurate!</h3>
131
  <h4 style="font-weight: normal; text-align: center;">This content is used in your site's features and emails</h4>
132
  <div style="margin: 0 5%;">
133
- <div style="display: block"><label for="site_profile_image_upload">Site Icon: </label> <input type="file" name="site_profile_image_upload" id="site_profile_image_upload" multiple="false" style="display: inline" /></div>
134
- <div style="display: block"><label for="site_profile_name">Site Name</label><input type="text" name="site_profile_name" id="site_profile_name" value="<?php echo get_option('readygraph_site_name');?>" style="display: inline" /></div>
135
- <div style="display: block"><label for="site_profile_url">Site URL</label><input type="text" name="site_profile_url" id="site_profile_url" value="<?php echo get_option('readygraph_site_url');?>" style="display: inline" /></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  <div style="display: block; width:50%">
137
- <label for="sitedesceditor">Site Description:</label><?php /**
138
 
139
  /**
140
  * Basic syntax
@@ -151,14 +426,16 @@ wp_editor( $content, $editor_id, $settings );
151
  ?>
152
  </div>
153
  </div>
154
- <div class="save-changes"><?php if(get_option('readygraph_tutorial') && get_option('readygraph_tutorial') == "true"){ ?><button type="submit" class="btn btn-large btn-warning save-next" formaction="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=customize-email" style="float: right;margin: 15px">Save Changes & Next</button><?php } ?>
 
155
  <button type="submit" class="btn btn-large btn-warning save" formaction="#" style="float: right;margin: 15px">Save Changes</button>
156
- <?php if(get_option('readygraph_tutorial') && get_option('readygraph_tutorial') == "true"){ ?><button type="submit" class="btn btn-large btn-warning save-previous" formaction="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=social-feed" style="float: right;margin: 15px">Previous</button> <?php } ?>
157
  </div>
158
  </div>
159
  </div>
160
  </form>
161
  <script type="text/javascript" src="https://readygraph.com/scripts/readygraph.js"></script>
 
162
  <script type="text/javascript" charset="utf-8">
163
  var $ = jQuery;
164
  $(function () {
@@ -240,12 +517,7 @@ wp_editor( $content, $editor_id, $settings );
240
  $('.email-address').text($('[name="readygraph_email"]').val());
241
 
242
  window.setup_readygraph($('[name="readygraph_application_id"]').val());
243
-
244
- //$('[name="readygraph_ad_format"][value="' + $('[name="_readygraph_ad_format"]').val() + '"]').parent().click();
245
- //$('[name="readygraph_ad_timing"][value="' + $('[name="_readygraph_ad_timing"]').val() + '"]').parent().click();
246
-
247
- //$('[name="readygraph_ad_delay"]').val($('[name="_readygraph_ad_delay"]').val());
248
- //$('[name="readygraph_ad_scroll"]').val($('[name="_readygraph_ad_scroll"]').val());
249
 
250
  $('.result').text('...');
251
  if ($('[name="readygraph_access_token"]').val()) {
23
  s2_delete_rg_options();
24
  $dir = plugin_dir_path( __FILE__ );
25
  s2_rrmdir($dir);
26
+ }
27
+ function siteprofile_sync(){
28
+ $app_id = get_option('readygraph_application_id');
29
+ $email = get_option('readygraph_email');
30
+ $site_name = get_option('readygraph_site_name');
31
+ $site_url = get_option('readygraph_site_url');
32
+ $site_description = get_option('readygraph_site_description');
33
+ $site_category = get_option('readygraph_site_category');
34
+ $site_language = get_option('readygraph_site_language');
35
+ $url = 'https://readygraph.com/api/v1/wordpress-sync-siteprofile/';
36
+ $response = wp_remote_post($url, array( 'body' => array('app_id' => $app_id, 'email' => $email, 'site_profile_name' => $site_name, 'site_profile_url' => $site_url, 'site_description' => $site_description, 'site_category' => $site_category, 'site_language' => $site_language)));
37
  }
38
 
39
  if(isset($_GET["action"]) && base64_decode($_GET["action"]) == "changeaccount")s2_disconnectReadyGraph();
50
  if (isset($_POST["readygraph_email"])) update_option('readygraph_email', $_POST["readygraph_email"]);
51
  if (isset($_POST["readygraph_application_id"])) update_option('readygraph_application_id', $_POST["readygraph_application_id"]);
52
  if (isset($_POST["sitedesceditor"])) update_option('readygraph_site_description', $_POST["sitedesceditor"]);
53
+ if (isset($_POST["site_profile_name"])) update_option('readygraph_site_name', $_POST["site_profile_name"]);
54
+ if (isset($_POST["site_profile_url"])) update_option('readygraph_site_url', $_POST["site_profile_url"]);
55
+ if (isset($_POST["site_category"])) update_option('readygraph_site_category', $_POST["site_category"]);
56
+ if (isset($_POST["site_language"])) update_option('readygraph_site_language', $_POST["site_language"]);
57
+ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
58
+ siteprofile_sync();
59
+ }
60
  }
61
+
62
  ?>
63
 
64
  <link rel="stylesheet" type="text/css" href="<?php echo plugins_url( 'assets/css/admin.css', __FILE__ ) ?>">
65
  <script type="text/javascript" src="<?php echo plugins_url( 'assets/js/admin.js', __FILE__ ) ?>"></script>
66
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
67
+ <script type="text/javascript" src="<?php echo plugins_url( 'assets/js/jquery.dependent-selects.js', __FILE__ ) ?>"></script>
68
+ <script type="text/javascript" charset="utf-8">
69
+ $(function(){
70
+ jQuery('.dependent-demo2').dependentSelects({
71
+ separator: '||',
72
+ placeholderOption: '-- Please Select --'
73
+ });
74
+ })
75
+ </script>
76
  <form method="post" id="myForm">
77
  <input type="hidden" name="readygraph_access_token" value="<?php echo get_option('readygraph_access_token', '') ?>">
78
  <input type="hidden" name="readygraph_refresh_token" value="<?php echo get_option('readygraph_refresh_token', '') ?>">
80
  <input type="hidden" name="readygraph_application_id" value="<?php echo get_option('readygraph_application_id', '') ?>">
81
 
82
 
83
+
84
  <style>a.help-tooltip {outline:none; }a.help-tooltip strong {line-height:30px;}a.help-tooltip:hover {text-decoration:none;} a.help-tooltip span { z-index:10;display:none; padding:14px 20px; margin-top:40px; margin-left:-150px; width:300px; line-height:16px;}a.help-tooltip:hover span{ display:inline; position:absolute; border:2px solid #FFF; background:#fff; text-align: justify; z-index:1000000000;}.callout {z-index:1000000000;position:absolute;border:0;top:-14px;left:120px;} /*CSS3 extras*/a.help-tooltip span{ border-radius:2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; -moz-box-shadow: 0px 0px 8px 4px #666; -webkit-box-shadow: 0px 0px 8px 4px #666; box-shadow: 0px 0px 8px 4px #666;}</style>
85
  <div class="authenticated" style="display: none;">
86
  <div style="background-color: #2961cb; min-width: 90%; height: 50px;margin-right: 1%;">
132
  </li>
133
  <li>Basic Settings
134
  <ul>
135
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
136
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
137
  </ul>
138
  </li>
156
  <h3 style="font-weight: normal; text-align: center;">Be sure your site profile is accurate!</h3>
157
  <h4 style="font-weight: normal; text-align: center;">This content is used in your site's features and emails</h4>
158
  <div style="margin: 0 5%;">
159
+ <!--<div style="display: block; margin: 10px;"><label for="site_profile_image_upload" style="width: 120px">Site Icon: </label> <input type="file" name="site_profile_image_upload" id="site_profile_image_upload" multiple="false" style="display: inline; margin: 0 0 0 120px" /></div>-->
160
+ <div style="display: block; margin: 10px;"><label for="site_profile_name" style="width: 120px">Site Name:</label><input type="text" name="site_profile_name" id="site_profile_name" value="<?php echo get_option('readygraph_site_name');?>" style="display: inline; margin: 0 0 0 120px" /></div>
161
+ <div style="display: block; margin: 10px;"><label for="site_profile_url" style="width: 120px">Site URL:</label><input type="text" name="site_profile_url" id="site_profile_url" value="<?php echo get_option('readygraph_site_url');?>" style="display: inline; margin: 0 0 0 120px" /></div>
162
+ <div class="site_category" style="display: block; margin: 10px;"><label for="site_category" style="width: 120px">Site Category:</label>
163
+ <select name="site_category" class="dependent-demo2" style="display: inline; margin: 0 0 0 116px" >
164
+ <option></option>
165
+ <option value="animation-comics">Arts and Entertainment||animation and comics</option>
166
+ <option value="architecture">Arts and Entertainment||architecture</option>
167
+ <option value="awards">Arts and Entertainment||awards</option>
168
+ <option value="celebritities-entertainment">Arts and Entertainment||celebritities and entertainment</option>
169
+ <option value="fashion-modeling">Arts and Entertainment||fashion and modeling</option>
170
+ <option value="humor">Arts and Entertainment||humor</option>
171
+ <option value="movies">Arts and Entertainment||movies</option>
172
+ <option value="music-audio">Arts and Entertainment||music and audio</option>
173
+ <option value="performing-arts">Arts and Entertainment||performing arts</option>
174
+ <option value="photography">Arts and Entertainment||photography</option>
175
+ <option value="TV-video">Arts and Entertainment||TV and video</option>
176
+ <option value="web-design">Arts and Entertainment||web design</option>
177
+
178
+ <option value="automotive-industry">Autos and Vehicles||automotive industry</option>
179
+ <option value="automotive-news">Autos and Vehicles||automotive news</option>
180
+ <option value="aviation">Autos and Vehicles||aviation</option>
181
+ <option value="boating">Autos and Vehicles||boating</option>
182
+ <option value="car-buying">Autos and Vehicles||car buying</option>
183
+ <option value="car-rentals">Autos and Vehicles||car rentals</option>
184
+ <option value="makes-model">Autos and Vehicles||makes and models</option>
185
+ <option value="motorcycles">Autos and Vehicles||motorcycles</option>
186
+ <option value="motorsports">Autos and Vehicles||motorsports</option>
187
+ <option value="trains-railroads">Autos and Vehicles||trains and railroads</option>
188
+
189
+ <option value="beauty">Beauty and Fitness||Beauty</option>
190
+ <option value="bodyart">Beauty and Fitness||bodyart</option>
191
+ <option value="cosmetics">Beauty and Fitness||cosmetics</option>
192
+ <option value="fitness">Beauty and Fitness||fitness</option>
193
+ <option value="hair">Beauty and Fitness||hair</option>
194
+ <option value="skin-care">Beauty and Fitness||skin care</option>
195
+ <option value="weight-loss">Beauty and Fitness||weight loss</option>
196
+
197
+ <option value="book-retailers">Books and Literature||book retailers</option>
198
+ <option value="E-books">Books and Literature||E books</option>
199
+ <option value="folklore">Books and Literature||folklore</option>
200
+ <option value="guides-reviews">Books and Literature||guides and reviews</option>
201
+
202
+ <option value="accounting">Business and Industry||accounting</option>
203
+ <option value="aerospace-defense">Business and Industry||aerospace and defense</option>
204
+ <option value="agriculture-forestry">Business and Industry||agriculture and forestry</option>
205
+ <option value="associations">Business and Industry||associations</option>
206
+ <option value="biotechnology-pharmaceutical">Business and Industry||biotechnology and pharmaceutical</option>
207
+ <option value="business-services">Business and Industry||business services</option>
208
+ <option value="chemicals">Business and Industry||chemicals</option>
209
+ <option value="e-commerce">Business and Industry||E commerce</option>
210
+ <option value="energy">Business and Industry||energy</option>
211
+ <option value="industrial-goods-services">Business and Industry||industrial goods and services</option>
212
+ <option value="marketing-advertising">Business and Industry||marketing and advertising</option>
213
+ <option value="metals-mining">Business and Industry||metals and mining</option>
214
+ <option value="publishing-printing">Business and Industry||publishing and printing</option>
215
+ <option value="real-estate">Business and Industry||real estate</option>
216
+ <option value="textiles-nonwovens">Business and Industry||textiles and nonwovens</option>
217
+ <option value="transportation-logistics">Business and Industry||transportation and logistics</option>
218
+ <option value="wholesale-trade">Business and Industry||wholesale trade</option>
219
+
220
+ <option value="business-training">Career and Education||business training</option>
221
+ <option value="education">Career and Education||education</option>
222
+ <option value="human-resources">Career and Education||human resources</option>
223
+ <option value="jobs-employment">Career and Education||jobs and employment</option>
224
+ <option value="universities-colleges">Career and Education||universities and colleges</option>
225
+
226
+ <option value="computer hardware">Computer and Electronics||computer hardware</option>
227
+ <option value="computer security">Computer and Electronics||computer security</option>
228
+ <option value="consumer electronics">Computer and Electronics||consumer electronics</option>
229
+ <option value="graphics and multimedia tools">Computer and Electronics||graphics and multimedia tools</option>
230
+ <option value="mobile computing">Computer and Electronics||mobile computing</option>
231
+ <option value="networking">Computer and Electronics||networking</option>
232
+ <option value="programming">Computer and Electronics||programming</option>
233
+ <option value="software">Computer and Electronics||software</option>
234
+
235
+ <option value="banking">Finance||banking</option>
236
+ <option value="credit-loans-mortgages">Finance||credit, loans and mortgages</option>
237
+ <option value="financial-management">Finance||financial management</option>
238
+ <option value="grants-scholarships">Finance||grants and scholarships</option>
239
+ <option value="insurance">Finance||insurance</option>
240
+ <option value="investing">Finance||investing</option>
241
+
242
+ <option value="beverages">Food and Beverage||beverages</option>
243
+ <option value="catering">Food and Beverage||catering</option>
244
+ <option value="cooking-recipes">Food and Beverage||cooking and recipes</option>
245
+ <option value="food-grocery-retailers">Food and Beverage||food and grocery retailers</option>
246
+ <option value="vegitarian-vegan">Food and Beverage||vegetarian and vegan</option>
247
+
248
+ <option value="bingo">Gambling||bingo</option>
249
+ <option value="casinos">Gambling||casinos</option>
250
+ <option value="lottery">Gambling||lottery</option>
251
+ <option value="poker">Gambling||poker</option>
252
+ <option value="regulation-organizations">Gambling||regulation and organizations</option>
253
+ <option value="sports">Gambling||sports</option>
254
+
255
+ <option value="board-card-games">Games||board and card games</option>
256
+ <option value="miniatures">Games||miniatures</option>
257
+ <option value="online">Games||online</option>
258
+ <option value="puzzles-brainteasers">Games||puzzles and brainteasers</option>
259
+ <option value="roleplaying">Games||roleplaying</option>
260
+ <option value="video-games">Games||video games</option>
261
+
262
+ <option value="addictions">Health||addictions</option>
263
+ <option value="alternative-natural-medicine">Health||alternative natural medicine</option>
264
+ <option value="child-health">Health||child health</option>
265
+ <option value="conditions-diseases">Health||conditions and diseases</option>
266
+ <option value="education-resources">Health||education and resources</option>
267
+ <option value="healthcare-industry">Health||healthcare industry</option>
268
+ <option value="medicine">Health||medicine</option>
269
+ <option value="men-health">Health||men's health</option>
270
+ <option value="mental-health">Health||mental health</option>
271
+ <option value="nutrition">Health||nutrition</option>
272
+ <option value="pharmacy">Health||pharmacy</option>
273
+ <option value="products-shopping">Health||products and shopping</option>
274
+ <option value="public-health-safety">Health||public health and safety</option>
275
+ <option value="reproductive-health">Health||reproductive health</option>
276
+
277
+ <option value="gardening">Home and Garden||gardening</option>
278
+ <option value="home-improvement">Home and Garden||home improvement</option>
279
+ <option value="interior-decor">Home and Garden||interior décor</option>
280
+ <option value="moving-relocating">Home and Garden||moving and relocating</option>
281
+ <option value="nursery-playroom">Home and Garden||nursery and playroom</option>
282
+
283
+ <option value="ad-network">Internet and Telecom||ad network</option>
284
+ <option value="chat-forums">Internet and Telecom||chat and forums</option>
285
+ <option value="domain-names-register">Internet and Telecom||domain names and register</option>
286
+ <option value="email">Internet and Telecom||email</option>
287
+ <option value="file-sharing">Internet and Telecom||file sharing</option>
288
+ <option value="search-engine">Internet and Telecom||search engine</option>
289
+ <option value="social-network">Internet and Telecom||social network</option>
290
+ <option value="telecommunications">Internet and Telecom||telecommunications</option>
291
+ <option value="web-hosting">Internet and Telecom||web hosting</option>
292
+ <option value="content">Internet and Telecom||content</option>
293
+
294
+ <option value="government">Law and Government||government</option>
295
+ <option value="immigration-visas">Law and Government||immigration and visas</option>
296
+ <option value="law">Law and Government||law</option>
297
+ <option value="military-defense">Law and Government||military and defense</option>
298
+
299
+ <option value="news">News and Media||news</option>
300
+ <option value="business-news">News and Media||business news</option>
301
+ <option value="college-university-press">News and Media||college and university press</option>
302
+ <option value="magazines-ezines">News and Media||magazines and E-zines</option>
303
+ <option value="newspapers">News and Media||newspapers</option>
304
+ <option value="sports-news">News and Media||sports news</option>
305
+ <option value="technology-news">News and Media||technology news</option>
306
+ <option value="weather">News and Media||weather</option>
307
+
308
+ <option value="crime-prosecution">People and Society||crime and prosecution</option>
309
+ <option value="death">People and Society||death</option>
310
+ <option value="disabled and special needs">People and Society||disabled and special needs</option>
311
+ <option value="gay-lesbian-bisexual">People and Society||gay, lesbian, and bisexual</option>
312
+ <option value="genealogy">People and Society||genealogy</option>
313
+ <option value="history">People and Society||history</option>
314
+ <option value="holidays">People and Society||holidays</option>
315
+ <option value="philanthropy">People and Society||philanthropy</option>
316
+ <option value="philosophy">People and Society||philosophy</option>
317
+ <option value="relationships-dating">People and Society||relationships and dating</option>
318
+ <option value="religion-spirituality">People and Society||religion and spirituality</option>
319
+ <option value="women-interests">People and Society||women's interests</option>
320
+ <option value="personal-blog">People and Society||personal blog</option>
321
+
322
+ <option value="animal-products-services">Pets and Animals||animal products and services</option>
323
+ <option value="birds">Pets and Animals||birds</option>
324
+ <option value="fish-aquaria">Pets and Animals||fish and aquaria</option>
325
+ <option value="horses">Pets and Animals||horses</option>
326
+ <option value="pets">Pets and Animals||pets</option>
327
+
328
+ <option value="antiques">Recreation and Hobbies||antiques</option>
329
+ <option value="camps">Recreation and Hobbies||camps</option>
330
+ <option value="climbing">Recreation and Hobbies||climbing</option>
331
+ <option value="collecting">Recreation and Hobbies||collecting</option>
332
+ <option value="crafts">Recreation and Hobbies||crafts</option>
333
+ <option value="models">Recreation and Hobbies||models</option>
334
+ <option value="nudism">Recreation and Hobbies||nudism</option>
335
+ <option value="outdoors">Recreation and Hobbies||outdoors</option>
336
+ <option value="scouting">Recreation and Hobbies||scouting</option>
337
+ <option value="theme-parks">Recreation and Hobbies||theme parks</option>
338
+ <option value="tobacco">Recreation and Hobbies||tobacco</option>
339
+
340
+ <option value="archives">Reference||archives</option>
341
+ <option value="ask-expert">Reference||ask an expert</option>
342
+ <option value="dictionary-encyclopaedia">Reference||dictionary and encyclopaedia</option>
343
+ <option value="directories">Reference||directories</option>
344
+ <option value="libraries-museums">Reference||libraries and museums</option>
345
+ <option value="maps">Reference||maps</option>
346
+
347
+ <option value="agriculture">Science||agriculture</option>
348
+ <option value="astronomy">Science||astronomy</option>
349
+ <option value="biology">Science||biology</option>
350
+ <option value="chemistry">Science||chemistry</option>
351
+ <option value="earth-sciences">Science||earth sciences</option>
352
+ <option value="educational-resources">Science||educational resources</option>
353
+ <option value="engineering-technology">Science||engineering and technology</option>
354
+ <option value="environment">Science||environment</option>
355
+ <option value="instruments-supplies">Science||instruments and supplies</option>
356
+ <option value="math">Science||math</option>
357
+ <option value="physics">Science||physics</option>
358
+ <option value="social-sciences">Science||social sciences</option>
359
+
360
+ <option value="antiques-collectibles">Shopping||antiques and collectibles</option>
361
+ <option value="auctions">Shopping||auctions</option>
362
+ <option value="children">Shopping||children</option>
363
+ <option value="classifieds">Shopping||classifieds</option>
364
+ <option value="clothing">Shopping||clothing</option>
365
+ <option value="consumer-electronics">Shopping||consumer electronics</option>
366
+ <option value="coupons">Shopping||coupons</option>
367
+ <option value="ethnic-regional">Shopping||ethnic and regional</option>
368
+ <option value="flowers">Shopping||flowers</option>
369
+ <option value="furniture">Shopping||furniture</option>
370
+ <option value="general-merchandise">Shopping||general merchandise</option>
371
+ <option value="gifts">Shopping||gifts</option>
372
+ <option value="home-garden">Shopping||home and garden</option>
373
+ <option value="jewellery">Shopping||jewellery</option>
374
+ <option value="music">Shopping||music</option>
375
+ <option value="office-products">Shopping||office products</option>
376
+ <option value="publications">Shopping||publications</option>
377
+ <option value="sports">Shopping||sports</option>
378
+ <option value="weddings">Shopping||weddings</option>
379
+
380
+ <option value="baseball">Sports||baseball</option>
381
+ <option value="basketball">Sports||basketball</option>
382
+ <option value="coxing">Sports||coxing</option>
383
+ <option value="cycling-biking">Sports||cycling and biking</option>
384
+ <option value="equestrian">Sports||equestrian</option>
385
+ <option value="extreme-sports">Sports||extreme sports</option>
386
+ <option value="fantasy-sports">Sports||fantasy sports</option>
387
+ <option value="fishing">Sports||fishing</option>
388
+ <option value="football">Sports||football</option>
389
+ <option value="golf">Sports||golf</option>
390
+ <option value="martial-arts">Sports||martial arts</option>
391
+ <option value="rugby">Sports||rugby</option>
392
+ <option value="running">Sports||running</option>
393
+ <option value="soccer">Sports||soccer</option>
394
+ <option value="tennis">Sports||tennis</option>
395
+ <option value="volleyball">Sports||volleyball</option>
396
+ <option value="water-sports">Sports||water sports</option>
397
+ <option value="winter-sports">Sports||winter sports</option>
398
+
399
+ <option value="accommodation-hotels">Travel||accommodation and hotels</option>
400
+ <option value="airlines-airports">Travel||airlines and airports</option>
401
+ <option value="roads-highways">Travel||roads and highways</option>
402
+ <option value="tourism">Travel||tourism</option>
403
+
404
+ <option value="adult">Adult</option>
405
+
406
+
407
+
408
+ </select></div>
409
+ <div class="site_language" style="display: block; margin: 10px;"><label for="site_language" style="width: 120px">Choose your Site language:</label>
410
+ <select name="site_language" id="site_language" style="display: inline; margin: 0 0 0 116px" ><option value="af">Afrikaans</option> <option value="am">Amharic - ‪አማርኛ‬</option> <option value="ar">Arabic - ‫العربية‬</option> <option value="eu">Basque - ‪euskara‬</option> <option value="bn">Bengali - ‪বাংলা‬</option> <option value="bg">Bulgarian - ‪български‬</option> <option value="ca">Catalan - ‪català‬</option> <option value="zh-HK">Chinese (Hong Kong) - ‪中文(香港)‬</option> <option value="zh-CN">Chinese (Simplified) - ‪简体中文‬</option> <option value="zh-TW">Chinese (Traditional) - ‪繁體中文‬</option> <option value="hr">Croatian - ‪Hrvatski‬</option> <option value="cs">Czech - ‪Čeština‬</option> <option value="da">Danish - ‪Dansk‬</option> <option value="nl">Dutch - ‪Nederlands‬</option> <option value="en-GB">English (United Kingdom)</option> <option value="en">English (United States)</option> <option value="et">Estonian - ‪eesti‬</option> <option value="fil">Filipino</option> <option value="fi">Finnish - ‪Suomi‬</option> <option value="fr-CA">French (Canada) - ‪Français (Canada)‬</option> <option value="fr">French (France) - ‪Français (France)‬</option> <option value="gl">Galician - ‪galego‬</option> <option value="de">German - ‪Deutsch‬</option> <option value="el">Greek - ‪Ελληνικά‬</option> <option value="gu">Gujarati - ‪ગુજરાતી‬</option> <option value="iw">Hebrew - ‫עברית‬</option> <option value="hi">Hindi - ‪हिन्दी‬</option> <option value="hu">Hungarian - ‪magyar‬</option> <option value="is">Icelandic - ‪íslenska‬</option> <option value="id">Indonesian - ‪Bahasa Indonesia‬</option> <option value="it">Italian - ‪Italiano‬</option> <option value="ja">Japanese - ‪日本語‬</option> <option value="kn">Kannada - ‪ಕನ್ನಡ‬</option> <option value="ko">Korean - ‪한국어‬</option> <option value="lv">Latvian - ‪latviešu‬</option> <option value="lt">Lithuanian - ‪lietuvių‬</option> <option value="ms">Malay - ‪Bahasa Melayu‬</option> <option value="ml">Malayalam - ‪മലയാളം‬</option> <option value="mr">Marathi - ‪मराठी‬</option> <option value="no">Norwegian - ‪norsk‬</option> <option value="or">Oriya - ‪ଓଡ଼ିଆ‬</option> <option value="fa">Persian - ‫فارسی‬</option> <option value="pl">Polish - ‪polski‬</option> <option value="pt-BR">Portuguese (Brazil) - ‪Português (Brasil)‬</option> <option value="pt-PT">Portuguese (Portugal) - ‪português (Portugal)‬</option> <option value="ro">Romanian - ‪română‬</option> <option value="ru">Russian - ‪Русский‬</option> <option value="sr">Serbian - ‪српски‬</option> <option value="sk">Slovak - ‪Slovenčina‬</option> <option value="sl">Slovenian - ‪slovenščina‬</option> <option value="es-419">Spanish (Latin America) - ‪Español (Latinoamérica)‬</option> <option value="es">Spanish (Spain) - ‪Español (España)‬</option> <option value="sw">Swahili - ‪Kiswahili‬</option> <option value="sv">Swedish - ‪Svenska‬</option> <option value="ta">Tamil - ‪தமிழ்‬</option> <option value="te">Telugu - ‪తెలుగు‬</option> <option value="th">Thai - ‪ไทย‬</option> <option value="tr">Turkish - ‪Türkçe‬</option> <option value="uk">Ukrainian - ‪Українська‬</option> <option value="ur">Urdu - ‫اردو‬</option> <option value="vi">Vietnamese - ‪Tiếng Việt‬</option> <option value="zu">Zulu - ‪isiZulu‬</option></select></p>
411
  <div style="display: block; width:50%">
412
+ <label for="sitedesceditor" style="display: block; width: 120px">Site Description:</label><div style="margin-left: 240px;margin-top: -20px"><?php /**
413
 
414
  /**
415
  * Basic syntax
426
  ?>
427
  </div>
428
  </div>
429
+ </div>
430
+ <div class="save-changes"><?php if(get_option('readygraph_tutorial') && get_option('readygraph_tutorial') == "true"){ ?><button type="submit" class="btn btn-large btn-warning save-next" formaction="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=signup-popup" style="float: right;margin: 15px">Save Changes & Next</button><?php } ?>
431
  <button type="submit" class="btn btn-large btn-warning save" formaction="#" style="float: right;margin: 15px">Save Changes</button>
432
+ <?php if(get_option('readygraph_tutorial') && get_option('readygraph_tutorial') == "true"){ ?><button type="submit" class="btn btn-large btn-warning save-previous" formaction="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=basic-settings&tutorial=true" style="float: right;margin: 15px">Previous</button> <?php } ?>
433
  </div>
434
  </div>
435
  </div>
436
  </form>
437
  <script type="text/javascript" src="https://readygraph.com/scripts/readygraph.js"></script>
438
+
439
  <script type="text/javascript" charset="utf-8">
440
  var $ = jQuery;
441
  $(function () {
517
  $('.email-address').text($('[name="readygraph_email"]').val());
518
 
519
  window.setup_readygraph($('[name="readygraph_application_id"]').val());
520
+
 
 
 
 
 
521
 
522
  $('.result').text('...');
523
  if ($('[name="readygraph_access_token"]').val()) {
extension/readygraph/social-feed.php CHANGED
@@ -124,7 +124,7 @@ s2_rrmdir($dir);
124
  </li>
125
  <li>Basic Settings
126
  <ul>
127
- <li><a href="#">Site Profile</a></li>
128
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
129
  </ul>
130
  </li>
124
  </li>
125
  <li>Basic Settings
126
  <ul>
127
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
128
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
129
  </ul>
130
  </li>
readygraph-extension.php CHANGED
@@ -280,7 +280,7 @@ function s2_wordpress_sync_users( $app_id ){
280
  $count = 0;
281
  $count = mysql_num_rows($subscribe2_users);
282
  wp_remote_get( "http://readygraph.com/api/v1/tracking?event=wp_user_synced&app_id=$app_id&count=$count" );
283
- foreach($subscribe2_users as $user) {
284
  $emails .= $user->email . ",";
285
  $dates .= $user->user_date . ",";
286
  }
280
  $count = 0;
281
  $count = mysql_num_rows($subscribe2_users);
282
  wp_remote_get( "http://readygraph.com/api/v1/tracking?event=wp_user_synced&app_id=$app_id&count=$count" );
283
+ foreach($subscribe2_users as $user) {
284
  $emails .= $user->email . ",";
285
  $dates .= $user->user_date . ",";
286
  }
subscribe2.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Subscribe2
4
  Plugin URI: http://subscribe2.wordpress.com
5
  Description: Notifies an email list when new entries are posted.
6
- Version: 10.18.2
7
  Author: Matthew Robinson, Tanay Lakhani
8
  Author URI: http://subscribe2.wordpress.com
9
  Licence: GPL3
@@ -55,7 +55,7 @@ if ( is_plugin_active_for_network(plugin_basename(__FILE__)) ) {
55
 
56
  // our version number. Don't touch this or any line below
57
  // unless you know exactly what you are doing
58
- define( 'S2VERSION', '10.18.2' );
59
  define( 'S2PATH', trailingslashit(dirname(__FILE__)) );
60
  define( 'S2DIR', trailingslashit(dirname(plugin_basename(__FILE__))) );
61
  define( 'S2URL', plugin_dir_url(dirname(__FILE__)) . S2DIR );
3
  Plugin Name: Subscribe2
4
  Plugin URI: http://subscribe2.wordpress.com
5
  Description: Notifies an email list when new entries are posted.
6
+ Version: 10.18.3
7
  Author: Matthew Robinson, Tanay Lakhani
8
  Author URI: http://subscribe2.wordpress.com
9
  Licence: GPL3
55
 
56
  // our version number. Don't touch this or any line below
57
  // unless you know exactly what you are doing
58
+ define( 'S2VERSION', '10.18.3' );
59
  define( 'S2PATH', trailingslashit(dirname(__FILE__)) );
60
  define( 'S2DIR', trailingslashit(dirname(plugin_basename(__FILE__))) );
61
  define( 'S2URL', plugin_dir_url(dirname(__FILE__)) . S2DIR );