Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/24/2014 11:48:48 PM (11 years ago)
Author:
johnjamesjacoby
Message:

Replace BP_PLUGIN_DIR and BP_PLUGIN_URL constant usages with plugin_dir and plugin_url BuddyPress variables, respectively. Also replaces $bp global touches with buddypress() calls within the above scopes.

File:
1 edited

Legend:

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

    r7585 r7756  
    1313function bp_core_set_avatar_constants() {
    1414
     15    $bp = buddypress();
     16
    1517    if ( !defined( 'BP_AVATAR_THUMB_WIDTH' ) )
    1618        define( 'BP_AVATAR_THUMB_WIDTH', 50 );
     
    2931
    3032    if ( !defined( 'BP_AVATAR_ORIGINAL_MAX_FILESIZE' ) ) {
    31 
    32         $bp = buddypress();
    3333
    3434        if ( !isset( $bp->site_options['fileupload_maxk'] ) ) {
     
    4040
    4141    if ( !defined( 'BP_AVATAR_DEFAULT' ) )
    42         define( 'BP_AVATAR_DEFAULT', BP_PLUGIN_URL . 'bp-core/images/mystery-man.jpg' );
     42        define( 'BP_AVATAR_DEFAULT', $bp->plugin_url . 'bp-core/images/mystery-man.jpg' );
    4343
    4444    if ( !defined( 'BP_AVATAR_DEFAULT_THUMB' ) )
    45         define( 'BP_AVATAR_DEFAULT_THUMB', BP_PLUGIN_URL . 'bp-core/images/mystery-man-50.jpg' );
     45        define( 'BP_AVATAR_DEFAULT_THUMB', $bp->plugin_url . 'bp-core/images/mystery-man-50.jpg' );
    4646
    4747    if ( ! defined( 'BP_SHOW_AVATARS' ) ) {
     
    472472    // No avatar was found, and we've been told not to use a gravatar.
    473473    } else {
    474         $gravatar = apply_filters( "bp_core_default_avatar_$object", BP_PLUGIN_URL . 'bp-core/images/mystery-man.jpg', $params );
     474        $gravatar = apply_filters( "bp_core_default_avatar_$object", $bp->plugin_url . 'bp-core/images/mystery-man.jpg', $params );
    475475    }
    476476
Note: See TracChangeset for help on using the changeset viewer.