Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/10/2015 02:49:16 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Replace all remaining $bp global touches with buddypress().

All existing tests continue to pass as normal. I will further manually scrutinize each replacement to ensure correctness.

Fixes #5138. Any stragglers or updates will reference this ticket.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-template.php

    r9455 r9471  
    12981298 */
    12991299function bp_get_loggedin_user_nav() {
    1300         global $bp;
     1300        $bp = buddypress();
    13011301
    13021302        // Loop through each navigation item
    … …  
    13401340 */
    13411341function bp_get_displayed_user_nav() {
    1342         global $bp;
     1342        $bp = buddypress();
    13431343
    13441344        foreach ( (array) $bp->bp_nav as $user_nav_item ) {
    … …  
    14841484         */
    14851485        function bp_get_displayed_user_email() {
    1486                 global $bp;
     1486                $bp = buddypress();
    14871487
    14881488                // If displayed user exists, return email address
    … …  
    16461646 */
    16471647function bp_displayed_user_domain() {
    1648         global $bp;
     1648        $bp = buddypress();
    16491649
    16501650        /**
    … …  
    16641664 */
    16651665function bp_loggedin_user_domain() {
    1666         global $bp;
     1666        $bp = buddypress();
    16671667
    16681668        /**
    … …  
    16881688         */
    16891689        function bp_get_displayed_user_fullname() {
    1690                 global $bp;
     1690                $bp = buddypress();
    16911691
    16921692                /**
    … …  
    17181718         */
    17191719        function bp_get_loggedin_user_fullname() {
    1720                 global $bp;
     1720                $bp = buddypress();
    17211721
    17221722                /**
    … …  
    17421742         */
    17431743        function bp_get_displayed_user_username() {
    1744                 global $bp;
     1744                $bp = buddypress();
    17451745
    17461746                if ( bp_displayed_user_id() ) {
    … …  
    17721772         */
    17731773        function bp_get_loggedin_user_username() {
    1774                 global $bp;
     1774                $bp = buddypress();
    17751775
    17761776                if ( bp_loggedin_user_id() ) {
    … …  
    20962096         */
    20972097        function bp_get_signup_avatar_dir_value() {
    2098                 global $bp;
     2098                $bp = buddypress();
    20992099
    21002100                // Check if signup_avatar_dir is passed
    … …  
    21322132         */
    21332133        function bp_get_current_signup_step() {
    2134                 global $bp;
    2135 
    2136                 return $bp->signup->step;
     2134                return buddypress()->signup->step;
    21372135        }
    21382136
    … …  
    23032301         */
    23042302        function bp_get_members_component_link( $component, $action = '', $query_args = '', $nonce = false ) {
    2305                 global $bp;
    23062303
    23072304                // Must be displayed user
    23082305                if ( !bp_displayed_user_id() )
    23092306                        return;
     2307
     2308                $bp = buddypress();
    23102309
    23112310                // Append $action to $url if there is no $type
Note: See TracChangeset for help on using the changeset viewer.