1. <?php
  2.  
  3. define( 'MENTIONS_BP_COMPONENT_SLUG', 'mentions' );
  4.  
  5. class MENTIONS_BuddyPress {
  6.  
  7. function MENTIONS_BuddyPress() {
  8. global $bp;
  9.  
  10. add_action( 'bp_setup_nav', array( &$this, 'bp_setup_nav'), 100 );
  11. }
  12.  
  13. function bp_setup_nav() {
  14. bp_core_new_nav_item( array(
  15. 'name' => __( 'Mentions', YOUR_TEXTDOMAIN ),
  16. 'slug' => MENTIONS_BP_COMPONENT_SLUG,
  17. 'screen_function' => array( &$this, 'tab_template' ),
  18. ) );
  19. }
  20.  
  21.  
  22. function tab_template() {
  23. add_action( 'bp_template_content', array( &$this, 'tab_content' ) );
  24. bp_core_load_template( 'members/single/plugins' );
  25. }
  26.  
  27. function tab_content() {
  28. ?>
  29. <!--Content goes here-->
  30. <?php
  31. }
  32. }
  33.  
  34.  
  35. $GLOBALS['_mentions_buddypress'] = new MENTIONS_BuddyPress;