예제 #1
0
/**
 * Get a formatted HTML list of all available email tags
 *
 * Based on edd_get_emails_tags_list()
 *
 * @since       1.0.0
 * @param       string $type Whether this is a standard or admin email
 * @return      $string
 */
function edd_wallet_get_email_tags_list($type = '')
{
    // The list
    $list = '';
    // Remove unusable tags
    $unusable_tags = array('download_list', 'file_urls', 'subtotal', 'tax', 'discount_codes');
    if ($type == 'admin') {
        $unusable_tags[] = 'payment_id';
        $unusable_tags[] = 'receipt_id';
        $unusable_tags[] = 'payment_method';
        $unusable_tags[] = 'receipt_link';
        $unusable_tags[] = 'billing_address';
    }
    $unusable_tags = apply_filters('edd_wallet_remove_email_tags', $unusable_tags, $type);
    foreach ($unusable_tags as $tag) {
        edd_wallet_remove_email_tag($tag);
    }
    // Get all email tags
    $email_tags = edd_get_email_tags();
    // Check
    if (count($email_tags) > 0) {
        // Loop
        foreach ($email_tags as $email_tag) {
            // Add email tag to list
            $list .= '{' . $email_tag['tag'] . '} - ' . $email_tag['description'] . '<br/>';
        }
    }
    // Return the list
    return $list;
}
예제 #2
0
function edd_fes_pu_get_email_tags()
{
    $tags = array();
    foreach (edd_get_email_tags() as $tag) {
        $tags[$tag['tag']] = '{' . $tag['tag'] . '}';
    }
    return $tags;
}
/**
 * Get a formatted HTML list of all available email tags
 *
 * @since 1.9
 *
 * @return string
 */
function edd_get_emails_tags_list()
{
    // The list
    $list = '';
    // Get all tags
    $email_tags = edd_get_email_tags();
    // Check
    if (count($email_tags) > 0) {
        // Loop
        foreach ($email_tags as $email_tag) {
            // Add email tag to list
            $list .= '{' . $email_tag['tag'] . '} - ' . $email_tag['description'] . '<br/>';
        }
    }
    // Return the list
    return $list;
}
 * Edit Product Update Email Page
 *
 * @since 0.9.3
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
$email_id = absint($_GET['id']);
$email = get_post($email_id);
$emailmeta = get_post_custom($email_id);
$filters = unserialize($emailmeta['_edd_pup_filters'][0]);
$updated_products = get_post_meta($email_id, '_edd_pup_updated_products', TRUE);
$recipients = edd_pup_customer_count($email_id, $updated_products);
$products = edd_pup_get_all_downloads();
$tags = edd_get_email_tags();
$status = get_post_status($email_id);
$fromname = !empty($emailmeta['_edd_pup_from_name'][0]) ? $emailmeta['_edd_pup_from_name'][0] : '';
$fromemail = !empty($emailmeta['_edd_pup_from_email'][0]) ? $emailmeta['_edd_pup_from_email'][0] : '';
// Redirect to view page if edit page is accessed directly
if ($status != 'draft') {
    ?>
	<script type="text/javascript">
		window.location.href = document.URL.replace('edit_pup_email', 'view_pup_email');
	</script>
	<?php 
}
?>

<form id="edd-pup-email-edit" action="" method="POST">
<div id="edd-pup-single-email" class="wrap">