Subscribe2 - Version 10.6

Version Description

Download this release

Release Info

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

Code changes from version 10.5 to 10.6

ReadMe.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_butt
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.5
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.
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.6
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.
classes/class-s2-admin.php CHANGED
@@ -12,9 +12,6 @@ class s2_admin extends s2class {
12
  add_action("admin_print_styles-$s2user", array(&$this, 'user_admin_css'));
13
  add_action('load-' . $s2user, array(&$this, 'user_help'));
14
 
15
- // $s2readygraph = add_submenu_page('s2', __('Readygraph App', 'subscribe2'), __('Readygraph App', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'readygraph'), 's2_readygraph', array(&$this, 'readygraph_menu'));
16
- add_action("admin_print_scripts-$s2readygraph", array(&$this, 'readygraph_js'));
17
-
18
  $s2subscribers = add_submenu_page('s2', __('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'manage'), 's2_tools', array(&$this, 'subscribers_menu'));
19
  add_action("admin_print_scripts-$s2subscribers", array(&$this, 'checkbox_form_js'));
20
  add_action('load-' . $s2subscribers, array(&$this, 'subscribers_help'));
@@ -156,21 +153,6 @@ class s2_admin extends s2class {
156
  wp_enqueue_script('s2_date_time');
157
  } // end option_form_js()
158
 
159
- /**
160
- Enqueue jQuery for ReadyGraph
161
- */
162
- function readygraph_js() {
163
- wp_enqueue_script('jquery');
164
- wp_register_script('s2_readygraph', S2URL . 'include/s2_readygraph' . $this->script_debug . '.js', array('jquery'), '1.0');
165
- wp_enqueue_script('s2_readygraph');
166
- wp_localize_script('s2_readygraph', 'objectL10n', array(
167
- 'emailempty' => __('Email is empty!', 'subscribe2'),
168
- 'passwordempty' => __('Password is empty!', 'subscribe2'),
169
- 'urlempty' => __('Site URL is empty!', 'subscribe2'),
170
- 'passwordmatch' => __('Password is not matching!', 'subscribe2')
171
- ) );
172
- } // end readygraph_js()
173
-
174
  /**
175
  Adds a links directly to the settings page from the plugin page
176
  */
@@ -191,14 +173,6 @@ class s2_admin extends s2class {
191
  require_once(S2PATH . 'admin/subscribers.php');
192
  } // end subscribers_menu()
193
 
194
- /**
195
- Our ReadyGraph API page
196
- */
197
- /* function readygraph_menu() {
198
- global $wpdb;
199
- require_once(S2PATH . 'admin/app_page.php');
200
- } // end readygraph_menu()
201
- */
202
  /**
203
  Our settings page
204
  */
12
  add_action("admin_print_styles-$s2user", array(&$this, 'user_admin_css'));
13
  add_action('load-' . $s2user, array(&$this, 'user_help'));
14
 
 
 
 
15
  $s2subscribers = add_submenu_page('s2', __('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'manage'), 's2_tools', array(&$this, 'subscribers_menu'));
16
  add_action("admin_print_scripts-$s2subscribers", array(&$this, 'checkbox_form_js'));
17
  add_action('load-' . $s2subscribers, array(&$this, 'subscribers_help'));
153
  wp_enqueue_script('s2_date_time');
154
  } // end option_form_js()
155
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  /**
157
  Adds a links directly to the settings page from the plugin page
158
  */
173
  require_once(S2PATH . 'admin/subscribers.php');
174
  } // end subscribers_menu()
175
 
 
 
 
 
 
 
 
 
176
  /**
177
  Our settings page
178
  */
classes/class-s2-frontend.php CHANGED
@@ -147,7 +147,7 @@ class s2_frontend extends s2class {
147
  } elseif ( $this->is_barred($this->email) ) {
148
  $this->s2form = $this->form . $this->barred_domain;
149
  } else {
150
- $readygraph_api = get_option('readygraph_api');
151
  if ($readygraph_api && strlen($readygraph_api) > 0 && is_plugin_active( 'readygraph/readygraph.php' )) {
152
  $rg_url = 'https://readygraph.com/api/v1/wordpress-enduser/';
153
  $postdata = http_build_query(
147
  } elseif ( $this->is_barred($this->email) ) {
148
  $this->s2form = $this->form . $this->barred_domain;
149
  } else {
150
+ $readygraph_api = get_option('readygraph_application_id');
151
  if ($readygraph_api && strlen($readygraph_api) > 0 && is_plugin_active( 'readygraph/readygraph.php' )) {
152
  $rg_url = 'https://readygraph.com/api/v1/wordpress-enduser/';
153
  $postdata = http_build_query(
include/s2_edit.js CHANGED
@@ -52,7 +52,7 @@ function s2_cron_revert( id ) {
52
  jQuery( '#s2' + id + 'date' ).html( date );
53
  time = jQuery( '#js' + id + 'time' ).val();
54
  jQuery( '[name='+ id + 'time] option' ).filter(function() {
55
- return ( this.text == time );
56
  }).prop( 'selected', true ).parent().focus();
57
  jQuery( '#s2' + id + 'time' ).html( time );
58
  s2_hide( id );
52
  jQuery( '#s2' + id + 'date' ).html( date );
53
  time = jQuery( '#js' + id + 'time' ).val();
54
  jQuery( '[name='+ id + 'time] option' ).filter(function() {
55
+ return ( this.text === time );
56
  }).prop( 'selected', true ).parent().focus();
57
  jQuery( '#s2' + id + 'time' ).html( time );
58
  s2_hide( id );
include/s2_edit.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(){jQuery('#s2bcclimit_2').hide();jQuery('#s2entries_2').hide();jQuery('#s2cron_2').hide()});function s2_show(id){jQuery('#s2'+id+'_2').show();jQuery('#s2'+id+'_1').hide();return false}function s2_hide(id){jQuery('#s2'+id+'_1').show();jQuery('#s2'+id+'_2').hide();return false}function s2_update(id){var input=jQuery('input[name="'+id+'"]').val();jQuery('#s2'+id).html(input);s2_hide(id)}function s2_revert(id){var option=jQuery('#js'+id).val();jQuery('input[name="'+id+'"]').val(option);jQuery('#s2'+id).html(option);s2_hide(id)}function s2_cron_update(id){var date,time;date=jQuery('input[name="'+id+'date"]').val();jQuery('#s2'+id+'date').html(date);time=jQuery('select[name="'+id+'time"] option:selected').html();jQuery('#s2'+id+'time').html(time);s2_hide(id)}function s2_cron_revert(id){var date,time;date=jQuery('#js'+id+'date').val();jQuery('input[name="'+id+'date"]').val(date);jQuery('#s2'+id+'date').html(date);time=jQuery('#js'+id+'time').val();jQuery('[name='+id+'time] option').filter(function(){return(this.text==time)}).prop('selected',true).parent().focus();jQuery('#s2'+id+'time').html(time);s2_hide(id)}
1
+ jQuery(document).ready(function(){jQuery('#s2bcclimit_2').hide();jQuery('#s2entries_2').hide();jQuery('#s2cron_2').hide()});function s2_show(id){jQuery('#s2'+id+'_2').show();jQuery('#s2'+id+'_1').hide();return false}function s2_hide(id){jQuery('#s2'+id+'_1').show();jQuery('#s2'+id+'_2').hide();return false}function s2_update(id){var input=jQuery('input[name="'+id+'"]').val();jQuery('#s2'+id).html(input);s2_hide(id)}function s2_revert(id){var option=jQuery('#js'+id).val();jQuery('input[name="'+id+'"]').val(option);jQuery('#s2'+id).html(option);s2_hide(id)}function s2_cron_update(id){var date,time;date=jQuery('input[name="'+id+'date"]').val();jQuery('#s2'+id+'date').html(date);time=jQuery('select[name="'+id+'time"] option:selected').html();jQuery('#s2'+id+'time').html(time);s2_hide(id)}function s2_cron_revert(id){var date,time;date=jQuery('#js'+id+'date').val();jQuery('input[name="'+id+'date"]').val(date);jQuery('#s2'+id+'date').html(date);time=jQuery('#js'+id+'time').val();jQuery('[name='+id+'time] option').filter(function(){return(this.text===time)}).prop('selected',true).parent().focus();jQuery('#s2'+id+'time').html(time);s2_hide(id)}
include/s2_readygraph.js DELETED
@@ -1,82 +0,0 @@
1
- /* global objectL10n */
2
- jQuery(document).ready(function(){
3
- var emailempty, passwordempty, email, password, site_url, first_name, password2, urlempty, passwordmatch;
4
- jQuery('#signin-submit').click(function(){
5
- emailempty = '{emailempty}'.replace('{emailempty}', objectL10n.emailempty);
6
- passwordempty = '{passwordempty}'.replace('{passwordempty}', objectL10n.passwordempty);
7
- email = jQuery('#signin-email').val();
8
- password = jQuery('#signin-password').val();
9
- if (!email) {
10
- window.alert(emailempty);
11
- return;
12
- }
13
- if (!password) {
14
- window.alert(passwordempty);
15
- return;
16
- }
17
- jQuery.ajax({
18
- type: 'GET',
19
- url: 'https://readygraph.com/api/v1/wordpress-login/',
20
- data: {
21
- 'email' : email,
22
- 'password' : password
23
- },
24
- dataType: 'json',
25
- success: function(response) {
26
- if (response.success) {
27
- var pathname = window.location.href;
28
- window.location = pathname + '&app_id='+response.data.app_id;
29
- } else {
30
- jQuery('#error').text(response.error);
31
- jQuery('#error').show();
32
- }
33
- }
34
- });
35
- });
36
-
37
- jQuery('#register-app-submit').click(function(){
38
- email = jQuery('#register-email').val();
39
- site_url = jQuery('#register-url').val();
40
- first_name = jQuery('#register-name').val();
41
- password = jQuery('#register-password').val();
42
- password2 = jQuery('#register-password1').val();
43
- urlempty = '{urlempty}'.replace('{urlempty}', objectL10n.urlempty);
44
- emailempty = '{emailempty}'.replace('{emailempty}', objectL10n.emailempty);
45
- passwordmatch = '{passwordmatch}'.replace('{passwordmatch}', objectL10n.passwordmatch);
46
- if (!site_url) {
47
- window.alert(urlempty);
48
- return;
49
- }
50
- if (!email) {
51
- window.alert(emailempty);
52
- return;
53
- }
54
- if ( !password || password != password2 ) {
55
- window.alert(passwordmatch);
56
- return;
57
- }
58
-
59
- jQuery.ajax({
60
- type: 'POST',
61
- url: 'https://readygraph.com/api/v1/wordpress-signup/',
62
- data: {
63
- 'email' : email,
64
- 'site_url' : site_url,
65
- 'first_name': first_name,
66
- 'password' : password,
67
- 'password2' : password2,
68
- 'source' : 'subscribe2'
69
- },
70
- dataType: 'json',
71
- success: function(response) {
72
- if (response.success) {
73
- var pathname = window.location.href;
74
- window.location = pathname + '&app_id='+response.data.app_id;
75
- } else {
76
- jQuery('#error').text(response.error);
77
- jQuery('#error').show();
78
- }
79
- }
80
- });
81
- });
82
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
include/s2_readygraph.min.js DELETED
@@ -1 +0,0 @@
1
- jQuery(document).ready(function(){var emailempty,passwordempty,email,password,site_url,first_name,password2,urlempty,passwordmatch;jQuery('#signin-submit').click(function(){emailempty='{emailempty}'.replace('{emailempty}',objectL10n.emailempty);passwordempty='{passwordempty}'.replace('{passwordempty}',objectL10n.passwordempty);email=jQuery('#signin-email').val();password=jQuery('#signin-password').val();if(!email){window.alert(emailempty);return}if(!password){window.alert(passwordempty);return}jQuery.ajax({type:'GET',url:'https://readygraph.com/api/v1/wordpress-login/',data:{'email':email,'password':password},dataType:'json',success:function(response){if(response.success){var pathname=window.location.href;window.location=pathname+'&app_id='+response.data.app_id}else{jQuery('#error').text(response.error);jQuery('#error').show()}}})});jQuery('#register-app-submit').click(function(){email=jQuery('#register-email').val();site_url=jQuery('#register-url').val();first_name=jQuery('#register-name').val();password=jQuery('#register-password').val();password2=jQuery('#register-password1').val();urlempty='{urlempty}'.replace('{urlempty}',objectL10n.urlempty);emailempty='{emailempty}'.replace('{emailempty}',objectL10n.emailempty);passwordmatch='{passwordmatch}'.replace('{passwordmatch}',objectL10n.passwordmatch);if(!site_url){window.alert(urlempty);return}if(!email){window.alert(emailempty);return}if(!password||password!=password2){window.alert(passwordmatch);return}jQuery.ajax({type:'POST',url:'https://readygraph.com/api/v1/wordpress-signup/',data:{'email':email,'site_url':site_url,'first_name':first_name,'password':password,'password2':password2,'source':'subscribe2'},dataType:'json',success:function(response){if(response.success){var pathname=window.location.href;window.location=pathname+'&app_id='+response.data.app_id}else{jQuery('#error').text(response.error);jQuery('#error').show()}}})})});
 
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.4
7
  Author: Matthew Robinson
8
  Author URI: http://subscribe2.wordpress.com
9
  Licence: GPL3
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.6
7
  Author: Matthew Robinson
8
  Author URI: http://subscribe2.wordpress.com
9
  Licence: GPL3