/**
  * Page that lists all FUE_Emails
  */
 public static function list_emails_page()
 {
     $types = Follow_Up_Emails::get_email_types();
     $campaigns = get_terms('follow_up_email_campaign', array('hide_empty' => false));
     $bccs = get_option('fue_bcc_types', false);
     $from_addresses = get_option('fue_from_email_types', false);
     include FUE_TEMPLATES_DIR . '/email-list/email-list.php';
 }
Ejemplo n.º 2
0
 /**
  * Update the priorities the emails are loaded and displayed
  */
 public static function update_priorities()
 {
     $types = Follow_Up_Emails::get_email_types();
     foreach ($types as $key => $type) {
         if (isset($_POST[$key . '_order']) && !empty($_POST[$key . '_order'])) {
             foreach ($_POST[$key . '_order'] as $idx => $email_id) {
                 $priority = $idx + 1;
                 fue_save_email(array('id' => $email_id, 'priority' => $priority));
             }
         }
     }
     if (isset($_POST['bcc'])) {
         update_option('fue_bcc_types', $_POST['bcc']);
     }
     if (isset($_POST['from_email'])) {
         update_option('fue_from_email_types', $_POST['from_email']);
     }
     do_action('fue_update_priorities', $_POST);
 }
Ejemplo n.º 3
0
<?php

/* @var FUE_Email $email */
$types = Follow_Up_Emails::get_email_types();
?>
<input type="hidden" id="email_id" value="<?php 
echo $email->id;
?>
" />
<select id="email_type" name="email_type" class="select2" data-placeholder="<?php 
_e('Please select an email type', 'follow_up_emails');
?>
" style="width: 100%;">
    <option value=""></option>
    <?php 
foreach ($types as $type) {
    ?>
    <option value="<?php 
    echo $type->id;
    ?>
" <?php 
    selected($email->type, $type->id);
    ?>
><?php 
    echo $type->singular_label;
    ?>
</option>
    <?php 
}
?>
</select>