本文整理汇总了PHP中bbp_topic_class函数的典型用法代码示例。如果您正苦于以下问题:PHP bbp_topic_class函数的具体用法?PHP bbp_topic_class怎么用?PHP bbp_topic_class使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bbp_topic_class函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bbp_topic_id
<?php
/**
* Topics Loop - Single
*
* @package bbPress
* @subpackage Theme
*/
?>
<ul id="bbp-topic-<?php
bbp_topic_id();
?>
" <?php
bbp_topic_class();
?>
>
<li class="bbp-topic-title">
<?php
if (bbp_is_user_home()) {
?>
<?php
if (bbp_is_favorites()) {
?>
<span class="bbp-topic-action">
<?php
示例2: bbp_get_template_part
?>
<br class="clear" />
<?php
bbp_get_template_part('topic-info', 'top');
?>
<div class="topic-body">
<div id="bbp-topic-<?php
bbp_topic_id();
?>
" <?php
bbp_topic_class('bbp-lead-topic');
?>
>
<div class="bbp-topic-content">
<?php
do_action('bbp_theme_before_topic_content');
?>
<?php
bbp_topic_content();
?>
<?php
do_action('bbp_theme_after_topic_content');
示例3: bbp_topic_id
<?php
/**
* Topics Loop - Single
*
* @package bbPress
* @subpackage Theme
*/
?>
<ul id="topic-<?php
bbp_topic_id();
?>
" <?php
bbp_topic_class(bbp_get_topic_id(), array('row'));
?>
>
<li class="bbp-topic-title col-lg-8">
<?php
if (bbp_is_user_home()) {
?>
<?php
if (bbp_is_favorites()) {
?>
<span class="bbp-topic-action">
<?php
示例4: single_row
public function single_row($level = 0)
{
global $mode, $post;
static $alternate;
$edit_link = '#';
get_edit_post_link($post->ID);
$title = get_the_title();
$post_type_object = get_post_type_object($post->post_type);
$can_edit_post = false;
// current_user_can( 'edit_post', $post->ID );
$alternate = 'alternate' == $alternate ? '' : 'alternate';
$classes = array($alternate, 'level-0');
?>
<tr id="topic-row-<?php
echo $post->ID;
?>
" <?php
bbp_topic_class($post->ID, $classes);
?>
>
<?php
$forum_id = bbp_get_topic_forum_id($post->ID);
$topic_id = $post->ID;
list($columns, $hidden) = $this->get_column_info();
foreach ($columns as $column_name => $column_display_name) {
$class = "class=\"column-{$column_name}\"";
$style = '';
if (in_array($column_name, $hidden)) {
$style = ' style="display:none;"';
}
$attributes = "{$class}{$style}";
switch ($column_name) {
case 'no':
?>
<td <?php
echo $attributes;
?>
>
<?php
bbp_the_no();
?>
</td>
<?php
break;
case 'title':
$pad = str_repeat('— ', $level);
$title = '<a class="bbp-topic-permalink row-title" href="' . bbp_get_topic_permalink() . '">' . $title . '</a>';
echo "<td {$attributes}>";
do_action('bbp_theme_before_topic_title');
echo $pad . $title;
do_action('bbp_theme_after_topic_title');
echo '</td>';
break;
// Forum
// Forum
case 'forum':
// Output forum name
if (!empty($forum_id)) {
// Forum Title
$forum_title = bbp_get_forum_title($forum_id);
if (empty($forum_title)) {
$forum_title = esc_html__('No Forum', 'bbpress');
}
// Output the title
echo $forum_title;
} else {
esc_html_e('(No Forum)', 'bbpress');
}
break;
// Reply Count
// Reply Count
case 'reply_count':
echo "<td {$attributes}>";
echo '<div class="post-com-count-wrapper"><a class="post-com-count" href="#"><span class="comment-count">';
bbp_topic_reply_count($topic_id);
echo '</span></a></div>';
echo "</td>";
break;
// Reply Count
// Reply Count
case 'voice_count':
echo "<td {$attributes}>";
bbp_topic_voice_count($topic_id);
break;
// Author
// Author
case 'author':
echo "<td {$attributes}>";
bbp_topic_author_display_name($topic_id);
echo "</td>";
break;
// Freshness
// Freshness
case 'date':
echo "<td {$attributes}>";
echo get_the_date('Y.m.d');
echo "</td>";
break;
// Freshness
// Freshness
//.........这里部分代码省略.........
示例5: bbp_topic_permalink
?>
<a href="<?php
bbp_topic_permalink();
?>
"><?php
bbp_topic_title();
?>
</a></h3>
</span>
</div><!-- .bbp-reply-title -->
</div>
<div <?php
bbp_topic_class(0, 'single-post');
?>
>
<div class="bbp-reply-author">
<?php
do_action('bbp_theme_before_reply_author_details');
?>
<?php
bbp_topic_author_link(array('sep' => '<br />', 'show_role' => true, 'type' => 'avatar'));
?>
<?php
if (bbp_is_user_keymaster()) {