Version Description
Download this release
Release Info
Developer | tanaylakhani |
Plugin | Subscribe2 |
Version | 10.20.7 |
Comparing to | |
See all releases |
Code changes from version 10.20.6 to 10.20.7
- ChangeLog.txt +6 -0
- ReadMe.txt +1 -1
- admin/send_email.php +4 -3
- admin/settings.php +4 -3
- admin/subscribers.php +8 -1
- admin/your_subscriptions.php +4 -3
- classes/class-s2-ajax.php +141 -0
- classes/class-s2-core.php +8 -7
- extension/readygraph/admin.php +5 -5
- extension/readygraph/assets/Sign-Alert-icon.png +0 -0
- include/s2_ajax.js +69 -0
- include/s2_ajax.min.js +1 -0
- subscribe2.php +1 -1
- uninstall.php +5 -0
ChangeLog.txt
CHANGED
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
= 10.20.6 =
|
2 |
|
3 |
* Security Fix for readygraph
|
1 |
+
= 10.20.7 =
|
2 |
+
|
3 |
+
* uninstall bug fix
|
4 |
+
* RG banner removal - x buttons
|
5 |
+
* Ajax implementation for popup - by mattyrob
|
6 |
+
|
7 |
= 10.20.6 =
|
8 |
|
9 |
* Security Fix for readygraph
|
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.
|
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.7
|
8 |
License: GPL3
|
9 |
|
10 |
Sends a list of subscribers emails when you publish new posts. Automate user growth and revenue with ReadyGraph integration.
|
admin/send_email.php
CHANGED
@@ -96,10 +96,11 @@ echo "<div class=\"wrap\">";
|
|
96 |
if ( version_compare($GLOBALS['wp_version'], '3.8', '<=') ) {
|
97 |
echo "<div id=\"icon-edit\" class=\"icon32\"></div>";
|
98 |
}
|
99 |
-
if( file_exists(plugin_dir_path( __FILE__ ).'
|
100 |
wp_enqueue_style('s2_rg_admin_template', S2URL . 'extension/readygraph/assets/css/upgrade.css');
|
101 |
-
|
102 |
-
|
|
|
103 |
|
104 |
echo "<h2>" . __('Send an email to subscribers', 'subscribe2') . "</h2>\r\n";
|
105 |
echo "<form method=\"post\" enctype=\"multipart/form-data\">\r\n";
|
96 |
if ( version_compare($GLOBALS['wp_version'], '3.8', '<=') ) {
|
97 |
echo "<div id=\"icon-edit\" class=\"icon32\"></div>";
|
98 |
}
|
99 |
+
if( file_exists( plugin_dir_path( dirname(__FILE__) ).'readygraph-extension.php' )) {
|
100 |
wp_enqueue_style('s2_rg_admin_template', S2URL . 'extension/readygraph/assets/css/upgrade.css');
|
101 |
+
if (isset($_GET['readygraph_premium_notice']) && $_GET['readygraph_premium_notice'] == 'dismiss') update_option('readygraph_premium_notice',"false");
|
102 |
+
if (get_option('readygraph_premium_notice','true') != "false"){
|
103 |
+
echo '<div class="rg_info rg_message"><img src="'.S2URL.'extension/readygraph/assets/Sign-Alert-icon.png" style="float: left;height: 50px;padding-right: 10px;"><a href="admin.php?page=readygraph-app"><button class="button-warning pure-button" style="float: right; margin-right: 15px;">Connect ReadyGraph</button></a><h3 style="color:white">Grow your site traffic faster: Activate Email Newsletter\'s User Growth Engine (ReadyGraph)</h3><p style="color: whitesmoke">Promotion to New Users | Viral Signup Form | Site Update emails | Import Existing Users</p><div class="aa_close" style="position: absolute;right: 15px;top: 12px;"><a href="//' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . '&readygraph_premium_notice=dismiss"><img src="'.S2URL.'extension/readygraph/assets/dialog_close.png" style="width:12px;"></a></div></div>';}}
|
104 |
|
105 |
echo "<h2>" . __('Send an email to subscribers', 'subscribe2') . "</h2>\r\n";
|
106 |
echo "<form method=\"post\" enctype=\"multipart/form-data\">\r\n";
|
admin/settings.php
CHANGED
@@ -158,10 +158,11 @@ if ( version_compare($GLOBALS['wp_version'], '3.8', '<=') ) {
|
|
158 |
echo "<div id=\"icon-options-general\" class=\"icon32\"></div>";
|
159 |
}
|
160 |
|
161 |
-
if( file_exists(plugin_dir_path(dirname(__FILE__ )
|
162 |
wp_enqueue_style('s2_rg_admin_template', S2URL . 'extension/readygraph/assets/css/upgrade.css');
|
163 |
-
|
164 |
-
|
|
|
165 |
|
166 |
$tabs = array('email' => __('Email Settings', 'subscribe2'),
|
167 |
'templates' => __('Templates', 'subscribe2'),
|
158 |
echo "<div id=\"icon-options-general\" class=\"icon32\"></div>";
|
159 |
}
|
160 |
|
161 |
+
if( file_exists( plugin_dir_path( dirname(__FILE__) ).'readygraph-extension.php' )) {
|
162 |
wp_enqueue_style('s2_rg_admin_template', S2URL . 'extension/readygraph/assets/css/upgrade.css');
|
163 |
+
if (isset($_GET['readygraph_premium_notice']) && $_GET['readygraph_premium_notice'] == 'dismiss') update_option('readygraph_premium_notice',"false");
|
164 |
+
if (get_option('readygraph_premium_notice','true') != "false"){
|
165 |
+
echo '<div class="rg_info rg_message"><img src="'.S2URL.'extension/readygraph/assets/Sign-Alert-icon.png" style="float: left;height: 50px;padding-right: 10px;"><a href="admin.php?page=readygraph-app"><button class="button-warning pure-button" style="float: right; margin-right: 15px;">Connect ReadyGraph</button></a><h3 style="color:white">Grow your site traffic faster: Activate Email Newsletter\'s User Growth Engine (ReadyGraph)</h3><p style="color: whitesmoke">Promotion to New Users | Viral Signup Form | Site Update emails | Import Existing Users</p><div class="aa_close" style="position: absolute;right: 15px;top: 12px;"><a href="//' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . '&readygraph_premium_notice=dismiss"><img src="'.S2URL.'extension/readygraph/assets/dialog_close.png" style="width:12px;"></a></div></div>';}}
|
166 |
|
167 |
$tabs = array('email' => __('Email Settings', 'subscribe2'),
|
168 |
'templates' => __('Templates', 'subscribe2'),
|
admin/subscribers.php
CHANGED
@@ -183,10 +183,17 @@ echo "<div class=\"wrap\">";
|
|
183 |
if ( version_compare($GLOBALS['wp_version'], '3.8', '<=') ) {
|
184 |
echo "<div id=\"icon-tools\" class=\"icon32\"></div>";
|
185 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
if( file_exists(plugin_dir_path( __FILE__ ).'/readygraph-extension.php' )) {
|
187 |
wp_enqueue_style('s2_rg_admin_template', S2URL . 'extension/readygraph/assets/css/upgrade.css');
|
188 |
|
189 |
-
echo '<div class="rg_info rg_message"><img src="'.S2URL . 'include/Sign-Alert-icon.png" style="float: left;height: 50px;padding-right: 10px;"><a href="admin.php?page=readygraph-app"><button class="button-warning pure-button" style="float: right; margin-right: 15px;">Connect ReadyGraph</button></a><h3 style="color:white">Grow your site traffic faster: Activate Subscribe2\'s User Growth Engine (ReadyGraph)</h3><p style="color: whitesmoke">Promotion to New Users | Viral Signup Form | Site Update emails | Import Existing Users</p></div>';}
|
190 |
$tabs = array('public' => __('Public Subscribers', 'subscribe2'), 'registered' => __('Registered Subscribers', 'subscribe2'));
|
191 |
echo "<h2 class=\"nav-tab-wrapper\">";
|
192 |
foreach ( $tabs as $tab_key => $tab_caption ) {
|
183 |
if ( version_compare($GLOBALS['wp_version'], '3.8', '<=') ) {
|
184 |
echo "<div id=\"icon-tools\" class=\"icon32\"></div>";
|
185 |
}
|
186 |
+
|
187 |
+
if( file_exists( plugin_dir_path( dirname(__FILE__) ).'readygraph-extension.php' )) {
|
188 |
+
wp_enqueue_style('s2_rg_admin_template', S2URL . 'extension/readygraph/assets/css/upgrade.css');
|
189 |
+
if (isset($_GET['readygraph_premium_notice']) && $_GET['readygraph_premium_notice'] == 'dismiss') update_option('readygraph_premium_notice',"false");
|
190 |
+
if (get_option('readygraph_premium_notice','true') != "false"){
|
191 |
+
echo '<div class="rg_info rg_message"><img src="'.S2URL.'extension/readygraph/assets/Sign-Alert-icon.png" style="float: left;height: 50px;padding-right: 10px;"><a href="admin.php?page=readygraph-app"><button class="button-warning pure-button" style="float: right; margin-right: 15px;">Connect ReadyGraph</button></a><h3 style="color:white">Grow your site traffic faster: Activate Email Newsletter\'s User Growth Engine (ReadyGraph)</h3><p style="color: whitesmoke">Promotion to New Users | Viral Signup Form | Site Update emails | Import Existing Users</p><div class="aa_close" style="position: absolute;right: 15px;top: 12px;"><a href="//' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . '&readygraph_premium_notice=dismiss"><img src="'.S2URL.'extension/readygraph/assets/dialog_close.png" style="width:12px;"></a></div></div>';}}
|
192 |
+
/*
|
193 |
if( file_exists(plugin_dir_path( __FILE__ ).'/readygraph-extension.php' )) {
|
194 |
wp_enqueue_style('s2_rg_admin_template', S2URL . 'extension/readygraph/assets/css/upgrade.css');
|
195 |
|
196 |
+
echo '<div class="rg_info rg_message"><img src="'.S2URL . 'include/Sign-Alert-icon.png" style="float: left;height: 50px;padding-right: 10px;"><a href="admin.php?page=readygraph-app"><button class="button-warning pure-button" style="float: right; margin-right: 15px;">Connect ReadyGraph</button></a><h3 style="color:white">Grow your site traffic faster: Activate Subscribe2\'s User Growth Engine (ReadyGraph)</h3><p style="color: whitesmoke">Promotion to New Users | Viral Signup Form | Site Update emails | Import Existing Users</p></div>';}*/
|
197 |
$tabs = array('public' => __('Public Subscribers', 'subscribe2'), 'registered' => __('Registered Subscribers', 'subscribe2'));
|
198 |
echo "<h2 class=\"nav-tab-wrapper\">";
|
199 |
foreach ( $tabs as $tab_key => $tab_caption ) {
|
admin/your_subscriptions.php
CHANGED
@@ -95,10 +95,11 @@ echo "<div class=\"wrap\">";
|
|
95 |
if ( version_compare($GLOBALS['wp_version'], '3.8', '<=') ) {
|
96 |
echo "<div id=\"icon-users\" class=\"icon32\"></div>";
|
97 |
}
|
98 |
-
if( file_exists(plugin_dir_path( __FILE__ ).'
|
99 |
wp_enqueue_style('s2_rg_admin_template', S2URL . 'extension/readygraph/assets/css/upgrade.css');
|
100 |
-
|
101 |
-
|
|
|
102 |
|
103 |
echo "<h2>" . __('Notification Settings', 'subscribe2') . "</h2>\r\n";
|
104 |
if ( isset($_GET['email']) ) {
|
95 |
if ( version_compare($GLOBALS['wp_version'], '3.8', '<=') ) {
|
96 |
echo "<div id=\"icon-users\" class=\"icon32\"></div>";
|
97 |
}
|
98 |
+
if( file_exists( plugin_dir_path( dirname(__FILE__) ).'readygraph-extension.php' )) {
|
99 |
wp_enqueue_style('s2_rg_admin_template', S2URL . 'extension/readygraph/assets/css/upgrade.css');
|
100 |
+
if (isset($_GET['readygraph_premium_notice']) && $_GET['readygraph_premium_notice'] == 'dismiss') update_option('readygraph_premium_notice',"false");
|
101 |
+
if (get_option('readygraph_premium_notice','true') != "false"){
|
102 |
+
echo '<div class="rg_info rg_message"><img src="'.S2URL.'extension/readygraph/assets/Sign-Alert-icon.png" style="float: left;height: 50px;padding-right: 10px;"><a href="admin.php?page=readygraph-app"><button class="button-warning pure-button" style="float: right; margin-right: 15px;">Connect ReadyGraph</button></a><h3 style="color:white">Grow your site traffic faster: Activate Email Newsletter\'s User Growth Engine (ReadyGraph)</h3><p style="color: whitesmoke">Promotion to New Users | Viral Signup Form | Site Update emails | Import Existing Users</p><div class="aa_close" style="position: absolute;right: 15px;top: 12px;"><a href="//' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . '&readygraph_premium_notice=dismiss"><img src="'.S2URL.'extension/readygraph/assets/dialog_close.png" style="width:12px;"></a></div></div>';}}
|
103 |
|
104 |
echo "<h2>" . __('Notification Settings', 'subscribe2') . "</h2>\r\n";
|
105 |
if ( isset($_GET['email']) ) {
|
classes/class-s2-ajax.php
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Copyright Matthew Robinson 2015
|
3 |
+
class S2_Ajax_Class {
|
4 |
+
/**
|
5 |
+
Constructor
|
6 |
+
*/
|
7 |
+
function __construct() {
|
8 |
+
// if SCRIPT_DEBUG is true, use dev scripts
|
9 |
+
$this->script_debug = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
10 |
+
if ( is_admin() ) {
|
11 |
+
add_action( 'wp_ajax_nopriv_subscribe2_form', array( &$this, 's2_ajax_form_handler' ) );
|
12 |
+
add_action( 'wp_ajax_nopriv_subscribe2_submit', array( &$this, 's2_ajax_submit_handler' ) );
|
13 |
+
add_filter( 's2_ajax_form', array( &$this, 's2_ajax_form_class' ), 1 );
|
14 |
+
|
15 |
+
global $s2_frontend;
|
16 |
+
require_once( S2PATH . 'classes/class-s2-core.php' );
|
17 |
+
require_once( S2PATH . 'classes/class-s2-frontend.php' );
|
18 |
+
$s2_frontend = new S2_Frontend;
|
19 |
+
$s2_frontend->subscribe2_options = get_option( 'subscribe2_options' );
|
20 |
+
global $wpdb;
|
21 |
+
$s2_frontend->public = $wpdb->prefix . 'subscribe2';
|
22 |
+
} else {
|
23 |
+
// add actions for ajax form if enabled
|
24 |
+
add_action( 'wp_enqueue_scripts', array( &$this, 'add_ajax' ) );
|
25 |
+
}
|
26 |
+
} // end __construct
|
27 |
+
|
28 |
+
/**
|
29 |
+
Add jQuery code and CSS to front pages for ajax form
|
30 |
+
*/
|
31 |
+
function add_ajax() {
|
32 |
+
// enqueue the jQuery script we need and let WordPress handle the dependencies
|
33 |
+
wp_enqueue_script( 'jquery-ui-dialog' );
|
34 |
+
$css = apply_filters( 's2_jqueryui_css', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/ui-darkness/jquery-ui.css' );
|
35 |
+
if ( is_ssl() ) {
|
36 |
+
$css = str_replace( 'http:', 'https:', $css );
|
37 |
+
}
|
38 |
+
wp_register_style( 'jquery-ui-style', $css );
|
39 |
+
wp_enqueue_style( 'jquery-ui-style' );
|
40 |
+
wp_register_script( 's2_ajax', S2URL . 'include/s2_ajax' . $this->script_debug . '.js', array(), '1.0' );
|
41 |
+
$translation_array = array(
|
42 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
43 |
+
'title' => __( 'Subscribe to this blog', 'subscribe2' ),
|
44 |
+
);
|
45 |
+
wp_localize_script( 's2_ajax', 's2_script_strings', $translation_array );
|
46 |
+
wp_enqueue_script( 's2_ajax' );
|
47 |
+
} // end add_ajax()
|
48 |
+
|
49 |
+
/**
|
50 |
+
Ajax form handler
|
51 |
+
*/
|
52 |
+
function s2_ajax_form_handler() {
|
53 |
+
require_once( ABSPATH . '/wp-includes/shortcodes.php' );
|
54 |
+
|
55 |
+
$response = str_replace( ':', '&', $_POST['data'] );
|
56 |
+
$response = str_replace( '-', '=', $response );
|
57 |
+
wp_parse_str( $response, $atts );
|
58 |
+
|
59 |
+
global $s2_frontend;
|
60 |
+
$content = $s2_frontend->shortcode( $atts );
|
61 |
+
$content = apply_filters( 's2_ajax_form', $content );
|
62 |
+
echo $content;
|
63 |
+
wp_die();
|
64 |
+
} // end s2_ajax_handler()
|
65 |
+
|
66 |
+
/**
|
67 |
+
Ajax submit handler
|
68 |
+
*/
|
69 |
+
function s2_ajax_submit_handler() {
|
70 |
+
$data = $_POST['data'];
|
71 |
+
if ( ( isset( $data['firstname'] ) && '' !== $data['firstname'] ) || ( isset( $data['lastname'] ) && '' !== $data['lastname'] ) || ( isset( $data['uri'] ) && 'http://' !== $data['uri'] ) ) {
|
72 |
+
// looks like some invisible-to-user fields were changed; falsely report success
|
73 |
+
echo '<p>' . __( 'A confirmation message is on its way!', 'subscribe2' ) . '</p>';
|
74 |
+
wp_die();
|
75 |
+
}
|
76 |
+
|
77 |
+
global $s2_frontend, $wpdb;
|
78 |
+
$s2_frontend->email = $s2_frontend->sanitize_email( $data['email'] );
|
79 |
+
$s2_frontend->ip = $data['ip'];
|
80 |
+
if ( ! is_email( $s2_frontend->email ) ) {
|
81 |
+
echo '<p>' . __( 'Sorry, but that does not look like an email address to me.', 'subscribe2' ) . '</p>';
|
82 |
+
wp_die();
|
83 |
+
} elseif ( $s2_frontend->is_barred( $s2_frontend->email ) ) {
|
84 |
+
echo '<p>' . __( 'Sorry, email addresses at that domain are currently barred due to spam, please use an alternative email address.', 'subscribe2' ) . '</p>';
|
85 |
+
wp_die();
|
86 |
+
} else {
|
87 |
+
if ( is_int( $s2_frontend->lockout ) && $s2_frontend->lockout > 0 ) {
|
88 |
+
$date = date( 'H:i:s.u', $s2_frontend->lockout );
|
89 |
+
$ips = $wpdb->get_col( $wpdb->prepare( "SELECT ip FROM $s2_frontend->public WHERE date = CURDATE() AND time > SUBTIME(CURTIME(), %s)", $date ) );
|
90 |
+
if ( in_array( $s2_frontend->ip, $ips ) ) {
|
91 |
+
echo '<p>' . __( 'Slow down, you move too fast.', 'subscribe2' ) . '</p>';
|
92 |
+
wp_die();
|
93 |
+
}
|
94 |
+
}
|
95 |
+
$check = $wpdb->get_var( $wpdb->prepare( "SELECT user_email FROM $wpdb->users WHERE user_email = %s", $s2_frontend->email ) );
|
96 |
+
if ( null !== $check ) {
|
97 |
+
printf( __( 'To manage your subscription options please <a href="%1$s">login.</a>', 'subscribe2' ), get_option( 'siteurl' ) . '/wp-login.php' );
|
98 |
+
wp_die();
|
99 |
+
}
|
100 |
+
if ( 'subscribe' === $data['button'] ) {
|
101 |
+
if ( '1' !== $s2_frontend->is_public( $s2_frontend->email ) ) {
|
102 |
+
// the user is unknown or inactive
|
103 |
+
$s2_frontend->add( $s2_frontend->email );
|
104 |
+
$status = $s2_frontend->send_confirm( 'add' );
|
105 |
+
if ( $status ) {
|
106 |
+
echo '<p>' . __( 'A confirmation message is on its way!', 'subscribe2' ) . '</p>';
|
107 |
+
} else {
|
108 |
+
echo '<p>' . __( 'Sorry, there seems to be an error on the server. Please try again later.', 'subscribe2' ) . '</p>';
|
109 |
+
}
|
110 |
+
} else {
|
111 |
+
// they're already subscribed
|
112 |
+
echo '<p>' . __( 'That email address is already subscribed.', 'subscribe2' ) . '</p>';
|
113 |
+
}
|
114 |
+
wp_die();
|
115 |
+
} elseif ( 'unsubscribe' === $data['button'] ) {
|
116 |
+
if ( false === $s2_frontend->is_public( $s2_frontend->email ) ) {
|
117 |
+
echo '<p>' . __( 'That email address is not subscribed.', 'subscribe2' ) . '</p>';
|
118 |
+
} else {
|
119 |
+
$status = $s2_frontend->send_confirm( 'del' );
|
120 |
+
if ( $status ) {
|
121 |
+
echo '<p>' . __( 'A confirmation message is on its way!', 'subscribe2' ) . '</p>';
|
122 |
+
} else {
|
123 |
+
echo '<p>' . __( 'Sorry, there seems to be an error on the server. Please try again later.', 'subscribe2' ) . '</p>';
|
124 |
+
}
|
125 |
+
}
|
126 |
+
wp_die();
|
127 |
+
}
|
128 |
+
}
|
129 |
+
wp_die();
|
130 |
+
} // end s2_ajax_submit_handler()
|
131 |
+
|
132 |
+
/**
|
133 |
+
Filter to add ajax id to form
|
134 |
+
*/
|
135 |
+
function s2_ajax_form_class( $content ) {
|
136 |
+
$content = str_replace( '<form', '<form id="s2ajaxform"', $content );
|
137 |
+
$content = str_replace( 'wp-login.php"', 'wp-login.php" style="text-decoration: underline;"', $content );
|
138 |
+
return $content;
|
139 |
+
} // end s2_ajax_form_class()
|
140 |
+
}
|
141 |
+
?>
|
classes/class-s2-core.php
CHANGED
@@ -1700,7 +1700,14 @@ class s2class {
|
|
1700 |
if ( $this->clean_interval > 0 ) {
|
1701 |
add_action('wp_scheduled_delete', array(&$this, 's2cleaner_task'));
|
1702 |
}
|
1703 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1704 |
// Add actions specific to admin or frontend
|
1705 |
if ( is_admin() ) {
|
1706 |
//add menu, authoring and category admin actions
|
@@ -1768,12 +1775,6 @@ class s2class {
|
|
1768 |
if ( '1' == $this->subscribe2_options['show_meta'] ) {
|
1769 |
add_action('wp_meta', array(&$this, 'add_minimeta'), 0);
|
1770 |
}
|
1771 |
-
|
1772 |
-
// add actions for ajax form if enabled
|
1773 |
-
if ( '1' == $this->subscribe2_options['ajax'] ) {
|
1774 |
-
add_action('wp_enqueue_scripts', array(&$this, 'add_ajax'));
|
1775 |
-
add_action('wp_footer', array(&$this, 'add_s2_ajax'));
|
1776 |
-
}
|
1777 |
}
|
1778 |
} // end s2init()
|
1779 |
|
1700 |
if ( $this->clean_interval > 0 ) {
|
1701 |
add_action('wp_scheduled_delete', array(&$this, 's2cleaner_task'));
|
1702 |
}
|
1703 |
+
|
1704 |
+
// add ajax class if enabled
|
1705 |
+
if ( '1' === $this->subscribe2_options['ajax'] ) {
|
1706 |
+
require_once( S2PATH . 'classes/class-s2-ajax.php' );
|
1707 |
+
global $mysubscribe2_ajax;
|
1708 |
+
$mysubscribe2_ajax = new S2_Ajax_Class;
|
1709 |
+
}
|
1710 |
+
|
1711 |
// Add actions specific to admin or frontend
|
1712 |
if ( is_admin() ) {
|
1713 |
//add menu, authoring and category admin actions
|
1775 |
if ( '1' == $this->subscribe2_options['show_meta'] ) {
|
1776 |
add_action('wp_meta', array(&$this, 'add_minimeta'), 0);
|
1777 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1778 |
}
|
1779 |
} // end s2init()
|
1780 |
|
extension/readygraph/admin.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
|
2 |
-
|
3 |
/**
|
4 |
* Represents the view for the administration dashboard.
|
5 |
*
|
@@ -113,9 +113,9 @@ include("header.php");
|
|
113 |
</div>
|
114 |
<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>
|
115 |
<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"></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>
|
116 |
-
<div style="margin: 10px;"><div class="rg-icon-thumb"><input type="radio" name="select-plan" value="
|
117 |
-
<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
|
118 |
-
<div style="margin: 10px;"><div class="rg-icon-thumb"><input type="radio" name="select-plan" value="
|
119 |
<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>
|
120 |
<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"> Save 20% with an annual plan</input></div>
|
121 |
<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>
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
3 |
/**
|
4 |
* Represents the view for the administration dashboard.
|
5 |
*
|
113 |
</div>
|
114 |
<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>
|
115 |
<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"></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>
|
116 |
+
<div style="margin: 10px;"><div class="rg-icon-thumb"><input type="radio" name="select-plan" value="promote_39" style="font-weight: bold; margin: 12px 0" checked></div><p class="rg-icon-content"><strong>Get promoted to 2000 users monthly</strong></input><br><span style="margin-top: -12px">$39/month</span></p></div>
|
117 |
+
<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 10,000 users monthly</strong></input><br><span style="margin-top: -12px">$59/month</span></p></div>
|
118 |
+
<div style="margin: 10px;"><div class="rg-icon-thumb"><input type="radio" name="select-plan" value="promote_99" 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">$99/month</span></p></div>
|
119 |
<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>
|
120 |
<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"> Save 20% with an annual plan</input></div>
|
121 |
<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>
|
extension/readygraph/assets/Sign-Alert-icon.png
ADDED
Binary file
|
include/s2_ajax.js
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global s2_script_strings */
|
2 |
+
// Version 1.0 - original version
|
3 |
+
// Copyright Matthew Robinson 2015
|
4 |
+
|
5 |
+
var s2jQuery = jQuery.noConflict();
|
6 |
+
s2jQuery( document ).ready( function() {
|
7 |
+
var dialog = s2jQuery( '<div></div>' );
|
8 |
+
var ajaxurl = s2_script_strings.ajaxurl;
|
9 |
+
s2jQuery( 'a.s2popup' ).click( function(){
|
10 |
+
var data = {
|
11 |
+
'action': 'subscribe2_form',
|
12 |
+
'data': s2jQuery( 'a.s2popup' ).attr( 'id' )
|
13 |
+
};
|
14 |
+
jQuery.post( ajaxurl, data, function( response ) {
|
15 |
+
dialog.html( response );
|
16 |
+
});
|
17 |
+
dialog.dialog( { modal: true, zIndex: 10000, title: s2_script_strings.title } );
|
18 |
+
dialog.dialog( 'open' );
|
19 |
+
});
|
20 |
+
s2jQuery( document ).on( 'submit', '#s2ajaxform', function( event ) {
|
21 |
+
event.preventDefault();
|
22 |
+
var email = s2jQuery( '#s2ajaxform input[name=email]' ).val();
|
23 |
+
var ip = s2jQuery( '#s2ajaxform input[name=ip]' ).val();
|
24 |
+
var firstname = s2jQuery( '#s2ajaxform input[name=firstname]' ).val();
|
25 |
+
if ( typeof firstname === 'undefined' ) {
|
26 |
+
firstname = '';
|
27 |
+
}
|
28 |
+
var lastname = s2jQuery( '#s2ajaxform input[name=lastname]' ).val();
|
29 |
+
if ( typeof lastname === 'undefined' ) {
|
30 |
+
lastname = '';
|
31 |
+
}
|
32 |
+
var uri = s2jQuery( '#s2ajaxform input[name=uri]' ).val();
|
33 |
+
if ( typeof uri === 'undefined' ) {
|
34 |
+
uri = 'http://';
|
35 |
+
}
|
36 |
+
var btn = s2jQuery( this ).find( 'input[type=submit][clicked=true]' );
|
37 |
+
if ( btn.length && s2jQuery( '#s2ajaxform' ).has( btn ) ) {
|
38 |
+
var data = {
|
39 |
+
'action': 'subscribe2_submit',
|
40 |
+
'data': {
|
41 |
+
email: email,
|
42 |
+
ip: ip,
|
43 |
+
firstname: firstname,
|
44 |
+
lastname: lastname,
|
45 |
+
uri: uri,
|
46 |
+
button: btn.attr( 'name' )
|
47 |
+
}
|
48 |
+
};
|
49 |
+
jQuery.post( ajaxurl, data, function( response ) {
|
50 |
+
dialog.html( response );
|
51 |
+
});
|
52 |
+
}
|
53 |
+
});
|
54 |
+
// Allows detection of which button was clicked
|
55 |
+
s2jQuery( document ).on( 'click', '#s2ajaxform input[type=submit]', function() {
|
56 |
+
s2jQuery( '#s2ajaxform input[type=submit]' ).removeAttr( 'clicked' );
|
57 |
+
s2jQuery( this ).attr( 'clicked', 'true' );
|
58 |
+
});
|
59 |
+
// when form is closed return to default
|
60 |
+
s2jQuery( document ).on( 'dialogclose', function() {
|
61 |
+
var data = {
|
62 |
+
'action': 'subscribe2_form',
|
63 |
+
'data': s2jQuery( 'a.s2popup' ).attr( 'id' )
|
64 |
+
};
|
65 |
+
jQuery.post( ajaxurl, data, function( response ) {
|
66 |
+
dialog.html( response );
|
67 |
+
});
|
68 |
+
});
|
69 |
+
});
|
include/s2_ajax.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
var s2jQuery=jQuery.noConflict();s2jQuery(document).ready(function(){var dialog=s2jQuery('<div></div>');var ajaxurl=s2_script_strings.ajaxurl;s2jQuery('a.s2popup').click(function(){var data={'action':'subscribe2_form','data':s2jQuery('a.s2popup').attr('id')};jQuery.post(ajaxurl,data,function(response){dialog.html(response)});dialog.dialog({modal:true,zIndex:10000,title:s2_script_strings.title});dialog.dialog('open')});s2jQuery(document).on('submit','#s2ajaxform',function(event){event.preventDefault();var email=s2jQuery('#s2ajaxform input[name=email]').val();var ip=s2jQuery('#s2ajaxform input[name=ip]').val();var firstname=s2jQuery('#s2ajaxform input[name=firstname]').val();if(typeof firstname==='undefined'){firstname=''}var lastname=s2jQuery('#s2ajaxform input[name=lastname]').val();if(typeof lastname==='undefined'){lastname=''}var uri=s2jQuery('#s2ajaxform input[name=uri]').val();if(typeof uri==='undefined'){uri='http://'}var btn=s2jQuery(this).find('input[type=submit][clicked=true]');if(btn.length&&s2jQuery('#s2ajaxform').has(btn)){var data={'action':'subscribe2_submit','data':{email:email,ip:ip,firstname:firstname,lastname:lastname,uri:uri,button:btn.attr('name')}};jQuery.post(ajaxurl,data,function(response){dialog.html(response)})}});s2jQuery(document).on('click','#s2ajaxform input[type=submit]',function(){s2jQuery('#s2ajaxform input[type=submit]').removeAttr('clicked');s2jQuery(this).attr('clicked','true')});s2jQuery(document).on('dialogclose',function(){var data={'action':'subscribe2_form','data':s2jQuery('a.s2popup').attr('id')};jQuery.post(ajaxurl,data,function(response){dialog.html(response)})})});
|
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.
|
7 |
Author: Matthew Robinson, Tanay Lakhani
|
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.20.7
|
7 |
Author: Matthew Robinson, Tanay Lakhani
|
8 |
Author URI: http://subscribe2.wordpress.com
|
9 |
Licence: GPL3
|
uninstall.php
CHANGED
@@ -3,6 +3,11 @@ if ( !defined('ABSPATH') && !defined('WP_UNINSTALL_PLUGIN') ) {
|
|
3 |
// Make sure not to call this file directly
|
4 |
exit();
|
5 |
} else {
|
|
|
|
|
|
|
|
|
|
|
6 |
// Is this WordPressMU or not?
|
7 |
if ( isset($wpmu_version) || strpos($wp_version, 'wordpress-mu') ) {
|
8 |
$s2_mu = true;
|
3 |
// Make sure not to call this file directly
|
4 |
exit();
|
5 |
} else {
|
6 |
+
// Is Subscribe2 free active
|
7 |
+
if ( is_plugin_active( 'subscribe2_html/subscribe2.php' ) ) {
|
8 |
+
return;
|
9 |
+
}
|
10 |
+
|
11 |
// Is this WordPressMU or not?
|
12 |
if ( isset($wpmu_version) || strpos($wp_version, 'wordpress-mu') ) {
|
13 |
$s2_mu = true;
|