Skip to:
Content

BuddyPress.org

Ticket #6534: 6534.param-order-fix.patch

File 6534.param-order-fix.patch, 691 bytes (added by dcavins, 8 years ago)

Correct the parameter order in the 'groups' backcompat case of bp_core_remove_subnav_item().

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

    diff --git src/bp-core/bp-core-buddybar.php src/bp-core/bp-core-buddybar.php
    index f16557f..f1eb2e9 100644
    function bp_core_remove_subnav_item( $parent_slug, $slug, $component = null ) { 
    834834        // Backward compatibility for removing group nav items using the group slug as `$parent_slug`.
    835835        if ( ! $component && bp_is_active( 'groups' ) && isset( $bp->groups->nav ) ) {
    836836                if ( $bp->groups->nav->get_primary( array( 'slug' => $parent_slug ) ) ) {
    837                         return bp_core_remove_subnav_item( $slug, $parent_slug, 'groups' );
     837                        return bp_core_remove_subnav_item( $parent_slug, $slug, 'groups' );
    838838                }
    839839        }
    840840