Changeset 7751
- Timestamp:
- 01/21/2014 10:39:09 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-template.php
r7574 r7751 26 26 * @since BuddyPress (1.5) 27 27 * 28 * @global object $bp BuddyPress global settings.29 28 * @uses apply_filters() To call the 'bp_get_activity_slug' hook. 30 29 * … … 32 31 */ 33 32 function bp_get_activity_slug() { 34 global $bp; 35 return apply_filters( 'bp_get_activity_slug', $bp->activity->slug ); 33 return apply_filters( 'bp_get_activity_slug', buddypress()->activity->slug ); 36 34 } 37 35 … … 51 49 * @since BuddyPress (1.5) 52 50 * 53 * @global object $bp BuddyPress global settings.54 51 * @uses apply_filters() To call the 'bp_get_activity_root_slug' hook. 55 52 * … … 57 54 */ 58 55 function bp_get_activity_root_slug() { 59 global $bp; 60 return apply_filters( 'bp_get_activity_root_slug', $bp->activity->root_slug ); 56 return apply_filters( 'bp_get_activity_root_slug', buddypress()->activity->root_slug ); 61 57 } 62 58 -
trunk/bp-friends/bp-friends-template.php
r7560 r7751 27 27 */ 28 28 function bp_get_friends_slug() { 29 global $bp; 30 return apply_filters( 'bp_get_friends_slug', $bp->friends->slug ); 29 return apply_filters( 'bp_get_friends_slug', buddypress()->friends->slug ); 31 30 } 32 31 … … 47 46 */ 48 47 function bp_get_friends_root_slug() { 49 global $bp; 50 return apply_filters( 'bp_get_friends_root_slug', $bp->friends->root_slug ); 48 return apply_filters( 'bp_get_friends_root_slug', buddypress()->friends->root_slug ); 51 49 } 52 50 -
trunk/bp-groups/bp-groups-template.php
r7745 r7751 31 31 */ 32 32 function bp_get_groups_slug() { 33 global $bp; 34 return apply_filters( 'bp_get_groups_slug', $bp->groups->slug ); 33 return apply_filters( 'bp_get_groups_slug', buddypress()->groups->slug ); 35 34 } 36 35 … … 55 54 */ 56 55 function bp_get_groups_root_slug() { 57 global $bp; 58 return apply_filters( 'bp_get_groups_root_slug', $bp->groups->root_slug ); 56 return apply_filters( 'bp_get_groups_root_slug', buddypress()->groups->root_slug ); 59 57 } 60 58 -
trunk/bp-members/bp-members-template.php
r7513 r7751 33 33 */ 34 34 function bp_get_members_slug() { 35 global $bp; 36 return apply_filters( 'bp_get_members_slug', $bp->members->slug ); 35 return apply_filters( 'bp_get_members_slug', buddypress()->members->slug ); 37 36 } 38 37 … … 57 56 */ 58 57 function bp_get_members_root_slug() { 59 global $bp; 60 return apply_filters( 'bp_get_members_root_slug', $bp->members->root_slug ); 58 return apply_filters( 'bp_get_members_root_slug', buddypress()->members->root_slug ); 61 59 } 62 60 … … 110 108 $bp = buddypress(); 111 109 112 if ( !empty( $bp->pages->register->slug ) ) 110 if ( !empty( $bp->pages->register->slug ) ) { 113 111 $slug = $bp->pages->register->slug; 114 elseif ( defined( 'BP_REGISTER_SLUG' ) )112 } elseif ( defined( 'BP_REGISTER_SLUG' ) ) { 115 113 $slug = BP_REGISTER_SLUG; 116 else114 } else { 117 115 $slug = 'register'; 116 } 118 117 119 118 return apply_filters( 'bp_get_signup_slug', $slug ); … … 140 139 */ 141 140 function bp_get_activate_slug() { 142 global $bp;143 144 if ( !empty( $bp->pages->activate->slug ) ) 141 $bp = buddypress(); 142 143 if ( !empty( $bp->pages->activate->slug ) ) { 145 144 $slug = $bp->pages->activate->slug; 146 elseif ( defined( 'BP_ACTIVATION_SLUG' ) )145 } elseif ( defined( 'BP_ACTIVATION_SLUG' ) ) { 147 146 $slug = BP_ACTIVATION_SLUG; 148 else147 } else { 149 148 $slug = 'activate'; 149 } 150 150 151 151 return apply_filters( 'bp_get_activate_slug', $slug );
Note: See TracChangeset
for help on using the changeset viewer.