Subscribe2 - Version 10.20.2

Version Description

Download this release

Release Info

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

Code changes from version 10.20.1 to 10.20.2

ChangeLog.txt CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  = 10.20.1 =
2
 
3
  * Bug Fix
1
+ = 10.20.2 =
2
+
3
+ * Bug Fix for readygraph
4
+
5
  = 10.20.1 =
6
 
7
  * Bug Fix
ReadMe.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://plugins.readygraph.com/donate/
4
  Tags: posts, subscription, email, subscribe, notify, notification
5
  Requires at least: 3.3
6
  Tested up to: 4.1
7
- Stable tag: 10.20.1
8
  License: GPL3
9
 
10
  Sends a list of subscribers emails when you publish new posts. Automate user growth and revenue with ReadyGraph integration.
4
  Tags: posts, subscription, email, subscribe, notify, notification
5
  Requires at least: 3.3
6
  Tested up to: 4.1
7
+ Stable tag: 10.20.2
8
  License: GPL3
9
 
10
  Sends a list of subscribers emails when you publish new posts. Automate user growth and revenue with ReadyGraph integration.
classes/class-s2-frontend.php CHANGED
@@ -115,7 +115,8 @@ class s2_frontend extends s2class {
115
  // ReadyGraph end user message
116
  $readygraph_message = '';
117
  $readygraph_api = get_option('readygraph_application_id');
118
- if($readygraph_api && strlen($readygraph_api) > 0) {
 
119
  $readygraph_message = "<p style='max-width:180px;font-size: 10px;'>" . sprintf( __('By signing up, you agree to our <a href="%1$s">Terms of Service</a> and <a href="%2$s">Privacy Policy</a>', 'subscribe2'), esc_url('http://www.readygraph.com/tos'), esc_url('http://readygraph.com/privacy/') ) . ".</p>";
120
  }
121
 
115
  // ReadyGraph end user message
116
  $readygraph_message = '';
117
  $readygraph_api = get_option('readygraph_application_id');
118
+ $readygraph_access_token = get_option('readygraph_access_token');
119
+ if($readygraph_api && strlen($readygraph_api) > 0 && $readygraph_access_token && strlen($readygraph_access_token) > 0) {
120
  $readygraph_message = "<p style='max-width:180px;font-size: 10px;'>" . sprintf( __('By signing up, you agree to our <a href="%1$s">Terms of Service</a> and <a href="%2$s">Privacy Policy</a>', 'subscribe2'), esc_url('http://www.readygraph.com/tos'), esc_url('http://readygraph.com/privacy/') ) . ".</p>";
121
  }
122
 
extension/readygraph/admin.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
  /**
3
  * Represents the view for the administration dashboard.
4
  *
@@ -37,33 +37,19 @@ include("header.php");
37
  <div class="authenticate" style="display: none;">
38
  <div class="wrap1" style="min-height: 600px;">
39
  <div id="icon-plugins" class="icon32"></div>
40
- <h2>Earn Revenue with <?php echo $s2_main_plugin_title ?>'s ReadyGraph Growth Engine</h2>
41
  <p style="display:none;color:red;" id="error"></p>
42
  <div class="register-left">
43
- <div class="alert" style="margin: 0px auto; padding: 15px; text-align: center;">
44
- <h3>Make money and grow your site with ReadyGraph</h3>
45
  <!-- <h3 style="margin-top: 0px; font-weight: 300;"><?php //echo $main_plugin_title ?>, Now with ReadyGraph</h3> -->
46
-
47
-
48
- <?php if(get_option('readygraph_enable_monetize') && get_option('readygraph_enable_monetize') == "true") { ?>
49
- <p style="padding: 20px 0px 10px 0px;"><a class="btn btn-primary connect" href="javascript:void(0);" style="font-size: 18px; padding: 10px 30px;">Growth Features Only<br><span style="font-size: 10px;">Connect ReadyGraph</span></a></p>
50
-
51
- <p style="padding: 20px 0px 10px 0px;"><a class="btn btn-success" href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=monetization-settings" style="font-size: 18px; padding: 20px 85px;">Settings</a></p>
52
- <h5 style="padding: 0px 0px 20px 0px;font-weight: normal; text-align: center;"><img style="height: 30px;" src="<?php echo plugin_dir_url( __FILE__ );?>assets/check.png"/>Monetization Active</h5>
53
- <?php } else {?>
54
- <p style="padding: 20px 0px 10px 0px;">
55
-
56
- <a class="btn btn-primary monetize" href="javascript:void(0);" style="font-size: 18px; padding: 10px 30px;">Start Earning Revenue<br><span style="font-size: 10px;">Connect ReadyGraph</span></a>
57
- <span style="width: 100%; display: block;margin: 5px;">
58
- <input type="checkbox" name="readygraph_monetize" value="1" checked disabled>Activate Monetization<br></span>
59
- </p>
60
- <p style="padding: 20px 0px 30px 0px;"><a class="btn btn-default connect" href="javascript:void(0);" style="font-size: 18px; padding: 10px 30px;">Growth Features Only<br><span style="font-size: 10px;">Connect ReadyGraph</span></a></p>
61
- <?php } ?>
62
-
63
 
64
  <!--<p style="padding: 0px 0px;"><a class="btn btn-default skip" href="javascript:void(0);" style="font-size: 10px; line-height: 20px; padding: 0 30px;">Skip ReadyGraph</a></p>-->
65
- <p>Readygraph maximizes your Growth and Revenue</p>
66
  <p style="text-align: left; padding: 0 20px;">
 
67
  - Monetize mobile and web traffic with optimized, non-intrusive ad units<br>
68
  - Get more traffic<br>
69
  - Send automatic email digests of all your site posts<br>
@@ -217,6 +203,13 @@ include("header.php");
217
  </form>
218
 
219
  <script type="text/javascript" charset="utf-8">
 
 
 
 
 
 
 
220
  function subscribe_readygraph() {
221
  var radios = document.getElementsByName("select-plan");
222
  if (document.getElementById('plan-type').checked) {
1
+ <?php
2
  /**
3
  * Represents the view for the administration dashboard.
4
  *
37
  <div class="authenticate" style="display: none;">
38
  <div class="wrap1" style="min-height: 600px;">
39
  <div id="icon-plugins" class="icon32"></div>
40
+ <h2>We have enhanced <?php echo $s2_main_plugin_title ?> with ReadyGraph's Growth/Revenue Engine</h2>
41
  <p style="display:none;color:red;" id="error"></p>
42
  <div class="register-left">
43
+ <div class="alert" style="margin: 0px auto; padding: 20px 15px; text-align: center;">
44
+ <h3>Activate ReadyGraph to get more traffic and revenue</h3>
45
  <!-- <h3 style="margin-top: 0px; font-weight: 300;"><?php //echo $main_plugin_title ?>, Now with ReadyGraph</h3> -->
46
+ <p style="padding: 50px 0px 10px 0px;"><a class="btn btn-primary connect" href="javascript:void(0);" style="font-size: 18px; padding: 20px 25px;">Connect ReadyGraph >></a></p>
47
+ <span><input type="checkbox" id="readygraph_monetize" name="readygraph_monetize" value="1" style="margin: 0 10px;" checked >Enable Monetization</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
  <!--<p style="padding: 0px 0px;"><a class="btn btn-default skip" href="javascript:void(0);" style="font-size: 10px; line-height: 20px; padding: 0 30px;">Skip ReadyGraph</a></p>-->
50
+ <p style="margin-top:50px">Readygraph maximizes your Growth and Revenue</p>
51
  <p style="text-align: left; padding: 0 20px;">
52
+ - Collect site reviews<br>
53
  - Monetize mobile and web traffic with optimized, non-intrusive ad units<br>
54
  - Get more traffic<br>
55
  - Send automatic email digests of all your site posts<br>
203
  </form>
204
 
205
  <script type="text/javascript" charset="utf-8">
206
+ var enable_monetize;
207
+ if(document.getElementById('readygraph_monetize').checked) {
208
+ enable_monetize = true;
209
+ } else {
210
+ enable_monetize = false;
211
+ }
212
+
213
  function subscribe_readygraph() {
214
  var radios = document.getElementsByName("select-plan");
215
  if (document.getElementById('plan-type').checked) {
extension/readygraph/footer.php CHANGED
@@ -69,6 +69,28 @@
69
  });
70
 
71
  $("a.connect").click(function() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  var url = authHost + '/oauth/authenticate?client_id=' + settings.clientId + '&redirect_uri=' + encodeURIComponent(location.href.replace('#' + location.hash,"")) + '&response_type=token&app_id='+app_id+'&app_secret='+app_secret;
73
  openPopup(url);
74
  $(document.body).bind('focus', parent_disable);
69
  });
70
 
71
  $("a.connect").click(function() {
72
+ if (enable_monetize){
73
+ if(app_id.length > 0) {
74
+ $.ajax({
75
+ url: resourceHost + '/api/v1/wp-monetize/'
76
+ , method: 'POST'
77
+ , data: {
78
+ app_id: $('[name="readygraph_application_id"]').val(),
79
+ monetize: "true",
80
+ client_id: settings.clientId
81
+ }
82
+ , success: function (response) {
83
+ var monetize_adsoptimal_id = response.data.adsoptimal_id;
84
+ var monetize_adsoptimal_secret = response.data.adsoptimal_secret;
85
+ jQuery.post(ajaxurl,{action : 's2-myajax-submit',readygraph_monetize : "true",adsoptimal_id : monetize_adsoptimal_id, adsoptimal_secret : monetize_adsoptimal_secret},function() {});
86
+ /* future processing for sites opted in for monetization */
87
+ }
88
+ , error: function (response) {
89
+ console.log(response);
90
+ /* future process */
91
+ }
92
+ });}
93
+ }
94
  var url = authHost + '/oauth/authenticate?client_id=' + settings.clientId + '&redirect_uri=' + encodeURIComponent(location.href.replace('#' + location.hash,"")) + '&response_type=token&app_id='+app_id+'&app_secret='+app_secret;
