本文整理汇总了PHP中bbp_reply_post_date函数的典型用法代码示例。如果您正苦于以下问题:PHP bbp_reply_post_date函数的具体用法?PHP bbp_reply_post_date怎么用?PHP bbp_reply_post_date使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bbp_reply_post_date函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add_author_post_date_count_ip
/**
* Add post date, author post count and author ip to the author element.
*/
public function add_author_post_date_count_ip()
{
?>
<div class="bbp-reply-post-date"><?php
bbp_reply_post_date(bbp_get_reply_id());
?>
</div>
<div class="bbps-post-count"><?php
printf(__('Post count: %s', 'Avada'), bbp_get_user_reply_count_raw(bbp_get_reply_author_id()) + bbp_get_user_topic_count_raw(bbp_get_reply_author_id()));
?>
</div>
<?php
if (bbp_is_user_keymaster()) {
?>
<?php
do_action('bbp_theme_before_topic_author_admin_details');
?>
<div class="bbp-reply-ip fusion-reply-id"><?php
bbp_author_ip(bbp_get_topic_id());
?>
</div>
<?php
do_action('bbp_theme_after_topic_author_admin_details');
?>
<?php
}
}
示例2: preg_replace
<span class="mom-main-color">
<?php
if (class_exists('userpro_api')) {
/* Integrating UserPro */
global $userpro;
$link = preg_replace("/(?<=href=(\"|'))[^\"']+(?=(\"|'))/", $userpro->permalink(bbp_get_reply_author_id()), bbp_get_reply_author_link(array('sep' => '', 'size' => 0)));
echo $link . userpro_show_badges(bbp_get_reply_author_id());
} else {
bbp_reply_author_link(array('sep' => '', 'show_role' => false, 'type' => 'name'));
}
?>
</span> <?php
_e('on:', 'framework');
?>
<?php
bbp_reply_post_date();
?>
<a href="<?php
bbp_reply_url();
?>
" class="bbp-reply-permalink alignright">#<?php
bbp_reply_id();
?>
</a>
</div>
<?php
do_action('bbp_theme_before_reply_content');
?>
<?php
bbp_reply_content();
示例3: test_bbp_get_reply_post_date
/**
* @covers ::bbp_reply_post_date
* @covers ::bbp_get_reply_post_date
*/
public function test_bbp_get_reply_post_date()
{
$f = $this->factory->forum->create();
$t = $this->factory->topic->create(array('post_parent' => $f, 'topic_meta' => array('forum_id' => $f)));
$now = time();
$post_date = date('Y-m-d H:i:s', $now - 60 * 66);
$r = $this->factory->reply->create(array('post_parent' => $t, 'post_date' => $post_date, 'reply_meta' => array('forum_id' => $f, 'topic_id' => $t)));
// Configue our written date time, August 4, 2012 at 2:37 pm.
$gmt = false;
$date = get_post_time(get_option('date_format'), $gmt, $r, true);
$time = get_post_time(get_option('time_format'), $gmt, $r, true);
$result = sprintf('%1$s at %2$s', $date, $time);
// Output, string, August 4, 2012 at 2:37 pm.
$this->expectOutputString($result);
bbp_reply_post_date($r);
// String, August 4, 2012 at 2:37 pm.
$datetime = bbp_get_topic_post_date($r, false, false);
$this->assertSame($result, $datetime);
// Humanized string, 4 days, 4 hours ago.
$datetime = bbp_get_topic_post_date($r, true, false);
$this->assertSame('1 hour, 6 minutes ago', $datetime);
// Humanized string using GMT formatted date, 4 days, 4 hours ago.
$datetime = bbp_get_topic_post_date($r, true, true);
$this->assertSame('1 hour, 6 minutes ago', $datetime);
}