Advertisement
Guest User

Projects tab

a guest
Aug 19th, 2013
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. function my_bp_nav_adder()
  2. {
  3. bp_core_new_nav_item(
  4. array(
  5. 'name' => __('My Projects', 'kleo_framework'),
  6. 'slug' => 'my-projects',
  7. 'position' => 75,
  8. 'show_for_displayed_user' => false,
  9. 'screen_function' => 'my_projects_link',
  10. 'item_css_id' => 'my-projects'
  11. ));
  12. }
  13. function my_projects_link () {
  14. //add title and content here - last is to call the members plugin.php template
  15. add_action( 'bp_template_title', 'my_projects_page_function_to_show_screen_title' );
  16. add_action( 'bp_template_content', 'my_projects_page_function_to_show_screen_content' );
  17. bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
  18. }
  19.  
  20. function my_projects_page_function_to_show_screen_title() {
  21. echo __('My Projects', 'kleo_framework');
  22. }
  23. function my_projects_page_function_to_show_screen_content() {
  24. echo do_shortcode('[collabpress]');
  25.  
  26. }
  27. add_action( 'bp_setup_nav', 'my_bp_nav_adder' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement