bp_nouveau_get_single_item_nav_classes ()
返回单项导航容器类
描述
返回
(字符串)CSS类
源
文件:bp-templates / bp-nouveau /包括/ template-tags.php
函数bp_nouveau_get_single_item_nav_classes() {$classes = array('main-navs', 'no-ajax', 'bp-navs', 'single-screen-navs');$ = bp_current_component组件();$ bp_nouveau = bp_nouveau ();If (bp_is_user()) {$component = '成员';美元menu_type =“users-nav”;} else {$menu_type = 'groups-nav';} $customizer_option = (bp_is_user())?“user_nav_display”:“group_nav_display”;$layout_prefs = (int) bp_nouveau_get_temporary_setting($customizer_option, bp_nouveau_get_appance_settings ($customizer_option));//设置全局变量以备以后使用-这是从' bp_nouveau_get_container_classes() //但被设置为检查这个数组类的添加。 $bp_nouveau->{$component}->single_primary_nav_layout = $layout_prefs; if ( 1 === $layout_prefs ) { $classes[] = 'vertical'; } else { $classes[] = 'horizontal'; } $classes[] = $menu_type; $class = array_map( 'sanitize_html_class', $classes ); /** * Filters the final results for BuddyPress Nouveau single item nav classes. * * This filter will return a single string of concatenated classes to be used. * * @since BuddyPress 3.0.0 * * @param string $value Concatenated classes. * @param array $classes Array of classes that were concatenated. */ return apply_filters( 'bp_nouveau_get_single_item_nav_classes', join( ' ', $class ), $classes ); }
更新日志
版本 | 描述 |
---|---|
BuddyPress 3.0.0 | 介绍了。 |