Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function my_bp_nav_adder()
- {
- bp_core_new_nav_item(
- array(
- 'name' => __('My Projects', 'kleo_framework'),
- 'slug' => 'my-projects',
- 'position' => 75,
- 'show_for_displayed_user' => false,
- 'screen_function' => 'my_projects_link',
- 'item_css_id' => 'my-projects'
- ));
- }
- function my_projects_link () {
- //add title and content here - last is to call the members plugin.php template
- add_action( 'bp_template_title', 'my_projects_page_function_to_show_screen_title' );
- add_action( 'bp_template_content', 'my_projects_page_function_to_show_screen_content' );
- bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
- }
- function my_projects_page_function_to_show_screen_title() {
- echo __('My Projects', 'kleo_framework');
- }
- function my_projects_page_function_to_show_screen_content() {
- echo do_shortcode('[collabpress]');
- }
- add_action( 'bp_setup_nav', 'my_bp_nav_adder' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement