Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
There is a problem here somewhere
/* new menu item */
add_action( 'bp_setup_nav', 'add_ideas_nav_tab', 997 );
function add_ideas_nav_tab() {
global $bp;
bp_core_new_nav_item( array(
'name' => __( 'Ideas', 'bp-ideas' ),
'slug' => 'ideas',
'show_for_displayed_user' => true,
'position' => 49,
'default_subnav_slug' => 'ideas',
'screen_function' => 'ideas_screen',
) );
}
function ideas_screen() {
add_action( 'bp_template_content', 'ideas_screen_show' );
bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'buddypress/members/single/plugins' ) );
}
function ideas_screen_show() {
// call template
locate_template( array( 'buddypress/members/single/ideas.php' ), true );
}
add_action( 'bp_setup_nav', 'add_ideas_subnav_tab', 100 );
function add_ideas_subnav_tab() {
global $bp;
bp_core_new_subnav_item( array(
'name' => __( 'My ideas', 'bp-my-ideas' ),
'slug' => 'ideas',
'parent_url' => trailingslashit( bp_loggedin_user_domain() . 'ideas' ),
'parent_slug' => 'ideas',
'screen_function' => 'profile_screen_ideas',
'position' => 50
)
);
}
// show ideas when 'Ideas' tab is clicked
function profile_screen_ideas() {
add_action( 'bp_template_content', 'profile_screen_ideas_show' );
bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'buddypress/members/single/plugins' ) );
}
function profile_screen_ideas_show() {
// call template
locate_template( array( 'buddypress/members/single/ideas.php' ), true );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.