Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/11/2012 03:21:00 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Replace direct references to $bp user fullname and user_login with their functional equivalents, and kill off some $bp global usage in the process. See #3994, #3989.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-filters.php

    r5683 r5705  
    11<?php
     2
    23// Exit if accessed directly
    34if ( !defined( 'ABSPATH' ) ) exit;
     
    5556 */
    5657function bp_core_allow_default_theme( $themes ) {
    57     global $bp, $wpdb;
     58    global $wpdb;
    5859
    5960    if ( !bp_current_user_can( 'bp_moderate' ) )
     
    141142 */
    142143function bp_core_filter_user_welcome_email( $welcome_email ) {
    143     /* Don't touch the email if we don't have a custom registration template */
     144
     145    // Don't touch the email if we don't have a custom registration template
    144146    if ( '' == locate_template( array( 'registration/register.php' ), false ) && '' == locate_template( array( 'register.php' ), false ) )
    145147        return $welcome_email;
     
    165167 */
    166168function bp_core_filter_blog_welcome_email( $welcome_email, $blog_id, $user_id, $password ) {
    167     /* Don't touch the email if we don't have a custom registration template */
     169
     170    // Don't touch the email if we don't have a custom registration template
    168171    if ( '' == locate_template( array( 'registration/register.php' ), false ) && '' == locate_template( array( 'register.php' ), false ) )
    169172        return $welcome_email;
     
    265268
    266269    // Displayed user
    267     if ( !empty( $bp->displayed_user->fullname ) && !is_404() ) {
     270    if ( bp_get_displayed_user_fullname() && !is_404() ) {
    268271
    269272        // Get the component's ID to try and get it's name
Note: See TracChangeset for help on using the changeset viewer.