Guest User

Untitled

a guest
Feb 9th, 2016
257
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function my_shop_nav() {
  2. global $bp;
  3.  
  4. //add menu item
  5. $nav_item = array(
  6. 'name' => __( 'My Shop','buddypress' ),
  7. 'slug' => 'my-shop',
  8. 'default_subnav_slug' => 'my-shop',
  9. 'screen_function' => 'show_my_shop',
  10. 'position' => 40,
  11. 'item_css_id' => 'my-shop',
  12. );
  13.  
  14. bp_core_new_nav_item($nav_item);
  15.  
  16. } //end my_shop_nav
  17.  
  18. add_action( 'bp_setup_nav', 'my_shop_nav', 1000 );
  19.  
  20.  
  21.  
  22. //add content
  23. function show_my_shop() {
  24. add_action( 'bp_template_title', 'my_shop_title' );
  25. add_action( 'bp_template_content', 'my_shop_content' );
  26. bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
  27. }
  28.  
  29. function my_shop_title() {
  30. echo 'My Shop';
  31. }
  32.  
  33. function my_shop_content() {
  34. echo 'My Shop';
  35. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×