Plugin Directory

Changeset 2717363


Ignore:
Timestamp:
05/03/2022 02:13:18 AM (4 years ago)
Author:
MyThemeShop
Message:

Update to version 1.2.13 from GitHub

Location:
wp-subscribe
Files:
10 added
29 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-subscribe/assets/banner-772x250.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • wp-subscribe/assets/icon-128x128.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • wp-subscribe/assets/icon-256x256.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • wp-subscribe/assets/screenshot-1.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • wp-subscribe/assets/screenshot-2.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • wp-subscribe/tags/1.2.13/assets/css/wp-subscribe-form.css

    r1715462 r2717363  
    33 * Name:        wp-subscribe-form.css
    44 * Written by:  MyThemeShop
    5  */.wp-subscribe-wrap{padding:20px;text-align:center;background:#f47555}.wp-subscribe-wrap h4.title{font-size:22px;line-height:1;margin-bottom:0;text-transform:uppercase;color:#fff}.wp-subscribe-wrap h4.title span{font-size:38px;font-weight:bold;display:inline-block;margin-top:15px}#wp_subscribe_popup .wp-subscribe-wrap h4.title{margin-top:0}.wp-subscribe-wrap p{margin:0;color:#fff}.wp-subscribe-wrap p.text{margin:15px 0;opacity:.8}.wp-subscribe-wrap p.footer-text{font-size:12px;margin-top:10px}.wp-subscribe-wrap input{box-sizing:border-box;width:100%;height:45px;margin:0;padding:10px 0;text-align:center;text-indent:10px;border:none;border-radius:0;box-shadow:none}.wp-subscribe-wrap input::-webkit-input-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input:-moz-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input::-moz-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input:-ms-input-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input:focus::-webkit-input-placeholder{color:transparent !important}.wp-subscribe-wrap input:focus:-moz-placeholder{color:transparent !important}.wp-subscribe-wrap input:focus::-moz-placeholder{color:transparent !important}.wp-subscribe-wrap input:focus:-ms-input-placeholder{color:transparent !important}.wp-subscribe-wrap .email-field{margin-top:10px}.wp-subscribe-wrap input.email-field,.wp-subscribe-wrap input.name-field{color:#fff;background:#d56144}.wp-subscribe-wrap input.submit{font-size:18px;font-weight:500;margin-top:20px;cursor:pointer;text-transform:uppercase;color:#f47555;background:#fff;box-shadow:0 1px 2px 0 rgba(0,0,0,0.05)}.wp-subscribe-single .wp-subscribe-wrap{clear:both;margin:10px 0;text-align:left}.wp-subscribe-single .wp-subscribe-wrap input{text-align:left}.wp-subscribe-wrap .error,.wp-subscribe-wrap .thanks{margin-top:10px}.wp-subscribe-wrap .wp-subscribe-loader{display:none;padding:1em;text-align:center;vertical-align:top}.wp-subscribe-wrap.loading .wp-subscribe-form,.thanks,.error{display:none}.wp-subscribe-wrap.loading .wp-subscribe-loader{display:block}
     5 */.wp-subscribe-wrap{padding:20px;text-align:center;background:#f47555}.wp-subscribe-wrap h4.title{font-size:22px;line-height:1;margin-bottom:0;text-transform:uppercase;color:#fff}.wp-subscribe-wrap h4.title span{font-size:38px;font-weight:bold;display:inline-block;margin-top:15px}#wp_subscribe_popup .wp-subscribe-wrap h4.title{margin-top:0}.wp-subscribe-wrap p{margin:0;color:#fff}.wp-subscribe-wrap p.text{margin:15px 0;opacity:.8}.wp-subscribe-wrap p.footer-text{font-size:12px;margin-top:10px}.wp-subscribe-wrap input{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:45px;margin:0;padding:10px 0;text-align:center;text-indent:10px;border:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none}.wp-subscribe-wrap input::-webkit-input-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input:-moz-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input::-moz-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input:-ms-input-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input:focus::-webkit-input-placeholder{color:transparent !important}.wp-subscribe-wrap input:focus:-moz-placeholder{color:transparent !important}.wp-subscribe-wrap input:focus::-moz-placeholder{color:transparent !important}.wp-subscribe-wrap input:focus:-ms-input-placeholder{color:transparent !important}.wp-subscribe-wrap input.consent-field{width:17px;height:17px;margin-top:2px;margin-right:6px;cursor:pointer}.wp-subscribe-wrap .wps-consent-wrapper{margin-top:20px;text-align:left;display:block}.wp-subscribe-wrap .wps-consent-wrapper label{color:#fff;opacity:0.8;font-weight:normal}.wp-subscribe-wrap .wps-consent-wrapper label input{float:left;margin-bottom:5px}.wp-subscribe-wrap .email-field{margin-top:10px}.wp-subscribe-wrap input.email-field,.wp-subscribe-wrap input.name-field{color:#fff;background:#d56144}.wp-subscribe-wrap input.submit{font-size:18px;font-weight:500;line-height:1;margin-top:20px;cursor:pointer;text-transform:uppercase;color:#f47555;background:#fff;-webkit-box-shadow:0 1px 2px 0 rgba(0,0,0,0.05);box-shadow:0 1px 2px 0 rgba(0,0,0,0.05)}.wp-subscribe-single .wp-subscribe-wrap{clear:both;margin:10px 0;text-align:left}.wp-subscribe-single .wp-subscribe-wrap input{text-align:left}.wp-subscribe-wrap .error,.wp-subscribe-wrap .thanks{margin-top:10px}.wp-subscribe-wrap .wp-subscribe-loader{display:none;padding:1em;text-align:center;vertical-align:top}.wp-subscribe-wrap.loading .wp-subscribe-form,.thanks,.error{display:none}.wp-subscribe-wrap.loading .wp-subscribe-loader{display:block}
  • wp-subscribe/tags/1.2.13/assets/js/wp-subscribe-admin.js

    r1739908 r2717363  
    196196    });
    197197
     198    jQuery(document).on('click', '.wpsubscribe-dismiss-notice', function(e){
     199        e.preventDefault();
     200        jQuery(this).parent().remove();
     201        jQuery.ajax({
     202            type: "POST",
     203            url: ajaxurl,
     204            data: {
     205                action: 'mts_dismiss_wpsubscribe_notice',
     206                dismiss: jQuery(this).data('ignore')
     207            }
     208        });
     209        return false;
     210    });
     211
    198212}( jQuery ) );
  • wp-subscribe/tags/1.2.13/includes/subscription/class-wps-aweber.php

    r1715462 r2717363  
    33 * Aweber Subscription
    44 */
     5
     6 if ( ! defined( 'ABSPATH' ) ) {
     7    exit;
     8}
     9
    510class WPS_Subscription_Aweber extends WPS_Subscription_Base {
    611
     
    218223            <br />
    219224            <ul>
    220                 <li><?php printf( wp_kses_post( __( '<span>1.</span> <a href="%s" target="_blank">Click here</a> <span>to open the authorization page and log in.</span>', 'content-locker' ) ), 'https://auth.aweber.com/1.0/oauth/authorize_app/1afc783e' ) ?></li>
    221                 <li><?php echo wp_kses_post( __( '<span>2.</span> Copy and paste the authorization code in the field below.', 'content-locker' ) ) ?></li>
     225                <li>
     226                    <?php
     227                    // Translators: %1$s is "1." and %2$s is is the URL to the Aweber authorization page.
     228                    printf( wp_kses_post( __( '%1$s <a href="%2$s" target="_blank">Click here</a> <span>to open the authorization page and log in.</span>', 'content-locker' ) ), '<span>1.</span>', 'https://auth.aweber.com/1.0/oauth/authorize_app/1afc783e' );
     229                    ?>
     230                </li>
     231                <li>
     232                    <?php
     233                    // Translators: %s is "2.".
     234                    printf( wp_kses_post( __( '%s Copy and paste the authorization code in the field below.', 'content-locker' ) ), '<span>2.</span>' );
     235                    ?>
     236                </li>
    222237            </ul>
    223238
     
    228243        <div class="alert alert-hint mb30 <?php echo empty( $instance['aweber_access_key'] ) ? ' hidden' : '' ?>">
    229244            <p>
    230                 <strong><?php _e( 'Your Aweber Account is connected.', 'content-locker' ) ?></strong>
     245                <strong><?php esc_html_e( 'Your Aweber Account is connected.', 'content-locker' ) ?></strong>
    231246                <?php echo wp_kses_post( __( '<a href="#" class="aweber_disconnect">Click here</a> <span>to disconnect.</span>', 'content-locker' ) ) ?>
    232247            </p>
  • wp-subscribe/tags/1.2.13/includes/subscription/class-wps-base.php

    r1715462 r2717363  
    33 * A class for subscription services
    44 */
     5
     6if ( ! defined( 'ABSPATH' ) ) {
     7    exit;
     8}
     9
    510abstract class WPS_Subscription_Base {
    611
     
    125130
    126131        if( !empty( $this->options['include_name_field'] ) ) {
    127             printf( '<input class="regular-text name-field" type="text" name="%s" placeholder="%s">', esc_attr( $name ), esc_attr( $this->options['name_placeholder'] ) );
     132            printf( '<input class="regular-text name-field" type="text" name="%s" placeholder="%s" required>', esc_attr( $name ), esc_attr( $this->options['name_placeholder'] ) );
    128133        }
    129134    }
     
    131136    public function the_email_field( $name ) {
    132137
    133         printf( '<input class="regular-text email-field" type="text" name="%s" placeholder="%s">', esc_attr( $name ), esc_attr( $this->options['email_placeholder'] ) );
     138        printf( '<input class="regular-text email-field" type="email" name="%s" placeholder="%s" required>', esc_attr( $name ), esc_attr( $this->options['email_placeholder'] ) );
    134139    }
    135140
  • wp-subscribe/tags/1.2.13/includes/subscription/class-wps-feedburner.php

    r1715462 r2717363  
    44 */
    55
     6if ( ! defined( 'ABSPATH' ) ) {
     7    exit;
     8}
     9
    610class WPS_Subscription_FeedBurner extends WPS_Subscription_Base {
    711
    8     public function the_form( $id, $options ) {
     12    public function the_form( $id, $options ) {
    913        ?>
    1014
    11         <form action="https://feedburner.google.com/fb/a/mailverify?uri=<?php echo $options['feedburner_id'] ?>" method="post" class="wp-subscribe-form wp-subscribe-feedburner" id="wp-subscribe-form-<?php echo $id ?>" target="popupwindow">
     15        <form action="https://feedburner.google.com/fb/a/mailverify?uri=<?php echo esc_attr( $options['feedburner_id'] ); ?>" method="post" class="wp-subscribe-form wp-subscribe-feedburner" id="wp-subscribe-form-<?php echo esc_attr( $id ); ?>" target="popupwindow">
    1216
    13             <input class="regular-text email-field" type="text" name="email" placeholder="<?php echo esc_attr( $options['email_placeholder'] ) ?>">
     17            <input class="regular-text email-field" type="email" name="email" placeholder="<?php echo esc_attr( $options['email_placeholder'] ) ?>" required>
    1418
    15             <input type="hidden" name="uri" value="<?php echo $options['feedburner_id'] ?>">
     19            <input type="hidden" name="uri" value="<?php echo esc_attr( $options['feedburner_id'] ); ?>">
    1620
    1721            <input type="hidden" name="loc" value="en_US">
    1822
    19             <input type="hidden" name="form_type" value="<?php echo $options['form_type'] ?>">
     23            <input type="hidden" name="form_type" value="<?php echo esc_attr( $options['form_type'] ); ?>">
    2024
    21             <input type="hidden" name="service" value="<?php echo $options['service'] ?>">
     25            <input type="hidden" name="service" value="<?php echo esc_attr( $options['service'] ); ?>">
    2226
    23             <input type="hidden" name="widget" value="<?php echo isset( $options['widget_id'] ) ? $options['widget_id'] : '0'; ?>">
    24 
     27            <input type="hidden" name="widget" value="<?php echo isset( $options['widget_id'] ) ? esc_attr( $options['widget_id'] ) : '0'; ?>">
     28            <?php if( ! empty( $options['consent_text'] ) ) : ?>
     29                <div class="wps-consent-wrapper">
     30                    <label for="consent-field">
     31                        <input class="consent-field" id="consent-field" type="checkbox" name="consent" required />
     32                        <?php echo wp_kses_post( $options['consent_text'] ); ?>
     33                    </label>
     34                </div>
     35            <?php endif; ?>
    2536            <input class="submit" type="submit" name="submit" value="<?php echo esc_attr( $options['button_text'] ) ?>">
    2637
     
    3748                'name'  => 'feedburner_id',
    3849                'type'  => 'text',
    39                 'title' => esc_html__( 'Feedburner ID', 'wp-subscribe' ),
     50                'title' => __( 'Feedburner ID', 'wp-subscribe' ),
    4051            )
    4152        );
  • wp-subscribe/tags/1.2.13/includes/subscription/class-wps-mailchimp.php

    r1715462 r2717363  
    33 * MailChimp Subscription
    44 */
     5
     6if ( ! defined( 'ABSPATH' ) ) {
     7    exit;
     8}
    59
    610class WPS_Subscription_MailChimp extends WPS_Subscription_Base {
  • wp-subscribe/tags/1.2.13/includes/wps-functions-options.php

    r1715462 r2717363  
    77 * Get mailing services
    88 *
    9  * @use filter  wp_subscribe_mailing_services
     9 * @use filter wp_subscribe_mailing_services
    1010 * @return array
    1111 */
     
    1414    $services = array(
    1515
    16         'aweber' => array(
    17             'title'       => esc_html__( 'Aweber', 'wp-subscribe' ),
    18             'description' => esc_html__( 'Adds subscribers to your Aweber account.', 'wp-subscribe' ),
    19             'class'       => 'WPS_Subscription_Aweber'
    20         ),
     16        'aweber' => array(
     17            'title'       => __( 'Aweber', 'wp-subscribe' ),
     18            'description' => __( 'Adds subscribers to your Aweber account.', 'wp-subscribe' ),
     19            'class'       => 'WPS_Subscription_Aweber'
     20        ),
    2121
    2222        'feedburner' => array(
    23             'title'       => esc_html__( 'FeedBurner', 'wp-subscribe' ),
    24             'description' => esc_html__( 'Adds subscribers to your FeedBurner account.', 'wp-subscribe' ),
    25             'class'       => 'WPS_Subscription_FeedBurner'
    26         ),
     23            'title'       => __( 'FeedBurner', 'wp-subscribe' ),
     24            'description' => __( 'Adds subscribers to your FeedBurner account.', 'wp-subscribe' ),
     25            'class'       => 'WPS_Subscription_FeedBurner'
     26        ),
    2727
    2828        'mailchimp' => array(
    29             'title'       => esc_html__( 'MailChimp', 'wp-subscribe' ),
    30             'description' => esc_html__( 'Adds subscribers to your MailChimp account.', 'wp-subscribe' ),
     29            'title'       => __( 'MailChimp', 'wp-subscribe' ),
     30            'description' => __( 'Adds subscribers to your MailChimp account.', 'wp-subscribe' ),
    3131            'class'       => 'WPS_Subscription_MailChimp'
    32         )
     32        )
    3333    );
    3434
  • wp-subscribe/tags/1.2.13/includes/wps-helpers.php

    r1823647 r2717363  
    3131?>
    3232    <?php if( isset( $options['before_widget'] ) ) : ?>
    33         <?php echo $options['before_widget'] ?>
     33        <?php echo wp_kses_post( $options['before_widget'] ); ?>
    3434    <?php else: ?>
    3535        <div class="wp-subscribe-popup-form-wrapper">
    3636    <?php endif; ?>
    3737
    38         <div id="wp-subscribe" class="wp-subscribe-wrap wp-subscribe wp-subscribe-<?php echo $wp_subscribe_forms ?>" data-thanks_page="<?php echo absint( isset( $options['thanks_page'] ) ? $options['thanks_page'] : 0 ) ?>" data-thanks_page_url="<?php echo isset( $options['thanks_page_url'] ) ? esc_url( $options['thanks_page_url'] ) : '' ?>" data-thanks_page_new_window="0">
     38        <div id="wp-subscribe" class="wp-subscribe-wrap wp-subscribe wp-subscribe-<?php echo esc_attr( $wp_subscribe_forms ); ?>" data-thanks_page="<?php echo absint( isset( $options['thanks_page'] ) ? $options['thanks_page'] : 0 ) ?>" data-thanks_page_url="<?php echo isset( $options['thanks_page_url'] ) ? esc_url( $options['thanks_page_url'] ) : '' ?>" data-thanks_page_new_window="0">
    3939
    4040            <h4 class="title"><?php echo wp_kses_post( $options['title'] )?></h4>
     
    4242            <p class="text"><?php echo wp_kses_post( $options['text'] ) ?></p>
    4343
    44             <?php if( method_exists( $service, 'the_form' ) ) :
     44            <?php
     45            if ( method_exists( $service, 'the_form' ) ) :
    4546                $service->the_form( $wp_subscribe_forms, $options );
    46             else: ?>
    47 
    48             <form action="<?php echo $current_url ?>" method="post" class="wp-subscribe-form wp-subscribe-<?php echo $options['service'] ?>" id="wp-subscribe-form-<?php echo $wp_subscribe_forms ?>">
    49 
    50                 <?php if( !empty( $options['include_name_field'] ) ) : ?>
    51                     <input class="regular-text name-field" type="text" name="name" placeholder="<?php echo esc_attr( $options['name_placeholder'] ) ?>">
    52                 <?php endif; ?>
    53 
    54                 <input class="regular-text email-field" type="text" name="email" placeholder="<?php echo esc_attr( $options['email_placeholder'] ) ?>">
    55 
    56                 <input type="hidden" name="form_type" value="<?php echo $options['form_type'] ?>">
    57 
    58                 <input type="hidden" name="service" value="<?php echo $options['service'] ?>">
    59 
    60                 <input type="hidden" name="widget" value="<?php echo isset( $options['widget_id'] ) ? $options['widget_id'] : '0'; ?>">
    61 
    62                 <input class="submit" type="submit" name="submit" value="<?php echo esc_attr( $options['button_text'] ) ?>">
    63 
    64             </form>
     47            else :
     48                ?>
     49                <form action="<?php echo esc_url( $current_url ); ?>" method="post" class="wp-subscribe-form wp-subscribe-<?php echo esc_attr( $options['service'] ); ?>" id="wp-subscribe-form-<?php echo esc_attr( $wp_subscribe_forms ); ?>">
     50
     51                    <?php if ( ! empty( $options['include_name_field'] ) ) : ?>
     52                        <input class="regular-text name-field" type="text" name="name" placeholder="<?php echo esc_attr( $options['name_placeholder'] ); ?>" title="<?php echo esc_attr( $options['name_placeholder'] ); ?>" required>
     53                    <?php endif; ?>
     54
     55                    <input class="regular-text email-field" type="email" name="email" placeholder="<?php echo esc_attr( $options['email_placeholder'] ); ?>" title="<?php echo esc_attr( $options['email_placeholder'] ); ?>" required>
     56
     57                    <input type="hidden" name="form_type" value="<?php echo esc_attr( $options['form_type'] ); ?>">
     58
     59                    <input type="hidden" name="service" value="<?php echo esc_attr( $options['service'] ); ?>">
     60
     61                    <input type="hidden" name="widget" value="<?php echo isset( $options['widget_id'] ) ? esc_attr( $options['widget_id'] ) : '0'; ?>">
     62                    <?php if ( ! empty( $options['consent_text'] ) ) : ?>
     63                        <div class="wps-consent-wrapper">
     64                            <label for="consent-field">
     65                                <input class="consent-field" id="consent-field" type="checkbox" name="consent" required>
     66                                <?php echo wp_kses_post( $options['consent_text'] ); ?>
     67                            </label>
     68                    <?php endif; ?>
     69                    <input class="submit" type="submit" name="submit" value="<?php echo esc_attr( $options['button_text'] ); ?>">
     70
     71                </form>
    6572
    6673            <?php endif; ?>
     
    8491            <div class="clear"></div>
    8592
    86             <p class="footer-text"><?php echo $options['footer_text'];?></p>
     93            <p class="footer-text"><?php echo wp_kses_post( $options['footer_text'] );?></p>
    8794
    8895        </div>
    8996
    9097    <?php if( isset( $options['after_widget'] ) ) : ?>
    91         <?php echo $options['after_widget'] ?>
     98        <?php echo wp_kses_post( $options['after_widget'] ); ?>
    9299    <?php else: ?>
    93100        </div><!-- /form-wrapper -->
     
    187194    ) ) );
    188195    ?>
    189     <input class="<?php echo esc_attr( $class ) ?>" id="<?php echo esc_attr( $id ) ?>" name="<?php echo esc_attr( $name ) ?>" type="text" value="<?php echo esc_attr( $value ) ?>"<?php if( isset( $data_id ) ) { printf( 'data-id="%s"', $data_id ); } ?>>
     196    <input class="<?php echo esc_attr( $class ) ?>" id="<?php echo esc_attr( $id ) ?>" name="<?php echo esc_attr( $name ) ?>" type="text" value="<?php echo esc_attr( $value ) ?>"<?php if( isset( $data_id ) ) { printf( 'data-id="%s"', esc_attr( $data_id ) ); } ?>>
    190197    <?php
    191198}
  • wp-subscribe/tags/1.2.13/includes/wps-widget.php

    r1715462 r2717363  
    55 */
    66
    7 if( ! class_exists('wp_subscribe') ) :
     7if ( ! defined( 'ABSPATH' ) ) {
     8    exit;
     9}
    810
    911class wp_subscribe extends WP_Widget {
     
    1214     * The Constructor
    1315     */
    14     public function __construct() {
    15 
    16         add_action( 'wp_enqueue_scripts',                   array( &$this, 'register_scripts' ) );
    17         add_action( 'admin_enqueue_scripts',                array( &$this, 'enqueue_scripts' ) );
    18         add_action( 'customize_controls_enqueue_scripts',   array( &$this, 'enqueue_scripts' ) );
    19 
    20         // Widget settings
    21         $widget_ops = array(
    22             'classname'     => 'wp_subscribe',
    23             'description'   => esc_html__( 'Displays subscription form, supports FeedBurner, MailChimp & AWeber.', 'wp-subscribe' )
     16    public function __construct() {
     17
     18        add_action( 'wp_enqueue_scripts', array( &$this, 'register_scripts' ) );
     19        add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_scripts' ) );
     20        add_action( 'customize_controls_enqueue_scripts', array( &$this, 'enqueue_scripts' ) );
     21
     22        // Widget settings
     23        $widget_ops = array(
     24            'classname'   => 'wp_subscribe',
     25            'description' => esc_html__( 'Displays subscription form, supports FeedBurner, MailChimp & AWeber.', 'wp-subscribe' )
    2426        );
    2527
    26         // Widget control settings
    27         $control_ops = array(
     28        // Widget control settings
     29        $control_ops = array(
    2830            'id_base' => 'wp_subscribe'
    2931        );
    3032
    31         // Create the widget.
    32         parent::__construct(
     33        // Create the widget.
     34        parent::__construct(
    3335            'wp_subscribe',
    3436            esc_html__( 'WP Subscribe Widget', 'wp-subscribe' ),
     
    3638            $control_ops
    3739        );
    38     }
     40    }
    3941
    4042    /**
     
    4648        return apply_filters( 'wp_subscribe_form_defaults', array(
    4749            'service'            => 'feedburner',
    48             'include_name_field' => false,
    49 
    50             'title'             => esc_html__( 'Get more stuff', 'wp-subscribe' ),
    51             'text'              => esc_html__( 'Subscribe to our mailing list and get interesting stuff and updates to your email inbox.', 'wp-subscribe' ),
    52             'email_placeholder' => esc_html__( 'Enter your email here', 'wp-subscribe' ),
    53             'name_placeholder'  => esc_html__( 'Enter your name here', 'wp-subscribe' ),
    54             'button_text'       => esc_html__( 'Sign Up Now', 'wp-subscribe' ),
    55             'success_message'   => esc_html__( 'Thank you for subscribing.', 'wp-subscribe' ),
    56             'error_message'     => esc_html__( 'Something went wrong.', 'wp-subscribe' ),
    57             'footer_text'       => esc_html__( 'we respect your privacy and take protecting it seriously', 'wp-subscribe' )
    58         ));
    59     }
     50            'include_name_field' => false,
     51
     52            'title'             => __( 'Get more stuff', 'wp-subscribe' ),
     53            'text'              => __( 'Subscribe to our mailing list and get interesting stuff and updates to your email inbox.', 'wp-subscribe' ),
     54            'email_placeholder' => __( 'Enter your email here', 'wp-subscribe' ),
     55            'consent_text'      => __( 'I consent to my submitted data being collected via this form*', 'wp-subscribe' ),
     56            'name_placeholder'  => __( 'Enter your name here', 'wp-subscribe' ),
     57            'button_text'       => __( 'Sign Up Now', 'wp-subscribe' ),
     58            'success_message'   => __( 'Thank you for subscribing.', 'wp-subscribe' ),
     59            'error_message'     => __( 'Something went wrong.', 'wp-subscribe' ),
     60            'footer_text'       => __( 'we respect your privacy and take protecting it seriously', 'wp-subscribe' )
     61        ));
     62    }
    6063
    6164    /**
     
    6366     * @return void
    6467     */
    65     function register_scripts() {
    66 
    67         wp_register_style( 'wp-subscribe', wps()->plugin_url() . '/assets/css/wp-subscribe-form.css' );
    68         wp_register_script( 'wp-subscribe', wps()->plugin_url() . '/assets/js/wp-subscribe-form.js', array( 'jquery' ) );
    69 
    70         wp_localize_script( 'wp-subscribe', 'wp_subscribe', array(
     68    function register_scripts() {
     69
     70        wp_register_style( 'wp-subscribe', wps()->plugin_url() . '/assets/css/wp-subscribe-form.css' );
     71        wp_register_script( 'wp-subscribe', wps()->plugin_url() . '/assets/js/wp-subscribe-form.js', array( 'jquery' ) );
     72
     73        wp_localize_script( 'wp-subscribe', 'wp_subscribe', array(
    7174            'ajaxurl' => admin_url( 'admin-ajax.php' )
    7275        ) );
    73     }
     76    }
    7477
    7578    /**
     
    7780     * @return void
    7881     */
    79     function enqueue_scripts() {
    80 
     82    function enqueue_scripts() {
    8183        $screen = get_current_screen();
    8284        $current_filter = current_filter();
    83 
    84         if ( 'widgets' === $screen->id || 'customize_controls_enqueue_scripts' === $current_filter ) {
    85 
    86             wp_enqueue_style( 'wp-subscribe-options', wps()->plugin_url() . '/assets/css/wp-subscribe-options.css' );
    87             wp_enqueue_script( 'wp-subscribe-admin', wps()->plugin_url() . '/assets/js/wp-subscribe-admin.js', array( 'jquery' ) );
    88         }
    89     }
     85        if ( 'widgets' === $screen->id || 'customize_controls_enqueue_scripts' === $current_filter ) {
     86            wp_enqueue_style( 'wp-subscribe-options', wps()->plugin_url() . '/assets/css/wp-subscribe-options.css' );
     87        }
     88
     89        wp_enqueue_script( 'wp-subscribe-admin', wps()->plugin_url() . '/assets/js/wp-subscribe-admin.js', array( 'jquery' ) );
     90    }
    9091
    9192    /**
     
    9596     * @return void
    9697     */
    97     function widget( $args, $instance ) {
    98 
    99         extract( $args );
    100         $instance = wp_parse_args( (array) $instance, $this->get_defaults() );
     98    function widget( $args, $instance ) {
     99
     100        extract( $args );
     101        $instance = wp_parse_args( (array) $instance, $this->get_defaults() );
    101102
    102103        $instance['before_widget'] = $before_widget;
     
    106107
    107108        wps_the_form( $instance );
    108     }
     109    }
    109110
    110111    /**
     
    116117     * @return array
    117118     */
    118     function update( $new_instance, $old_instance ) {
     119    function update( $new_instance, $old_instance ) {
    119120
    120121        $instance = $old_instance;
    121         $instance = array_merge( $instance, $new_instance );
    122 
    123         // Feedburner ID -- make sure the user didn't insert full url
    124         if( isset( $instance['feedburner_id'] ) && 0 === strpos( $instance['feedburner_id'], 'http' ) ) {
     122        $instance = array_merge( $instance, $new_instance );
     123
     124        // Feedburner ID -- make sure the user didn't insert full url
     125        if( isset( $instance['feedburner_id'] ) && 0 === strpos( $instance['feedburner_id'], 'http' ) ) {
    125126            $instance['feedburner_id'] = substr( $instance['feedburner_id'], strrpos( $instance['feedburner_id'], '/' ) + 1 );
    126127        }
    127128
    128         return $instance;
    129     }
     129        return $instance;
     130    }
    130131
    131132    /**
     
    135136     * @return void
    136137     */
    137     function form( $instance ) {
     138    function form( $instance ) {
    138139
    139140        $instance = wp_parse_args( (array) $instance, $this->get_defaults() );
    140141        $services = wps_get_mailing_services('options');
    141     ?>
    142         <div class="wp_subscribe_options_form">
    143 
    144             <!-- Hidden title field to prevent WP picking up Title Color field as widget title -->
    145             <input type="hidden" value="" id="<?php echo $this->get_field_id('title') ?>" name="<?php echo $this->get_field_name('title') ?>">
     142    ?>
     143        <div class="wp_subscribe_options_form">
     144
     145            <!-- Hidden title field to prevent WP picking up Title Color field as widget title -->
     146            <input type="hidden" value="" id="<?php echo esc_attr( $this->get_field_id('title') ); ?>" name="<?php echo esc_attr( $this->get_field_name('title') ); ?>">
    146147
    147148            <?php $this->field_select(array(
     
    154155            )); ?>
    155156
    156             <div class="wp_subscribe_account_details">
     157            <div class="wp_subscribe_account_details">
    157158
    158159                <?php foreach( $services as $service_id => $service_name ): ?>
     
    165166                <?php endforeach; ?>
    166167
    167             </div><!-- .wp_subscribe_account_details -->
    168 
    169             <p class="wp_subscribe_include_name">
    170 
    171                 <label for="<?php echo $this->get_field_id('include_name_field') ?>">
    172                     <input type="hidden" name="<?php echo $this->get_field_name('include_name_field'); ?>" value="0">
    173                     <input id="<?php echo $this->get_field_id('include_name_field'); ?>" type="checkbox" class="include-name-field" name="<?php echo $this->get_field_name('include_name_field'); ?>" value="1" <?php checked($instance['include_name_field']); ?>>
    174                     <?php echo wp_kses_post( __( 'Include <strong>Name</strong> field', 'wp-subscribe' ) ) ?>
    175                 </label>
     168            </div><!-- .wp_subscribe_account_details -->
     169
     170            <p class="wp_subscribe_include_name">
     171
     172                <label for="<?php echo esc_attr( $this->get_field_id('include_name_field') ); ?>">
     173                    <input type="hidden" name="<?php echo esc_attr( $this->get_field_name('include_name_field') ); ?>" value="0">
     174                    <input id="<?php echo esc_attr( $this->get_field_id('include_name_field') ); ?>" type="checkbox" class="include-name-field" name="<?php echo esc_attr( $this->get_field_name('include_name_field') ); ?>" value="1" <?php checked($instance['include_name_field']); ?>>
     175                    <?php echo wp_kses_post( __( 'Include <strong>Name</strong> field', 'wp-subscribe' ) ) ?>
     176                </label>
    176177
    177178            </p>
    178179
    179             <h4 class="wp_subscribe_labels_header">
    180                 <a class="wp-subscribe-toggle" href="#" rel="wp_subscribe_labels"><?php _e('Labels', 'wp-subscribe'); ?></a>
     180            <h4 class="wp_subscribe_labels_header">
     181                <a class="wp-subscribe-toggle" href="#" rel="wp_subscribe_labels"><?php esc_html_e('Labels', 'wp-subscribe'); ?></a>
    181182            </h4>
    182183
    183             <div class="wp_subscribe_labels" style="display: none;">
     184            <div class="wp_subscribe_labels" style="display: none;">
    184185
    185186                <?php
     
    214215
    215216                    $this->field_text(array(
     217                        'id'    => 'consent_text',
     218                        'name'  => 'consent_text',
     219                        'title' => esc_html( 'Consent Label', 'wp-subscribe' ),
     220                        'value' => $instance['consent_text']
     221                    ));
     222
     223                    $this->field_text(array(
    216224                        'id'    => 'button_text',
    217225                        'name'  => 'button_text',
     
    234242                    ));
    235243
    236                     $this->field_text(array(
     244                    $this->field_textarea(array(
    237245                        'id'    => 'footer_text',
    238246                        'name'  => 'footer_text',
     
    240248                        'value' => $instance['footer_text']
    241249                    ));
    242                 ?>
    243 
    244             </div><!-- .wp_subscribe_labels -->
    245 
    246         </div><!-- .wp_subscribe_options_form -->
    247     <?php
    248     }
    249 
    250     // -------------------------- FIELD HELPRES ----------------------
    251 
    252     public function field_textarea( $args = array() ) {
    253 
     250                ?>
     251
     252            </div><!-- .wp_subscribe_labels -->
     253
     254        </div><!-- .wp_subscribe_options_form -->
     255    <?php
     256    }
     257
     258    // -------------------------- FIELD HELPERS --------------------------
     259
     260    public function field_textarea( $args = array() ) {
    254261        extract( $args );
    255262        ?>
    256         <p class="wp-subscribe-label-field wp-subscribe-<?php echo $id; ?>-field">
    257             <label for="<?php echo $this->get_field_id($id) ?>">
    258                 <?php echo $title ?>
    259             </label>
    260 
    261             <textarea class="widefat" id="<?php echo $this->get_field_id($id) ?>" name="<?php echo $this->get_field_name($id) ?>"><?php echo esc_textarea( $value ) ?></textarea>
    262         </p>
    263 
    264         <?php
    265     }
     263        <p class="wp-subscribe-label-field wp-subscribe-<?php echo esc_attr( $id ); ?>-field">
     264            <label for="<?php echo esc_attr( $this->get_field_id($id) ); ?>">
     265                <?php echo wp_kses_post( $title ); ?>
     266            </label>
     267
     268            <textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id($id) ); ?>" name="<?php echo esc_attr( $this->get_field_name($id) ); ?>"><?php echo esc_textarea( $value ) ?></textarea>
     269        </p>
     270
     271        <?php
     272    }
    266273
    267274    public function field_text( $args = array() ) {
     
    269276        extract( $args );
    270277        ?>
    271         <div class="wp-subscribe-label-field wp-subscribe-<?php echo $id; ?>-field">
    272             <label for="<?php echo $this->get_field_id( $id ) ?>">
    273                 <?php echo esc_html( $title ) ?>
    274             </label>
     278        <div class="wp-subscribe-label-field wp-subscribe-<?php echo esc_attr( $id ); ?>-field">
     279            <label for="<?php echo esc_attr( $this->get_field_id( $id ) ) ?>">
     280                <?php echo esc_html( $title ) ?>
     281            </label>
    275282
    276283            <div class="wps-input-wrapper">
    277284
    278285                <?php wps_field_text(array(
    279                     'id'    => $this->get_field_id( $id ),
    280                     'name'  => $this->get_field_name( $id ),
    281                     'value' => $value,
     286                    'id'      => $this->get_field_id( $id ),
     287                    'name'    => $this->get_field_name( $id ),
     288                    'value'   => $value,
    282289                    'data_id' => $id
    283                 )) ?>
     290                ) ); ?>
    284291
    285292                <?php if( isset( $link ) ) {
     
    293300            </div>
    294301
    295         </div>
    296         <?php
    297     }
     302        </div>
     303        <?php
     304    }
    298305
    299306    public function field_hidden( $args = array() ) {
     
    302309
    303310        wps_field_hidden(array(
    304             'id'    => $this->get_field_id( $id ),
    305             'name'  => $this->get_field_name( $id ),
    306             'value' => $value,
     311            'id'      => $this->get_field_id( $id ),
     312            'name'    => $this->get_field_name( $id ),
     313            'value'   => $value,
    307314            'data_id' => $id
    308315        ));
    309     }
     316    }
    310317
    311318    public function field_raw( $args = array() ) {
    312319
    313320        call_user_func_array( $args['content'], array( $args['value'] ) );
    314     }
     321    }
    315322
    316323    public function field_checkbox( $args = array() ) {
     
    318325        extract( $args );
    319326        ?>
    320         <div class="wp-subscribe-<?php echo $id; ?>-field">
    321 
    322             <label for="<?php echo $this->get_field_id( $id ) ?>">
    323 
    324                 <input type="hidden" name="<?php echo $this->get_field_name( $id ) ?>" value="0" data-id="<?php echo $this->get_field_id( $id ) ?>">
    325 
    326                 <input type="checkbox" id="<?php echo $this->get_field_id( $id ) ?>" name="<?php echo $this->get_field_name( $id ) ?>" value="1"<?php checked( $value ) ?> data-id="<?php echo $id ?>">
    327 
    328                 <?php echo esc_html($title) ?>
     327        <div class="wp-subscribe-<?php echo esc_attr( $id ); ?>-field">
     328
     329            <label for="<?php echo esc_attr( $this->get_field_id( $id ) ); ?>">
     330
     331                <input type="hidden" name="<?php echo esc_attr( $this->get_field_name( $id ) ); ?>" value="0" data-id="<?php echo esc_attr( $this->get_field_id( $id ) ); ?>">
     332
     333                <input type="checkbox" id="<?php echo esc_attr( $this->get_field_id( $id ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( $id ) ); ?>" value="1"<?php checked( $value ) ?> data-id="<?php echo esc_attr( $id ); ?>">
     334
     335                <?php echo esc_html( $title ); ?>
    329336
    330337            </label>
     
    334341    }
    335342
    336     public function field_select( $args = array() ) {
     343    public function field_select( $args = array() ) {
    337344
    338345        $options = array();
    339346        extract( $args );
    340         ?>
    341 
    342         <div class="wp-subscribe-label-field wp-subscribe-<?php echo $id ?>-field">
    343             <label for="<?php echo $this->get_field_id( $id ) ?>">
    344                 <?php echo esc_html( $title ) ?>
    345             </label>
     347        ?>
     348
     349        <div class="wp-subscribe-label-field wp-subscribe-<?php echo esc_attr( $id ); ?>-field">
     350            <label for="<?php echo esc_attr( $this->get_field_id( $id ) ); ?>">
     351                <?php echo esc_html( $title ) ?>
     352            </label>
    346353
    347354            <div class="wps-input-wrapper">
    348355                <?php wps_field_select(array(
    349                     'id'    => $this->get_field_id( $id ),
    350                     'name'  => $this->get_field_name( $id ),
    351                     'value' => $value,
     356                    'id'      => $this->get_field_id( $id ),
     357                    'name'    => $this->get_field_name( $id ),
     358                    'value'   => $value,
    352359                    'options' => $options,
    353                     'class' => 'widefat list-selectbox'
     360                    'class'   => 'widefat list-selectbox'
    354361                )) ?>
    355362
     
    368375            </div>
    369376
    370         </div>
    371 
    372         <?php
    373     }
     377        </div>
     378
     379        <?php
     380    }
    374381}
    375382
     
    380387add_action( 'widgets_init', 'wps_register_widget' );
    381388function wps_register_widget() {
    382     register_widget( 'wp_subscribe' );
     389    register_widget( 'wp_subscribe' );
    383390}
    384 
    385 endif;
  • wp-subscribe/tags/1.2.13/languages/wp-subscribe.pot

    r1823649 r2717363  
    1 # Copyright (C) 2018 WP Subscribe
    2 # This file is distributed under the same license as the WP Subscribe package.
     1# Copyright (C) 2022 MyThemeShop
     2# This file is distributed under the same license as the WP Subscribe plugin.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WP Subscribe 1.2.6\n"
     5"Project-Id-Version: WP Subscribe 1.2.13\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-subscribe\n"
    7 "POT-Creation-Date: 2018-02-17 01:23:40+00:00\n"
     7"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     8"Language-Team: LANGUAGE <[email protected]>\n"
    89"MIME-Version: 1.0\n"
    910"Content-Type: text/plain; charset=UTF-8\n"
    1011"Content-Transfer-Encoding: 8bit\n"
    11 "PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
    12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    13 "Language-Team: LANGUAGE <[email protected]>\n"
    14 
    15 #: includes/subscription/class-wps-aweber.php:67
     12"POT-Creation-Date: 2022-05-03T04:00:05+02:00\n"
     13"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
     14"X-Generator: WP-CLI 2.6.0\n"
     15"X-Domain: wp-subscribe\n"
     16
     17#. Plugin Name of the plugin
     18msgid "WP Subscribe"
     19msgstr ""
     20
     21#. Plugin URI of the plugin
     22msgid "http://mythemeshop.com/plugins/wp-subscribe/"
     23msgstr ""
     24
     25#. Description of the plugin
     26msgid "WP Subscribe is a simple but powerful subscription plugin which supports MailChimp, Aweber and Feedburner."
     27msgstr ""
     28
     29#. Author of the plugin
     30msgid "MyThemeShop"
     31msgstr ""
     32
     33#. Author URI of the plugin
     34msgid "http://mythemeshop.com/"
     35msgstr ""
     36
     37#: includes/subscription/class-wps-aweber.php:72
    1638msgid "Unable to connect to Aweber. The Authorization Code is empty."
    1739msgstr ""
    1840
    19 #: includes/subscription/class-wps-aweber.php:77
    20 msgid ""
    21 "Unable to connect your Aweber Account. The Authorization Code is incorrect."
    22 msgstr ""
    23 
    24 #: includes/subscription/class-wps-aweber.php:203
     41#: includes/subscription/class-wps-aweber.php:82
     42msgid "Unable to connect your Aweber Account. The Authorization Code is incorrect."
     43msgstr ""
     44
     45#: includes/subscription/class-wps-aweber.php:208
    2546msgid "AWeber List"
    2647msgstr ""
    2748
    28 #: includes/subscription/class-wps-aweber.php:204
    29 #: includes/subscription/class-wps-mailchimp.php:73
     49#: includes/subscription/class-wps-aweber.php:209
     50#: includes/subscription/class-wps-mailchimp.php:77
    3051msgid "Select List"
    3152msgstr ""
    3253
    33 #: includes/subscription/class-wps-aweber.php:217
    34 msgid "To connect your Aweber account:"
    35 msgstr ""
    36 
    37 #: includes/subscription/class-wps-aweber.php:220
    38 msgid ""
    39 "<span>1.</span> <a href=\"%s\" target=\"_blank\">Click here</a> <span>to "
    40 "open the authorization page and log in.</span>"
    41 msgstr ""
    42 
    43 #: includes/subscription/class-wps-aweber.php:221
    44 msgid ""
    45 "<span>2.</span> Copy and paste the authorization code in the field below."
    46 msgstr ""
    47 
    48 #: includes/subscription/class-wps-aweber.php:230
    49 msgid "Your Aweber Account is connected."
    50 msgstr ""
    51 
    52 #: includes/subscription/class-wps-aweber.php:231
    53 msgid ""
    54 "<a href=\"#\" class=\"aweber_disconnect\">Click here</a> <span>to disconnect."
    55 "</span>"
    56 msgstr ""
    57 
    58 #: includes/subscription/class-wps-feedburner.php:39
     54#: includes/subscription/class-wps-feedburner.php:50
    5955msgid "Feedburner ID"
    6056msgstr ""
    6157
    62 #: includes/subscription/class-wps-mailchimp.php:63
     58#: includes/subscription/class-wps-mailchimp.php:67
    6359msgid "MailChimp API URL"
    6460msgstr ""
    6561
    66 #: includes/subscription/class-wps-mailchimp.php:64
     62#: includes/subscription/class-wps-mailchimp.php:68
    6763msgid "The API key of your MailChimp account."
    6864msgstr ""
    6965
    70 #: includes/subscription/class-wps-mailchimp.php:72
     66#: includes/subscription/class-wps-mailchimp.php:76
    7167msgid "MailChimp List"
    7268msgstr ""
    7369
    74 #: includes/subscription/class-wps-mailchimp.php:81
     70#: includes/subscription/class-wps-mailchimp.php:85
    7571msgid "Send double opt-in notification"
    7672msgstr ""
     
    10096msgstr ""
    10197
    102 #: includes/wps-helpers.php:217
     98#: includes/wps-helpers.php:224
    10399msgid "No Animation"
    104100msgstr ""
    105101
    106 #: includes/wps-helpers.php:218
     102#: includes/wps-helpers.php:225
    107103msgid "Attention Seekers"
    108104msgstr ""
    109105
    110 #: includes/wps-helpers.php:219
     106#: includes/wps-helpers.php:226
    111107msgid "bounce"
    112108msgstr ""
    113109
    114 #: includes/wps-helpers.php:220
     110#: includes/wps-helpers.php:227
    115111msgid "flash"
    116112msgstr ""
    117113
    118 #: includes/wps-helpers.php:221
     114#: includes/wps-helpers.php:228
    119115msgid "pulse"
    120116msgstr ""
    121117
    122 #: includes/wps-helpers.php:222
     118#: includes/wps-helpers.php:229
    123119msgid "rubberBand"
    124120msgstr ""
    125121
    126 #: includes/wps-helpers.php:223
     122#: includes/wps-helpers.php:230
    127123msgid "shake"
    128124msgstr ""
    129125
    130 #: includes/wps-helpers.php:224
     126#: includes/wps-helpers.php:231
    131127msgid "swing"
    132128msgstr ""
    133129
    134 #: includes/wps-helpers.php:225
     130#: includes/wps-helpers.php:232
    135131msgid "tada"
    136132msgstr ""
    137133
    138 #: includes/wps-helpers.php:226
     134#: includes/wps-helpers.php:233
    139135msgid "wobble"
    140136msgstr ""
    141137
    142 #: includes/wps-helpers.php:228
     138#: includes/wps-helpers.php:235
    143139msgid "Bouncing Entrances"
    144140msgstr ""
    145141
    146 #: includes/wps-helpers.php:229
     142#: includes/wps-helpers.php:236
    147143msgid "bounceIn"
    148144msgstr ""
    149145
    150 #: includes/wps-helpers.php:230
     146#: includes/wps-helpers.php:237
    151147msgid "bounceInDown"
    152148msgstr ""
    153149
    154 #: includes/wps-helpers.php:231
     150#: includes/wps-helpers.php:238
    155151msgid "bounceInLeft"
    156152msgstr ""
    157153
    158 #: includes/wps-helpers.php:232
     154#: includes/wps-helpers.php:239
    159155msgid "bounceInRight"
    160156msgstr ""
    161157
    162 #: includes/wps-helpers.php:233
     158#: includes/wps-helpers.php:240
    163159msgid "bounceInUp"
    164160msgstr ""
    165161
    166 #: includes/wps-helpers.php:235
     162#: includes/wps-helpers.php:242
    167163msgid "Fading Entrances"
    168164msgstr ""
    169165
    170 #: includes/wps-helpers.php:236
     166#: includes/wps-helpers.php:243
    171167msgid "fadeIn"
    172168msgstr ""
    173169
    174 #: includes/wps-helpers.php:237
     170#: includes/wps-helpers.php:244
    175171msgid "fadeInDown"
    176172msgstr ""
    177173
    178 #: includes/wps-helpers.php:238
     174#: includes/wps-helpers.php:245
    179175msgid "fadeInDownBig"
    180176msgstr ""
    181177
    182 #: includes/wps-helpers.php:239
     178#: includes/wps-helpers.php:246
    183179msgid "fadeInLeft"
    184180msgstr ""
    185181
    186 #: includes/wps-helpers.php:240
     182#: includes/wps-helpers.php:247
    187183msgid "fadeInLeftBig"
    188184msgstr ""
    189185
    190 #: includes/wps-helpers.php:241
     186#: includes/wps-helpers.php:248
    191187msgid "fadeInRight"
    192188msgstr ""
    193189
    194 #: includes/wps-helpers.php:242
     190#: includes/wps-helpers.php:249
    195191msgid "fadeInRightBig"
    196192msgstr ""
    197193
    198 #: includes/wps-helpers.php:243
     194#: includes/wps-helpers.php:250
    199195msgid "fadeInUp"
    200196msgstr ""
    201197
    202 #: includes/wps-helpers.php:244
     198#: includes/wps-helpers.php:251
    203199msgid "fadeInUpBig"
    204200msgstr ""
    205201
    206 #: includes/wps-helpers.php:246
     202#: includes/wps-helpers.php:253
    207203msgid "Flippers"
    208204msgstr ""
    209205
    210 #: includes/wps-helpers.php:247
     206#: includes/wps-helpers.php:254
    211207msgid "flipInX"
    212208msgstr ""
    213209
    214 #: includes/wps-helpers.php:248
     210#: includes/wps-helpers.php:255
    215211msgid "flipInY"
    216212msgstr ""
    217213
    218 #: includes/wps-helpers.php:250
     214#: includes/wps-helpers.php:257
    219215msgid "Lightspeed"
    220216msgstr ""
    221217
    222 #: includes/wps-helpers.php:251
     218#: includes/wps-helpers.php:258
    223219msgid "lightSpeedIn"
    224220msgstr ""
    225221
    226 #: includes/wps-helpers.php:253
     222#: includes/wps-helpers.php:260
    227223msgid "Rotating Entrances"
    228224msgstr ""
    229225
    230 #: includes/wps-helpers.php:254
     226#: includes/wps-helpers.php:261
    231227msgid "rotateIn"
    232228msgstr ""
    233229
    234 #: includes/wps-helpers.php:255
     230#: includes/wps-helpers.php:262
    235231msgid "rotateInDownLeft"
    236232msgstr ""
    237233
    238 #: includes/wps-helpers.php:256
     234#: includes/wps-helpers.php:263
    239235msgid "rotateInDownRight"
    240236msgstr ""
    241237
    242 #: includes/wps-helpers.php:257
     238#: includes/wps-helpers.php:264
    243239msgid "rotateInUpLeft"
    244240msgstr ""
    245241
    246 #: includes/wps-helpers.php:258
     242#: includes/wps-helpers.php:265
    247243msgid "rotateInUpRight"
    248244msgstr ""
    249245
    250 #: includes/wps-helpers.php:260
     246#: includes/wps-helpers.php:267
    251247msgid "Specials"
    252248msgstr ""
    253249
    254 #: includes/wps-helpers.php:261
     250#: includes/wps-helpers.php:268
    255251msgid "rollIn"
    256252msgstr ""
    257253
    258 #: includes/wps-helpers.php:263
     254#: includes/wps-helpers.php:270
    259255msgid "Zoom Entrances"
    260256msgstr ""
    261257
    262 #: includes/wps-helpers.php:264
     258#: includes/wps-helpers.php:271
    263259msgid "zoomIn"
    264260msgstr ""
    265261
    266 #: includes/wps-helpers.php:265
     262#: includes/wps-helpers.php:272
    267263msgid "zoomInDown"
    268264msgstr ""
    269265
    270 #: includes/wps-helpers.php:266
     266#: includes/wps-helpers.php:273
    271267msgid "zoomInLeft"
    272268msgstr ""
    273269
    274 #: includes/wps-helpers.php:267
     270#: includes/wps-helpers.php:274
    275271msgid "zoomInRight"
    276272msgstr ""
    277273
    278 #: includes/wps-helpers.php:268
     274#: includes/wps-helpers.php:275
    279275msgid "zoomInUp"
    280276msgstr ""
    281277
    282 #: includes/wps-widget.php:23
     278#: includes/wps-widget.php:25
    283279msgid "Displays subscription form, supports FeedBurner, MailChimp & AWeber."
    284280msgstr ""
    285281
    286 #: includes/wps-widget.php:34
     282#: includes/wps-widget.php:36
    287283msgid "WP Subscribe Widget"
    288284msgstr ""
    289285
    290 #: includes/wps-widget.php:50
     286#: includes/wps-widget.php:52
    291287msgid "Get more stuff"
    292288msgstr ""
    293289
    294 #: includes/wps-widget.php:51
    295 msgid ""
    296 "Subscribe to our mailing list and get interesting stuff and updates to your "
    297 "email inbox."
    298 msgstr ""
    299 
    300 #: includes/wps-widget.php:52
     290#: includes/wps-widget.php:53
     291msgid "Subscribe to our mailing list and get interesting stuff and updates to your email inbox."
     292msgstr ""
     293
     294#: includes/wps-widget.php:54
    301295msgid "Enter your email here"
    302296msgstr ""
    303297
    304 #: includes/wps-widget.php:53
     298#: includes/wps-widget.php:55
     299msgid "I consent to my submitted data being collected via this form*"
     300msgstr ""
     301
     302#: includes/wps-widget.php:56
    305303msgid "Enter your name here"
    306304msgstr ""
    307305
    308 #: includes/wps-widget.php:54
     306#: includes/wps-widget.php:57
    309307msgid "Sign Up Now"
    310308msgstr ""
    311309
    312 #: includes/wps-widget.php:55
     310#: includes/wps-widget.php:58
    313311msgid "Thank you for subscribing."
    314312msgstr ""
    315313
    316 #: includes/wps-widget.php:56
     314#: includes/wps-widget.php:59
    317315msgid "Something went wrong."
    318316msgstr ""
    319317
    320 #: includes/wps-widget.php:57
     318#: includes/wps-widget.php:60
    321319msgid "we respect your privacy and take protecting it seriously"
    322320msgstr ""
    323321
    324 #: includes/wps-widget.php:174
     322#: includes/wps-widget.php:175
    325323msgid "Include <strong>Name</strong> field"
    326324msgstr ""
    327325
    328 #: includes/wps-widget.php:180
     326#: includes/wps-widget.php:181
    329327msgid "Labels"
    330328msgstr ""
    331329
    332 #: includes/wps-widget.php:286 includes/wps-widget.php:361
     330#: includes/wps-widget.php:293
     331#: includes/wps-widget.php:368
    333332msgid "Click here"
    334333msgstr ""
    335334
    336 #: includes/wps-widget.php:357
     335#: includes/wps-widget.php:364
    337336msgid "Get list"
    338337msgstr ""
    339338
    340 #: wp-subscribe.php:61 wp-subscribe.php:68
     339#: wp-subscribe.php:61
     340#: wp-subscribe.php:68
    341341msgid "Cheatin&#8217; huh?"
    342342msgstr ""
    343343
    344 #: wp-subscribe.php:160
     344#. Translators: %s is "WP Subscribe Pro" as a link.
     345#: wp-subscribe.php:125
     346msgid "Like WP Subscribe plugin? You will LOVE %s!"
     347msgstr ""
     348
     349#: wp-subscribe.php:135
     350msgid "Thank you for trying WP Subscribe. We hope you will like it."
     351msgstr ""
     352
     353#: wp-subscribe.php:206
    345354msgid "No aweber authorization code found."
    346355msgstr ""
    347356
    348 #: wp-subscribe.php:192
     357#: wp-subscribe.php:238
    349358msgid "No data found."
    350359msgstr ""
    351360
    352 #: wp-subscribe.php:200
     361#: wp-subscribe.php:246
    353362msgid "No email address found."
    354363msgstr ""
    355364
    356 #: wp-subscribe.php:207
     365#: wp-subscribe.php:253
    357366msgid "Not a valid email address."
    358367msgstr ""
    359368
    360 #: wp-subscribe.php:216
     369#: wp-subscribe.php:262
    361370msgid "Unknown mailing service called."
    362371msgstr ""
    363372
    364 #: wp-subscribe.php:251
     373#: wp-subscribe.php:297
    365374msgid "Not permitted."
    366375msgstr ""
    367376
    368 #: wp-subscribe.php:260
     377#: wp-subscribe.php:306
    369378msgid "Service not defined."
    370379msgstr ""
    371380
    372 #: wp-subscribe.php:278
     381#: wp-subscribe.php:324
    373382msgid "No lists found."
    374383msgstr ""
    375 
    376 #. Plugin Name of the plugin/theme
    377 msgid "WP Subscribe"
    378 msgstr ""
    379 
    380 #. Plugin URI of the plugin/theme
    381 msgid "http://mythemeshop.com/plugins/wp-subscribe/"
    382 msgstr ""
    383 
    384 #. Description of the plugin/theme
    385 msgid ""
    386 "WP Subscribe is a simple but powerful subscription plugin which supports "
    387 "MailChimp, Aweber and Feedburner."
    388 msgstr ""
    389 
    390 #. Author of the plugin/theme
    391 msgid "MyThemeShop"
    392 msgstr ""
    393 
    394 #. Author URI of the plugin/theme
    395 msgid "http://mythemeshop.com/"
    396 msgstr ""
  • wp-subscribe/tags/1.2.13/readme.txt

    r2357681 r2717363  
    44Tags: subscribe, subscription, subscription box, newsletter, subscribe widget, mailchimp, aweber, feedburner,
    55Requires at least: 4.0
    6 Tested up to: 5.5
    7 Stable tag: 1.2.12
     6Tested up to: 5.9.3
     7Stable tag: 1.2.13
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8282
    8383== Changelog ==
     84
     85= 1.2.13 =
     86* Fixed a security issue
    8487
    8588= 1.2.12 =
  • wp-subscribe/tags/1.2.13/wp-subscribe.php

    r1849523 r2717363  
    44 * Plugin URI: http://mythemeshop.com/plugins/wp-subscribe/
    55 * Description: WP Subscribe is a simple but powerful subscription plugin which supports MailChimp, Aweber and Feedburner.
    6  * Version: 1.2.7
     6 * Version: 1.2.13
    77 * Author: MyThemeShop
    88 * Author URI: http://mythemeshop.com/
     
    2828         * @var string
    2929         */
    30         private $version = '1.2.6';
     30        private $version = '1.2.13';
    3131
    3232        /**
     
    7878            include_once 'includes/wps-functions-options.php';
    7979            include_once 'includes/wps-widget.php';
    80 
     80            register_activation_hook( __FILE__, array( $this, 'activate_plugin' ) );
    8181            $this->autoloader();
    8282            $this->hooks();
     
    109109            $this->add_action( 'wp_ajax_nopriv_validate_subscribe', 'validate_subscribe' );
    110110            $this->add_action( 'wp_ajax_connect_aweber', 'connect_aweber' );
     111
     112            /* Display a notice */
     113            $this->add_action('admin_notices', 'wp_subscribe_admin_notice');
     114            $this->add_action('wp_ajax_mts_dismiss_wpsubscribe_notice', 'wp_subscribe_admin_notice_ignore');
     115        }
     116
     117        public function wp_subscribe_admin_notice() {
     118            global $current_user ;
     119            $user_id = $current_user->ID;
     120            /* Check that the user hasn't already clicked to ignore the message */
     121            /* Only show the notice 2 days after plugin activation */
     122            if ( ! get_user_meta($user_id, 'wp_subscribe_ignore_notice') && time() >= (get_option( 'wp_subscribe_activated', 0 ) + (2 * 24 * 60 * 60)) ) {
     123                echo '<div class="updated notice-info wp-subscribe-notice" id="wpsubscribe-notice" style="position:relative;">';
     124                // Translators: %s is "WP Subscribe Pro" as a link.
     125                echo '<p>' . sprintf( __('Like WP Subscribe plugin? You will LOVE %s!', 'wp-subscribe'), '<a target="_blank" 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"><strong>WP Subscribe Pro</strong></a>' ) . '</p><a class="notice-dismiss wpsubscribe-dismiss-notice" data-ignore="0" href="#"></a>';
     126                echo "</div>";
     127            }
     128            /* Other notice appears right after activating */
     129            /* And it gets hidden after showing 3 times */
     130            if ( ! get_user_meta($user_id, 'wp_subscribe_ignore_notice_2') && get_option('wp_subscribe_notice_views', 0) < 3 && get_option( 'wp_subscribe_activated', 0 ) ) {
     131                $views = get_option('wp_subscribe_notice_views', 0);
     132                update_option( 'wp_subscribe_notice_views', ($views + 1) );
     133                echo '<div class="updated notice-info wp-subscribe-notice" id="wpsubscribe-notice2" style="position:relative;">';
     134                echo '<p>';
     135                esc_html_e('Thank you for trying WP Subscribe. We hope you will like it.', 'wp-subscribe');
     136                echo '</p>';
     137                echo '<a class="notice-dismiss wpsubscribe-dismiss-notice" data-ignore="1" href="#"></a>';
     138                echo "</div>";
     139            }
     140        }
     141
     142        public function wp_subscribe_admin_notice_ignore() {
     143            global $current_user;
     144            $user_id = $current_user->ID;
     145            /* If user clicks to ignore the notice, add that to their user meta */
     146            if ( isset($_POST['dismiss']) ) {
     147                if ( '0' == $_POST['dismiss'] ) {
     148                    add_user_meta($user_id, 'wp_subscribe_ignore_notice', '1', true);
     149                } elseif ( '1' == $_POST['dismiss'] ) {
     150                    add_user_meta($user_id, 'wp_subscribe_ignore_notice_2', '1', true);
     151                }
     152            }
     153        }
     154
     155        public function activate_plugin() {
     156            update_option('wp_subscribe_activated', time());
    111157        }
    112158
     
    150196            load_plugin_textdomain( 'wp-subscribe', false, $this->plugin_dir() . '/languages' );
    151197        }
    152        
     198
    153199        public function connect_aweber() {
    154200
  • wp-subscribe/trunk/assets/css/wp-subscribe-form.css

    r1715462 r2717363  
    33 * Name:        wp-subscribe-form.css
    44 * Written by:  MyThemeShop
    5  */.wp-subscribe-wrap{padding:20px;text-align:center;background:#f47555}.wp-subscribe-wrap h4.title{font-size:22px;line-height:1;margin-bottom:0;text-transform:uppercase;color:#fff}.wp-subscribe-wrap h4.title span{font-size:38px;font-weight:bold;display:inline-block;margin-top:15px}#wp_subscribe_popup .wp-subscribe-wrap h4.title{margin-top:0}.wp-subscribe-wrap p{margin:0;color:#fff}.wp-subscribe-wrap p.text{margin:15px 0;opacity:.8}.wp-subscribe-wrap p.footer-text{font-size:12px;margin-top:10px}.wp-subscribe-wrap input{box-sizing:border-box;width:100%;height:45px;margin:0;padding:10px 0;text-align:center;text-indent:10px;border:none;border-radius:0;box-shadow:none}.wp-subscribe-wrap input::-webkit-input-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input:-moz-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input::-moz-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input:-ms-input-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input:focus::-webkit-input-placeholder{color:transparent !important}.wp-subscribe-wrap input:focus:-moz-placeholder{color:transparent !important}.wp-subscribe-wrap input:focus::-moz-placeholder{color:transparent !important}.wp-subscribe-wrap input:focus:-ms-input-placeholder{color:transparent !important}.wp-subscribe-wrap .email-field{margin-top:10px}.wp-subscribe-wrap input.email-field,.wp-subscribe-wrap input.name-field{color:#fff;background:#d56144}.wp-subscribe-wrap input.submit{font-size:18px;font-weight:500;margin-top:20px;cursor:pointer;text-transform:uppercase;color:#f47555;background:#fff;box-shadow:0 1px 2px 0 rgba(0,0,0,0.05)}.wp-subscribe-single .wp-subscribe-wrap{clear:both;margin:10px 0;text-align:left}.wp-subscribe-single .wp-subscribe-wrap input{text-align:left}.wp-subscribe-wrap .error,.wp-subscribe-wrap .thanks{margin-top:10px}.wp-subscribe-wrap .wp-subscribe-loader{display:none;padding:1em;text-align:center;vertical-align:top}.wp-subscribe-wrap.loading .wp-subscribe-form,.thanks,.error{display:none}.wp-subscribe-wrap.loading .wp-subscribe-loader{display:block}
     5 */.wp-subscribe-wrap{padding:20px;text-align:center;background:#f47555}.wp-subscribe-wrap h4.title{font-size:22px;line-height:1;margin-bottom:0;text-transform:uppercase;color:#fff}.wp-subscribe-wrap h4.title span{font-size:38px;font-weight:bold;display:inline-block;margin-top:15px}#wp_subscribe_popup .wp-subscribe-wrap h4.title{margin-top:0}.wp-subscribe-wrap p{margin:0;color:#fff}.wp-subscribe-wrap p.text{margin:15px 0;opacity:.8}.wp-subscribe-wrap p.footer-text{font-size:12px;margin-top:10px}.wp-subscribe-wrap input{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:45px;margin:0;padding:10px 0;text-align:center;text-indent:10px;border:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none}.wp-subscribe-wrap input::-webkit-input-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input:-moz-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input::-moz-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input:-ms-input-placeholder{opacity:.8;color:inherit}.wp-subscribe-wrap input:focus::-webkit-input-placeholder{color:transparent !important}.wp-subscribe-wrap input:focus:-moz-placeholder{color:transparent !important}.wp-subscribe-wrap input:focus::-moz-placeholder{color:transparent !important}.wp-subscribe-wrap input:focus:-ms-input-placeholder{color:transparent !important}.wp-subscribe-wrap input.consent-field{width:17px;height:17px;margin-top:2px;margin-right:6px;cursor:pointer}.wp-subscribe-wrap .wps-consent-wrapper{margin-top:20px;text-align:left;display:block}.wp-subscribe-wrap .wps-consent-wrapper label{color:#fff;opacity:0.8;font-weight:normal}.wp-subscribe-wrap .wps-consent-wrapper label input{float:left;margin-bottom:5px}.wp-subscribe-wrap .email-field{margin-top:10px}.wp-subscribe-wrap input.email-field,.wp-subscribe-wrap input.name-field{color:#fff;background:#d56144}.wp-subscribe-wrap input.submit{font-size:18px;font-weight:500;line-height:1;margin-top:20px;cursor:pointer;text-transform:uppercase;color:#f47555;background:#fff;-webkit-box-shadow:0 1px 2px 0 rgba(0,0,0,0.05);box-shadow:0 1px 2px 0 rgba(0,0,0,0.05)}.wp-subscribe-single .wp-subscribe-wrap{clear:both;margin:10px 0;text-align:left}.wp-subscribe-single .wp-subscribe-wrap input{text-align:left}.wp-subscribe-wrap .error,.wp-subscribe-wrap .thanks{margin-top:10px}.wp-subscribe-wrap .wp-subscribe-loader{display:none;padding:1em;text-align:center;vertical-align:top}.wp-subscribe-wrap.loading .wp-subscribe-form,.thanks,.error{display:none}.wp-subscribe-wrap.loading .wp-subscribe-loader{display:block}
  • wp-subscribe/trunk/assets/js/wp-subscribe-admin.js

    r1739908 r2717363  
    196196    });
    197197
     198    jQuery(document).on('click', '.wpsubscribe-dismiss-notice', function(e){
     199        e.preventDefault();
     200        jQuery(this).parent().remove();
     201        jQuery.ajax({
     202            type: "POST",
     203            url: ajaxurl,
     204            data: {
     205                action: 'mts_dismiss_wpsubscribe_notice',
     206                dismiss: jQuery(this).data('ignore')
     207            }
     208        });
     209        return false;
     210    });
     211
    198212}( jQuery ) );
  • wp-subscribe/trunk/includes/subscription/class-wps-aweber.php

    r1715462 r2717363  
    33 * Aweber Subscription
    44 */
     5
     6 if ( ! defined( 'ABSPATH' ) ) {
     7    exit;
     8}
     9
    510class WPS_Subscription_Aweber extends WPS_Subscription_Base {
    611
     
    218223            <br />
    219224            <ul>
    220                 <li><?php printf( wp_kses_post( __( '<span>1.</span> <a href="%s" target="_blank">Click here</a> <span>to open the authorization page and log in.</span>', 'content-locker' ) ), 'https://auth.aweber.com/1.0/oauth/authorize_app/1afc783e' ) ?></li>
    221                 <li><?php echo wp_kses_post( __( '<span>2.</span> Copy and paste the authorization code in the field below.', 'content-locker' ) ) ?></li>
     225                <li>
     226                    <?php
     227                    // Translators: %1$s is "1." and %2$s is is the URL to the Aweber authorization page.
     228                    printf( wp_kses_post( __( '%1$s <a href="%2$s" target="_blank">Click here</a> <span>to open the authorization page and log in.</span>', 'content-locker' ) ), '<span>1.</span>', 'https://auth.aweber.com/1.0/oauth/authorize_app/1afc783e' );
     229                    ?>
     230                </li>
     231                <li>
     232                    <?php
     233                    // Translators: %s is "2.".
     234                    printf( wp_kses_post( __( '%s Copy and paste the authorization code in the field below.', 'content-locker' ) ), '<span>2.</span>' );
     235                    ?>
     236                </li>
    222237            </ul>
    223238
     
    228243        <div class="alert alert-hint mb30 <?php echo empty( $instance['aweber_access_key'] ) ? ' hidden' : '' ?>">
    229244            <p>
    230                 <strong><?php _e( 'Your Aweber Account is connected.', 'content-locker' ) ?></strong>
     245                <strong><?php esc_html_e( 'Your Aweber Account is connected.', 'content-locker' ) ?></strong>
    231246                <?php echo wp_kses_post( __( '<a href="#" class="aweber_disconnect">Click here</a> <span>to disconnect.</span>', 'content-locker' ) ) ?>
    232247            </p>
  • wp-subscribe/trunk/includes/subscription/class-wps-base.php

    r1715462 r2717363  
    33 * A class for subscription services
    44 */
     5
     6if ( ! defined( 'ABSPATH' ) ) {
     7    exit;
     8}
     9
    510abstract class WPS_Subscription_Base {
    611
     
    125130
    126131        if( !empty( $this->options['include_name_field'] ) ) {
    127             printf( '<input class="regular-text name-field" type="text" name="%s" placeholder="%s">', esc_attr( $name ), esc_attr( $this->options['name_placeholder'] ) );
     132            printf( '<input class="regular-text name-field" type="text" name="%s" placeholder="%s" required>', esc_attr( $name ), esc_attr( $this->options['name_placeholder'] ) );
    128133        }
    129134    }
     
    131136    public function the_email_field( $name ) {
    132137
    133         printf( '<input class="regular-text email-field" type="text" name="%s" placeholder="%s">', esc_attr( $name ), esc_attr( $this->options['email_placeholder'] ) );
     138        printf( '<input class="regular-text email-field" type="email" name="%s" placeholder="%s" required>', esc_attr( $name ), esc_attr( $this->options['email_placeholder'] ) );
    134139    }
    135140
  • wp-subscribe/trunk/includes/subscription/class-wps-feedburner.php

    r1715462 r2717363  
    44 */
    55
     6if ( ! defined( 'ABSPATH' ) ) {
     7    exit;
     8}
     9
    610class WPS_Subscription_FeedBurner extends WPS_Subscription_Base {
    711
    8     public function the_form( $id, $options ) {
     12    public function the_form( $id, $options ) {
    913        ?>
    1014
    11         <form action="https://feedburner.google.com/fb/a/mailverify?uri=<?php echo $options['feedburner_id'] ?>" method="post" class="wp-subscribe-form wp-subscribe-feedburner" id="wp-subscribe-form-<?php echo $id ?>" target="popupwindow">
     15        <form action="https://feedburner.google.com/fb/a/mailverify?uri=<?php echo esc_attr( $options['feedburner_id'] ); ?>" method="post" class="wp-subscribe-form wp-subscribe-feedburner" id="wp-subscribe-form-<?php echo esc_attr( $id ); ?>" target="popupwindow">
    1216
    13             <input class="regular-text email-field" type="text" name="email" placeholder="<?php echo esc_attr( $options['email_placeholder'] ) ?>">
     17            <input class="regular-text email-field" type="email" name="email" placeholder="<?php echo esc_attr( $options['email_placeholder'] ) ?>" required>
    1418
    15             <input type="hidden" name="uri" value="<?php echo $options['feedburner_id'] ?>">
     19            <input type="hidden" name="uri" value="<?php echo esc_attr( $options['feedburner_id'] ); ?>">
    1620
    1721            <input type="hidden" name="loc" value="en_US">
    1822
    19             <input type="hidden" name="form_type" value="<?php echo $options['form_type'] ?>">
     23            <input type="hidden" name="form_type" value="<?php echo esc_attr( $options['form_type'] ); ?>">
    2024
    21             <input type="hidden" name="service" value="<?php echo $options['service'] ?>">
     25            <input type="hidden" name="service" value="<?php echo esc_attr( $options['service'] ); ?>">
    2226
    23             <input type="hidden" name="widget" value="<?php echo isset( $options['widget_id'] ) ? $options['widget_id'] : '0'; ?>">
    24 
     27            <input type="hidden" name="widget" value="<?php echo isset( $options['widget_id'] ) ? esc_attr( $options['widget_id'] ) : '0'; ?>">
     28            <?php if( ! empty( $options['consent_text'] ) ) : ?>
     29                <div class="wps-consent-wrapper">
     30                    <label for="consent-field">
     31                        <input class="consent-field" id="consent-field" type="checkbox" name="consent" required />
     32                        <?php echo wp_kses_post( $options['consent_text'] ); ?>
     33                    </label>
     34                </div>
     35            <?php endif; ?>
    2536            <input class="submit" type="submit" name="submit" value="<?php echo esc_attr( $options['button_text'] ) ?>">
    2637
     
    3748                'name'  => 'feedburner_id',
    3849                'type'  => 'text',
    39                 'title' => esc_html__( 'Feedburner ID', 'wp-subscribe' ),
     50                'title' => __( 'Feedburner ID', 'wp-subscribe' ),
    4051            )
    4152        );
  • wp-subscribe/trunk/includes/subscription/class-wps-mailchimp.php

    r1715462 r2717363  
    33 * MailChimp Subscription
    44 */
     5
     6if ( ! defined( 'ABSPATH' ) ) {
     7    exit;
     8}
    59
    610class WPS_Subscription_MailChimp extends WPS_Subscription_Base {
  • wp-subscribe/trunk/includes/wps-functions-options.php

    r1715462 r2717363  
    77 * Get mailing services
    88 *
    9  * @use filter  wp_subscribe_mailing_services
     9 * @use filter wp_subscribe_mailing_services
    1010 * @return array
    1111 */
     
    1414    $services = array(
    1515
    16         'aweber' => array(
    17             'title'       => esc_html__( 'Aweber', 'wp-subscribe' ),
    18             'description' => esc_html__( 'Adds subscribers to your Aweber account.', 'wp-subscribe' ),
    19             'class'       => 'WPS_Subscription_Aweber'
    20         ),
     16        'aweber' => array(
     17            'title'       => __( 'Aweber', 'wp-subscribe' ),
     18            'description' => __( 'Adds subscribers to your Aweber account.', 'wp-subscribe' ),
     19            'class'       => 'WPS_Subscription_Aweber'
     20        ),
    2121
    2222        'feedburner' => array(
    23             'title'       => esc_html__( 'FeedBurner', 'wp-subscribe' ),
    24             'description' => esc_html__( 'Adds subscribers to your FeedBurner account.', 'wp-subscribe' ),
    25             'class'       => 'WPS_Subscription_FeedBurner'
    26         ),
     23            'title'       => __( 'FeedBurner', 'wp-subscribe' ),
     24            'description' => __( 'Adds subscribers to your FeedBurner account.', 'wp-subscribe' ),
     25            'class'       => 'WPS_Subscription_FeedBurner'
     26        ),
    2727
    2828        'mailchimp' => array(
    29             'title'       => esc_html__( 'MailChimp', 'wp-subscribe' ),
    30             'description' => esc_html__( 'Adds subscribers to your MailChimp account.', 'wp-subscribe' ),
     29            'title'       => __( 'MailChimp', 'wp-subscribe' ),
     30            'description' => __( 'Adds subscribers to your MailChimp account.', 'wp-subscribe' ),
    3131            'class'       => 'WPS_Subscription_MailChimp'
    32         )
     32        )
    3333    );
    3434
  • wp-subscribe/trunk/includes/wps-helpers.php

    r1823647 r2717363  
    3131?>
    3232    <?php if( isset( $options['before_widget'] ) ) : ?>
    33         <?php echo $options['before_widget'] ?>
     33        <?php echo wp_kses_post( $options['before_widget'] ); ?>
    3434    <?php else: ?>
    3535        <div class="wp-subscribe-popup-form-wrapper">
    3636    <?php endif; ?>
    3737
    38         <div id="wp-subscribe" class="wp-subscribe-wrap wp-subscribe wp-subscribe-<?php echo $wp_subscribe_forms ?>" data-thanks_page="<?php echo absint( isset( $options['thanks_page'] ) ? $options['thanks_page'] : 0 ) ?>" data-thanks_page_url="<?php echo isset( $options['thanks_page_url'] ) ? esc_url( $options['thanks_page_url'] ) : '' ?>" data-thanks_page_new_window="0">
     38        <div id="wp-subscribe" class="wp-subscribe-wrap wp-subscribe wp-subscribe-<?php echo esc_attr( $wp_subscribe_forms ); ?>" data-thanks_page="<?php echo absint( isset( $options['thanks_page'] ) ? $options['thanks_page'] : 0 ) ?>" data-thanks_page_url="<?php echo isset( $options['thanks_page_url'] ) ? esc_url( $options['thanks_page_url'] ) : '' ?>" data-thanks_page_new_window="0">
    3939
    4040            <h4 class="title"><?php echo wp_kses_post( $options['title'] )?></h4>
     
    4242            <p class="text"><?php echo wp_kses_post( $options['text'] ) ?></p>
    4343
    44             <?php if( method_exists( $service, 'the_form' ) ) :
     44            <?php
     45            if ( method_exists( $service, 'the_form' ) ) :
    4546                $service->the_form( $wp_subscribe_forms, $options );
    46             else: ?>
    47 
    48             <form action="<?php echo $current_url ?>" method="post" class="wp-subscribe-form wp-subscribe-<?php echo $options['service'] ?>" id="wp-subscribe-form-<?php echo $wp_subscribe_forms ?>">
    49 
    50                 <?php if( !empty( $options['include_name_field'] ) ) : ?>
    51                     <input class="regular-text name-field" type="text" name="name" placeholder="<?php echo esc_attr( $options['name_placeholder'] ) ?>">
    52                 <?php endif; ?>
    53 
    54                 <input class="regular-text email-field" type="text" name="email" placeholder="<?php echo esc_attr( $options['email_placeholder'] ) ?>">
    55 
    56                 <input type="hidden" name="form_type" value="<?php echo $options['form_type'] ?>">
    57 
    58                 <input type="hidden" name="service" value="<?php echo $options['service'] ?>">
    59 
    60                 <input type="hidden" name="widget" value="<?php echo isset( $options['widget_id'] ) ? $options['widget_id'] : '0'; ?>">
    61 
    62                 <input class="submit" type="submit" name="submit" value="<?php echo esc_attr( $options['button_text'] ) ?>">
    63 
    64             </form>
     47            else :
     48                ?>
     49                <form action="<?php echo esc_url( $current_url ); ?>" method="post" class="wp-subscribe-form wp-subscribe-<?php echo esc_attr( $options['service'] ); ?>" id="wp-subscribe-form-<?php echo esc_attr( $wp_subscribe_forms ); ?>">
     50
     51                    <?php if ( ! empty( $options['include_name_field'] ) ) : ?>
     52                        <input class="regular-text name-field" type="text" name="name" placeholder="<?php echo esc_attr( $options['name_placeholder'] ); ?>" title="<?php echo esc_attr( $options['name_placeholder'] ); ?>" required>
     53                    <?php endif; ?>
     54
     55                    <input class="regular-text email-field" type="email" name="email" placeholder="<?php echo esc_attr( $options['email_placeholder'] ); ?>" title="<?php echo esc_attr( $options['email_placeholder'] ); ?>" required>
     56
     57                    <input type="hidden" name="form_type" value="<?php echo esc_attr( $options['form_type'] ); ?>">
     58
     59                    <input type="hidden" name="service" value="<?php echo esc_attr( $options['service'] ); ?>">
     60
     61                    <input type="hidden" name="widget" value="<?php echo isset( $options['widget_id'] ) ? esc_attr( $options['widget_id'] ) : '0'; ?>">
     62                    <?php if ( ! empty( $options['consent_text'] ) ) : ?>
     63                        <div class="wps-consent-wrapper">
     64                            <label for="consent-field">
     65                                <input class="consent-field" id="consent-field" type="checkbox" name="consent" required>
     66                                <?php echo wp_kses_post( $options['consent_text'] ); ?>
     67                            </label>
     68                    <?php endif; ?>
     69                    <input class="submit" type="submit" name="submit" value="<?php echo esc_attr( $options['button_text'] ); ?>">
     70
     71                </form>
    6572
    6673            <?php endif; ?>
     
    8491            <div class="clear"></div>
    8592
    86             <p class="footer-text"><?php echo $options['footer_text'];?></p>
     93            <p class="footer-text"><?php echo wp_kses_post( $options['footer_text'] );?></p>
    8794
    8895        </div>
    8996
    9097    <?php if( isset( $options['after_widget'] ) ) : ?>
    91         <?php echo $options['after_widget'] ?>
     98        <?php echo wp_kses_post( $options['after_widget'] ); ?>
    9299    <?php else: ?>
    93100        </div><!-- /form-wrapper -->
     
    187194    ) ) );
    188195    ?>
    189     <input class="<?php echo esc_attr( $class ) ?>" id="<?php echo esc_attr( $id ) ?>" name="<?php echo esc_attr( $name ) ?>" type="text" value="<?php echo esc_attr( $value ) ?>"<?php if( isset( $data_id ) ) { printf( 'data-id="%s"', $data_id ); } ?>>
     196    <input class="<?php echo esc_attr( $class ) ?>" id="<?php echo esc_attr( $id ) ?>" name="<?php echo esc_attr( $name ) ?>" type="text" value="<?php echo esc_attr( $value ) ?>"<?php if( isset( $data_id ) ) { printf( 'data-id="%s"', esc_attr( $data_id ) ); } ?>>
    190197    <?php
    191198}
  • wp-subscribe/trunk/includes/wps-widget.php

    r1715462 r2717363  
    55 */
    66
    7 if( ! class_exists('wp_subscribe') ) :
     7if ( ! defined( 'ABSPATH' ) ) {
     8    exit;
     9}
    810
    911class wp_subscribe extends WP_Widget {
     
    1214     * The Constructor
    1315     */
    14     public function __construct() {
    15 
    16         add_action( 'wp_enqueue_scripts',                   array( &$this, 'register_scripts' ) );
    17         add_action( 'admin_enqueue_scripts',                array( &$this, 'enqueue_scripts' ) );
    18         add_action( 'customize_controls_enqueue_scripts',   array( &$this, 'enqueue_scripts' ) );
    19 
    20         // Widget settings
    21         $widget_ops = array(
    22             'classname'     => 'wp_subscribe',
    23             'description'   => esc_html__( 'Displays subscription form, supports FeedBurner, MailChimp & AWeber.', 'wp-subscribe' )
     16    public function __construct() {
     17
     18        add_action( 'wp_enqueue_scripts', array( &$this, 'register_scripts' ) );
     19        add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_scripts' ) );
     20        add_action( 'customize_controls_enqueue_scripts', array( &$this, 'enqueue_scripts' ) );
     21
     22        // Widget settings
     23        $widget_ops = array(
     24            'classname'   => 'wp_subscribe',
     25            'description' => esc_html__( 'Displays subscription form, supports FeedBurner, MailChimp & AWeber.', 'wp-subscribe' )
    2426        );
    2527
    26         // Widget control settings
    27         $control_ops = array(
     28        // Widget control settings
     29        $control_ops = array(
    2830            'id_base' => 'wp_subscribe'
    2931        );
    3032
    31         // Create the widget.
    32         parent::__construct(
     33        // Create the widget.
     34        parent::__construct(
    3335            'wp_subscribe',
    3436            esc_html__( 'WP Subscribe Widget', 'wp-subscribe' ),
     
    3638            $control_ops
    3739        );
    38     }
     40    }
    3941
    4042    /**
     
    4648        return apply_filters( 'wp_subscribe_form_defaults', array(
    4749            'service'            => 'feedburner',
    48             'include_name_field' => false,
    49 
    50             'title'             => esc_html__( 'Get more stuff', 'wp-subscribe' ),
    51             'text'              => esc_html__( 'Subscribe to our mailing list and get interesting stuff and updates to your email inbox.', 'wp-subscribe' ),
    52             'email_placeholder' => esc_html__( 'Enter your email here', 'wp-subscribe' ),
    53             'name_placeholder'  => esc_html__( 'Enter your name here', 'wp-subscribe' ),
    54             'button_text'       => esc_html__( 'Sign Up Now', 'wp-subscribe' ),
    55             'success_message'   => esc_html__( 'Thank you for subscribing.', 'wp-subscribe' ),
    56             'error_message'     => esc_html__( 'Something went wrong.', 'wp-subscribe' ),
    57             'footer_text'       => esc_html__( 'we respect your privacy and take protecting it seriously', 'wp-subscribe' )
    58         ));
    59     }
     50            'include_name_field' => false,
     51
     52            'title'             => __( 'Get more stuff', 'wp-subscribe' ),
     53            'text'              => __( 'Subscribe to our mailing list and get interesting stuff and updates to your email inbox.', 'wp-subscribe' ),
     54            'email_placeholder' => __( 'Enter your email here', 'wp-subscribe' ),
     55            'consent_text'      => __( 'I consent to my submitted data being collected via this form*', 'wp-subscribe' ),
     56            'name_placeholder'  => __( 'Enter your name here', 'wp-subscribe' ),
     57            'button_text'       => __( 'Sign Up Now', 'wp-subscribe' ),
     58            'success_message'   => __( 'Thank you for subscribing.', 'wp-subscribe' ),
     59            'error_message'     => __( 'Something went wrong.', 'wp-subscribe' ),
     60            'footer_text'       => __( 'we respect your privacy and take protecting it seriously', 'wp-subscribe' )
     61        ));
     62    }
    6063
    6164    /**
     
    6366     * @return void
    6467     */
    65     function register_scripts() {
    66 
    67         wp_register_style( 'wp-subscribe', wps()->plugin_url() . '/assets/css/wp-subscribe-form.css' );
    68         wp_register_script( 'wp-subscribe', wps()->plugin_url() . '/assets/js/wp-subscribe-form.js', array( 'jquery' ) );
    69 
    70         wp_localize_script( 'wp-subscribe', 'wp_subscribe', array(
     68    function register_scripts() {
     69
     70        wp_register_style( 'wp-subscribe', wps()->plugin_url() . '/assets/css/wp-subscribe-form.css' );
     71        wp_register_script( 'wp-subscribe', wps()->plugin_url() . '/assets/js/wp-subscribe-form.js', array( 'jquery' ) );
     72
     73        wp_localize_script( 'wp-subscribe', 'wp_subscribe', array(
    7174            'ajaxurl' => admin_url( 'admin-ajax.php' )
    7275        ) );
    73     }
     76    }
    7477
    7578    /**
     
    7780     * @return void
    7881     */
    79     function enqueue_scripts() {
    80 
     82    function enqueue_scripts() {
    8183        $screen = get_current_screen();
    8284        $current_filter = current_filter();
    83 
    84         if ( 'widgets' === $screen->id || 'customize_controls_enqueue_scripts' === $current_filter ) {
    85 
    86             wp_enqueue_style( 'wp-subscribe-options', wps()->plugin_url() . '/assets/css/wp-subscribe-options.css' );
    87             wp_enqueue_script( 'wp-subscribe-admin', wps()->plugin_url() . '/assets/js/wp-subscribe-admin.js', array( 'jquery' ) );
    88         }
    89     }
     85        if ( 'widgets' === $screen->id || 'customize_controls_enqueue_scripts' === $current_filter ) {
     86            wp_enqueue_style( 'wp-subscribe-options', wps()->plugin_url() . '/assets/css/wp-subscribe-options.css' );
     87        }
     88
     89        wp_enqueue_script( 'wp-subscribe-admin', wps()->plugin_url() . '/assets/js/wp-subscribe-admin.js', array( 'jquery' ) );
     90    }
    9091
    9192    /**
     
    9596     * @return void
    9697     */
    97     function widget( $args, $instance ) {
    98 
    99         extract( $args );
    100         $instance = wp_parse_args( (array) $instance, $this->get_defaults() );
     98    function widget( $args, $instance ) {
     99
     100        extract( $args );
     101        $instance = wp_parse_args( (array) $instance, $this->get_defaults() );
    101102
    102103        $instance['before_widget'] = $before_widget;
     
    106107
    107108        wps_the_form( $instance );
    108     }
     109    }
    109110
    110111    /**
     
    116117     * @return array
    117118     */
    118     function update( $new_instance, $old_instance ) {
     119    function update( $new_instance, $old_instance ) {
    119120
    120121        $instance = $old_instance;
    121         $instance = array_merge( $instance, $new_instance );
    122 
    123         // Feedburner ID -- make sure the user didn't insert full url
    124         if( isset( $instance['feedburner_id'] ) && 0 === strpos( $instance['feedburner_id'], 'http' ) ) {
     122        $instance = array_merge( $instance, $new_instance );
     123
     124        // Feedburner ID -- make sure the user didn't insert full url
     125        if( isset( $instance['feedburner_id'] ) && 0 === strpos( $instance['feedburner_id'], 'http' ) ) {
    125126            $instance['feedburner_id'] = substr( $instance['feedburner_id'], strrpos( $instance['feedburner_id'], '/' ) + 1 );
    126127        }
    127128
    128         return $instance;
    129     }
     129        return $instance;
     130    }
    130131
    131132    /**
     
    135136     * @return void
    136137     */
    137     function form( $instance ) {
     138    function form( $instance ) {
    138139
    139140        $instance = wp_parse_args( (array) $instance, $this->get_defaults() );
    140141        $services = wps_get_mailing_services('options');
    141     ?>
    142         <div class="wp_subscribe_options_form">
    143 
    144             <!-- Hidden title field to prevent WP picking up Title Color field as widget title -->
    145             <input type="hidden" value="" id="<?php echo $this->get_field_id('title') ?>" name="<?php echo $this->get_field_name('title') ?>">
     142    ?>
     143        <div class="wp_subscribe_options_form">
     144
     145            <!-- Hidden title field to prevent WP picking up Title Color field as widget title -->
     146            <input type="hidden" value="" id="<?php echo esc_attr( $this->get_field_id('title') ); ?>" name="<?php echo esc_attr( $this->get_field_name('title') ); ?>">
    146147
    147148            <?php $this->field_select(array(
     
    154155            )); ?>
    155156
    156             <div class="wp_subscribe_account_details">
     157            <div class="wp_subscribe_account_details">
    157158
    158159                <?php foreach( $services as $service_id => $service_name ): ?>
     
    165166                <?php endforeach; ?>
    166167
    167             </div><!-- .wp_subscribe_account_details -->
    168 
    169             <p class="wp_subscribe_include_name">
    170 
    171                 <label for="<?php echo $this->get_field_id('include_name_field') ?>">
    172                     <input type="hidden" name="<?php echo $this->get_field_name('include_name_field'); ?>" value="0">
    173                     <input id="<?php echo $this->get_field_id('include_name_field'); ?>" type="checkbox" class="include-name-field" name="<?php echo $this->get_field_name('include_name_field'); ?>" value="1" <?php checked($instance['include_name_field']); ?>>
    174                     <?php echo wp_kses_post( __( 'Include <strong>Name</strong> field', 'wp-subscribe' ) ) ?>
    175                 </label>
     168            </div><!-- .wp_subscribe_account_details -->
     169
     170            <p class="wp_subscribe_include_name">
     171
     172                <label for="<?php echo esc_attr( $this->get_field_id('include_name_field') ); ?>">
     173                    <input type="hidden" name="<?php echo esc_attr( $this->get_field_name('include_name_field') ); ?>" value="0">
     174                    <input id="<?php echo esc_attr( $this->get_field_id('include_name_field') ); ?>" type="checkbox" class="include-name-field" name="<?php echo esc_attr( $this->get_field_name('include_name_field') ); ?>" value="1" <?php checked($instance['include_name_field']); ?>>
     175                    <?php echo wp_kses_post( __( 'Include <strong>Name</strong> field', 'wp-subscribe' ) ) ?>
     176                </label>
    176177
    177178            </p>
    178179
    179             <h4 class="wp_subscribe_labels_header">
    180                 <a class="wp-subscribe-toggle" href="#" rel="wp_subscribe_labels"><?php _e('Labels', 'wp-subscribe'); ?></a>
     180            <h4 class="wp_subscribe_labels_header">
     181                <a class="wp-subscribe-toggle" href="#" rel="wp_subscribe_labels"><?php esc_html_e('Labels', 'wp-subscribe'); ?></a>
    181182            </h4>
    182183
    183             <div class="wp_subscribe_labels" style="display: none;">
     184            <div class="wp_subscribe_labels" style="display: none;">
    184185
    185186                <?php
     
    214215
    215216                    $this->field_text(array(
     217                        'id'    => 'consent_text',
     218                        'name'  => 'consent_text',
     219                        'title' => esc_html( 'Consent Label', 'wp-subscribe' ),
     220                        'value' => $instance['consent_text']
     221                    ));
     222
     223                    $this->field_text(array(
    216224                        'id'    => 'button_text',
    217225                        'name'  => 'button_text',
     
    234242                    ));
    235243
    236                     $this->field_text(array(
     244                    $this->field_textarea(array(
    237245                        'id'    => 'footer_text',
    238246                        'name'  => 'footer_text',
     
    240248                        'value' => $instance['footer_text']
    241249                    ));
    242                 ?>
    243 
    244             </div><!-- .wp_subscribe_labels -->
    245 
    246         </div><!-- .wp_subscribe_options_form -->
    247     <?php
    248     }
    249 
    250     // -------------------------- FIELD HELPRES ----------------------
    251 
    252     public function field_textarea( $args = array() ) {
    253 
     250                ?>
     251
     252            </div><!-- .wp_subscribe_labels -->
     253
     254        </div><!-- .wp_subscribe_options_form -->
     255    <?php
     256    }
     257
     258    // -------------------------- FIELD HELPERS --------------------------
     259
     260    public function field_textarea( $args = array() ) {
    254261        extract( $args );
    255262        ?>
    256         <p class="wp-subscribe-label-field wp-subscribe-<?php echo $id; ?>-field">
    257             <label for="<?php echo $this->get_field_id($id) ?>">
    258                 <?php echo $title ?>
    259             </label>
    260 
    261             <textarea class="widefat" id="<?php echo $this->get_field_id($id) ?>" name="<?php echo $this->get_field_name($id) ?>"><?php echo esc_textarea( $value ) ?></textarea>
    262         </p>
    263 
    264         <?php
    265     }
     263        <p class="wp-subscribe-label-field wp-subscribe-<?php echo esc_attr( $id ); ?>-field">
     264            <label for="<?php echo esc_attr( $this->get_field_id($id) ); ?>">
     265                <?php echo wp_kses_post( $title ); ?>
     266            </label>
     267
     268            <textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id($id) ); ?>" name="<?php echo esc_attr( $this->get_field_name($id) ); ?>"><?php echo esc_textarea( $value ) ?></textarea>
     269        </p>
     270
     271        <?php
     272    }
    266273
    267274    public function field_text( $args = array() ) {
     
    269276        extract( $args );
    270277        ?>
    271         <div class="wp-subscribe-label-field wp-subscribe-<?php echo $id; ?>-field">
    272             <label for="<?php echo $this->get_field_id( $id ) ?>">
    273                 <?php echo esc_html( $title ) ?>
    274             </label>
     278        <div class="wp-subscribe-label-field wp-subscribe-<?php echo esc_attr( $id ); ?>-field">
     279            <label for="<?php echo esc_attr( $this->get_field_id( $id ) ) ?>">
     280                <?php echo esc_html( $title ) ?>
     281            </label>
    275282
    276283            <div class="wps-input-wrapper">
    277284
    278285                <?php wps_field_text(array(
    279                     'id'    => $this->get_field_id( $id ),
    280                     'name'  => $this->get_field_name( $id ),
    281                     'value' => $value,
     286                    'id'      => $this->get_field_id( $id ),
     287                    'name'    => $this->get_field_name( $id ),
     288                    'value'   => $value,
    282289                    'data_id' => $id
    283                 )) ?>
     290                ) ); ?>
    284291
    285292                <?php if( isset( $link ) ) {
     
    293300            </div>
    294301
    295         </div>
    296         <?php
    297     }
     302        </div>
     303        <?php
     304    }
    298305
    299306    public function field_hidden( $args = array() ) {
     
    302309
    303310        wps_field_hidden(array(
    304             'id'    => $this->get_field_id( $id ),
    305             'name'  => $this->get_field_name( $id ),
    306             'value' => $value,
     311            'id'      => $this->get_field_id( $id ),
     312            'name'    => $this->get_field_name( $id ),
     313            'value'   => $value,
    307314            'data_id' => $id
    308315        ));
    309     }
     316    }
    310317
    311318    public function field_raw( $args = array() ) {
    312319
    313320        call_user_func_array( $args['content'], array( $args['value'] ) );
    314     }
     321    }
    315322
    316323    public function field_checkbox( $args = array() ) {
     
    318325        extract( $args );
    319326        ?>
    320         <div class="wp-subscribe-<?php echo $id; ?>-field">
    321 
    322             <label for="<?php echo $this->get_field_id( $id ) ?>">
    323 
    324                 <input type="hidden" name="<?php echo $this->get_field_name( $id ) ?>" value="0" data-id="<?php echo $this->get_field_id( $id ) ?>">
    325 
    326                 <input type="checkbox" id="<?php echo $this->get_field_id( $id ) ?>" name="<?php echo $this->get_field_name( $id ) ?>" value="1"<?php checked( $value ) ?> data-id="<?php echo $id ?>">
    327 
    328                 <?php echo esc_html($title) ?>
     327        <div class="wp-subscribe-<?php echo esc_attr( $id ); ?>-field">
     328
     329            <label for="<?php echo esc_attr( $this->get_field_id( $id ) ); ?>">
     330
     331                <input type="hidden" name="<?php echo esc_attr( $this->get_field_name( $id ) ); ?>" value="0" data-id="<?php echo esc_attr( $this->get_field_id( $id ) ); ?>">
     332
     333                <input type="checkbox" id="<?php echo esc_attr( $this->get_field_id( $id ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( $id ) ); ?>" value="1"<?php checked( $value ) ?> data-id="<?php echo esc_attr( $id ); ?>">
     334
     335                <?php echo esc_html( $title ); ?>
    329336
    330337            </label>
     
    334341    }
    335342
    336     public function field_select( $args = array() ) {
     343    public function field_select( $args = array() ) {
    337344
    338345        $options = array();
    339346        extract( $args );
    340         ?>
    341 
    342         <div class="wp-subscribe-label-field wp-subscribe-<?php echo $id ?>-field">
    343             <label for="<?php echo $this->get_field_id( $id ) ?>">
    344                 <?php echo esc_html( $title ) ?>
    345             </label>
     347        ?>
     348
     349        <div class="wp-subscribe-label-field wp-subscribe-<?php echo esc_attr( $id ); ?>-field">
     350            <label for="<?php echo esc_attr( $this->get_field_id( $id ) ); ?>">
     351                <?php echo esc_html( $title ) ?>
     352            </label>
    346353
    347354            <div class="wps-input-wrapper">
    348355                <?php wps_field_select(array(
    349                     'id'    => $this->get_field_id( $id ),
    350                     'name'  => $this->get_field_name( $id ),
    351                     'value' => $value,
     356                    'id'      => $this->get_field_id( $id ),
     357                    'name'    => $this->get_field_name( $id ),
     358                    'value'   => $value,
    352359                    'options' => $options,
    353                     'class' => 'widefat list-selectbox'
     360                    'class'   => 'widefat list-selectbox'
    354361                )) ?>
    355362
     
    368375            </div>
    369376
    370         </div>
    371 
    372         <?php
    373     }
     377        </div>
     378
     379        <?php
     380    }
    374381}
    375382
     
    380387add_action( 'widgets_init', 'wps_register_widget' );
    381388function wps_register_widget() {
    382     register_widget( 'wp_subscribe' );
     389    register_widget( 'wp_subscribe' );
    383390}
    384 
    385 endif;
  • wp-subscribe/trunk/languages/wp-subscribe.pot

    r1823649 r2717363  
    1 # Copyright (C) 2018 WP Subscribe
    2 # This file is distributed under the same license as the WP Subscribe package.
     1# Copyright (C) 2022 MyThemeShop
     2# This file is distributed under the same license as the WP Subscribe plugin.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WP Subscribe 1.2.6\n"
     5"Project-Id-Version: WP Subscribe 1.2.13\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-subscribe\n"
    7 "POT-Creation-Date: 2018-02-17 01:23:40+00:00\n"
     7"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     8"Language-Team: LANGUAGE <[email protected]>\n"
    89"MIME-Version: 1.0\n"
    910"Content-Type: text/plain; charset=UTF-8\n"
    1011"Content-Transfer-Encoding: 8bit\n"
    11 "PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
    12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    13 "Language-Team: LANGUAGE <[email protected]>\n"
    14 
    15 #: includes/subscription/class-wps-aweber.php:67
     12"POT-Creation-Date: 2022-05-03T04:00:05+02:00\n"
     13"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
     14"X-Generator: WP-CLI 2.6.0\n"
     15"X-Domain: wp-subscribe\n"
     16
     17#. Plugin Name of the plugin
     18msgid "WP Subscribe"
     19msgstr ""
     20
     21#. Plugin URI of the plugin
     22msgid "http://mythemeshop.com/plugins/wp-subscribe/"
     23msgstr ""
     24
     25#. Description of the plugin
     26msgid "WP Subscribe is a simple but powerful subscription plugin which supports MailChimp, Aweber and Feedburner."
     27msgstr ""
     28
     29#. Author of the plugin
     30msgid "MyThemeShop"
     31msgstr ""
     32
     33#. Author URI of the plugin
     34msgid "http://mythemeshop.com/"
     35msgstr ""
     36
     37#: includes/subscription/class-wps-aweber.php:72
    1638msgid "Unable to connect to Aweber. The Authorization Code is empty."
    1739msgstr ""
    1840
    19 #: includes/subscription/class-wps-aweber.php:77
    20 msgid ""
    21 "Unable to connect your Aweber Account. The Authorization Code is incorrect."
    22 msgstr ""
    23 
    24 #: includes/subscription/class-wps-aweber.php:203
     41#: includes/subscription/class-wps-aweber.php:82
     42msgid "Unable to connect your Aweber Account. The Authorization Code is incorrect."
     43msgstr ""
     44
     45#: includes/subscription/class-wps-aweber.php:208
    2546msgid "AWeber List"
    2647msgstr ""
    2748
    28 #: includes/subscription/class-wps-aweber.php:204
    29 #: includes/subscription/class-wps-mailchimp.php:73
     49#: includes/subscription/class-wps-aweber.php:209
     50#: includes/subscription/class-wps-mailchimp.php:77
    3051msgid "Select List"
    3152msgstr ""
    3253
    33 #: includes/subscription/class-wps-aweber.php:217
    34 msgid "To connect your Aweber account:"
    35 msgstr ""
    36 
    37 #: includes/subscription/class-wps-aweber.php:220
    38 msgid ""
    39 "<span>1.</span> <a href=\"%s\" target=\"_blank\">Click here</a> <span>to "
    40 "open the authorization page and log in.</span>"
    41 msgstr ""
    42 
    43 #: includes/subscription/class-wps-aweber.php:221
    44 msgid ""
    45 "<span>2.</span> Copy and paste the authorization code in the field below."
    46 msgstr ""
    47 
    48 #: includes/subscription/class-wps-aweber.php:230
    49 msgid "Your Aweber Account is connected."
    50 msgstr ""
    51 
    52 #: includes/subscription/class-wps-aweber.php:231
    53 msgid ""
    54 "<a href=\"#\" class=\"aweber_disconnect\">Click here</a> <span>to disconnect."
    55 "</span>"
    56 msgstr ""
    57 
    58 #: includes/subscription/class-wps-feedburner.php:39
     54#: includes/subscription/class-wps-feedburner.php:50
    5955msgid "Feedburner ID"
    6056msgstr ""
    6157
    62 #: includes/subscription/class-wps-mailchimp.php:63
     58#: includes/subscription/class-wps-mailchimp.php:67
    6359msgid "MailChimp API URL"
    6460msgstr ""
    6561
    66 #: includes/subscription/class-wps-mailchimp.php:64
     62#: includes/subscription/class-wps-mailchimp.php:68
    6763msgid "The API key of your MailChimp account."
    6864msgstr ""
    6965
    70 #: includes/subscription/class-wps-mailchimp.php:72
     66#: includes/subscription/class-wps-mailchimp.php:76
    7167msgid "MailChimp List"
    7268msgstr ""
    7369
    74 #: includes/subscription/class-wps-mailchimp.php:81
     70#: includes/subscription/class-wps-mailchimp.php:85
    7571msgid "Send double opt-in notification"
    7672msgstr ""
     
    10096msgstr ""
    10197
    102 #: includes/wps-helpers.php:217
     98#: includes/wps-helpers.php:224
    10399msgid "No Animation"
    104100msgstr ""
    105101
    106 #: includes/wps-helpers.php:218
     102#: includes/wps-helpers.php:225
    107103msgid "Attention Seekers"
    108104msgstr ""
    109105
    110 #: includes/wps-helpers.php:219
     106#: includes/wps-helpers.php:226
    111107msgid "bounce"
    112108msgstr ""
    113109
    114 #: includes/wps-helpers.php:220
     110#: includes/wps-helpers.php:227
    115111msgid "flash"
    116112msgstr ""
    117113
    118 #: includes/wps-helpers.php:221
     114#: includes/wps-helpers.php:228
    119115msgid "pulse"
    120116msgstr ""
    121117
    122 #: includes/wps-helpers.php:222
     118#: includes/wps-helpers.php:229
    123119msgid "rubberBand"
    124120msgstr ""
    125121
    126 #: includes/wps-helpers.php:223
     122#: includes/wps-helpers.php:230
    127123msgid "shake"
    128124msgstr ""
    129125
    130 #: includes/wps-helpers.php:224
     126#: includes/wps-helpers.php:231
    131127msgid "swing"
    132128msgstr ""
    133129
    134 #: includes/wps-helpers.php:225
     130#: includes/wps-helpers.php:232
    135131msgid "tada"
    136132msgstr ""
    137133
    138 #: includes/wps-helpers.php:226
     134#: includes/wps-helpers.php:233
    139135msgid "wobble"
    140136msgstr ""
    141137
    142 #: includes/wps-helpers.php:228
     138#: includes/wps-helpers.php:235
    143139msgid "Bouncing Entrances"
    144140msgstr ""
    145141
    146 #: includes/wps-helpers.php:229
     142#: includes/wps-helpers.php:236
    147143msgid "bounceIn"
    148144msgstr ""
    149145
    150 #: includes/wps-helpers.php:230
     146#: includes/wps-helpers.php:237
    151147msgid "bounceInDown"
    152148msgstr ""
    153149
    154 #: includes/wps-helpers.php:231
     150#: includes/wps-helpers.php:238
    155151msgid "bounceInLeft"
    156152msgstr ""
    157153
    158 #: includes/wps-helpers.php:232
     154#: includes/wps-helpers.php:239
    159155msgid "bounceInRight"
    160156msgstr ""
    161157
    162 #: includes/wps-helpers.php:233
     158#: includes/wps-helpers.php:240
    163159msgid "bounceInUp"
    164160msgstr ""
    165161
    166 #: includes/wps-helpers.php:235
     162#: includes/wps-helpers.php:242
    167163msgid "Fading Entrances"
    168164msgstr ""
    169165
    170 #: includes/wps-helpers.php:236
     166#: includes/wps-helpers.php:243
    171167msgid "fadeIn"
    172168msgstr ""
    173169
    174 #: includes/wps-helpers.php:237
     170#: includes/wps-helpers.php:244
    175171msgid "fadeInDown"
    176172msgstr ""
    177173
    178 #: includes/wps-helpers.php:238
     174#: includes/wps-helpers.php:245
    179175msgid "fadeInDownBig"
    180176msgstr ""
    181177
    182 #: includes/wps-helpers.php:239
     178#: includes/wps-helpers.php:246
    183179msgid "fadeInLeft"
    184180msgstr ""
    185181
    186 #: includes/wps-helpers.php:240
     182#: includes/wps-helpers.php:247
    187183msgid "fadeInLeftBig"
    188184msgstr ""
    189185
    190 #: includes/wps-helpers.php:241
     186#: includes/wps-helpers.php:248
    191187msgid "fadeInRight"
    192188msgstr ""
    193189
    194 #: includes/wps-helpers.php:242
     190#: includes/wps-helpers.php:249
    195191msgid "fadeInRightBig"
    196192msgstr ""
    197193
    198 #: includes/wps-helpers.php:243
     194#: includes/wps-helpers.php:250
    199195msgid "fadeInUp"
    200196msgstr ""
    201197
    202 #: includes/wps-helpers.php:244
     198#: includes/wps-helpers.php:251
    203199msgid "fadeInUpBig"
    204200msgstr ""
    205201
    206 #: includes/wps-helpers.php:246
     202#: includes/wps-helpers.php:253
    207203msgid "Flippers"
    208204msgstr ""
    209205
    210 #: includes/wps-helpers.php:247
     206#: includes/wps-helpers.php:254
    211207msgid "flipInX"
    212208msgstr ""
    213209
    214 #: includes/wps-helpers.php:248
     210#: includes/wps-helpers.php:255
    215211msgid "flipInY"
    216212msgstr ""
    217213
    218 #: includes/wps-helpers.php:250
     214#: includes/wps-helpers.php:257
    219215msgid "Lightspeed"
    220216msgstr ""
    221217
    222 #: includes/wps-helpers.php:251
     218#: includes/wps-helpers.php:258
    223219msgid "lightSpeedIn"
    224220msgstr ""
    225221
    226 #: includes/wps-helpers.php:253
     222#: includes/wps-helpers.php:260
    227223msgid "Rotating Entrances"
    228224msgstr ""
    229225
    230 #: includes/wps-helpers.php:254
     226#: includes/wps-helpers.php:261
    231227msgid "rotateIn"
    232228msgstr ""
    233229
    234 #: includes/wps-helpers.php:255
     230#: includes/wps-helpers.php:262
    235231msgid "rotateInDownLeft"
    236232msgstr ""
    237233
    238 #: includes/wps-helpers.php:256
     234#: includes/wps-helpers.php:263
    239235msgid "rotateInDownRight"
    240236msgstr ""
    241237
    242 #: includes/wps-helpers.php:257
     238#: includes/wps-helpers.php:264
    243239msgid "rotateInUpLeft"
    244240msgstr ""
    245241
    246 #: includes/wps-helpers.php:258
     242#: includes/wps-helpers.php:265
    247243msgid "rotateInUpRight"
    248244msgstr ""
    249245
    250 #: includes/wps-helpers.php:260
     246#: includes/wps-helpers.php:267
    251247msgid "Specials"
    252248msgstr ""
    253249
    254 #: includes/wps-helpers.php:261
     250#: includes/wps-helpers.php:268
    255251msgid "rollIn"
    256252msgstr ""
    257253
    258 #: includes/wps-helpers.php:263
     254#: includes/wps-helpers.php:270
    259255msgid "Zoom Entrances"
    260256msgstr ""
    261257
    262 #: includes/wps-helpers.php:264
     258#: includes/wps-helpers.php:271
    263259msgid "zoomIn"
    264260msgstr ""
    265261
    266 #: includes/wps-helpers.php:265
     262#: includes/wps-helpers.php:272
    267263msgid "zoomInDown"
    268264msgstr ""
    269265
    270 #: includes/wps-helpers.php:266
     266#: includes/wps-helpers.php:273
    271267msgid "zoomInLeft"
    272268msgstr ""
    273269
    274 #: includes/wps-helpers.php:267
     270#: includes/wps-helpers.php:274
    275271msgid "zoomInRight"
    276272msgstr ""
    277273
    278 #: includes/wps-helpers.php:268
     274#: includes/wps-helpers.php:275
    279275msgid "zoomInUp"
    280276msgstr ""
    281277
    282 #: includes/wps-widget.php:23
     278#: includes/wps-widget.php:25
    283279msgid "Displays subscription form, supports FeedBurner, MailChimp & AWeber."
    284280msgstr ""
    285281
    286 #: includes/wps-widget.php:34
     282#: includes/wps-widget.php:36
    287283msgid "WP Subscribe Widget"
    288284msgstr ""
    289285
    290 #: includes/wps-widget.php:50
     286#: includes/wps-widget.php:52
    291287msgid "Get more stuff"
    292288msgstr ""
    293289
    294 #: includes/wps-widget.php:51
    295 msgid ""
    296 "Subscribe to our mailing list and get interesting stuff and updates to your "
    297 "email inbox."
    298 msgstr ""
    299 
    300 #: includes/wps-widget.php:52
     290#: includes/wps-widget.php:53
     291msgid "Subscribe to our mailing list and get interesting stuff and updates to your email inbox."
     292msgstr ""
     293
     294#: includes/wps-widget.php:54
    301295msgid "Enter your email here"
    302296msgstr ""
    303297
    304 #: includes/wps-widget.php:53
     298#: includes/wps-widget.php:55
     299msgid "I consent to my submitted data being collected via this form*"
     300msgstr ""
     301
     302#: includes/wps-widget.php:56
    305303msgid "Enter your name here"
    306304msgstr ""
    307305
    308 #: includes/wps-widget.php:54
     306#: includes/wps-widget.php:57
    309307msgid "Sign Up Now"
    310308msgstr ""
    311309
    312 #: includes/wps-widget.php:55
     310#: includes/wps-widget.php:58
    313311msgid "Thank you for subscribing."
    314312msgstr ""
    315313
    316 #: includes/wps-widget.php:56
     314#: includes/wps-widget.php:59
    317315msgid "Something went wrong."
    318316msgstr ""
    319317
    320 #: includes/wps-widget.php:57
     318#: includes/wps-widget.php:60
    321319msgid "we respect your privacy and take protecting it seriously"
    322320msgstr ""
    323321
    324 #: includes/wps-widget.php:174
     322#: includes/wps-widget.php:175
    325323msgid "Include <strong>Name</strong> field"
    326324msgstr ""
    327325
    328 #: includes/wps-widget.php:180
     326#: includes/wps-widget.php:181
    329327msgid "Labels"
    330328msgstr ""
    331329
    332 #: includes/wps-widget.php:286 includes/wps-widget.php:361
     330#: includes/wps-widget.php:293
     331#: includes/wps-widget.php:368
    333332msgid "Click here"
    334333msgstr ""
    335334
    336 #: includes/wps-widget.php:357
     335#: includes/wps-widget.php:364
    337336msgid "Get list"
    338337msgstr ""
    339338
    340 #: wp-subscribe.php:61 wp-subscribe.php:68
     339#: wp-subscribe.php:61
     340#: wp-subscribe.php:68
    341341msgid "Cheatin&#8217; huh?"
    342342msgstr ""
    343343
    344 #: wp-subscribe.php:160
     344#. Translators: %s is "WP Subscribe Pro" as a link.
     345#: wp-subscribe.php:125
     346msgid "Like WP Subscribe plugin? You will LOVE %s!"
     347msgstr ""
     348
     349#: wp-subscribe.php:135
     350msgid "Thank you for trying WP Subscribe. We hope you will like it."
     351msgstr ""
     352
     353#: wp-subscribe.php:206
    345354msgid "No aweber authorization code found."
    346355msgstr ""
    347356
    348 #: wp-subscribe.php:192
     357#: wp-subscribe.php:238
    349358msgid "No data found."
    350359msgstr ""
    351360
    352 #: wp-subscribe.php:200
     361#: wp-subscribe.php:246
    353362msgid "No email address found."
    354363msgstr ""
    355364
    356 #: wp-subscribe.php:207
     365#: wp-subscribe.php:253
    357366msgid "Not a valid email address."
    358367msgstr ""
    359368
    360 #: wp-subscribe.php:216
     369#: wp-subscribe.php:262
    361370msgid "Unknown mailing service called."
    362371msgstr ""
    363372
    364 #: wp-subscribe.php:251
     373#: wp-subscribe.php:297
    365374msgid "Not permitted."
    366375msgstr ""
    367376
    368 #: wp-subscribe.php:260
     377#: wp-subscribe.php:306
    369378msgid "Service not defined."
    370379msgstr ""
    371380
    372 #: wp-subscribe.php:278
     381#: wp-subscribe.php:324
    373382msgid "No lists found."
    374383msgstr ""
    375 
    376 #. Plugin Name of the plugin/theme
    377 msgid "WP Subscribe"
    378 msgstr ""
    379 
    380 #. Plugin URI of the plugin/theme
    381 msgid "http://mythemeshop.com/plugins/wp-subscribe/"
    382 msgstr ""
    383 
    384 #. Description of the plugin/theme
    385 msgid ""
    386 "WP Subscribe is a simple but powerful subscription plugin which supports "
    387 "MailChimp, Aweber and Feedburner."
    388 msgstr ""
    389 
    390 #. Author of the plugin/theme
    391 msgid "MyThemeShop"
    392 msgstr ""
    393 
    394 #. Author URI of the plugin/theme
    395 msgid "http://mythemeshop.com/"
    396 msgstr ""
  • wp-subscribe/trunk/readme.txt

    r2357681 r2717363  
    44Tags: subscribe, subscription, subscription box, newsletter, subscribe widget, mailchimp, aweber, feedburner,
    55Requires at least: 4.0
    6 Tested up to: 5.5
    7 Stable tag: 1.2.12
     6Tested up to: 5.9.3
     7Stable tag: 1.2.13
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8282
    8383== Changelog ==
     84
     85= 1.2.13 =
     86* Fixed a security issue
    8487
    8588= 1.2.12 =
  • wp-subscribe/trunk/wp-subscribe.php

    r1849523 r2717363  
    44 * Plugin URI: http://mythemeshop.com/plugins/wp-subscribe/
    55 * Description: WP Subscribe is a simple but powerful subscription plugin which supports MailChimp, Aweber and Feedburner.
    6  * Version: 1.2.7
     6 * Version: 1.2.13
    77 * Author: MyThemeShop
    88 * Author URI: http://mythemeshop.com/
     
    2828         * @var string
    2929         */
    30         private $version = '1.2.6';
     30        private $version = '1.2.13';
    3131
    3232        /**
     
    7878            include_once 'includes/wps-functions-options.php';
    7979            include_once 'includes/wps-widget.php';
    80 
     80            register_activation_hook( __FILE__, array( $this, 'activate_plugin' ) );
    8181            $this->autoloader();
    8282            $this->hooks();
     
    109109            $this->add_action( 'wp_ajax_nopriv_validate_subscribe', 'validate_subscribe' );
    110110            $this->add_action( 'wp_ajax_connect_aweber', 'connect_aweber' );
     111
     112            /* Display a notice */
     113            $this->add_action('admin_notices', 'wp_subscribe_admin_notice');
     114            $this->add_action('wp_ajax_mts_dismiss_wpsubscribe_notice', 'wp_subscribe_admin_notice_ignore');
     115        }
     116
     117        public function wp_subscribe_admin_notice() {
     118            global $current_user ;
     119            $user_id = $current_user->ID;
     120            /* Check that the user hasn't already clicked to ignore the message */
     121            /* Only show the notice 2 days after plugin activation */
     122            if ( ! get_user_meta($user_id, 'wp_subscribe_ignore_notice') && time() >= (get_option( 'wp_subscribe_activated', 0 ) + (2 * 24 * 60 * 60)) ) {
     123                echo '<div class="updated notice-info wp-subscribe-notice" id="wpsubscribe-notice" style="position:relative;">';
     124                // Translators: %s is "WP Subscribe Pro" as a link.
     125                echo '<p>' . sprintf( __('Like WP Subscribe plugin? You will LOVE %s!', 'wp-subscribe'), '<a target="_blank" 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"><strong>WP Subscribe Pro</strong></a>' ) . '</p><a class="notice-dismiss wpsubscribe-dismiss-notice" data-ignore="0" href="#"></a>';
     126                echo "</div>";
     127            }
     128            /* Other notice appears right after activating */
     129            /* And it gets hidden after showing 3 times */
     130            if ( ! get_user_meta($user_id, 'wp_subscribe_ignore_notice_2') && get_option('wp_subscribe_notice_views', 0) < 3 && get_option( 'wp_subscribe_activated', 0 ) ) {
     131                $views = get_option('wp_subscribe_notice_views', 0);
     132                update_option( 'wp_subscribe_notice_views', ($views + 1) );
     133                echo '<div class="updated notice-info wp-subscribe-notice" id="wpsubscribe-notice2" style="position:relative;">';
     134                echo '<p>';
     135                esc_html_e('Thank you for trying WP Subscribe. We hope you will like it.', 'wp-subscribe');
     136                echo '</p>';
     137                echo '<a class="notice-dismiss wpsubscribe-dismiss-notice" data-ignore="1" href="#"></a>';
     138                echo "</div>";
     139            }
     140        }
     141
     142        public function wp_subscribe_admin_notice_ignore() {
     143            global $current_user;
     144            $user_id = $current_user->ID;
     145            /* If user clicks to ignore the notice, add that to their user meta */
     146            if ( isset($_POST['dismiss']) ) {
     147                if ( '0' == $_POST['dismiss'] ) {
     148                    add_user_meta($user_id, 'wp_subscribe_ignore_notice', '1', true);
     149                } elseif ( '1' == $_POST['dismiss'] ) {
     150                    add_user_meta($user_id, 'wp_subscribe_ignore_notice_2', '1', true);
     151                }
     152            }
     153        }
     154
     155        public function activate_plugin() {
     156            update_option('wp_subscribe_activated', time());
    111157        }
    112158
     
    150196            load_plugin_textdomain( 'wp-subscribe', false, $this->plugin_dir() . '/languages' );
    151197        }
    152        
     198
    153199        public function connect_aweber() {
    154200
Note: See TracChangeset for help on using the changeset viewer.