Skip to:
Content

BuddyPress.org

Ticket #3578: 3578-automatic.patch

File 3578-automatic.patch, 1.1 KB (added by boonebgorges, 13 years ago)
  • bp-core/bp-core-component.php

    class BP_Component { 
    107107
    108108                $defaults = array(
    109109                        'slug'                  => $this->id,
    110                         'root_slug'             => '',
    111110                        'has_directory'         => false,
    112111                        'notification_callback' => '',
    113112                        'search_string'         => '',
    class BP_Component { 
    119118                $this->slug          = apply_filters( 'bp_' . $this->id . '_slug',          $r['slug']          );
    120119
    121120                // Slug used for root directory
    122                 $this->root_slug     = apply_filters( 'bp_' . $this->id . '_root_slug',     $r['root_slug']     );
     121                $root_slug           = isset( $bp->pages->{$this->id}->slug ) ? $bp->pages->{$this->id}->slug : '';
     122                $this->root_slug     = apply_filters( 'bp_' . $this->id . '_root_slug',     $root_slug    );
    123123
    124124                // Does this component have a top-level directory?
    125125                $this->has_directory = apply_filters( 'bp_' . $this->id . '_has_directory', $r['has_directory'] );