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

PHP bp_get_options_nav函数代码示例

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

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



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

示例1: infinity_bp_nav_inject_options_filter

/**
 * Inject options nav onto end of active displayed user nav component
 *
 * @param string $html
 * @param array $user_nav_item
 * @return string
 */
function infinity_bp_nav_inject_options_filter($html, $user_nav_item)
{
    // slug of nav item being filtered
    $component = $user_nav_item['slug'];
    // show options nav?
    $show = bp_is_current_component($component);
    // special hack to handle profile in BP versions < 1.7
    if ('profile' == $component && -1 == version_compare(BP_VERSION, '1.7') && false == bp_is_my_profile()) {
        // force hide it
        $show = false;
    }
    // filter the show var because i love developers
    $show = (bool) apply_filters('infinity_bp_nav_inject_options_show', $show, $user_nav_item);
    // ok, finally... should we show it?
    if (true === $show) {
        // yes, need to capture options nav output
        ob_start();
        // run options nav template tag
        bp_get_options_nav();
        // grab buffer and wipe it
        $nav = trim((string) ob_get_clean());
        // make sure the result has some meat
        if ('' != $nav) {
            // yep, inject options nav onto end of list item wrapped in special <ul>
            return preg_replace('/(<\\/li>.*)$/', '<ul class="profile-subnav">' . $nav . '</ul>$1', $html, 1);
        }
    }
    // no changes
    return $html;
}
开发者ID:shads196770,项目名称:cbox-theme,代码行数:37,代码来源:menus.php


示例2: bp_get_options_nav

<?php

/**
 * BuddyPress - Single Member Forums
 *
 * @package BuddyPress
 * @subpackage Theme
 */
?>

<div class="item-list-tabs bp-sub-tabs no-ajax" id="subnav" role="navigation">
	<ul>
		<?php 
bp_get_options_nav();
?>

		<li id="forums-order-select" class="last filter">

			<label for="forums-order-by"><?php 
_e('Order By:', 'buddypress');
?>
</label>
			<select id="forums-order-by">
				<option value="active"><?php 
_e('Last Active', 'buddypress');
?>
</option>
				<option value="popular"><?php 
_e('Most Posts', 'buddypress');
?>
</option>
开发者ID:schiz,项目名称:scrollax,代码行数:31,代码来源:forums.php


示例3: if

<?php if ( bp_is_my_profile() ) : ?>
	<div class="item-list-tabs no-ajax" id="subnav">
		<ul>
			<?php bp_get_options_nav() ?>
		</ul>
	</div><!-- .item-list-tabs -->
<?php endif; ?>

<?php do_action( 'bp_before_profile_content' ) ?>

<div class="profile">
	<?php if ( 'edit' == bp_current_action() ) : ?>
		<?php locate_template( array( 'members/single/profile/edit.php' ), true ) ?>

	<?php elseif ( 'change-avatar' == bp_current_action() ) : ?>
		<?php locate_template( array( 'members/single/profile/change-avatar.php' ), true ) ?>

	<?php else : ?>
		<?php locate_template( array( 'members/single/profile/profile-loop.php' ), true ) ?>

	<?php endif; ?>
</div><!-- .profile -->

<?php do_action( 'bp_after_profile_content' ) ?>
开发者ID:n-sane,项目名称:zaroka,代码行数:24,代码来源:profile.php


示例4: widget_community_nav


//.........这里部分代码省略.........
            echo site_url();
            ?>
/<?php 
            echo BP_FORUMS_SLUG;
            ?>
/" title="<?php 
            _e('Forums', 'cc');
            ?>
"><?php 
            _e('Forums', 'cc');
            ?>
</a>
                                                </li>
                                        <?php 
        }
        ?>
					<?php 
    }
    ?>
					<?php 
    if (bp_is_active('blogs') && is_multisite()) {
        ?>
                                                        <li<?php 
        if (bp_is_blogs_component()) {
            ?>
 class="selected"<?php 
        }
        ?>
>
							<a href="<?php 
        echo site_url();
        ?>
/<?php 
        echo BP_BLOGS_SLUG;
        ?>
/" title="<?php 
        _e('Blogs', 'cc');
        ?>
"><?php 
        _e('Blogs', 'cc');
        ?>
</a>
						</li>
					<?php 
    }
    ?>
  				</ul>
				
   <?php 
    if (bp_is_single_item() || bp_is_user()) {
        ?>
	   	<?php 
        if (bp_is_group()) {
            ?>
		<div id="community-single-nav" class="widget-title" >
		  <ul class="item-list">
		  <h3 class="widgettitle"><?php 
            _e('@ Group', 'cc');
            ?>
</h3>
				<?php 
            bp_get_options_nav();
            ?>
				<?php 
            do_action('bp_group_options_nav');
            ?>
			</ul>
		
		</div>	
		<?php 
        }
        ?>

		<?php 
        if (bp_is_user()) {
            ?>
		<div id="community-single-nav" class="widget-title" >
		  <ul class="item-list">
		  <h3 class="widgettitle"><?php 
            _e('@ Member', 'cc');
            ?>
</h3>
		  <?php 
            bp_get_displayed_user_nav();
            ?>
				<?php 
            do_action('bp_group_options_nav');
            ?>
			</ul>
		
		</div>	
		<?php 
        }
        ?>
  	<?php 
    }
    ?>
  	</div>