95
  openPopup(url);
96
  $(document.body).bind('focus', parent_disable);
extension/readygraph/header.php CHANGED
@@ -41,24 +41,8 @@ include("functions.php");
41
  <link rel="stylesheet" type="text/css" href="<?php echo plugins_url( 'assets/css/admin.css', __FILE__ ) ?>">
42
  <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>
43
  <script type="text/javascript" src="<?php echo plugins_url( 'assets/js/admin.js', __FILE__ ) ?>"></script>
44
- <?php if (!get_option('readygraph_access_token') || strlen(get_option('readygraph_access_token')) <= 0) { ?>
45
- <div class="readygraph-nav-menu">
46
- <ul><li style="width: 200px;"><a style="color:#D5DEE4" href="<?php $current_url = explode("?", $_SERVER['REQUEST_URI']); echo $current_url[0];?>?page=s2_settings">Subscribe2 Settings</a>
47
- </li>
48
- <li style="width: 200px;color:#D5DEE4"><a style="color:#D5DEE4" href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=monetization-settings">Monetization Settings</a></li>
49
- </ul>
50
- <div class="btn-group" style="margin: 8px 10px 0 10px;">
51
- <p><a href="mailto:info@readygraph.com" style="color: #b1c1ca" >Help <img src="<?php echo plugin_dir_url( __FILE__ );?>assets/9.png"/></a></p>
52
- </div>
53
- <div class="btn-group" style="margin: 8px 10px 0 10px;">
54
- <p>
55
- <a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=faq" style="color: #b1c1ca" >FAQ <img src="<?php echo plugin_dir_url( __FILE__ );?>assets/10.png" /></a></p>
56
- </div>
57
- <div class="btn-group" style="">
58
- <p><a href="https://readygraph.com/accounts/payment/?email=<?php echo get_option('readygraph_email', '') ?>" target="_blank" style="color: #b1c1ca" ><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/go-premium.png" height="40px" style="margin:5px" /></a></p>
59
- </div>
60
- </div>
61
- <?php }else { ?>
62
  <div style="background-color: #2691CB; min-width: 90%; height: 50px;margin-right: 1%;">
63
  <img src="<?php echo plugin_dir_url( __FILE__ );?>assets/white-logo.png" style="width: 138px; height: 30px; margin: 10px 0 0 15px; float: left;">
64
  <div class="btn-group pull-right" style="margin: 8px 10px 0 0;">
@@ -132,4 +116,4 @@ include("functions.php");
132
  <p><a href="https://readygraph.com/accounts/payment/?email=<?php echo get_option('readygraph_email', '') ?>" target="_blank" style="color: #b1c1ca" ><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/go-premium.png" height="40px" style="margin:5px" /></a></p>
133
  </div>
134
  </div>
135
- <? } ?>
41
  <link rel="stylesheet" type="text/css" href="<?php echo plugins_url( 'assets/css/admin.css', __FILE__ ) ?>">
