本文整理汇总了PHP中bbp_get_template_part函数的典型用法代码示例。如果您正苦于以下问题:PHP bbp_get_template_part函数的具体用法?PHP bbp_get_template_part怎么用?PHP bbp_get_template_part使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bbp_get_template_part函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: my_bbp_search_form
function my_bbp_search_form()
{
?>
<div class="bbp-search-form">
<?php
bbp_get_template_part('form', 'search');
?>
</div>
<?php
}
示例2: wp_emember_forum_viewing
function wp_emember_forum_viewing($retval, $forum_id, $user_id)
{
global $post;
if (wp_emember_is_forum_post_visible($post)) {
return $retval;
} else {
//eMember can also output *protected* message here
bbp_get_template_part('feedback', 'no-access');
$retval = false;
return $retval;
}
}
示例3: bbp_view_title
} else {
echo ' col-md-12';
}
?>
">
<section class="new-content">
<div class="box-post">
<div class="inner-box">
<h1 class="entry-title page-title clearfix"><span><?php
bbp_view_title();
?>
</span></h1>
<div class="entry-content">
<?php
bbp_get_template_part('content', 'single-view');
?>
</div>
</div>
</div>
</section>
</div><!-- #topic-front -->
<?php
do_action('bbp_after_main_content');
?>
<?php
get_sidebar('forum');
?>
示例4: bbp_get_template_part
<?php
bbp_get_template_part('pagination', 'topics');
?>
<?php
bbp_get_template_part('loop', 'topics');
?>
<?php
bbp_get_template_part('pagination', 'topics');
?>
<?php
} else {
?>
<?php
bbp_get_template_part('feedback', 'no-topics');
?>
<?php
}
?>
<?php
bbp_reset_query_name();
?>
</div>
示例5: bbp_tab_index
tabindex="<?php
bbp_tab_index();
?>
" />
<?php
_e('Grant this user super admin privileges for the Network.', 'bbpress');
?>
</label>
</div>
<?php
}
?>
<?php
bbp_get_template_part('form', 'user-roles');
?>
<?php
do_action('bbp_user_edit_after_role');
?>
</fieldset>
<?php
}
?>
<?php
do_action('bbp_user_edit_after');
?>
示例6: bbp_get_template_part
<div class="bbp-user-section">
<?php
if (bbp_get_user_topic_subscriptions()) {
?>
<?php
bbp_get_template_part('pagination', 'topics');
?>
<?php
bbp_get_template_part('loop', 'topics');
?>
<?php
bbp_get_template_part('pagination', 'topics');
?>
<?php
} else {
?>
<p><?php
bbp_is_user_home() ? _e('You are not currently subscribed to any topics.', 'wpdance') : _e('This user is not currently subscribed to any topics.', 'wpdance');
?>
</p>
<?php
}
?>
示例7: bbp_topic_tag_list
bbp_topic_tag_list();
bbp_single_topic_description();
}
?>
</div>
</div>
<div class="col-md-3 col-sm-4">
<?php
if (bbp_allow_search()) {
?>
<div class="bbp-search-form">
<?php
bbp_get_template_part('form', 'search');
?>
</div>
<?php
}
?>
</div>
</div>
</div>
</section>
<section id="content">
<div class="<?php
echo vibe_get_container();
?>
示例8: while
/*_e( 'Freshness', 'bbpress' ); */
?>
</li> -->
</ul>
</li><!-- .bbp-header -->
<li class="bbp-body">
<?php
while (bbp_forums()) {
bbp_the_forum();
?>
<?php
bbp_get_template_part('loop', 'single-forum');
?>
<?php
}
?>
</li><!-- .bbp-body -->
<!---<li class="bbp-footer">
<div class="tr">
<p class="td colspan4"> </p>
</div>
</li>
示例9: bbp_replace_the_content
/**
* Replaces the_content() if the post_type being displayed is one that would
* normally be handled by bbPress, but proper single page templates do not
* exist in the currently active theme.
*
* Note that we do *not* currently use is_main_query() here. This is because so
* many existing themes either use query_posts() or fail to use wp_reset_query()
* when running queries before the main loop, causing theme compat to fail.
*
* @since bbPress (r3034)
* @param string $content
* @return type
*/
function bbp_replace_the_content($content = '')
{
// Bail if not inside the query loop
if (!in_the_loop()) {
return $content;
}
$bbp = bbpress();
// Define local variable(s)
$new_content = '';
// Bail if shortcodes are unset somehow
if (!is_a($bbp->shortcodes, 'BBP_Shortcodes')) {
return $content;
}
// Use shortcode API to display forums/topics/replies because they are
// already output buffered and ready to fit inside the_content
/** Users *************************************************************/
// Profile View
if (bbp_is_single_user_edit() || bbp_is_single_user()) {
ob_start();
bbp_get_template_part('content', 'single-user');
$new_content = ob_get_contents();
ob_end_clean();
/** Forums ************************************************************/
// Forum archive
} elseif (bbp_is_forum_archive()) {
// Page exists where this archive should be
$page = bbp_get_page_by_path(bbp_get_root_slug());
if (!empty($page)) {
// Restore previously unset filters
bbp_restore_all_filters('the_content');
// Remove 'bbp_replace_the_content' filter to prevent infinite loops
remove_filter('the_content', 'bbp_replace_the_content');
// Start output buffer
ob_start();
// Grab the content of this page
$new_content = apply_filters('the_content', $page->post_content);
// Clean up the buffer
ob_end_clean();
// Add 'bbp_replace_the_content' filter back (@see $this::start())
add_filter('the_content', 'bbp_replace_the_content');
// No page so show the archive
} else {
$new_content = $bbp->shortcodes->display_forum_index();
}
// Forum Edit
} elseif (bbp_is_forum_edit()) {
$new_content = $bbp->shortcodes->display_forum_form();
// Single Forum
} elseif (bbp_is_single_forum()) {
$new_content = $bbp->shortcodes->display_forum(array('id' => get_the_ID()));
/** Topics ************************************************************/
// Topic archive
} elseif (bbp_is_topic_archive()) {
// Page exists where this archive should be
$page = bbp_get_page_by_path(bbp_get_topic_archive_slug());
if (!empty($page)) {
// Restore previously unset filters
bbp_restore_all_filters('the_content');
// Remove 'bbp_replace_the_content' filter to prevent infinite loops
remove_filter('the_content', 'bbp_replace_the_content');
// Start output buffer
ob_start();
// Grab the content of this page
$new_content = apply_filters('the_content', $page->post_content);
// Clean up the buffer
ob_end_clean();
// Add 'bbp_replace_the_content' filter back (@see $this::start())
add_filter('the_content', 'bbp_replace_the_content');
// No page so show the archive
} else {
$new_content = $bbp->shortcodes->display_topic_index();
}
// Topic Edit
} elseif (bbp_is_topic_edit()) {
// Split
if (bbp_is_topic_split()) {
ob_start();
bbp_get_template_part('form', 'topic-split');
$new_content = ob_get_contents();
ob_end_clean();
// Merge
} elseif (bbp_is_topic_merge()) {
ob_start();
bbp_get_template_part('form', 'topic-merge');
$new_content = ob_get_contents();
ob_end_clean();
// Edit
//.........这里部分代码省略.........
示例10: while
?>
<?php
while (have_posts()) {
the_post();
?>
<div id="bbp-edit-page" class="bbp-edit-page">
<h1 class="entry-title"><?php
the_title();
?>
</h1>
<div class="entry-content">
<?php
bbp_get_template_part('form', 'topic-merge');
?>
</div>
</div><!-- #bbp-edit-page -->
<?php
}
?>
<?php
do_action('bbp_after_main_content');
?>
<?php
get_sidebar();
示例11: the_content
?>
</h1>
<div class="entry-content">
<?php
the_content();
?>
<div id="bbpress-forums">
<?php
bbp_breadcrumb();
?>
<?php
bbp_get_template_part('form', 'user-register');
?>
</div>
</div>
</div><!-- #bbp-register -->
<?php
}
?>
<?php
do_action('bbp_after_main_content');
?>
<?php
示例12: bbp_get_template_part
bbp_get_template_part('content', 'single-forum');
?>
</div>
</div><!-- #forum-<?php
bbp_forum_id();
?>
-->
<?php
} else {
// Forum exists, user no access
?>
<?php
bbp_get_template_part('feedback', 'no-access');
?>
<?php
}
?>
<?php
}
?>
<?php
do_action('bbp_after_main_content');
?>
<?php
示例13: do_action
<?php
do_action('bbp_before_main_content');
?>
<?php
while (have_posts()) {
the_post();
?>
<div id="bbp-edit-page" class="bbp-edit-page">
<div class="entry-content">
<?php
bbp_get_template_part('form', 'forum');
?>
</div>
</div><!-- #bbp-edit-page -->
<?php
}
?>
<?php
do_action('bbp_after_main_content');
?>
</section>
<!-- /#content -->
示例14: add_search_form
/**
* Render the search form.
*/
public function add_search_form()
{
if (bbp_allow_search()) {
?>
<div class="bbp-search-form">
<?php
bbp_get_template_part('form', 'search');
?>
</div>
<?php
}
}
示例15: _e
_e('Freshness', 'bbpress');
?>
</th>
</tr>
</thead>
<tfoot>
<tr><td colspan="4"> </td></tr>
</tfoot>
<tbody>
<?php
while (bbp_forums()) {
bbp_the_forum();
?>
<?php
bbp_get_template_part('bbpress/loop', 'single-forum');
?>
<?php
}
?>
</tbody>
</table>
<?php
do_action('bbp_template_after_forums_loop');