Skip to content

Commit

Permalink
MailPoet: Hide all mention if not active
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj committed Feb 24, 2016
1 parent 2b860ad commit d636188
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions class-bjgk-genesis-enews-extended.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,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 @@ -246,10 +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 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

0 comments on commit d636188

Please sign in to comment.