当前位置: 首页>>代码示例>>PHP>>正文


PHP bbp_reply_post_date函数代码示例

本文整理汇总了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 
        }
    }
开发者ID:agiper,项目名称:wordpress,代码行数:36,代码来源:class-avada-layout-bbpress.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();
开发者ID:justinwool,项目名称:vortago,代码行数:31,代码来源:loop-single-reply.php

示例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);
 }
开发者ID:ntwb,项目名称:bbPress,代码行数:29,代码来源:reply.php


注:本文中的bbp_reply_post_date函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。