Version Description
- Switched to PHP 5 style constructor method for the widget class
Download this release
Release Info
Developer | MyThemeShop |
Plugin | WP Subscribe |
Version | 1.0.6 |
Comparing to | |
See all releases |
Code changes from version 1.0.5 to 1.0.6
- mail-icon.svg +1 -0
- readme.txt +5 -2
- wp-subscribe.php +42 -20
mail-icon.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?xml version="1.0" ?><svg height="120px" version="1.1" viewBox="0 0 32 32" width="120px" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><title/><desc/><defs/><g fill="none" fill-rule="evenodd" id="Page-1" stroke="none" stroke-width="1"><g fill="#929292" id="icon-2-mail-envelope-open"><path d="M20.6381516,20 L18.4205694,21.9827889 L18.5199469,21.9822704 L18.5199469,21.9822704 L18.5,22.000001 L15.1214931,22.000001 L16.8181902,21.9911489 L16.8181902,21.9911489 L14.551004,21.9803099 L12.3066528,20 L20.6381516,20 L20.6381516,20 Z M21.7565673,19 L25,16.0999756 L25,8.00862577 C25,7.45157714 24.5452911,7 24.0000398,7 L8.9999602,7 C8.44769743,7 8,7.44373571 8,8.00207596 L8,16.2000122 L11.1733195,19 L21.7565673,19 L21.7565673,19 Z M13.0909091,6 L16.5,3 L19.9090909,6 L24.0025781,6 C25.1090746,6 26,6.89525812 26,7.99961498 L26,11.36 L29,14 L29,28.0059397 C29,29.1054862 28.10296,30 26.9964051,30 L6.00359486,30 C4.88976324,30 4,29.1072288 4,28.0059397 L4,14 L7,11.36 L7,7.99961498 C7,6.88743329 7.89427625,6 8.99742191,6 L13.0909091,6 L13.0909091,6 L13.0909091,6 Z M18.4278349,6 L16.5,4.30000019 L14.5721651,6 L18.4278349,6 L18.4278349,6 L18.4278349,6 Z M26,12.6772727 L27.5,14 L26,15.3333335 L26,12.6772727 L26,12.6772727 L26,12.6772727 Z M7,15.3333335 L5.5,14 L7,12.6772728 L7,15.3333335 L7,15.3333335 L7,15.3333335 Z M13.5,23 L6.5,29 L26.5,29 L19.5,23 L13.5,23 L13.5,23 Z M27.68514,28.7251701 L20,22.0170898 L28,15 L28,21.5000199 L28,28.0000398 C28,28.2831537 27.8789949,28.5418569 27.68514,28.7251701 L27.68514,28.7251701 L27.68514,28.7251701 Z M5.31486,28.7251701 L13,22.0170898 L5,15 L5,21.5000199 L5,28.0000398 C5,28.2831537 5.12100514,28.5418569 5.31486,28.7251701 L5.31486,28.7251701 L5.31486,28.7251701 Z M10,10 L10,11 L23,11 L23,10 L10,10 L10,10 Z M10,13 L10,14 L23,14 L23,13 L10,13 L10,13 Z M10,16 L10,17 L23,17 L23,16 L10,16 L10,16 Z" id="mail-envelope-open"/></g></g></svg>
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: mythemeshop
|
|
3 |
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.
|
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.5 =
|
76 |
* Improvement - input placeholder text hides on click.
|
77 |
|
3 |
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.6
|
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.6 =
|
76 |
+
* Switched to PHP 5 style constructor method for the widget class
|
77 |
+
|
78 |
= 1.0.5 =
|
79 |
* Improvement - input placeholder text hides on click.
|
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 |
|
@@ -23,11 +23,11 @@ function wp_subscribe_register_widget() {
|
|
23 |
class wp_subscribe extends WP_Widget {
|
24 |
|
25 |
|
26 |
-
/*-----------------------------------------------------------------------------------*/
|
27 |
-
/* Widget Setup
|
28 |
-
/*-----------------------------------------------------------------------------------*/
|
29 |
|
30 |
-
function
|
31 |
|
32 |
add_action('wp_enqueue_scripts', array(&$this, 'register_scripts'));
|
33 |
add_action('admin_enqueue_scripts', array(&$this, 'register_admin_scripts'));
|
@@ -39,12 +39,12 @@ class wp_subscribe extends WP_Widget {
|
|
39 |
$control_ops = array( 'id_base' => 'wp_subscribe' );
|
40 |
|
41 |
/* Create the widget. */
|
42 |
-
|
43 |
}
|
44 |
|
45 |
-
/*-----------------------------------------------------------------------------------*/
|
46 |
-
/* Enqueue assets
|
47 |
-
/*-----------------------------------------------------------------------------------*/
|
48 |
function register_scripts() {
|
49 |
// JS
|
50 |
// wp_register_script('wp-subscribe', plugins_url('js/wp-subscribe.js', __FILE__), array('jquery'));
|
@@ -61,9 +61,9 @@ class wp_subscribe extends WP_Widget {
|
|
61 |
}
|
62 |
|
63 |
|
64 |
-
/*-----------------------------------------------------------------------------------*/
|
65 |
-
/* Display Widget
|
66 |
-
/*-----------------------------------------------------------------------------------*/
|
67 |
|
68 |
function widget( $args, $instance ) {
|
69 |
extract( $args );
|
@@ -141,9 +141,9 @@ class wp_subscribe extends WP_Widget {
|
|
141 |
}
|
142 |
|
143 |
|
144 |
-
/*-----------------------------------------------------------------------------------*/
|
145 |
-
/* Update Widget
|
146 |
-
/*-----------------------------------------------------------------------------------*/
|
147 |
|
148 |
function update( $new_instance, $old_instance ) {
|
149 |
$instance = $old_instance;
|
@@ -158,9 +158,9 @@ class wp_subscribe extends WP_Widget {
|
|
158 |
}
|
159 |
|
160 |
|
161 |
-
/*-----------------------------------------------------------------------------------*/
|
162 |
-
/* Widget Settings
|
163 |
-
/*-----------------------------------------------------------------------------------*/
|
164 |
|
165 |
function form( $instance ) {
|
166 |
$defaults = $this->get_defaults();
|
@@ -240,7 +240,7 @@ class wp_subscribe extends WP_Widget {
|
|
240 |
<label for="<?php echo $this->get_field_id($setting_name) ?>">
|
241 |
<?php echo $setting_label ?>
|
242 |
</label>
|
243 |
-
|
244 |
<textarea class="widefat" id="<?php echo $this->get_field_id($setting_name) ?>" name="<?php echo $this->get_field_name($setting_name) ?>"><?php echo esc_attr($setting_value); ?></textarea>
|
245 |
</p>
|
246 |
|
@@ -355,4 +355,26 @@ class wp_subscribe extends WP_Widget {
|
|
355 |
return $ret;
|
356 |
}
|
357 |
|
358 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.6
|
8 |
Author URI: http://mythemeshop.com/
|
9 |
*/
|
10 |
|
23 |
class wp_subscribe extends WP_Widget {
|
24 |
|
25 |
|
26 |
+
/*-----------------------------------------------------------------------------------*/
|
27 |
+
/* Widget Setup
|
28 |
+
/*-----------------------------------------------------------------------------------*/
|
29 |
|
30 |
+
function __construct() {
|
31 |
|
32 |
add_action('wp_enqueue_scripts', array(&$this, 'register_scripts'));
|
33 |
add_action('admin_enqueue_scripts', array(&$this, 'register_admin_scripts'));
|
39 |
$control_ops = array( 'id_base' => 'wp_subscribe' );
|
40 |
|
41 |
/* Create the widget. */
|
42 |
+
parent::__construct( 'wp_subscribe', __('WP Subscribe Widget', 'wp-subscribe'), $widget_ops, $control_ops );
|
43 |
}
|
44 |
|
45 |
+
/*-----------------------------------------------------------------------------------*/
|
46 |
+
/* Enqueue assets
|
47 |
+
/*-----------------------------------------------------------------------------------*/
|
48 |
function register_scripts() {
|
49 |
// JS
|
50 |
// wp_register_script('wp-subscribe', plugins_url('js/wp-subscribe.js', __FILE__), array('jquery'));
|
61 |
}
|
62 |
|
63 |
|
64 |
+
/*-----------------------------------------------------------------------------------*/
|
65 |
+
/* Display Widget
|
66 |
+
/*-----------------------------------------------------------------------------------*/
|
67 |
|
68 |
function widget( $args, $instance ) {
|
69 |
extract( $args );
|
141 |
}
|
142 |
|
143 |
|
144 |
+
/*-----------------------------------------------------------------------------------*/
|
145 |
+
/* Update Widget
|
146 |
+
/*-----------------------------------------------------------------------------------*/
|
147 |
|
148 |
function update( $new_instance, $old_instance ) {
|
149 |
$instance = $old_instance;
|
158 |
}
|
159 |
|
160 |
|
161 |
+
/*-----------------------------------------------------------------------------------*/
|
162 |
+
/* Widget Settings
|
163 |
+
/*-----------------------------------------------------------------------------------*/
|
164 |
|
165 |
function form( $instance ) {
|
166 |
$defaults = $this->get_defaults();
|
240 |
<label for="<?php echo $this->get_field_id($setting_name) ?>">
|
241 |
<?php echo $setting_label ?>
|
242 |
</label>
|
243 |
+
|
244 |
<textarea class="widefat" id="<?php echo $this->get_field_id($setting_name) ?>" name="<?php echo $this->get_field_name($setting_name) ?>"><?php echo esc_attr($setting_value); ?></textarea>
|
245 |
</p>
|
246 |
|
355 |
return $ret;
|
356 |
}
|
357 |
|
358 |
+
}
|
359 |
+
|
360 |
+
function subscribe_admin_notice() {
|
361 |
+
global $current_user;
|
362 |
+
|
363 |
+
$screen = get_current_screen();
|
364 |
+
$user_id = $current_user->ID;
|
365 |
+
|
366 |
+
if ( current_user_can( 'manage_options' ) ) {
|
367 |
+
if ( 'true' !== get_user_meta( $user_id, 'wps-notice-1', true )) {
|
368 |
+
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>';
|
369 |
+
echo '<div class="updated notice-info wp-subscribe-notice" id="wpsubscribe-notice" style="position:relative;overflow: hidden; padding: 17px 44px 17px 20px;">
|
370 |
+
<div class="wps-left-block" style="float: left; width: 60%;">';
|
371 |
+
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"></a>'), '?wps_notice_close=1');
|
372 |
+
echo '</div>
|
373 |
+
<div class="wps-right-block" style="width: 40%; float: right;">
|
374 |
+
<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>
|
375 |
+
</div>
|
376 |
+
</div>';
|
377 |
+
}
|
378 |
+
}
|
379 |
+
}
|
380 |
+
add_action( 'admin_notices', 'subscribe_admin_notice');
|