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


PHP bbp_get_template_part函数代码示例

本文整理汇总了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 
}
开发者ID:quyip8818,项目名称:wps,代码行数:12,代码来源:config.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;
    }
}
开发者ID:phupx,项目名称:genco,代码行数:12,代码来源:eMember_3rd_party_plugin_integration_code.php

示例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');
?>
开发者ID:jjpango,项目名称:JJTeam,代码行数:31,代码来源:single-view.php

示例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>
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:29,代码来源:content-single-view.php

示例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');
?>
开发者ID:roycocup,项目名称:enclothed,代码行数:31,代码来源:form-user-edit.php

示例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 
        }
        ?>
开发者ID:mynein,项目名称:myne,代码行数:30,代码来源:user-subscriptions.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();
        ?>
开发者ID:nikitansk,项目名称:devschool,代码行数:31,代码来源:bbpress.php

示例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">&nbsp;</p>
		</div>

	</li>
开发者ID:brianmontecillo,项目名称:wordpress,代码行数:31,代码来源:loop-forums.php

示例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
//.........这里部分代码省略.........
开发者ID:hscale,项目名称:webento,代码行数:101,代码来源:theme-compat.php

示例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();
开发者ID:ReLiFeD,项目名称:irreversible.eu,代码行数:31,代码来源:single-topic-merge.php

示例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 
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:31,代码来源:page-user-register.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 
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:31,代码来源:single-forum.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 -->
开发者ID:philtrimble,项目名称:GCFB-Portal-Theme---Main,代码行数:30,代码来源:single-forum-edit.php

示例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 
        }
    }
开发者ID:agiper,项目名称:wordpress,代码行数:19,代码来源:class-avada-layout-bbpress.php

示例15: _e

_e('Freshness', 'bbpress');
?>
</th>
			</tr>
		</thead>

		<tfoot>
			<tr><td colspan="4">&nbsp;</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');
开发者ID:besimhu,项目名称:legacy,代码行数:31,代码来源:loop-forums.php


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