<?php 
}
开发者ID:paulmedwal,项目名称:edxforumspublic,代码行数:101,代码来源:widgets.php


示例5: bp_group_admin_tabs

/**
 * HTML admin subnav items for group pages.
 *
 * @since 1.0.0
 *
 * @param object|bool $group Optional. Group object.
 *                           Default: current group in the loop.
 */
function bp_group_admin_tabs($group = false)
{
    global $groups_template;
    if (empty($group)) {
        $group = $groups_template->group ? $groups_template->group : groups_get_current_group();
    }
    $css_id = 'manage-members';
    if ('private' == $group->status) {
        $css_id = 'membership-requests';
    }
    add_filter("bp_get_options_nav_{$css_id}", 'bp_group_admin_tabs_backcompat', 10, 3);
    bp_get_options_nav($group->slug . '_manage');
    remove_filter("bp_get_options_nav_{$css_id}", 'bp_group_admin_tabs_backcompat', 10, 3);
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:22,代码来源:bp-groups-template.php


示例6: before_group_home_content

    /**
     * groups home: add the sidebars and their default widgets to the groups header
     *
     * located: grous/home.php do_action( 'bp_before_group_home_content' )
     *
     * @package Custom Community
     * @since 1.8.3
     */
    function before_group_home_content()
    {
        global $cap;
        if ($cap->bp_groups_header == false || $cap->bp_groups_header == 'on' || $cap->bp_groups_header == __('on', 'cc')) {
            ?>
			<div id="item-header">
                <div class="row-fluid">
                    <?php 
            if (!dynamic_sidebar('groupheader')) {
                ?>
                     <?php 
                locate_template(array('groups/single/group-header.php'), true);
                ?>
                    <?php 
            }
            ?>

                    <?php 
            if (is_active_sidebar('groupheaderleft')) {
                ?>
                        <div class="widgetarea cc-widget span4">
                        <?php 
                dynamic_sidebar('groupheaderleft');
                ?>
                        </div>
                    <?php 
            }
            ?>
                    <?php 
            if (is_active_sidebar('groupheadercenter')) {
                ?>
                        <div class="<?php 
                if (!is_active_sidebar('groupheaderleft')) {
                    echo 'group-header-left';
                }
                ?>
 widgetarea cc-widget span4">
                        <?php 
                dynamic_sidebar('groupheadercenter');
                ?>
                        </div>
                    <?php 
            }
            ?>
                    <?php 
            if (is_active_sidebar('groupheaderright')) {
                ?>
                        <div class="widgetarea cc-widget cc-widget-right span4">
                        <?php 
                dynamic_sidebar('groupheaderright');
                ?>
                        </div>
                    <?php 
            }
            ?>
                </div>
			</div>
		<?php 
        } else {
            ?>
			<div id="item-header">
				<h2><a href="<?php 
            bp_group_permalink();
            ?>
" title="<?php 
            bp_group_name();
            ?>
"><?php 
            bp_group_name();
            ?>
</a></h2>
			</div>
		<?php 
        }
        ?>
		<?php 
        if ($cap->bp_default_navigation == true) {
            ?>
			<div id="item-nav">
				<div class="item-list-tabs no-ajax" id="object-nav">
					<ul>
						<?php 
            bp_get_options_nav();
            ?>

						<?php 
            do_action('bp_group_options_nav');
            ?>
					</ul>
				</div>
			</div><!-- #item-nav -->
		<?php 
//.........这里部分代码省略.........
开发者ID:paulmedwal,项目名称:edxforumspublic,代码行数:101,代码来源:theme-generator.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP bp_get_profile_field_data函数代码示例发布时间:2022-05-24
下一篇:
PHP bp_get_option函数代码示例发布时间: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