/**
  * Trigger string for custom events
  *
  * @param string $string
  * @param FUE_Email $email
  * @return string
  */
 public function trigger_string($string, $email)
 {
     if ($email->trigger == 'before_tribe_event_starts' || $email->trigger == 'after_tribe_event_ends') {
         $type = $email->get_email_type();
         $string = sprintf(__('%d %s %s'), $email->interval, Follow_Up_Emails::get_duration($email->duration), $type->get_trigger_name($email->trigger));
     }
     return $string;
 }
Esempio n. 2
0
                            <?php 
/* @var FUE_Email $email */
$durations = Follow_Up_Emails::get_durations();
foreach ($durations as $key => $value) {
    if ($key == 'date') {
        continue;
    }
    ?>
                            <option class="interval_duration_<?php 
    echo $key;
    ?>
 hideable" value="<?php 
    echo esc_attr($key);
    ?>
"><?php 
    echo Follow_Up_Emails::get_duration($key, $value);
    ?>
</option>
                            <?php 
}
?>
                        </select>

                    </td>
                </tr>

                <?php 
do_action('fue_manual_email_form_before_message', $defaults);
?>

                <tr valign="top">
Esempio n. 3
0
 /**
  * Return a formatted string of this email's sending trigger
  *
  * @return string
  */
 public function get_trigger_string()
 {
     if ($this->type == 'manual') {
         $trigger = __('Manual Email', 'follow_up_emails');
     } else {
         if ($this->trigger == 'date') {
             $trigger = sprintf(__('Send on %s'), fue_format_send_datetime($this));
         } elseif ($this->trigger == 'signup') {
             $trigger = sprintf(__('%d %s after user signs up', 'follow_up_emails'), $this->interval, Follow_Up_Emails::get_duration($this->duration, $this->interval));
         } else {
             $type = $this->get_email_type();
             if ($type && $this->trigger) {
                 $trigger_name = $type->get_trigger_name($this->trigger);
                 $trigger = sprintf(__('%d %s %s'), $this->interval, Follow_Up_Emails::get_duration($this->duration, $this->interval), $trigger_name);
             } else {
                 $trigger = sprintf(__('Error getting the trigger. %s is not a valid type', 'follow_up_emails'), $this->get_type());
             }
         }
     }
     // support for older versions
     $trigger = apply_filters('fue_interval_str', $trigger, $this);
     return apply_filters('fue_trigger_str', $trigger, $this);
 }
 /**
  * Format the trigger string that is displayed in the email reports
  *
  * @param string    $string
  * @param FUE_Email $email
  *
  * @return string
  */
 public function trigger_string($string, $email)
 {
     if ($email->trigger == 'points_greater_than') {
         $email_type = $email->get_email_type();
         $meta = maybe_unserialize($email->meta);
         $string = sprintf(__('%d %s %s %d'), $email->interval, Follow_Up_Emails::get_duration($email->duration, $email->interval), $email_type->get_trigger_name($email->trigger), $meta['points_greater_than']);
     }
     return $string;
 }
Esempio n. 5
0
/**
 * Get the proper string representation of a duration depending on the value
 *
 * @deprecated
 * @param string    $duration
 * @param int       $value
 * @return string
 */
function fue_get_duration_string($duration, $value = 0)
{
    _deprecated_function('fue_get_duration_string', '4.0', 'Follow_Up_Emails::get_duration()');
    return Follow_Up_Emails::get_duration($duration, $value);
}
Esempio n. 6
0
    $triggers = $email_type->triggers;
}
foreach ($durations as $key => $duration) {
    $selected = $email->duration == $key ? 'selected' : '';
    ?>
                <option class="interval_duration_<?php 
    echo $key;
    ?>
 hideable" value="<?php 
    echo esc_attr($key);
    ?>
" <?php 
    echo $selected;
    ?>
><?php 
    echo Follow_Up_Emails::get_duration($key, $email->interval);
    ?>
</option>
            <?php 
}
?>
        </select>

        <span class="description signup signup_description hideable"><?php 
_e('after user signs up', 'follow_up_emails');
?>
</span>
    </p>

    <p class="form-field non-signup">
        <label><?php