本文整理汇总了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;
}
示例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>
示例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' ) ?>
示例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
}
示例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);
}
示例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
//.........这里部分代码省略.........