Guest User

Untitled

a guest
Jan 20th, 2015
27
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /**
  4.  * Add a Custom "My Profile" link to the Main Menu
  5.  *
  6.  */
  7. function cbox_custom_profile_menu_item ( $items, $args ) {
  8.     if ($args->theme_location == 'main-menu') {
  9.         $profilelink = '<li class="my-home-menu"><a href="' . bp_loggedin_user_domain( '/' ) . '">' . __('My Home') . '</a></li>';
  10.         $items .= '';
  11.         $items = $items . $profilelink;
  12.     }
  13.     return $items;
  14. }
  15. add_filter( 'wp_nav_menu_items', 'cbox_custom_profile_menu_item', 10, 2 );
RAW Paste Data