Пример #1
0
/**
 * Function to display the dashboard widget. Contains the last 3 subscribers, as well as some options.
 *
 * @return void
 */
function wp_email_capture_dashboard_widget()
{
    wp_email_capture_writetable(3, "<strong>" . __('Last Three Members To Join', 'WPEC') . "</strong><br/><br/>");
    $tempemails = wp_email_capture_count_temp();
    echo '<br/><br/><a name="list"></a><strong>' . __('Export', 'WPEC') . '</strong>';
    echo '<form name="wp_email_capture_export" action="' . esc_url($_SERVER['REQUEST_URI']) . '#list" method="post">';
    echo '<label>' . __('Use the button below to export your list as a CSV to use in software such as', 'WPEC') . ' <a href="http://www.gospelrhys.co.uk/go/aweber.php" title="Email Marketing">Aweber</a>.</label>';
    echo '<input type="hidden" name="wp_email_capture_export" />';
    echo '<div class="submit"><input type="submit" value="' . __('Export List', 'WPEC') . '" class="button" /></div>';
    echo "</form><br/><br/>";
    $tempemails = wp_email_capture_count_temp();
    echo "<a name='truncate'></a><strong>" . __('Temporary e-mails', 'WPEC') . "</strong>\n";
    echo '<form name="wp_email_capture_truncate" action="' . esc_url($_SERVER['REQUEST_URI']) . '#truncate" method="post">';
    echo '<label>' . __('There are', 'WPEC') . ' ' . $tempemails . ' ' . __('e-mail addresses that have been unconfirmed. Delete them to save space below.', 'WPEC') . '</label>';
    echo '<input type="hidden" name="wp_email_capture_truncate"/>';
    echo '<div class="submit"><input type="submit" value="' . __('Delete Unconfirmed e-mail Addresses', 'WPEC') . '" class="button"  /></div>';
    echo "</form>";
}
Пример #2
0
/**
 * Contents of the WP Email Capture Options Page
 *
 * @return void
 */
