Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/16/2017 03:55:22 PM (9 years ago)
Author:
johnjamesjacoby
Message:

Core: Use magic variable vs. method in bp_core_add_root_component().

The add_root() magic method will always return null, but the add_root variable will return the proper results from the main BuddyPress object's data array.

bp_core_add_root_component() has been deprecated for some time now, but this change will prevent subsequent calls to it from overwriting the previous value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-functions.php

    r11513 r11514  
    856856    // If there was no match, add a page for this root component.
    857857    if ( empty( $match ) ) {
    858         $add_root_items   = $bp->add_root();
     858        $add_root_items   = $bp->add_root;
    859859        $add_root_items[] = $slug;
    860860        $bp->add_root     = $add_root_items;
Note: See TracChangeset for help on using the changeset viewer.