Changeset 8323
- Timestamp:
- 04/26/2014 05:13:30 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-functions.php
r8185 r8323 562 562 // If there was no match, add a page for this root component 563 563 if ( empty( $match ) ) { 564 $bp->add_root[] = $slug; 564 $add_root_items = $bp->add_root(); 565 $add_root_items[] = $slug; 566 $bp->add_root = $add_root_items; 565 567 } 566 568 -
trunk/tests/testcases/core/functions.php
r7819 r8323 331 331 } 332 332 } 333 334 /** 335 * @group bp_core_add_root_component 336 */ 337 public function test_add_root_component_not_in_bp_pages() { 338 buddypress()->foo = new stdClass; 339 buddypress()->foo->id = 'foo'; 340 buddypress()->foo->slug = 'foo'; 341 342 bp_core_add_root_component( 'foo' ); 343 344 $this->assertTrue( in_array( 'foo', buddypress()->add_root ) ); 345 $this->assertTrue( buddypress()->foo->has_directory ); 346 $this->assertNotEmpty( buddypress()->loaded_components['foo'] ); 347 } 333 348 }
Note: See TracChangeset
for help on using the changeset viewer.