Version Description
- Fixed notification closing issue
Download this release
Release Info
Developer | MyThemeShop |
Plugin | WP Subscribe |
Version | 1.0.7 |
Comparing to | |
See all releases |
Code changes from version 1.0.6 to 1.0.7
- readme.txt +4 -1
- wp-subscribe.php +28 -18
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Creator's website link: http://mythemeshop.com/plugins/wp-subscribe/
|
|
4 |
Tags: subscribe, subscription, subscription box, newsletter, subscribe widget, mailchimp, aweber, feedburner,
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 4.3
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -72,6 +72,9 @@ Please disable all plugins and check if plugin is working properly. Then you can
|
|
72 |
|
73 |
== Changelog ==
|
74 |
|
|
|
|
|
|
|
75 |
= 1.0.6 =
|
76 |
* Switched to PHP 5 style constructor method for the widget class
|
77 |
|
4 |
Tags: subscribe, subscription, subscription box, newsletter, subscribe widget, mailchimp, aweber, feedburner,
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 4.3
|
7 |
+
Stable tag: 1.0.7
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
72 |
|
73 |
== Changelog ==
|
74 |
|
75 |
+
= 1.0.7 =
|
76 |
+
* Fixed notification closing issue
|
77 |
+
|
78 |
= 1.0.6 =
|
79 |
* Switched to PHP 5 style constructor method for the widget class
|
80 |
|
wp-subscribe.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Subscribe
|
|
4 |
Plugin URI: http://mythemeshop.com/plugins/wp-subscribe/
|
5 |
Description: WP Subscribe is a simple but powerful subscription plugin which supports MailChimp, Aweber and Feedburner.
|
6 |
Author: MyThemeShop
|
7 |
-
Version: 1.0.
|
8 |
Author URI: http://mythemeshop.com/
|
9 |
*/
|
10 |
|
@@ -357,24 +357,34 @@ class wp_subscribe extends WP_Widget {
|
|
357 |
|
358 |
}
|
359 |
|
360 |
-
|
361 |
-
global $current_user;
|
362 |
|
363 |
-
|
364 |
-
$user_id = $current_user->ID;
|
365 |
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
|
|
|
|
378 |
}
|
379 |
}
|
380 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
Plugin URI: http://mythemeshop.com/plugins/wp-subscribe/
|
5 |
Description: WP Subscribe is a simple but powerful subscription plugin which supports MailChimp, Aweber and Feedburner.
|
6 |
Author: MyThemeShop
|
7 |
+
Version: 1.0.7
|
8 |
Author URI: http://mythemeshop.com/
|
9 |
*/
|
10 |
|
357 |
|
358 |
}
|
359 |
|
360 |
+
/* Display a notice*/
|
|
|
361 |
|
362 |
+
add_action('admin_notices', 'subscribe_admin_notice');
|
|
|
363 |
|
364 |
+
function subscribe_admin_notice() {
|
365 |
+
global $current_user ;
|
366 |
+
$user_id = $current_user->ID;
|
367 |
+
/* Check that the user hasn't already clicked to ignore the message */
|
368 |
+
if ( ! get_user_meta($user_id, 'subscribe_ignore_notice') ) {
|
369 |
+
echo '<style type="text/css">.wp-subscribe-notice:after { content:""; position: absolute; right: 0; bottom: 0; background: url('.plugins_url('/mail-icon.svg', __FILE__).') right bottom no-repeat; width: 120px; height: 120px; opacity: 0.1;} .wp-core-ui .wps_notice_button { line-height: 44px; height: 44px; padding: 0 30px; font-size: 17px; margin: 0 auto; top: 30px; float: right; right: 50px; position: relative; z-index: 1; }</style>';
|
370 |
+
echo '<div class="updated notice-info wp-subscribe-notice" id="wpsubscribe-notice" style="position:relative;overflow: hidden; padding: 17px 44px 17px 20px;">
|
371 |
+
<div class="wps-left-block" style="float: left; width: 60%;">';
|
372 |
+
printf(__('<h4 style="font-size: 20px; color: #5FA52A; font-weight: normal; margin-bottom: 10px; margin-top: 5px;">Get WP Suscbribe Pro Today!</h4><p><strong>Turn visitors into paying customers with pro version of WP Subscribe</strong>. WP Subscribe Pro + WordPress is the ultimate lead generation machine. Grow your email list like crazy and generate more residual traffic and earnings.</p><a class="notice-dismiss" href="%1$s" style="z-index: 1;"></a>'), '?subscribe_admin_notice_ignore=0');
|
373 |
+
echo '</div>
|
374 |
+
<div class="wps-right-block" style="width: 40%; float: right;">
|
375 |
+
<a href="https://mythemeshop.com/plugins/wp-subscribe-pro/?utm_source=WP+Subscribe&utm_medium=Notification+Link&utm_content=WP+Subscribe+Pro+LP&utm_campaign=WordPressOrg" target="_blank" class="button button-primary wps_notice_button">Get WP Subscribe Pro Now</a>
|
376 |
+
</div>
|
377 |
+
</div>';
|
378 |
}
|
379 |
}
|
380 |
+
|
381 |
+
add_action('admin_init', 'subscribe_admin_notice_ignore');
|
382 |
+
|
383 |
+
function subscribe_admin_notice_ignore() {
|
384 |
+
global $current_user;
|
385 |
+
$user_id = $current_user->ID;
|
386 |
+
/* If user clicks to ignore the notice, add that to their user meta */
|
387 |
+
if ( isset($_GET['subscribe_admin_notice_ignore']) && '0' == $_GET['subscribe_admin_notice_ignore'] ) {
|
388 |
+
add_user_meta($user_id, 'subscribe_ignore_notice', 'true', true);
|
389 |
+
}
|
390 |
+
}
|