BuddyPress::content_setup_nav()
Description #
BuddyPress nav hook.
Source #
File: addons/buddypress/buddypress.php
public function content_setup_nav() { global $bp; bp_core_new_nav_item( array( 'name' => __( 'Q&A', 'anspress-question-answer' ), 'slug' => 'qa', 'screen_function' => array( $this, 'ap_qa_page' ), 'position' => 30, // weight on menu, change it to whatever you want. 'default_subnav_slug' => 'questions', ) ); $subnav = array( array( 'name' => __( 'Questions', 'anspress-question-answer' ), 'slug' => 'questions', ), array( 'name' => __( 'Answers', 'anspress-question-answer' ), 'slug' => 'answers', ), ); $subnav = apply_filters( 'ap_bp_nav', $subnav ); foreach ( $subnav as $nav ) { $this->setup_subnav( $nav['name'], $nav['slug'] ); } }
Expand full source code Collapse full source code View on GitHub: addons/buddypress/buddypress.php:103
Add your comment