/** * Display a list of custom shortcodes. * * This function outputs a HTML list of custom shortcodes to be used. * * @since 1.3 * @param * @return HTML formatted list of tags. */ public static function list_custom_tags() { $content_tags = mdjm_get_content_tags(); $output = ''; if (count($content_tags) > 0) { foreach ($content_tags as $content_tag) { if (strpos(strtolower($content_tag['tag']), 'mdjm_cf_') !== false) { $custom_tags[] = $content_tag; } } } if (!empty($custom_tags)) { $output .= '<ul>'; foreach ($custom_tags as $custom_tag) { $output .= '<li style="font-style: italic; font-size: smaller;">'; $output .= "{{$custom_tag['tag']}} - {$custom_tag['description']}"; $output .= '</li>'; } $output .= '</ul>'; } echo $output; }
/** * Get a formatted HTML list of all available content tags. * * @since 1.3 * * @return str */ function mdjm_get_content_tags_list() { // The list $list = ''; // Get all tags $content_tags = mdjm_get_content_tags(); // Check if (count($content_tags) > 0) { // Loop foreach ($content_tags as $content_tag) { // Add email tag to list. $list .= '{' . $content_tag['tag'] . '} - ' . $content_tag['description'] . '<br/>'; } } // Return the list of tags. return $list; }