Skip to:
Content

BuddyPress.org

Ticket #6503: 6503.fix-bp-nav.patch

File 6503.fix-bp-nav.patch, 634 bytes (added by dcavins, 11 years ago)

Fix error introduced in r10003 that prevents access-protected nav items from being added to the bp_nav array. The access protection should happen at access time in bp_core_register_nav_screen_function().

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

    diff --git src/bp-core/bp-core-buddybar.php src/bp-core/bp-core-buddybar.php
    index aba16c5..907b6ec 100644
    function bp_core_create_nav_link( $args = '' ) { 
    121121                return false;
    122122        }
    123123
    124         /**
    125          * If this nav item is hidden for the displayed user, and
    126          * the logged in user is not the displayed user
    127          * looking at their own profile, don't create the nav item.
    128          */
    129         if ( empty( $r['show_for_displayed_user'] ) && ! bp_user_has_access() ) {
    130                 return false;
    131         }
    132 
    133124        if ( empty( $r['item_css_id'] ) ) {
    134125                $r['item_css_id'] = $r['slug'];
    135126        }