Changeset 10972
- Timestamp:
- 07/30/2016 12:32:04 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-functions.php
r10956 r10972 634 634 'activity' => _x( 'Activity', 'Page title for the Activity directory.', 'buddypress' ), 635 635 'groups' => _x( 'Groups', 'Page title for the Groups directory.', 'buddypress' ), 636 ' sites' => _x( 'Sites', 'Page title for the Sites directory.', 'buddypress' ),636 'blogs' => _x( 'Sites', 'Page title for the Sites directory.', 'buddypress' ), 637 637 'members' => _x( 'Members', 'Page title for the Members directory.', 'buddypress' ), 638 638 'activate' => _x( 'Activate', 'Page title for the user activation screen.', 'buddypress' ), … … 658 658 659 659 // No need for a Sites directory unless we're on multisite. 660 if ( ! is_multisite() && isset( $pages_to_create[' sites'] ) ) {661 unset( $pages_to_create[' sites'] );660 if ( ! is_multisite() && isset( $pages_to_create['blogs'] ) ) { 661 unset( $pages_to_create['blogs'] ); 662 662 } 663 663 -
trunk/tests/phpunit/testcases/admin/functions.php
r10941 r10972 209 209 $missing_pages = array(); 210 210 foreach( buddypress()->admin->notices as $notice ) { 211 if ( false !== strpos( $notice['message'], 'BuddyPress is almost ready' ) ) { 212 continue; 213 } 214 211 215 preg_match_all( '/<strong>(.+?)<\/strong>/', $notice['message'], $missing_pages ); 212 216 } 213 217 214 $this->assertNotContains( 'Register', $missing_pages[1] ); 215 $this->assertNotContains( 'Activate', $missing_pages[1] ); 218 $this->assertEmpty( $missing_pages ); 216 219 217 220 // Reset buddypress() vars -
trunk/tests/phpunit/testcases/core/functions.php
r10470 r10972 722 722 $this->assertContains( $link_color, $result ); 723 723 } 724 725 /** 726 * @group bp_core_add_page_mappings 727 */ 728 public function test_bp_core_add_page_mappings() { 729 $bp = buddypress(); 730 $reset_bp_pages = $bp->pages; 731 732 $expected = array( 'activity', 'groups', 'members' ); 733 if ( is_multisite() ) { 734 $expected = array( 'activity', 'blogs', 'groups', 'members' ); 735 } 736 737 bp_core_add_page_mappings( $bp->active_components ); 738 $bp_pages = array_keys( bp_get_option( 'bp-pages' ) ); 739 sort( $bp_pages ); 740 741 $this->assertEquals( $expected, $bp_pages ); 742 743 $bp->pages = $reset_bp_pages; 744 } 724 745 }
Note: See TracChangeset
for help on using the changeset viewer.