/** * Get a formatted HTML list of all available email tags * * @since 1.0 * * @return string */ function give_get_emails_tags_list() { // Get all email tags. $email_tags = give_get_email_tags(); ob_start(); if (count($email_tags) > 0) { ?> <div class="give-email-tags-wrap"> <?php foreach ($email_tags as $email_tag) { ?> <span class="give_<?php echo $email_tag['tag']; ?> _tag"> <code>{<?php echo $email_tag['tag']; ?> }</code> - <?php echo $email_tag['description']; ?> </span> <?php } ?> </div> <?php } // Return the list. return ob_get_clean(); }
/** * Get a formatted HTML list of all available email tags * * @since 1.0 * * @return string */ function give_get_emails_tags_list() { // The list $list = ''; // Get all tags $email_tags = give_get_email_tags(); // Check if (count($email_tags) > 0) { // Loop foreach ($email_tags as $email_tag) { // Add email tag to list $list .= '<code>{' . $email_tag['tag'] . '}</code> - ' . $email_tag['description'] . '<br/>'; } } // Return the list return $list; }