コード例 #1
0
        if (!mb_is_user_page()) {
            echo get_avatar(mb_get_topic_author_id());
        }
        ?>

						<?php 
        mb_topic_link();
        ?>

						<div class="mb-topic-meta">
							<?php 
        mb_topic_states();
        ?>
							<?php 
        /* Translators: Topic author and date. 1 is the topic author. 2 is the topic date. */
        printf(__('Started by %1$s %2$s', 'message-board'), mb_get_topic_author_profile_link(), mb_get_topic_natural_time());
        ?>
						</div><!-- .mb-topic-meta -->

					</td><!-- .mb-col-title -->

					<td class="mb-col-count">
						<?php 
        printf(__('Replies: %s', 'message-board'), mb_get_topic_reply_count());
        ?>
<br />
						<?php 
        printf(__('Voices: %s', 'message-board'), mb_get_topic_voice_count());
        ?>
					</td><!-- .mb-col-count -->
コード例 #2
0
/**
 * Outputs the topic natural time (e.g., 1 month ago, 5 minutes ago, etc.)
 *
 * @since  1.0.0
 * @access public
 * @param  int     $topic_id
 * @return void
 */
function mb_topic_natural_time($topic_id = 0)
{
    echo mb_get_topic_natural_time($topic_id);
}