<option value='no' <?php 
    echo 'no' == $selected_use_themes ? " selected='selected'" : "";
    ?>
 ><?php 
    _e("no", "alo-easymail");
    ?>
</option>
	<option value='yes' <?php 
    echo 'yes' == $selected_use_themes ? " selected='selected'" : "";
    ?>
><?php 
    echo __("yes", "alo-easymail") . ", " . __(" free choice for authors", "alo-easymail");
    ?>
</option>
	<?php 
    $values_use_themes = alo_easymail_get_all_themes();
    foreach ($values_use_themes as $key => $label) {
        echo "<option value='{$key}' " . ($key == $selected_use_themes ? " selected='selected'" : "") . ">" . __("yes", "alo-easymail") . " " . __("but always use", "alo-easymail") . ": " . esc_html($key) . "</option>";
    }
    ?>
</select>
<br /><span class="description"><?php 
    _e("Tip: copy &#39;alo-easymail-themes&#39; folder to your theme directory and edit your themes there. Useful to prevent the loss of themes when you upgrade the plugin", "alo-easymail");
    ?>
</span></td>
</tr>


<?php 
    if (get_option('alo_em_js_rec_list')) {
        $selected_js_rec_list = get_option('alo_em_js_rec_list');
Exemplo n.º 2
0
function alo_em_save_newsletter_content_transient()
{
    global $user_ID;
    check_ajax_referer("alo-easymail");
    $newsletter_id = isset($_POST['newsletter']) && is_numeric($_POST['newsletter']) ? (int) $_POST['newsletter'] : false;
    $theme = isset($_POST['theme']) && array_key_exists($_POST['theme'], alo_easymail_get_all_themes()) ? stripslashes(trim($_POST['theme'])) : '';
    if ($newsletter_id) {
        $data = array('theme' => $theme);
        set_transient('alo_em_content_preview_' . $newsletter_id, $data, 60 * 3);
        die('1');
    }
    die('-1');
}