本文整理汇总了PHP中bbp_replies函数的典型用法代码示例。如果您正苦于以下问题:PHP bbp_replies函数的具体用法?PHP bbp_replies怎么用?PHP bbp_replies使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bbp_replies函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getReplyList
public function getReplyList($topicId = -1)
{
$topicId = $topicId == -1 ? $_POST['param']['topicId'] : $topicId;
$loadFrom = empty($_POST['param']['from']) ? 0 : $_POST['param']['from'];
$loadTo = empty($_POST['param']['to']) ? 0 : $_POST['param']['to'];
$return = array();
$param = array('post_parent' => $topicId, 'post_type' => 'reply');
if (!bbp_has_replies($param)) {
$this->_die();
}
while (bbp_replies()) {
bbp_the_reply();
$reply = new ForumBbpAjaxIntegratorPost(bbp_get_reply_id(), 'reply');
$return[] = $reply->getPostData();
}
return $return;
}
示例2: _e
<?php
_e('Replies', 'bbpress');
?>
<?php
}
?>
</th>
</tr>
</tfoot>
<tbody>
<?php
while (bbp_replies()) {
bbp_the_reply();
?>
<tr class="bbp-reply-header">
<td colspan="2">
<?php
printf(__('%1$s at %2$s', 'bbpress'), get_the_date(), esc_attr(get_the_time()));
?>
<a href="<?php
bbp_reply_url();
?>
" title="<?php
bbp_reply_title();
示例3: bbp_display_replies_feed_rss2
//.........这里部分代码省略.........
</dc:creator>
<description>
<![CDATA[
<p><?php
printf(__('Replies: %s', 'bbpress'), bbp_get_topic_reply_count());
?>
</p>
<?php
bbp_topic_content();
?>
]]>
</description>
<?php
rss_enclosure();
?>
<?php
do_action('bbp_feed_item');
?>
</item>
<?php
}
?>
<?php
}
?>
<?php
}
?>
<?php
if (bbp_has_replies($replies_query)) {
?>
<?php
while (bbp_replies()) {
bbp_the_reply();
?>
<item>
<guid><?php
bbp_reply_url();
?>
</guid>
<title><![CDATA[<?php
bbp_reply_title();
?>
]]></title>
<link><?php
bbp_reply_url();
?>
</link>
<pubDate><?php
echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false);
?>
</pubDate>
<dc:creator><?php
the_author();
?>
</dc:creator>
<description>
<![CDATA[
<?php
bbp_reply_content();
?>
]]>
</description>
<?php
rss_enclosure();
?>
<?php
do_action('bbp_feed_item');
?>
</item>
<?php
}
?>
<?php
}
?>
<?php
do_action('bbp_feed_footer');
?>
</channel>
</rss>
<?php
// We're done here
exit;
}
示例4: display_forums
//.........这里部分代码省略.........
bbp_forum_title();
?>
</h3>
<?php
bbp_get_template_part('feedback', 'no-topics');
return;
}
// Setup the topic
bbp_the_topic();
?>
<h3><?php
bbp_topic_title();
?>
</h3>
<?php
// Topic edit
if (bp_action_variable($offset + 2) === bbp_get_edit_rewrite_id()) {
// Unset the super sticky link on edit topic template
add_filter('bbp_get_topic_types', array($this, 'unset_super_sticky'), 10, 1);
// Set the edit switches
$wp_query->bbp_is_edit = true;
$wp_query->bbp_is_topic_edit = true;
// Setup the global forum ID
$bbp->current_topic_id = get_the_ID();
// Merge
if (!empty($_GET['action']) && 'merge' === $_GET['action']) {
bbp_set_query_name('bbp_topic_merge');
bbp_get_template_part('form', 'topic-merge');
// Split
} elseif (!empty($_GET['action']) && 'split' === $_GET['action']) {
bbp_set_query_name('bbp_topic_split');
bbp_get_template_part('form', 'topic-split');
// Edit
} else {
bbp_set_query_name('bbp_topic_form');
bbp_get_template_part('form', 'topic');
}
// Single Topic
} else {
bbp_set_query_name('bbp_single_topic');
bbp_get_template_part('content', 'single-topic');
}
break;
/** Single Reply **********************************************/
/** Single Reply **********************************************/
case $this->reply_slug:
// Get the reply
bbp_has_replies(array('name' => bp_action_variable($offset + 1), 'posts_per_page' => 1));
// If no topic, 404
if (!bbp_replies()) {
bp_do_404(bbp_get_forum_permalink($forum_id));
?>
<h3><?php
bbp_forum_title();
?>
</h3>
<?php
bbp_get_template_part('feedback', 'no-replies');
return;
}
// Setup the reply
bbp_the_reply();
?>
<h3><?php
bbp_reply_title();
?>
</h3>
<?php
if (bp_action_variable($offset + 2) === bbp_get_edit_rewrite_id()) {
// Set the edit switches
$wp_query->bbp_is_edit = true;
$wp_query->bbp_is_reply_edit = true;
// Setup the global reply ID
$bbp->current_reply_id = get_the_ID();
// Move
if (!empty($_GET['action']) && 'move' === $_GET['action']) {
bbp_set_query_name('bbp_reply_move');
bbp_get_template_part('form', 'reply-move');
// Edit
} else {
bbp_set_query_name('bbp_reply_form');
bbp_get_template_part('form', 'reply');
}
}
break;
}
// Reset the query
wp_reset_query();
?>
</div>
<?php
// Allow actions immediately after group forum output
do_action('bbp_after_group_forum_display');
}