Skip to:
Content

BuddyPress.org

Ticket #7690: 0001-added-home-tab.patch

File 0001-added-home-tab.patch, 1.2 KB (added by vapvarun, 3 years ago)

patch for front tab link

  • src/bp-core/bp-core-functions.php

    From a72e1e340823325d72755de55ceffcd9937c909e Mon Sep 17 00:00:00 2001
    From: Varun Dubey <vapvarun@gmail.com>
    Date: Tue, 27 Feb 2018 15:44:07 +0530
    Subject: [PATCH] added home tab
    
    ---
     src/bp-core/bp-core-functions.php | 12 ++++++++++++
     1 file changed, 12 insertions(+)
    
    diff --git a/src/bp-core/bp-core-functions.php b/src/bp-core/bp-core-functions.php
    index ddef982dd..651efcb2b 100644
    a b function bp_nav_menu_get_loggedin_pages() { 
    25532553        // Pull up a list of items registered in BP's primary nav for the member.
    25542554        $bp_menu_items = buddypress()->members->nav->get_primary();
    25552555
     2556        $bp_pages    = bp_core_get_directory_pages();
     2557        $member_slug = $bp_pages->members->slug;
     2558        $name        = bp_get_loggedin_user_username();
     2559
     2560        $_bp_menu_items[] = array(
     2561                'name' => __( 'Home', 'buddypress' ),
     2562                'slug' => 'home',
     2563                'link' => site_url() . "/$member_slug/$name/front/",
     2564        );
     2565
     2566        $bp_menu_items = array_merge( $_bp_menu_items, $bp_menu_items );
     2567
    25562568        // Some BP nav menu items will not be represented in bp_nav, because
    25572569        // they are not real BP components. We add them manually here.
    25582570        $bp_menu_items[] = array(