Skip to content

Commit

Permalink
Version 2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj committed Feb 24, 2016
2 parents 2934d4f + d636188 commit 972b189
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 163 deletions.
29 changes: 15 additions & 14 deletions class-bjgk-genesis-enews-extended.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Genesis eNews Extended
*
* @package BJGK\Genesis_enews_extended
* @version 2.0.1
* @version 2.0.2
* @author Brandon Kraft <[email protected]>
* @link http://www.brandonkraft.com/genesis-enews-extended/
* @copyright Copyright (c) 2012-2015, Brandon Kraft
Expand Down Expand Up @@ -116,7 +116,7 @@ function widget( $args, $instance ) {
</form>
<?php elseif ( ! empty( $instance['action'] ) ) : ?>
<form id="subscribe<?php echo $this->id; ?>" action="<?php echo esc_attr( $instance['action'] ); ?>" method="post" <?php if ($instance['open_same_window'] == 0 ) : ?> target="_blank"<?php endif; ?> onsubmit="if ( subbox1.value == '<?php echo esc_js( $instance['fname_text'] ); ?>') { subbox1.value = ''; } if ( subbox2.value == '<?php echo esc_js( $instance['lname_text'] ); ?>') { subbox2.value = ''; }" name="<?php echo esc_attr( $this->id ); ?>">
<?php if ( ! empty($instance['fname-field'] ) ) : ?><label for="subbox1" class="screenread"><?php echo esc_attr( $instance['fname_text'] ); ?></label><input type="text" id="subbox1" class="enews-subbox" value="" placeholder="<?php echo esc_attr( $instance['fname_text'] ); ?>"name="<?php echo esc_attr( $instance['fname-field'] ); ?>" /><?php endif ?>
<?php if ( ! empty($instance['fname-field'] ) ) : ?><label for="subbox1" class="screenread"><?php echo esc_attr( $instance['fname_text'] ); ?></label><input type="text" id="subbox1" class="enews-subbox" value="" placeholder="<?php echo esc_attr( $instance['fname_text'] ); ?>" name="<?php echo esc_attr( $instance['fname-field'] ); ?>" /><?php endif ?>
<?php if ( ! empty($instance['lname-field'] ) ) : ?><label for="subbox2" class="screenread"><?php echo esc_attr( $instance['lname_text'] ); ?></label><input type="text" id="subbox2" class="enews-subbox" value="" placeholder="<?php echo esc_attr( $instance['lname_text'] ); ?>" name="<?php echo esc_attr( $instance['lname-field'] ); ?>" /><?php endif ?>
<label for="subbox" class="screenread"><?php echo esc_attr( $instance['input_text'] ); ?></label><input type="<?php echo current_theme_supports( 'html5' ) ? 'email' : 'text'; ?>" value="" id="subbox" placeholder="<?php echo esc_attr( $instance['input_text'] ); ?>" name="<?php echo esc_js( $instance['email-field'] ); ?>" <?php if ( current_theme_supports( 'html5' ) ) : ?>required="required"<?php endif; ?> />
<?php echo $instance['hidden_fields']; ?>
Expand All @@ -133,8 +133,8 @@ function widget( $args, $instance ) {
<?php echo esc_html( $success_message ); ?>
</div>
<?php endif; ?>
<?php if ( isset( $instance['mailpoet-show-fname'] ) ) : ?><label for="subbox1" class="screenread"><?php echo esc_attr( $instance['fname_text'] ); ?></label><input type="text" id="subbox1" class="enews-subbox" value="" placeholder="<?php echo esc_attr( $instance['fname_text'] ); ?>"name="mailpoet-firstname" /><?php endif ?>
<?php if ( isset( $instance['mailpoet-show-lname'] ) ) : ?><label for="subbox2" class="screenread"><?php echo esc_attr( $instance['lname_text'] ); ?></label><input type="text" id="subbox2" class="enews-subbox" value="" placeholder="<?php echo esc_attr( $instance['lname_text'] ); ?>"name="mailpoet-lastname" /><?php endif ?>
<?php if ( isset( $instance['mailpoet-show-fname'] ) ) : ?><label for="subbox1" class="screenread"><?php echo esc_attr( $instance['fname_text'] ); ?></label><input type="text" id="subbox1" class="enews-subbox" value="" placeholder="<?php echo esc_attr( $instance['fname_text'] ); ?>" name="mailpoet-firstname" /><?php endif ?>
<?php if ( isset( $instance['mailpoet-show-lname'] ) ) : ?><label for="subbox2" class="screenread"><?php echo esc_attr( $instance['lname_text'] ); ?></label><input type="text" id="subbox2" class="enews-subbox" value="" placeholder="<?php echo esc_attr( $instance['lname_text'] ); ?>" name="mailpoet-lastname" /><?php endif ?>
<label for="subbox" class="screenread"><?php echo esc_attr( $instance['input_text'] ); ?></label><input type="<?php echo current_theme_supports( 'html5' ) ? 'email' : 'text'; ?>" value="" id="subbox" placeholder="<?php echo esc_attr( $instance['input_text'] ); ?>" name="mailpoet-email" <?php if ( current_theme_supports( 'html5' ) ) : ?>required="required"<?php endif; ?> />
<?php echo $instance['hidden_fields']; ?>
<input type="hidden" name="submission-type" value="mailpoet" />
Expand Down Expand Up @@ -167,8 +167,14 @@ function update( $new_instance, $old_instance ) {
$new_instance['hidden_fields'] = strip_tags( $new_instance['hidden_fields'], "<div>, <fieldset>, <input>, <label>, <legend>, <option>, <optgroup>, <select>, <textarea>" );
$new_instance['after_text'] = wp_kses_post( $new_instance['after_text']);
$new_instance['id'] = str_replace("http://feeds.feedburner.com/", "", $new_instance['id']);
$new_instance['mailpoet_check'] = wp_kses_post( $new_instance['mailpoet_check'] );
$new_instance['mailpoet_subbed'] = wp_kses_post( $new_instance['mailpoet_subbed'] );
if ( isset( $new_instance['mailpoet_check'] ) ) {
$new_instance['mailpoet_check'] = wp_kses_post( $new_instance['mailpoet_check'] );
}

if ( isset( $new_instance['mailpoet_subbed'] ) ) {
$new_instance['mailpoet_subbed'] = wp_kses_post( $new_instance['mailpoet_subbed'] );
}

return $new_instance;
}

Expand Down Expand Up @@ -198,14 +204,14 @@ function form( $instance ) {
</p>

<hr style="background-color: #ccc; border: 0; height: 1px; margin: 20px 0;">
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'mailpoet-list' ) ); ?>"><?php _e( 'MailPoet List', 'genesis-enews-extended' ); ?>:</label>
<?php if ( class_exists( 'WYSIJA' ) ) :
$mp_model_list = WYSIJA::get( 'list','model' );
$mp_lists = $mp_model_list->get( array( 'name','list_id' ), array(
'is_enabled' => 1,
) );
?>
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'mailpoet-list' ) ); ?>"><?php _e( 'MailPoet List', 'genesis-enews-extended' ); ?>:</label>
<fieldset>
<ul>
<?php foreach ( $mp_lists as $mp_list ) : ?>
Expand Down Expand Up @@ -240,14 +246,9 @@ function form( $instance ) {
<textarea id="<?php echo esc_attr( $this->get_field_id( 'mailpoet_subbed' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'mailpoet_subbed' ) ); ?>" class="widefat" rows="6" cols="4"><?php echo htmlspecialchars( $instance['mailpoet_subbed'] ); ?></textarea>
</p>
</fieldset>

<?php else : ?>
<br/>
<small><?php printf( __( "MailPoet is not currently activated. Genesis eNews Extended works with MailPoet, a free newsletter plugin. See <a href='%s' target='blank'>MailPoet's plugin page on WordPress.org</a>", 'genesis-enews-extended' ), 'http://wordpress.org/plugins/wysija-newsletters' ); ?></small>

<?php endif; ?>
</p>
<hr style="background: #ccc; border: 0; height: 1px; margin: 20px 0;">
<?php endif; ?>
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'id' ) ); ?>"><?php _e( 'Google/Feedburner ID', 'genesis-enews-extended' ); ?>:</label>
<input type="text" id="<?php echo esc_attr( $this->get_field_id( 'id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'id' ) ); ?>" value="<?php echo esc_attr( $instance['id'] ); ?>" class="widefat" /><br />
Expand Down
Binary file removed languages/genesis-enews-extended-en_GB.mo
Binary file not shown.
143 changes: 0 additions & 143 deletions languages/genesis-enews-extended-en_GB.po

This file was deleted.

4 changes: 2 additions & 2 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Genesis eNews Extended
*
* @package BJGK\Genesis_enews_extended
* @version 2.0.1
* @version 2.0.2
* @author Brandon Kraft <[email protected]>
* @copyright Copyright (c) 2012-2015, Brandon Kraft
* @link https://kraft.im/genesis-enews-extended/
Expand All @@ -13,7 +13,7 @@
* Plugin Name: Genesis eNews Extended
* Plugin URI: https://kraft.im/genesis-enews-extended/
* Description: Replaces the Genesis eNews Widget to allow easier use of additional mailing services.
* Version: 2.0.1
* Version: 2.0.2
* Author: Brandon Kraft
* Author URI: https://kraft.im
* License: GPL-2.0+
Expand Down
19 changes: 15 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
=== Genesis eNews Extended ===
Contributors: kraftbj, coffeaweb
Contributors: kraftbj
Donate link: https://kraft.im/donate/
Tags: genesis, genesiswp, mailchimp, aweber, studiopress, newsletter, subscribe, mailpoet, wysija
Requires at least: 3.0
Tested up to: 4.3
Stable tag: 2.0.1
Tested up to: 4.4
Text Domain: genesis-enews-extended
Stable tag: 2.0.2

Creates a new widget to easily add mailing lists integration to a Genesis website. Works with FeedBurner, MailChimp, AWeber, FeedBlitz and more.

Expand Down Expand Up @@ -51,6 +52,10 @@ Questions can be asked at the [WordPress.org Support Forum](http://wordpress.org

== Changelog ==

= 2.0.2 =
* Fixes minor issue that led to HTML validation issues.
* Fixes PHP notice for checking non-existent variables in some cases.

= 2.0.1 =
* Corrects typo impacting Last Name field text placeholder.

Expand Down Expand Up @@ -180,4 +185,10 @@ A special thanks to all who have contributed to Genesis eNews Extended.
= StudioPress =
* Special thanks to Brian Gardner and the team at StudioPress who wrote the original code that provided the foundation for the plugin.

If you're not listed and think you should be, please drop me a note. Any omission is, in no way, intentional.
If you're not listed and think you should be, please drop me a note. Any omission is, in no way, intentional.


== Upgrade Notice ==

= 2.0.2 =
Fixes minor bugs, including one that causes HTML validation errors.

0 comments on commit 972b189

Please sign in to comment.