Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/10/2015 02:49:16 AM (11 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-core/bp-core-catchuri.php

    r9467 r9471  
    3434 */
    3535function bp_core_set_uri_globals() {
    36     global $bp, $current_blog, $wp_rewrite;
     36    global $current_blog, $wp_rewrite;
    3737
    3838    // Don't catch URIs on non-root blogs unless multiblog mode is on
    3939    if ( !bp_is_root_blog() && !bp_is_multiblog_mode() )
    4040        return false;
     41
     42    $bp = buddypress();
    4143
    4244    // Define local variables
     
    419421 */
    420422function bp_core_catch_no_access() {
    421     global $bp, $wp_query;
     423    global $wp_query;
     424
     425    $bp = buddypress();
    422426
    423427    // If coming from bp_core_redirect() and $bp_no_status_set is true,
     
    550554 */
    551555function bp_redirect_canonical() {
    552     global $bp;
    553556
    554557    if ( !bp_is_blog_page() && apply_filters( 'bp_do_redirect_canonical', true ) ) {
     
    574577        if ( $canonical_url !== $req_url_clean ) {
    575578
     579            $bp = buddypress();
     580
    576581            // Template messages have been deleted from the cookie by this point, so
    577582            // they must be readded before redirecting
     
    619624 */
    620625function bp_get_canonical_url( $args = array() ) {
    621     global $bp;
    622626
    623627    // For non-BP content, return the requested url, and let WP do the work
     
    625629        return bp_get_requested_url();
    626630    }
     631
     632    $bp = buddypress();
    627633
    628634    $defaults = array(
     
    701707 */
    702708function bp_get_requested_url() {
    703     global $bp;
     709    $bp = buddypress();
    704710
    705711    if ( empty( $bp->canonical_stack['requested_url'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.