Version Description
Download this release
Release Info
Developer | tanaylakhani |
Plugin | Subscribe2 |
Version | 10.10 |
Comparing to | |
See all releases |
Code changes from version 10.9 to 10.10
- ChangeLog.txt +5 -0
- ReadMe.txt +1 -1
- extension/readygraph/admin.php +21 -10
- extension/readygraph/assets/callout_black.gif +0 -0
- extension/readygraph/assets/dialog_close.png +0 -0
- extension/readygraph/extension.php +3 -0
- readygraph-extension.php +60 -1
- subscribe2.php +2 -2
ChangeLog.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
= Version 10.9 =
|
2 |
|
3 |
* Close button to dismiss Readygraph connect button on plugins page
|
1 |
+
= Version 10.10 =
|
2 |
+
|
3 |
+
* Send blog updates to readygraph for weekly digest. You can turn it off from readygraph settings page.
|
4 |
+
* Fix Readygraph banner close permanently
|
5 |
+
|
6 |
= Version 10.9 =
|
7 |
|
8 |
* Close button to dismiss Readygraph connect button on plugins page
|
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.
|
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.10
|
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
@@ -23,6 +23,8 @@ delete_option('readygraph_enable_sidebar');
|
|
23 |
delete_option('readygraph_auto_select_all');
|
24 |
delete_option('readygraph_enable_notification');
|
25 |
delete_option('readygraph_enable_branding');
|
|
|
|
|
26 |
}
|
27 |
if(isset($_GET["action"]) && base64_decode($_GET["action"]) == "changeaccount")changeAccount();
|
28 |
global $main_plugin_title;
|
@@ -33,10 +35,11 @@ delete_option('readygraph_enable_branding');
|
|
33 |
if (isset($_POST["readygraph_application_id"])) update_option('readygraph_application_id', $_POST["readygraph_application_id"]);
|
34 |
if (isset($_POST["readygraph_settings"])) update_option('readygraph_settings', $_POST["readygraph_settings"]);
|
35 |
if (isset($_POST["readygraph_delay"])) update_option('readygraph_delay', 5000);
|
36 |
-
if (isset($_POST["readygraph_enable_notification"])) update_option('readygraph_enable_notification', '
|
37 |
if (isset($_POST["readygraph_enable_sidebar"])) update_option('readygraph_enable_sidebar', 'false');
|
38 |
if (isset($_POST["readygraph_auto_select_all"])) update_option('readygraph_auto_select_all', $_POST["selectAll"]);
|
39 |
-
if (isset($_POST["readygraph_enable_branding"])) update_option('readygraph_enable_branding', '
|
|
|
40 |
}
|
41 |
else {
|
42 |
if (isset($_POST["readygraph_access_token"])) update_option('readygraph_access_token', $_POST["readygraph_access_token"]);
|
@@ -49,6 +52,7 @@ delete_option('readygraph_enable_branding');
|
|
49 |
if (isset($_POST["readygraph_enable_sidebar"])) update_option('readygraph_enable_sidebar', $_POST["sidebar"]);
|
50 |
if (isset($_POST["readygraph_auto_select_all"])) update_option('readygraph_auto_select_all', $_POST["selectAll"]);
|
51 |
if (isset($_POST["readygraph_enable_branding"])) update_option('readygraph_enable_branding', $_POST["branding"]);
|
|
|
52 |
}
|
53 |
if (get_option('readygraph_enable_branding', '') == 'false') {
|
54 |
?>
|
@@ -70,9 +74,10 @@ delete_option('readygraph_enable_branding');
|
|
70 |
<input type="hidden" name="readygraph_settings" value="<?php echo htmlentities(str_replace("\\\"", "\"", get_option('readygraph_settings', '{}'))) ?>">
|
71 |
<input type="hidden" name="readygraph_delay" value="<?php echo get_option('readygraph_delay', '5000') ?>">
|
72 |
<input type="hidden" name="readygraph_enable_sidebar" value="<?php echo get_option('readygraph_enable_sidebar', 'false') ?>">
|
73 |
-
<input type="hidden" name="readygraph_enable_notification" value="<?php echo get_option('readygraph_enable_notification', '
|
74 |
<input type="hidden" name="readygraph_auto_select_all" value="<?php echo get_option('readygraph_auto_select_all', 'true') ?>">
|
75 |
-
<input type="hidden" name="readygraph_enable_branding" value="<?php echo get_option('readygraph_enable_branding', '
|
|
|
76 |
<div class="authenticate" style="display: none;">
|
77 |
<div class="wrap1" style="min-height: 600px;">
|
78 |
|
@@ -162,13 +167,13 @@ Questions, feel free to email us at nick@readygraph.com</p>
|
|
162 |
<label class="btn btn-primary rg-vertical-tab" tab="DEFAULT">
|
163 |
<input type="radio" name="options" id="option4"> Invitation Page
|
164 |
</label>
|
165 |
-
<a href="#" class="help-tooltip"><img src="
|
166 |
</div>
|
167 |
<div class="rg-preview-widget" style=""></div>
|
168 |
</td>
|
169 |
-
<td style="border-left: solid 1px #cccccc; text-align:
|
170 |
<div style="padding: 20px 0;">
|
171 |
-
<p>To configure Automated Email Settings, <a href="https://readygraph.com/application/customize/settings/advance/">Click here</a><a href="#" class="help-tooltip"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/Help-icon.png" width="15px" style="margin-left:10px;"/><span><img class="callout" src="
|
172 |
<br />
|
173 |
|
174 |
<p> To mass e-mail all your subscribers, <a href="https://readygraph.com/application/insights/">Click here</a></p><br />
|
@@ -189,12 +194,12 @@ Questions, feel free to email us at nick@readygraph.com</p>
|
|
189 |
<option value="600000">10 minute</option>
|
190 |
<option value="900000">15 minute</option>
|
191 |
<option value="1200000">20 minute</option>
|
192 |
-
</select><a href="#" class="help-tooltip"><img src="
|
193 |
<p>Enable Sidebar:
|
194 |
<select class="sidebar" name="sidebar" class="form-control">
|
195 |
<option value="true">YES</option>
|
196 |
<option value="false">NO</option>
|
197 |
-
</select><a href="#" class="help-tooltip"><img src="
|
198 |
<p>Enable Lower Right Notification:
|
199 |
<select class="notification" name="notification" class="form-control">
|
200 |
<option value="true">YES</option>
|
@@ -210,8 +215,13 @@ Questions, feel free to email us at nick@readygraph.com</p>
|
|
210 |
<option value="true">YES</option>
|
211 |
<option value="false">NO</option>
|
212 |
</select></p>
|
|
|
|
|
|
|
|
|
|
|
213 |
</div>
|
214 |
-
<button type="button" class="btn btn-large btn-warning save">Save Changes</button>
|
215 |
</td>
|
216 |
</tr>
|
217 |
</table>
|
@@ -305,6 +315,7 @@ Questions, feel free to email us at nick@readygraph.com</p>
|
|
305 |
$('.notification').val($('[name="readygraph_enable_notification"]').val());
|
306 |
$('.selectAll').val($('[name="readygraph_auto_select_all"]').val());
|
307 |
$('.branding').val($('[name="readygraph_enable_branding"]').val());
|
|
|
308 |
|
309 |
//$('[name="readygraph_ad_format"][value="' + $('[name="_readygraph_ad_format"]').val() + '"]').parent().click();
|
310 |
//$('[name="readygraph_ad_timing"][value="' + $('[name="_readygraph_ad_timing"]').val() + '"]').parent().click();
|
23 |
delete_option('readygraph_auto_select_all');
|
24 |
delete_option('readygraph_enable_notification');
|
25 |
delete_option('readygraph_enable_branding');
|
26 |
+
delete_option('readygraph_send_blog_updates');
|
27 |
+
wp_clear_scheduled_hook( 'rg_cron_hook' );
|
28 |
}
|
29 |
if(isset($_GET["action"]) && base64_decode($_GET["action"]) == "changeaccount")changeAccount();
|
30 |
global $main_plugin_title;
|
35 |
if (isset($_POST["readygraph_application_id"])) update_option('readygraph_application_id', $_POST["readygraph_application_id"]);
|
36 |
if (isset($_POST["readygraph_settings"])) update_option('readygraph_settings', $_POST["readygraph_settings"]);
|
37 |
if (isset($_POST["readygraph_delay"])) update_option('readygraph_delay', 5000);
|
38 |
+
if (isset($_POST["readygraph_enable_notification"])) update_option('readygraph_enable_notification', 'true');
|
39 |
if (isset($_POST["readygraph_enable_sidebar"])) update_option('readygraph_enable_sidebar', 'false');
|
40 |
if (isset($_POST["readygraph_auto_select_all"])) update_option('readygraph_auto_select_all', $_POST["selectAll"]);
|
41 |
+
if (isset($_POST["readygraph_enable_branding"])) update_option('readygraph_enable_branding', 'false');
|
42 |
+
if (isset($_POST["readygraph_send_blog_updates"])) update_option('readygraph_send_blog_updates', 'true');
|
43 |
}
|
44 |
else {
|
45 |
if (isset($_POST["readygraph_access_token"])) update_option('readygraph_access_token', $_POST["readygraph_access_token"]);
|
52 |
if (isset($_POST["readygraph_enable_sidebar"])) update_option('readygraph_enable_sidebar', $_POST["sidebar"]);
|
53 |
if (isset($_POST["readygraph_auto_select_all"])) update_option('readygraph_auto_select_all', $_POST["selectAll"]);
|
54 |
if (isset($_POST["readygraph_enable_branding"])) update_option('readygraph_enable_branding', $_POST["branding"]);
|
55 |
+
if (isset($_POST["readygraph_send_blog_updates"])) update_option('readygraph_send_blog_updates', $_POST["blog_updates"]);
|
56 |
}
|
57 |
if (get_option('readygraph_enable_branding', '') == 'false') {
|
58 |
?>
|
74 |
<input type="hidden" name="readygraph_settings" value="<?php echo htmlentities(str_replace("\\\"", "\"", get_option('readygraph_settings', '{}'))) ?>">
|
75 |
<input type="hidden" name="readygraph_delay" value="<?php echo get_option('readygraph_delay', '5000') ?>">
|
76 |
<input type="hidden" name="readygraph_enable_sidebar" value="<?php echo get_option('readygraph_enable_sidebar', 'false') ?>">
|
77 |
+
<input type="hidden" name="readygraph_enable_notification" value="<?php echo get_option('readygraph_enable_notification', 'true') ?>">
|
78 |
<input type="hidden" name="readygraph_auto_select_all" value="<?php echo get_option('readygraph_auto_select_all', 'true') ?>">
|
79 |
+
<input type="hidden" name="readygraph_enable_branding" value="<?php echo get_option('readygraph_enable_branding', 'false') ?>">
|
80 |
+
<input type="hidden" name="readygraph_send_blog_updates" value="<?php echo get_option('readygraph_send_blog_updates', 'true') ?>">
|
81 |
<div class="authenticate" style="display: none;">
|
82 |
<div class="wrap1" style="min-height: 600px;">
|
83 |
|
167 |
<label class="btn btn-primary rg-vertical-tab" tab="DEFAULT">
|
168 |
<input type="radio" name="options" id="option4"> Invitation Page
|
169 |
</label>
|
170 |
+
<a href="#" class="help-tooltip"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/Help-icon.png" width="15px" style="margin-left:10px;"/><span><img class="callout" src="<?php echo plugin_dir_url( __FILE__ );?>assets/callout_black.gif" /><strong>ReadyGraph Plugin Settings</strong><br />You can directly edit the text in the orange box below.<br /></span></a>
|
171 |
</div>
|
172 |
<div class="rg-preview-widget" style=""></div>
|
173 |
</td>
|
174 |
+
<td style="border-left: solid 1px #cccccc; text-align: left;padding-left: 25px;">
|
175 |
<div style="padding: 20px 0;">
|
176 |
+
<p>To configure Automated Email Settings, <a href="https://readygraph.com/application/customize/settings/advance/">Click here</a><a href="#" class="help-tooltip"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/Help-icon.png" width="15px" style="margin-left:10px;"/><span><img class="callout" src="<?php echo plugin_dir_url( __FILE__ );?>assets/callout_black.gif" /><strong>ReadyGraph Auto Email Settings</strong><br />ReadyGraph helps you maximize the engagement of your list by sending automated email campaigns on your behalf (welcome emails, weekly digests, social emails, etc.). You can customize these emails and turn on and off campaigns depending on your goals.<br /></span></a></p>
|
177 |
<br />
|
178 |
|
179 |
<p> To mass e-mail all your subscribers, <a href="https://readygraph.com/application/insights/">Click here</a></p><br />
|
194 |
<option value="600000">10 minute</option>
|
195 |
<option value="900000">15 minute</option>
|
196 |
<option value="1200000">20 minute</option>
|
197 |
+
</select><a href="#" class="help-tooltip"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/Help-icon.png" width="15px" style="margin-left:10px;"/><span><img class="callout" src="<?php echo plugin_dir_url( __FILE__ );?>assets/callout_black.gif" /><strong>ReadyGraph Popup Settings</strong><br />ReadyGraph's intelligent registration popup maximizes signups to your list. You can adjust it so that it displays to users after a preset time. Shorter times will yield more signups. <br /></span></a></p><br />
|
198 |
<p>Enable Sidebar:
|
199 |
<select class="sidebar" name="sidebar" class="form-control">
|
200 |
<option value="true">YES</option>
|
201 |
<option value="false">NO</option>
|
202 |
+
</select><a href="#" class="help-tooltip"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/Help-icon.png" width="15px" style="margin-left:10px;"/><span><img class="callout" src="<?php echo plugin_dir_url( __FILE__ );?>assets/callout_black.gif" /><strong>ReadyGraph Social Feed Settings</strong><br />You can add an optional social sidebar to your site that allows users the ability to share and discuss the best content on your site. For an example, click here.<br /></span></a></p><br />
|
203 |
<p>Enable Lower Right Notification:
|
204 |
<select class="notification" name="notification" class="form-control">
|
205 |
<option value="true">YES</option>
|
215 |
<option value="true">YES</option>
|
216 |
<option value="false">NO</option>
|
217 |
</select></p>
|
218 |
+
<p>Include blog updates in weekly email digest of Readygraph:
|
219 |
+
<select class="blog_updates" name="blog_updates" class="form-control">
|
220 |
+
<option value="true">YES</option>
|
221 |
+
<option value="false">NO</option>
|
222 |
+
</select></p>
|
223 |
</div>
|
224 |
+
<button type="button" class="btn btn-large btn-warning save" style="float: right;">Save Changes</button>
|
225 |
</td>
|
226 |
</tr>
|
227 |
</table>
|
315 |
$('.notification').val($('[name="readygraph_enable_notification"]').val());
|
316 |
$('.selectAll').val($('[name="readygraph_auto_select_all"]').val());
|
317 |
$('.branding').val($('[name="readygraph_enable_branding"]').val());
|
318 |
+
$('.blog_updates').val($('[name="readygraph_send_blog_updates"]').val());
|
319 |
|
320 |
//$('[name="readygraph_ad_format"][value="' + $('[name="_readygraph_ad_format"]').val() + '"]').parent().click();
|
321 |
//$('[name="readygraph_ad_timing"][value="' + $('[name="_readygraph_ad_timing"]').val() + '"]').parent().click();
|
extension/readygraph/assets/callout_black.gif
ADDED
Binary file
|
extension/readygraph/assets/dialog_close.png
CHANGED
Binary file
|
extension/readygraph/extension.php
CHANGED
@@ -150,6 +150,9 @@ function add_readygraph_plugin_warning() {
|
|
150 |
</form>
|
151 |
</div>';
|
152 |
}
|
|
|
|
|
|
|
153 |
}
|
154 |
|
155 |
function readygraph_client_script_head() {
|
150 |
</form>
|
151 |
</div>';
|
152 |
}
|
153 |
+
else{
|
154 |
+
//do nothing
|
155 |
+
}
|
156 |
}
|
157 |
|
158 |
function readygraph_client_script_head() {
|
readygraph-extension.php
CHANGED
@@ -58,7 +58,7 @@ EOF;
|
|
58 |
}
|
59 |
*/
|
60 |
function on_plugin_activated_readygraph_s2_redirect(){
|
61 |
-
|
62 |
global $menu_slug;
|
63 |
$setting_url="admin.php?page=$menu_slug";
|
64 |
if (get_option('rg_s2_plugin_do_activation_redirect', false)) {
|
@@ -74,4 +74,63 @@ EOF;
|
|
74 |
add_action('wp_head', 'readygraph_client_script_head');
|
75 |
add_action('admin_init', 'on_plugin_activated_readygraph_s2_redirect');
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
?>
|
58 |
}
|
59 |
*/
|
60 |
function on_plugin_activated_readygraph_s2_redirect(){
|
61 |
+
|
62 |
global $menu_slug;
|
63 |
$setting_url="admin.php?page=$menu_slug";
|
64 |
if (get_option('rg_s2_plugin_do_activation_redirect', false)) {
|
74 |
add_action('wp_head', 'readygraph_client_script_head');
|
75 |
add_action('admin_init', 'on_plugin_activated_readygraph_s2_redirect');
|
76 |
|
77 |
+
add_filter( 'cron_schedules', 'readygraph_cron_intervals' );
|
78 |
+
add_option('readygraph_connect_notice','true');
|
79 |
+
function readygraph_cron_intervals( $schedules ) {
|
80 |
+
$schedules['weekly'] = array( // Provide the programmatic name to be used in code
|
81 |
+
'interval' => 604800, // Intervals are listed in seconds
|
82 |
+
'display' => __('Every week Seconds') // Easy to read display name
|
83 |
+
);
|
84 |
+
return $schedules; // Do not forget to give back the list of schedules!
|
85 |
+
}
|
86 |
+
|
87 |
+
|
88 |
+
add_action( 'rg_cron_hook', 'rg_cron_exec' );
|
89 |
+
$send_blog_updates = get_option('readygraph_send_blog_updates');
|
90 |
+
if ($send_blog_updates == 'true'){
|
91 |
+
if( !wp_next_scheduled( 'rg_cron_hook' && $send_blog_updates == 'true')) {
|
92 |
+
wp_schedule_event( time(), 'weekly', 'rg_cron_hook' );
|
93 |
+
}
|
94 |
+
}
|
95 |
+
else
|
96 |
+
{
|
97 |
+
//do nothing
|
98 |
+
}
|
99 |
+
if ($send_blog_updates == 'false'){
|
100 |
+
wp_clear_scheduled_hook( 'rg_cron_hook' );
|
101 |
+
}
|
102 |
+
function rg_cron_exec() {
|
103 |
+
// $send_blog_updates = get_option('readygraph_send_blog_updates');
|
104 |
+
$readygraph_email = get_option('readygraph_email', '');
|
105 |
+
// wp_mail($readygraph_email, 'Automatic email', 'Hello, this is an automatically scheduled email from WordPress.');
|
106 |
+
global $wpdb;
|
107 |
+
$query = "SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_modified DESC LIMIT 5";
|
108 |
+
|
109 |
+
global $wpdb;
|
110 |
+
$recentposts = $wpdb->get_results($query);
|
111 |
+
|
112 |
+
echo "<h2> Recently Updated</h2>";
|
113 |
+
echo "<ul>";
|
114 |
+
$postdata = "";
|
115 |
+
$postdatalinks = "";
|
116 |
+
foreach($recentposts as $post) {
|
117 |
+
$postdata .= $post->post_title . ", ";
|
118 |
+
$postdatalinks .= get_permalink($post->ID) . ", ";
|
119 |
+
$url = 'http://readygraph.com/api/v1/post.json/';
|
120 |
+
$response = wp_remote_post($url, array( 'body' => array('is_wordpress'=>1, 'message' => rtrim($postdata, ", "), 'message_link' => rtrim($postdatalinks, ", "),'client_key' => get_option('readygraph_application_id'), 'email' => get_option('readygraph_email'))));
|
121 |
+
|
122 |
+
if ( is_wp_error( $response ) ) {
|
123 |
+
$error_message = $response->get_error_message();
|
124 |
+
echo "Something went wrong: $error_message";
|
125 |
+
} else {
|
126 |
+
echo 'Response:<pre>';
|
127 |
+
print_r( $response );
|
128 |
+
echo '</pre>';
|
129 |
+
}
|
130 |
+
echo "</ul>";
|
131 |
+
|
132 |
+
//endif;
|
133 |
+
|
134 |
+
}
|
135 |
+
}
|
136 |
?>
|
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.
|
7 |
Author: Matthew Robinson, tanaylakhani
|
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.
|
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.10
|
7 |
Author: Matthew Robinson, tanaylakhani
|
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.10' );
|
59 |
define( 'S2PATH', trailingslashit(dirname(__FILE__)) );
|
60 |
define( 'S2DIR', trailingslashit(dirname(plugin_basename(__FILE__))) );
|
61 |
define( 'S2URL', plugin_dir_url(dirname(__FILE__)) . S2DIR );
|