42
  <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>
43
  <script type="text/javascript" src="<?php echo plugins_url( 'assets/js/admin.js', __FILE__ ) ?>"></script>
44
+
45
+ <?php if (get_option('readygraph_access_token') || strlen(get_option('readygraph_access_token')) > 0){ ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  <div style="background-color: #2691CB; min-width: 90%; height: 50px;margin-right: 1%;">
47
  <img src="<?php echo plugin_dir_url( __FILE__ );?>assets/white-logo.png" style="width: 138px; height: 30px; margin: 10px 0 0 15px; float: left;">
48
  <div class="btn-group pull-right" style="margin: 8px 10px 0 0;">
116
  <p><a href="https://readygraph.com/accounts/payment/?email=<?php echo get_option('readygraph_email', '') ?>" target="_blank" style="color: #b1c1ca" ><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/go-premium.png" height="40px" style="margin:5px" /></a></p>
117
  </div>
118
  </div>
119
+ <? } ?>
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.20.1
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.20.1' );
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.20.2
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.20.2' );
59
  define( 'S2PATH', trailingslashit(dirname(__FILE__)) );
60
  define( 'S2DIR', trailingslashit(dirname(plugin_basename(__FILE__))) );
61
  define( 'S2URL', plugin_dir_url(dirname(__FILE__)) . S2DIR );