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


PHP bbp_topic_post_date函数代码示例

本文整理汇总了PHP中bbp_topic_post_date函数的典型用法代码示例。如果您正苦于以下问题:PHP bbp_topic_post_date函数的具体用法?PHP bbp_topic_post_date怎么用?PHP bbp_topic_post_date使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bbp_topic_post_date函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: bbp_topic_favorite_link

			<?php 
bbp_topic_favorite_link();
?>

		</div><!-- .bbp-topic-content -->

	</li><!-- .bbp-header -->

	<li class="bbp-body">

		<div class="bbp-topic-header">

			<div class="bbp-meta">

				<span class="bbp-topic-post-date"><?php 
bbp_topic_post_date();
?>
</span>

				<a href="<?php 
bbp_topic_permalink();
?>
" class="bbp-topic-permalink">#<?php 
bbp_topic_id();
?>
</a>

				<?php 
do_action('bbp_theme_before_topic_admin_links');
?>
开发者ID:severnrescue,项目名称:web,代码行数:30,代码来源:content-single-topic-lead.php

示例2: test_bbp_get_topic_post_date

 /**
  * @covers ::bbp_topic_post_date
  * @covers ::bbp_get_topic_post_date
  */
 public function test_bbp_get_topic_post_date()
 {
     $f = $this->factory->forum->create();
     $now = time();
     $post_date = date('Y-m-d H:i:s', $now - 60 * 60 * 100);
     $t = $this->factory->topic->create(array('post_parent' => $f, 'post_date' => $post_date, 'topic_meta' => array('forum_id' => $f)));
     // Configue our written date time, August 4, 2012 at 2:37 pm.
     $gmt = false;
     $date = get_post_time(get_option('date_format'), $gmt, $t, true);
     $time = get_post_time(get_option('time_format'), $gmt, $t, true);
     $result = sprintf('%1$s at %2$s', $date, $time);
     // Output, string, August 4, 2012 at 2:37 pm.
     $this->expectOutputString($result);
     bbp_topic_post_date($t);
     // String, August 4, 2012 at 2:37 pm.
     $datetime = bbp_get_topic_post_date($t, false, false);
     $this->assertSame($result, $datetime);
     // Humanized string, 4 days, 4 hours ago.
     $datetime = bbp_get_topic_post_date($t, true, false);
     $this->assertSame('4 days, 4 hours ago', $datetime);
     // Humanized string using GMT formatted date, 4 days, 4 hours ago.
     $datetime = bbp_get_topic_post_date($t, true, true);
     $this->assertSame('4 days, 4 hours ago', $datetime);
 }
开发者ID:joeyblake,项目名称:bbpress,代码行数:28,代码来源:topic.php

示例3: bbp_topic_class

bbp_topic_class();
?>
>

	<div class="bbp-reply-author">

		<?php 
do_action('bbp_theme_before_topic_author_details');
?>

		<?php 
bbp_topic_author_link(array('sep' => '', 'show_role' => true));
?>

		<div class="bbp-reply-post-date"><?php 
bbp_topic_post_date(bbp_get_topic_id());
?>
</div>

		<div class="bbps-post-count"><?php 
printf(__('Post count: %s', 'corporative'), bbp_get_user_reply_count_raw(bbp_get_reply_author_id()));
?>
</div>

		<?php 
if (bbp_is_user_keymaster()) {
    ?>

			<?php 
    do_action('bbp_theme_before_topic_author_admin_details');
    ?>
开发者ID:devmoonshine,项目名称:development,代码行数:31,代码来源:loop-search-topic.php

示例4: 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_topic_post_date(bbp_get_topic_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:universal-youth,项目名称:www.universal-youth.com,代码行数:36,代码来源:class-avada-layout-bbpress.php


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