function wp_email_capture_free_options()
{
    echo '<div class="wrap">
    <div style="width:70%;float:left;clear:both;" class="postbox-container">
    <div class="metabox-holder"><div class="meta-box-sortables">
    <h2>' . __('WP Email Capture Options', 'wp-email-capture') . '</h2>
    <h3>' . __('Options', 'wp-email-capture') . '</h3>';
    ?>

    <form method="post" action="options.php">

        <?php 
    wp_nonce_field('update-options');
    ?>

        <?php 
    settings_fields('wp-email-capture-group');
    ?>

        <table class="form-table">

            <tbody>

                <tr valign="top">

                    <th scope="row" style="width:400px"><?php 
    _e('Page to redirect to on sign up (full web address ie: http://www.domain.com/this-page/)', 'wp-email-capture');
    ?>
</th>

                    <td><input type="text" name="wp_email_capture_signup" class="regular-text code" value="<?php 
    echo get_option('wp_email_capture_signup');
    ?>
" /></td>

                </tr>

                <tr valign="top">

                    <th scope="row" style="width:400px"><label for="wp_email_capture_redirection"><?php 
    _e('Page to redirect to on confirmation of email address  (full web address ie: http://www.domain.com/this-other-page/)', 'wp-email-capture');
    ?>
</label></th>

                    <td><input type="text" name="wp_email_capture_redirection" class="regular-text code" value="<?php 
    echo get_option('wp_email_capture_redirection');
    ?>
" /></td>

                </tr>

                <tr valign="top">

                    <th scope="row" style="width:400px"><label for="wp_email_capture_from"><?php 
    _e('From Which Email Address', 'wp-email-capture');
    ?>
</label></th>

                    <td><input type="text" name="wp_email_capture_from" class="regular-text code"  value="<?php 
    echo get_option('wp_email_capture_from');
    ?>
" /></td>

                </tr>

                <tr valign="top">

                    <th scope="row" style="width:400px"><label for="wp_email_capture_from_name"><?php 
    _e('From Which Name', 'wp-email-capture');
    ?>
</label></th>

                    <td><input type="text" name="wp_email_capture_from_name" class="regular-text code"  value="<?php 
    echo get_option('wp_email_capture_from_name');
    ?>
" /></td>

                </tr>

                <tr valign="top">

                    <th scope="row" style="width:400px"><?php 
    _e('Subject of Email', 'wp-email-capture');
    ?>
</th>

                    <td><input type="text" name="wp_email_capture_subject" class="regular-text code"  value="<?php 
    echo get_option('wp_email_capture_subject');
    ?>
" /></td>

                </tr>

                <tr valign="top">

                    <th scope="row" style="width:400px"><label for="wp_email_capture_body"><?php 
    _e('Body of Email', 'wp-email-capture');
    ?>
<br>
                        <?php 
    _e('(use %NAME% to use the form\'s &quot;Name&quot; field in their welcome email)', 'wp-email-capture');
    ?>
</label>
                    </th>

                    <td><textarea name="wp_email_capture_body" style="width: 25em;"><?php 
    echo get_option('wp_email_capture_body');
    ?>
</textarea></td>

                </tr>

                <tr valign="top">

                    <th scope="row" style="width:400px"><label><?php 
    _e('Link to us (optional, but appreciated)', 'wp-email-capture');
    ?>
</label></th>

                    <td><input type="checkbox" name="wp_email_capture_link" value="1" <?php 
    checked(get_option('wp_email_capture_link'), 1);
    ?>
 /></td>

                </tr>

                <tr valign="top">

                    <th scope="row" style="width:400px"><label><?php 
    _e('Make The "Name" field a required field?', 'wp-email-capture');
    ?>
</label></th>

                    <td><input type="checkbox" name="wp_email_capture_name_required" value="1" <?php 
    checked(get_option('wp_email_capture_name_required'), 1);
    ?>
 /></td>

                </tr>

                <tr valign="top">

                    <th scope="row" style="width:400px"><?php 
    _e('Delimeter (leave blank for a comma)', 'wp-email-capture');
    ?>
</th>

                    <td><input type="text" name="wp_email_capture_name_delimeter" class="regular-text code"  value="<?php 
    echo get_option('wp_email_capture_name_delimeter');
    ?>
" /></td>

                </tr>

            </tbody>

        </table>

        <input type="hidden" name="action" value="update" />

        <input type="hidden" name="page_options" value="wp_email_capture_redirection,wp_email_capture_from,wp_email_capture_subject,wp_email_capture_signup,wp_email_capture_body,wp_email_capture_from_name,wp_email_capture_link,wp_email_capture_name_required,wp_email_capture_name_delimeter" />

        <p class="submit">

            <input type="submit" class="button-primary" value="<?php 
    _e('Save Changes', 'wp-email-capture');
    ?>
" />

        </p>

    </form>



    <?php 
    wp_email_capture_writetable();
    echo '<a name="list"></a><h3>' . __('Export', 'wp-email-capture') . '</h3>
    <form name="wp_email_capture_export" action="' . esc_url($_SERVER['REQUEST_URI']) . '#list" method="post">

    <label>' . __('Use the button below to export your list as a CSV to use in software such as <a href="http://wpemailcapture.com/recommends/aweber" title="Email Marketing">Aweber</a> or <a href="http://wpemailcapture.com/recommends/mailchimp">Mailchimp</a>', 'wp-email-capture') . '</label>
    <input type="hidden" name="wp_email_capture_export" />
    <div class="submit">
    <input type="submit" value="' . __('Export List', 'wp-email-capture') . '" class="button"  />
    </div>

    </form>';
    $tempemails = wp_email_capture_count_temp();
    echo "<a name='truncate'></a><h3>" . __('Temporary e-mails', 'wp-email-capture') . "</h3>\n";
    echo '<form name="wp_email_capture_truncate" action="' . esc_url($_SERVER['REQUEST_URI']) . '#truncate" method="post">';
    echo '<label>' . __('There are', 'wp-email-capture') . ' ' . $tempemails . ' ' . __('e-mail addresses that have been unconfirmed. Delete them to save space below.', 'wp-email-capture') . '</label>';
    echo '<input type="hidden" name="wp_email_capture_truncate"/>';
    echo '<div class="submit"><input type="submit" value="' . __('Delete Unconfirmed e-mail Addresses', 'wp-email-capture') . '" class="button"  /></div>';
    echo "</form>";
    echo "<a name='emptyallemails'></a><h3>" . __('Delete Current List', 'wp-email-capture') . "</h3>\n";
    echo '<form name="wp_email_capture_delete" action="' . esc_url($_SERVER['REQUEST_URI']) . '#delete" method="post">';
    echo '<label>' . __('Want to delete the entire list? Click the link below. <strong>WARNING: </strong> this will delete all confirmed emails, so make sure you have a backup.', 'wp-email-capture') . '</label>';
    echo '<input type="hidden" name="wp_email_capture_delete"/>';
    echo '<div class="submit"><input type="submit" value="' . __('Delete Confirmed e-mail Addresses', 'wp-email-capture') . '" class="button"  /></div>';
    echo "</form>";
    echo '</div></div></div>';
    wp_email_capture_admin_sidebar("getwpemailcapturepremiumdescription,affiliates,news,supportus");
    echo '</div>';
    ?>


    <?php 
}