本文整理汇总了PHP中bbp_author_link函数的典型用法代码示例。如果您正苦于以下问题:PHP bbp_author_link函数的具体用法?PHP bbp_author_link怎么用?PHP bbp_author_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bbp_author_link函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bbp_topic_freshness_link
<?php
bbp_topic_freshness_link();
?>
<?php
do_action('bbp_theme_after_topic_freshness_link');
?>
<p class="bbp-topic-meta">
<?php
do_action('bbp_theme_before_topic_freshness_author');
?>
<span class="bbp-topic-freshness-author"><?php
bbp_author_link(array('post_id' => bbp_get_topic_last_active_id(), 'type' => 'name'));
?>
</span>
<?php
do_action('bbp_theme_after_topic_freshness_author');
?>
</p>
</li>
</ul><!-- #bbp-topic-<?php
bbp_topic_id();
?>
-->
示例2: bbp_forum_freshness_link
<?php
bbp_forum_freshness_link();
?>
<?php
do_action('bbp_theme_after_forum_freshness_link');
?>
<p class="bbp-topic-meta">
<?php
do_action('bbp_theme_before_topic_author');
?>
<span class="bbp-topic-freshness-author"><?php
bbp_author_link(array('post_id' => bbp_get_forum_last_active_id()));
?>
</span>
<?php
do_action('bbp_theme_after_topic_author');
?>
</p>
</li>
</ul><!-- #bbp-forum-<?php
bbp_forum_id();
?>
-->
示例3: bbp_forum_topic_count
bbp_forum_topic_count();
?>
</div>
<div class="forum-freshness">
<?php
echo apoc_get_avatar(array('user_id' => bbp_get_forum_last_reply_author_id(), 'link' => true, 'size' => 50));
?>
<div class="freshest-meta">
<a class="freshest-title" href="<?php
echo $link;
?>
" title=""><?php
bbp_forum_last_topic_title();
?>
</a>
<span class="freshest-author">By <?php
bbp_author_link(array('post_id' => bbp_get_forum_last_topic_id(), 'type' => 'name'));
?>
</span>
<span class="freshest-time"><?php
bbp_topic_last_active_time(bbp_get_forum_last_topic_id());
?>
</span>
</div>
</div>
</li>
</ol>
<?php
}
示例4: bbp_forum_freshness_link
<?php
bbp_forum_freshness_link();
?>
<?php
do_action('bbp_theme_after_forum_freshness_link');
?>
<p class="bbp-topic-meta">
<?php
do_action('bbp_theme_before_topic_author');
?>
<span class="bbp-topic-freshness-author"><?php
bbp_author_link(array('post_id' => bbp_get_forum_last_active_id(), 'type' => name));
?>
</span>
<?php
do_action('bbp_theme_after_topic_author');
?>
</p>
</li>
</ul><!-- #bbp-forum-<?php
bbp_forum_id();
?>
-->
示例5: bbp_topic_freshness_link
<?php
bbp_topic_freshness_link();
?>
<?php
do_action('bbp_theme_after_topic_freshness_link');
?>
<!--<p class="bbp-topic-meta">
<?php
do_action('bbp_theme_before_topic_freshness_author');
?>
<span class="bbp-topic-freshness-author"><?php
bbp_author_link(array('post_id' => bbp_get_topic_last_active_id(), 'size' => 14));
?>
</span>
<?php
do_action('bbp_theme_after_topic_freshness_author');
?>
</p>-->
</li>
</ul><!-- #bbp-topic-<?php
bbp_topic_id();
?>
-->
示例6: do_action
<li class="bbp-topic-freshness col-md-2 text-right small">
<?php
do_action('bbp_theme_before_topic_freshness_link');
?>
<?php
bbp_topic_freshness_link();
?>
<?php
do_action('bbp_theme_after_topic_freshness_link');
?>
<!-- <hr /> -->
<p class="bbp-topic-meta">
<?php
do_action('bbp_theme_before_topic_freshness_author');
?>
<span class="bbp-topic-freshness-author"><?php
bbp_author_link(array('post_id' => bbp_get_topic_last_active_id(), 'size' => 20, 'link_title' => ''));
?>
</span>
<?php
do_action('bbp_theme_after_topic_freshness_author');
?>
</p>
</li>
</ul><!-- #bbp-topic-<?php
bbp_topic_id();
?>
-->
</li>
示例7: test_bbp_get_author_link
/**
* @covers ::bbp_author_link
* @covers ::bbp_get_author_link
*/
public function test_bbp_get_author_link()
{
$t = $this->factory->topic->create();
$display_name = $this->keymaster_userdata->display_name;
$current_user = get_current_user_id();
$size = 80;
$wp_avatar = get_avatar($current_user, $size);
// Pretty permalinks
$this->set_permalink_structure('/%postname%/');
$author_link = '<a href="http://' . WP_TESTS_DOMAIN . '/forums/users/' . $this->keymaster_userdata->user_nicename . '/" title="View ' . $display_name . ''s profile" class="bbp-author-avatar" rel="nofollow">' . $wp_avatar . '</a> <a href="http://' . WP_TESTS_DOMAIN . '/forums/users/' . $this->keymaster_userdata->user_nicename . '/" title="View ' . $display_name . ''s profile" class="bbp-author-name" rel="nofollow">' . $display_name . '</a>';
// String.
$this->assertSame($author_link, bbp_get_author_link($t));
// Output.
$this->expectOutputString($author_link);
bbp_author_link($t);
ob_clean();
// Ugly permalinks
$this->set_permalink_structure();
$author_link = '<a href="http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '" title="View ' . $display_name . ''s profile" class="bbp-author-avatar" rel="nofollow">' . $wp_avatar . '</a> <a href="http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '" title="View ' . $display_name . ''s profile" class="bbp-author-name" rel="nofollow">' . $display_name . '</a>';
// String.
$this->assertSame($author_link, bbp_get_author_link($t));
// Output.
$this->expectOutputString($author_link);
bbp_author_link($t);
}
示例8: bbp_get_topic
<?php
$topic = bbp_get_topic('');
?>
<ul class="td-topic-list-table">
<li class="td-forum-topics-avatar">
<span class="td-topic-started-by">
<?php
bbp_author_link(array('post_id' => $topic->ID, 'size' => 60, 'type' => 'avatar'));
//started by
?>
</span>
<span class="td-topic-last-reply">
<?php
$last_active_topic_id = get_post_meta($topic->ID, '_bbp_last_active_id', true);
bbp_author_link(array('post_id' => $last_active_topic_id, 'size' => 25, 'type' => 'avatar'));
?>
</span>
</li><li class="td-forum-topics-title">
<div class="td-topics-title">
<a href="<?php
bbp_topic_permalink();
?>
"><?php
bbp_topic_title();
?>
</a>
</div>
<div class="td-topics-title-details">
started by <a href="<?php
示例9: bbp_forum_freshness_link
<?php
bbp_forum_freshness_link();
?>
<?php
do_action('bbp_theme_after_forum_freshness_link');
?>
<p class="bbp-topic-meta">
<?php
do_action('bbp_theme_before_topic_author');
?>
<span class="bbp-topic-freshness-author"><?php
bbp_author_link(array('post_id' => bbp_get_forum_last_active_id(), 'type' => 'name', 'size' => 14));
?>
</span>
<?php
do_action('bbp_theme_after_topic_author');
?>
</p>
</li>
</ul><!-- #bbp-forum-<?php
bbp_forum_id();
?>
-->
示例10: apoc_loop_subforums
/**
* Display nested subforums with a hierarchical structure using their parent category
* @version 2.0
*/
function apoc_loop_subforums()
{
// Exclude private forums
$private = apoc_private_forum_ids();
// Check for subforums
$subs = bbp_forum_get_subforums(array('post__not_in' => $private));
if (empty($subs)) {
return;
}
// Buffer output
ob_start();
// Print a header
?>
<header class="forum-header">
<div class="forum-content"><h2><?php
bbp_forum_title();
?>
</h2></div>
<div class="forum-count">Topics</div>
<div class="forum-freshness">Latest Post</div>
</header>
<ol class="forums category <?php
bbp_forum_status();
?>
"><?php
// Loop over forums
foreach ($subs as $count => $sub) {
// Get forum details
$sub_id = $sub->ID;
$title = $sub->post_title;
$desc = $sub->post_content;
$permalink = bbp_get_forum_permalink($sub_id);
// Get topic counts
$topics = bbp_get_forum_topic_count($sub_id, false);
// Get the most recent reply and its topic
$reply_id = bbp_get_forum_last_reply_id($sub_id);
$topic_id = bbp_is_reply($reply_id) ? bbp_get_reply_topic_id($reply_id) : $reply_id;
$topic_title = bbp_get_topic_title($topic_id);
$link = bbp_get_reply_url($reply_id);
// Get the author avatar
$user_id = bbp_get_reply_author_id($reply_id);
$avatar = apoc_get_avatar(array('user_id' => $user_id, 'link' => true, 'size' => 50));
// Toggle html class
$class = $count % 2 ? 'odd' : 'even';
// Print output
?>
<li id="forum-<?php
echo $sub_id;
?>
" class="forum <?php
echo $class;
?>
">
<div class="forum-content">
<h3 class="forum-title"><a href="<?php
echo $permalink;
?>
" title="Browse <?php
echo $title;
?>
"><?php
echo $title;
?>
</a></h3>
<p class="forum-description"><?php
echo $desc;
?>
</p>
</div>
<div class="forum-count">
<?php
echo $topics;
?>
</div>
<div class="forum-freshness">
<?php
echo $avatar;
?>
<div class="freshest-meta">
<a class="freshest-title" href="<?php
echo $link;
?>
" title="<?php
echo $topic_title;
?>
"><?php
echo $topic_title;
?>
</a>
<span class="freshest-author">By <?php
bbp_author_link(array('post_id' => $reply_id, 'type' => 'name'));
?>
</span>
<span class="freshest-time"><?php
//.........这里部分代码省略.........
示例11: bbp_get_reply_author_id
// Get the author
$user_id = bbp_get_reply_author_id( $reply_id );
// Toggle html class?>
<tr>
<td><a class="bbp-forum-title" href="<?php echo $permalink; ?>"><?php echo $title; ?></a></td>
<td><?php echo $topics; ?></td>
<td><?php bbp_forum_post_count( $sub_id, true ); ?></td>
<td><p class="bbp-topic-meta">
<?php do_action( 'bbp_theme_before_topic_author' ); ?>
<a class="freshest-title" href="<?php echo $link; ?>" title="<?php echo $topic_title; ?>"><?php echo $topic_title; ?></a>
<span class="bbp-topic-freshness-author">By <?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 14 ) ); ?></span>
<?php do_action( 'bbp_theme_after_topic_author' ); ?>
</p>
<?php do_action( 'bbp_theme_before_forum_freshness_link' ); ?>
<span class="freshest-time"><?php bbp_topic_last_active_time( $topic_id ); ?></span>
<?php do_action( 'bbp_theme_after_forum_freshness_link' ); ?></td>
</tr>
<?php endforeach; ?>