function get_tag_name($id = 0) { bb_log_deprecated('function', __FUNCTION__, 'bb_get_tag_name'); return bb_get_tag_name($id); }
function _bb_list_tag_item($tag, $args) { $url = esc_url(bb_get_tag_link($tag)); $name = esc_html(bb_get_tag_name($tag)); if ('list' == $args['format']) { $id = 'tag-' . $tag->tag_id . '_' . $tag->user_id; return "\t" . '<li id="' . $id . '"' . get_alt_class('topic-tags') . '><a href="' . $url . '" rel="tag">' . $name . '</a> ' . bb_get_tag_remove_link(array('tag' => $tag, 'list_id' => $args['list_id'])) . '</li>' . "\n"; } }
$post_query = new BB_Query_Form('post', array('post_status' => 'normal', 'count' => true, 'per_page' => 20)); $bb_posts =& $post_query->results; $total = $post_query->found_rows; ?> <div class="wrap"> <h2><?php _e('Posts'); $h2_search = $post_query->get('post_text'); $h2_forum = $post_query->get('forum_id'); $h2_tag = $post_query->get('tag_id'); $h2_author = $post_query->get('post_author_id'); $h2_search = $h2_search ? ' ' . sprintf(__('containing “%s”'), esc_html($h2_search)) : ''; $h2_forum = $h2_forum ? ' ' . sprintf(__('in “%s”'), get_forum_name($h2_forum)) : ''; $h2_tag = $h2_tag ? ' ' . sprintf(__('with tag “%s”'), esc_html(bb_get_tag_name($h2_tag))) : ''; $h2_author = $h2_author ? ' ' . sprintf(__('by %s'), esc_html(get_user_name($h2_author))) : ''; if ($ip_available) { $h2_ip = $post_query->get('poster_ip'); $h2_ip = $h2_ip ? ' ' . sprintf(__('from IP address %s'), esc_html($h2_ip)) : ''; } else { $h2_ip = ''; } if ($h2_search || $h2_forum || $h2_tag || $h2_author || $h2_ip) { echo '<span class="subtitle">'; printf(__('%1$s%2$s%3$s%4$s%5$s'), $h2_search, $h2_forum, $h2_tag, $h2_author, $h2_ip); echo '</span>'; } ?> </h2> <?php
$posts = array(); foreach ($topics as $topic) { $posts[] = bb_get_first_post($topic->topic_id); } $title = esc_html(sprintf(__('%1$s » Tag: %2$s - Recent Topics'), bb_get_option('name'), bb_get_tag_name())); $link = bb_get_tag_link($feed_id); $link_self = bb_get_tag_topics_rss_link($feed_id); break; case 'tag-posts': if (!($tag = bb_get_tag($feed_id))) { die; } if (!($posts = get_tagged_topic_posts(array('tag_id' => $tag->tag_id, 'page' => 0)))) { die; } $title = esc_html(sprintf(__('%1$s » Tag: %2$s - Recent Posts'), bb_get_option('name'), bb_get_tag_name())); $link = bb_get_tag_link($feed_id); $link_self = bb_get_tag_posts_rss_link($feed_id); break; case 'forum-topics': if (!($topics = get_latest_topics($feed_id))) { die; } $posts = array(); foreach ($topics as $topic) { $posts[] = bb_get_first_post($topic->topic_id); } $title = esc_html(sprintf(__('%1$s » Forum: %2$s - Recent Topics'), bb_get_option('name'), get_forum_name($feed_id))); $link = get_forum_link($feed_id); $link_self = bb_get_forum_topics_rss_link($feed_id); break;