• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP bbp_get_template_part函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了bbp_get_template_part函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: do_action

?>
  <script>console.log('loop-search.php');</script>
<?php 
do_action('bbp_template_before_search_results_loop');
?>

<ul id="bbp-search-results" class="forums bbp-search-results">



  <li class="bbp-body">

    <?php 
while (bbp_search_results()) {
    bbp_the_search_result();
    ?>

      <?php 
    bbp_get_template_part('loop', 'search-' . get_post_type());
    ?>

    <?php 
}
?>

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

</ul><!-- #bbp-search-results -->

<?php 
do_action('bbp_template_after_search_results_loop');
开发者ID:hakkens,项目名称:davehakkens,代码行数:31,代码来源:loop-search.php


示例17: _e

_e('Last Post', 'cubell');
?>
</li>
		</ul>

	</li>

	<li class="bbp-body">

		<?php 
while (bbp_topics()) {
    bbp_the_topic();
    ?>

			<?php 
    bbp_get_template_part('loop', 'single-topic');
    ?>

		<?php 
}
?>

	</li>

</ul><!-- #bbp-forum-<?php 
bbp_forum_id();
?>
 -->

<?php 
do_action('bbp_template_after_topics_loop');
开发者ID:luskyj89,项目名称:mt-wordpress,代码行数:31,代码来源:loop-topics.php


示例18: do_action

<?php

/**
 * Single User Part
 *
 * @package bbPress
 * @subpackage Theme
 */
?>

	<?php 
do_action('bbp_template_notices');
// Profile details
bbp_get_template_part('bbpress/user', 'details');
// Subscriptions
bbp_get_template_part('bbpress/user', 'subscriptions');
// Favorite topics
bbp_get_template_part('bbpress/user', 'favorites');
// Topics created
bbp_get_template_part('bbpress/user', 'topics-created');
开发者ID:besimhu,项目名称:legacy,代码行数:20,代码来源:content-single-user.php


示例19: while

			<div id="content" role="main">

				<?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');
    ?>

						</div>
					</div><!-- #bbp-edit-page -->

				<?php 
}
?>

			</div><!-- #content -->
		</div><!-- #container -->

<?php 
get_sidebar();
get_footer();
开发者ID:hscale,项目名称:webento,代码行数:31,代码来源:single-topic-edit.php


示例20: do_action

        ?>
</p>
						</div>

					<?php 
    }
    ?>

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

					<div>

						<?php 
    bbp_get_template_part('bbpress/form', 'anonymous');
    ?>

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

						<p>
							<label for="bbp_topic_title"><?php 
    printf(__('Topic Title (Maximum Length: %d):', 'bbpress'), bbp_get_title_max_length());
    ?>
</label><br />
							<input type="text" id="bbp_topic_title" value="<?php 
    bbp_form_topic_title();
    ?>
" tabindex="<?php 
开发者ID:besimhu,项目名称:legacy,代码行数:31,代码来源:form-topic.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP bbp_get_time_since函数代码示例发布时间:2022-05-24
下一篇:
PHP bbp_get_spam_status_id函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap