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


PHP bp_get_forums_slug函数代码示例

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


在下文中一共展示了bp_get_forums_slug函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: bp_forums_slug

/**
 * Output the forums component slug.
 *
 * @since BuddyPress (1.5.0)
 *
 * @uses bp_get_forums_slug()
 */
function bp_forums_slug()
{
    echo bp_get_forums_slug();
}
开发者ID:danielcoats,项目名称:schoolpress,代码行数:11,代码来源:bp-forums-template.php

示例2: trailingslashit

				<div class="item-list-tabs" role="navigation">
					<ul>
						<li class="selected" id="forums-all"><a href="<?php 
echo trailingslashit(bp_get_root_domain() . '/' . bp_get_forums_root_slug());
?>
"><?php 
printf(__('All Topics <span>%s</span>', 'buddypress'), bp_get_forum_topic_count());
?>
</a></li>

						<?php 
if (is_user_logged_in() && bp_get_forum_topic_count_for_user(bp_loggedin_user_id())) {
    ?>

							<li id="forums-personal"><a href="<?php 
    echo trailingslashit(bp_loggedin_user_domain() . bp_get_forums_slug() . '/topics');
    ?>
"><?php 
    printf(__('My Topics <span>%s</span>', 'buddypress'), bp_get_forum_topic_count_for_user(bp_loggedin_user_id()));
    ?>
</a></li>

						<?php 
}
?>

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

					</ul>
开发者ID:shieldsdesignstudio,项目名称:forefield,代码行数:31,代码来源:bp-forums.php

示例3: setup_admin_bar

 /**
  * Set up bp-forums integration with the WordPress admin bar.
  *
  * @since 1.5.0
  *
  * @see BP_Component::setup_admin_bar() for a description of arguments.
  *
  * @param array $wp_admin_nav See BP_Component::setup_admin_bar()
  *                            for description.
  */
 public function setup_admin_bar($wp_admin_nav = array())
 {
     // Menus for logged in user.
     if (is_user_logged_in()) {
         // Setup the logged in user variables.
         $forums_link = trailingslashit(bp_loggedin_user_domain() . bp_get_forums_slug());
         // Add the "My Account" sub menus.
         $wp_admin_nav[] = array('parent' => buddypress()->my_account_menu_id, 'id' => 'my-account-' . $this->id, 'title' => __('Forums', 'buddypress'), 'href' => $forums_link);
         // Topics.
         $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-topics-started', 'title' => __('Topics Started', 'buddypress'), 'href' => $forums_link);
         // Replies.
         $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-replies', 'title' => __('Replies', 'buddypress'), 'href' => trailingslashit($forums_link . 'replies'));
         // Favorites.
         $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-favorite-topics', 'title' => __('Favorite Topics', 'buddypress'), 'href' => trailingslashit($forums_link . 'favorites'));
     }
     parent::setup_admin_bar($wp_admin_nav);
 }
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:27,代码来源:bp-forums-loader.php


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