Skip to content

Commit

Permalink
Merge branch 'release/2.1.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj committed Oct 24, 2020
2 parents eedae68 + 28dc6bc commit 0a1c379
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 28 deletions.
16 changes: 8 additions & 8 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.1.0
* @version 2.1.3
* @author Brandon Kraft <[email protected]>
* @link https://kraft.blog/genesis-enews-extended/
* @copyright Copyright (c) 2012-2018, Brandon Kraft
Expand Down Expand Up @@ -143,7 +143,7 @@ public function widget( $args, $instance ) {
on="<?php echo esc_attr( sprintf( 'submit-success:AMP.navigateTo( url=%s, target=_blank )', wp_json_encode( 'https://feedburner.google.com/fb/a/mailverify?uri=' . $instance['id'], JSON_UNESCAPED_SLASHES ) ) ); ?>"
<?php endif; ?>
xmlns="http://www.w3.org/1999/html">
<label class="screenread"><?php echo esc_attr( $instance['input_text'] ); ?><input type="<?php echo current_theme_supports( 'html5' ) ? 'email' : 'text'; ?>" value="" id="subbox" placeholder="<?php echo esc_attr( $instance['input_text'] ); ?>" name="email"
<label class="screen-reader-text"><?php echo esc_attr( $instance['input_text'] ); ?><input type="<?php echo current_theme_supports( 'html5' ) ? 'email' : 'text'; ?>" value="" id="subbox" placeholder="<?php echo esc_attr( $instance['input_text'] ); ?>" name="email"
<?php
if ( current_theme_supports( 'html5' ) ) :
?>
Expand All @@ -170,12 +170,12 @@ public function widget( $args, $instance ) {
<?php
if ( ! empty( $instance['fname-field'] ) ) :
?>
<label class="screenread"><?php echo esc_attr( $instance['fname_text'] ); ?><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'] ); ?>" /></label><?php endif ?>
<label class="screen-reader-text"><?php echo esc_attr( $instance['fname_text'] ); ?><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'] ); ?>" /></label><?php endif ?>
<?php
if ( ! empty( $instance['lname-field'] ) ) :
?>
<label class="screenread"><?php echo esc_attr( $instance['lname_text'] ); ?><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'] ); ?>" /></label><?php endif ?>
<label class="screenread"><?php echo esc_attr( $instance['input_text'] ); ?><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'] ); ?>"
<label class="screen-reader-text"><?php echo esc_attr( $instance['lname_text'] ); ?><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'] ); ?>" /></label><?php endif ?>
<label class="screen-reader-text"><?php echo esc_attr( $instance['input_text'] ); ?><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' ) ) :
?>
Expand All @@ -198,12 +198,12 @@ public function widget( $args, $instance ) {
<?php
if ( isset( $instance['mailpoet-show-fname'] ) ) :
?>
<label class="screenread"><?php echo esc_attr( $instance['fname_text'] ); ?><input type="text" id="subbox1" class="enews-subbox" value="" placeholder="<?php echo esc_attr( $instance['fname_text'] ); ?>" name="mailpoet-firstname" /></label><?php endif ?>
<label class="screen-reader-text"><?php echo esc_attr( $instance['fname_text'] ); ?><input type="text" id="subbox1" class="enews-subbox" value="" placeholder="<?php echo esc_attr( $instance['fname_text'] ); ?>" name="mailpoet-firstname" /></label><?php endif ?>
<?php
if ( isset( $instance['mailpoet-show-lname'] ) ) :
?>
<label class="screenread"><?php echo esc_attr( $instance['lname_text'] ); ?><input type="text" id="subbox2" class="enews-subbox" value="" placeholder="<?php echo esc_attr( $instance['lname_text'] ); ?>" name="mailpoet-lastname" /></label><?php endif ?>
<label class="screenread"><?php echo esc_attr( $instance['input_text'] ); ?><input type="<?php echo current_theme_supports( 'html5' ) ? 'email' : 'text'; ?>" value="" id="subbox" placeholder="<?php echo esc_attr( $instance['input_text'] ); ?>" name="mailpoet-email"
<label class="screen-reader-text"><?php echo esc_attr( $instance['lname_text'] ); ?><input type="text" id="subbox2" class="enews-subbox" value="" placeholder="<?php echo esc_attr( $instance['lname_text'] ); ?>" name="mailpoet-lastname" /></label><?php endif ?>
<label class="screen-reader-text"><?php echo esc_attr( $instance['input_text'] ); ?><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' ) ) :
?>
Expand Down
21 changes: 2 additions & 19 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.1.2
* @version 2.1.3
* @author Brandon Kraft <[email protected]>
* @copyright Copyright (c) 2012-2020, Brandon Kraft
* @link https://kraft.blog/genesis-enews-extended/
Expand All @@ -13,7 +13,7 @@
* Plugin Name: Genesis eNews Extended
* Plugin URI: https://kraft.blog/genesis-enews-extended/
* Description: Replaces the Genesis eNews Widget to allow easier use of additional mailing services.
* Version: 2.1.2
* Version: 2.1.3
* Author: Brandon Kraft
* Author URI: https://kraft.blog/
* License: GPL-2.0+
Expand Down Expand Up @@ -57,20 +57,3 @@ function bjgk_genesis_enews_load_translations() {
function bjgk_genesis_enews_load_widgets() {
register_widget( 'BJGK_Genesis_ENews_Extended' );
}

/**
* Adds CSS for screenreaders.
*
* @since 0.1.0
*/
function bjgk_genesis_enews_css() {
echo '<style type="text/css"> .enews .screenread :not( input, textarea ){
height: 1px;
left: -1000em;
overflow: hidden;
position: absolute;
top: -1000em;
width: 1px; } </style>';
}

add_action( 'wp_head', 'bjgk_genesis_enews_css' );
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Requires at least: 4.9.6
Requires PHP: 5.4.0
Tested up to: 5.6.0
Text Domain: genesis-enews-extended
Stable tag: 2.1.2
Stable tag: 2.1.3

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

Expand Down Expand Up @@ -51,6 +51,9 @@ Questions can be asked at the [WordPress.org Support Forum](https://wordpress.or
2. Widget setting screen.

== Changelog ==
= 2.1.3 =
* Fix: Use Core's screen reader CSS instead of the old custom one. Props Sallie Goetsch.

= 2.1.2 =
* Accessibility: Updates <label> to be implicit to eliminate duplication when multiple instances are used on a page.
* Coding Standards: Implement WPCS.
Expand Down

0 comments on commit 0a1c379

Please sign in to comment.