deliciousbrains / better-search-replace

A simple plugin for updating URLs or other text in a database.
https://bettersearchreplace.com
GNU General Public License v3.0
89 stars 36 forks source link

Sidebar update #28

Closed bradt closed 8 years ago

bradt commented 8 years ago

image

PSD: http://adobe.ly/2d2cN3r

I've copied the HTML below from WP Migrate DB Pro and adjusted the campaigns[] and source hidden inputs. Feel free to tweak the rest as needed.

<form method="post" action="https://deliciousbrains.com/email-subscribe/" target="_blank" class="subscribe block">
    <h2><?php _e( 'Get 20% Off!', 'wp-migrate-db' ); ?></h2>

    <?php $user = wp_get_current_user(); ?>

    <p class="interesting">
        <?php echo wptexturize( __( "Submit your name and email and we'll send you a coupon for 20% off your upgrade to the pro version.", 'wp-migrate-db' ) ); ?>
    </p>

    <div class="field">
        <input type="email" name="email" value="<?php echo esc_attr( $user->user_email ); ?>" placeholder="<?php _e( 'Your Email', 'wp-migrate-db' ); ?>"/>
    </div>

    <div class="field">
        <input type="text" name="first_name" value="<?php echo esc_attr( trim( $user->first_name ) ); ?>" placeholder="<?php _e( 'First Name', 'wp-migrate-db' ); ?>"/>
    </div>

    <div class="field">
        <input type="text" name="last_name" value="<?php echo esc_attr( trim( $user->last_name ) ); ?>" placeholder="<?php _e( 'Last Name', 'wp-migrate-db' ); ?>"/>
    </div>

    <input type="hidden" name="campaigns[]" value="9" />
    <input type="hidden" name="source" value="10" />

    <div class="field submit-button">
        <input type="submit" class="button" value="<?php _e( 'Send me the coupon', 'wp-migrate-db' ); ?>"/>
    </div>

    <p class="promise">
        <?php _e( 'We promise we will not use your email for anything else and you can unsubscribe with 1-click anytime.', 'wp-migrate-db' ); ?>
    </p>
</form>