Skip to:
Content

Changeset 1270


Ignore:
Timestamp:
03/27/09 10:27:30 (5 years ago)
Author:
apeatling
Message:

Changing filters on constants to if ( !is_defined ) calls. This makes it easier to change values as you can just add new definitions to your wp-config.php file.

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity.php

    r1265 r1270  
    1616define ( 'BP_ACTIVITY_DB_VERSION', '1211' ); 
    1717 
    18 define ( 'BP_ACTIVITY_SLUG', apply_filters( 'bp_activity_slug', 'activity' ) ); 
     18/* Define the slug for the component */ 
     19if ( !defined( 'BP_ACTIVITY_SLUG' ) ) 
     20    define ( 'BP_ACTIVITY_SLUG', 'activity' ); 
    1921 
    2022/* How long before activity items in streams are re-cached? */ 
    21 define ( 'BP_ACTIVITY_CACHE_LENGTH', '6 HOURS' ); 
     23if ( !defined( 'BP_ACTIVITY_CACHE_LENGTH' ) ) 
     24    define ( 'BP_ACTIVITY_CACHE_LENGTH', '6 HOURS' ); 
    2225 
    2326require ( 'bp-activity/bp-activity-classes.php' ); 
  • trunk/bp-blogs.php

    r1250 r1270  
    1515define ( 'BP_BLOGS_DB_VERSION', '937' ); 
    1616 
    17 define ( 'BP_BLOGS_SLUG', apply_filters( 'bp_blogs_slug', 'blogs' ) ); 
    18  
    19 /* These will be moved into admin configurable settings */ 
    20 define ( 'TOTAL_RECORDED_POSTS', 150 ); 
    21 define ( 'TOTAL_RECORDED_COMMENTS', 500 ); 
     17/* Define the slug for the component */ 
     18if ( !defined( 'BP_BLOGS_SLUG' ) ) 
     19    define ( 'BP_BLOGS_SLUG', 'blogs' ); 
     20 
     21/* Define the total number of posts to keep track of for each user. */ 
     22if ( !defined( 'TOTAL_RECORDED_POSTS' ) ) 
     23    define ( 'TOTAL_RECORDED_POSTS', 150 ); 
     24 
     25/* Define the total number of comments to keep track of for each user. */    
     26if ( !defined( 'TOTAL_RECORDED_COMMENTS' ) )     
     27    define ( 'TOTAL_RECORDED_COMMENTS', 500 ); 
    2228 
    2329require ( 'bp-blogs/bp-blogs-classes.php' ); 
  • trunk/bp-core.php

    r1267 r1270  
    1010*/ 
    1111 
     12/* Place your custom code (actions/filters) in a file called bp-custom.php and it will be loaded before anything else. */ 
     13if ( file_exists( WPMU_PLUGIN_DIR . '/bp-custom.php' ) ) 
     14    require( WPMU_PLUGIN_DIR . '/bp-custom.php' ); 
     15 
    1216/* Define the current version number for checking if DB tables are up to date. */ 
    1317define( 'BP_CORE_VERSION', '1.0-RC1' ); 
    1418define( 'BP_CORE_DB_VERSION', '1030' ); 
    1519 
    16 /* Place your custom code (actions/filters) in a file called bp-custom.php and it will be loaded before anything else. */ 
    17 if ( file_exists( WPMU_PLUGIN_DIR . '/bp-custom.php' ) ) 
    18     require( WPMU_PLUGIN_DIR . '/bp-custom.php' ); 
    19  
    20 /* Define on which blog ID BuddyPress should run */  
    21 define( 'BP_ROOT_BLOG', apply_filters( 'bp_root_blog', 1 ) ); 
     20/* Define on which blog ID BuddyPress should run */ 
     21if ( !defined( 'BP_ROOT_BLOG' ) ) 
     22    define( 'BP_ROOT_BLOG', 1 ); 
     23 
     24/* Define the user and usermeta table names, useful if you are using custom or shared tables */ 
     25if ( !defined( 'CUSTOM_USER_TABLE' ) ) 
     26    define( 'CUSTOM_USER_TABLE', $wpdb->base_prefix . 'users' ); 
     27 
     28if ( !defined( 'CUSTOM_USER_META_TABLE' ) ) 
     29    define( 'CUSTOM_USER_META_TABLE', $wpdb->base_prefix . 'usermeta' ); 
    2230 
    2331/* Load the language file */ 
     
    3139require ( 'bp-core/bp-core-avatars.php' ); 
    3240require ( 'bp-core/bp-core-templatetags.php' ); 
    33 require ( 'bp-core/bp-core-adminbar.php' ); 
    3441require ( 'bp-core/bp-core-settings.php' ); 
    3542require ( 'bp-core/bp-core-widgets.php' ); 
     
    3744require ( 'bp-core/bp-core-notifications.php' ); 
    3845 
     46if ( !defined( 'BP_DISABLE_ADMIN_BAR') ) 
     47    require ( 'bp-core/bp-core-adminbar.php' ); 
     48 
    3949/* Define the slug for member pages and the members directory (e.g. domain.com/[members] ) */ 
    40 define( 'MEMBERS_SLUG', apply_filters( 'bp_members_slug', 'members' ) ); 
     50if ( !defined( 'MEMBERS_SLUG' ) ) 
     51    define( 'MEMBERS_SLUG', 'members' ); 
    4152 
    4253/* Define the slug for the register/signup page */ 
    43 define( 'REGISTER_SLUG', apply_filters( 'bp_register_slug', 'register' ) ); 
     54if ( !defined( 'REGISTER_SLUG' ) ) 
     55    define( 'REGISTER_SLUG', 'register' ); 
    4456 
    4557/* Define the slug for the activation page */ 
    46 define( 'ACTIVATION_SLUG', apply_filters( 'bp_activate_slug', 'activate' ) ); 
     58if ( !defined( 'ACTIVATION_SLUG' ) ) 
     59    define( 'ACTIVATION_SLUG', 'activate' ); 
    4760 
    4861/* Define the slug for the search page */ 
    49 define( 'SEARCH_SLUG', apply_filters( 'bp_search_slug', 'search' ) ); 
     62if ( !defined( 'SEARCH_SLUG' ) ) 
     63    define( 'SEARCH_SLUG', 'search' ); 
    5064 
    5165/* Define the slug for the search page */ 
    52 define( 'HOME_BLOG_SLUG', apply_filters( 'bp_home_blog_slug', 'blog' ) ); 
     66if ( !defined( 'HOME_BLOG_SLUG' ) ) 
     67    define( 'HOME_BLOG_SLUG', 'blog' ); 
    5368 
    5469 
     
    626641    global $wpdb; 
    627642     
    628     $sql = $wpdb->prepare( "SELECT ID FROM " . $wpdb->base_prefix . "users WHERE user_login = %s", $username ); 
     643    $sql = $wpdb->prepare( "SELECT ID FROM " . CUSTOM_USER_TABLE . " WHERE user_login = %s", $username ); 
    629644    return $wpdb->get_var($sql); 
    630645} 
     
    643658    global $wpdb; 
    644659 
    645     return $wpdb->get_var( $wpdb->prepare( "SELECT ID from {$wpdb->base_prefix}users WHERE user_login = %s", $user_login ) ); 
     660    return $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM " . CUSTOM_USER_TABLE . " WHERE user_login = %s", $user_login ) ); 
    646661} 
    647662 
     
    814829    global $wpdb; 
    815830     
    816     $user_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->base_prefix}users WHERE user_login = %s", $username ) );  
     831    $user_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM " . CUSTOM_USER_TABLE . " WHERE user_login = %s", $username ) );  
    817832    return bp_core_get_userlink( $user_id, false, false, true ); 
    818833} 
  • trunk/bp-core/bp-core-classes.php

    r1268 r1270  
    128128            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 
    129129             
    130         $total_users = $wpdb->get_var( $wpdb->prepare("SELECT DISTINCT count(ID) FROM {$wpdb->base_prefix}users WHERE spam = 0 AND deleted = 0 AND user_status = 0 ORDER BY user_registered DESC" ) ); 
    131         $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT ID as user_id, DATE_ADD( user_registered, INTERVAL " . get_option('gmt_offset') . " HOUR ) as user_registered FROM {$wpdb->base_prefix}users WHERE spam = 0 AND deleted = 0 AND user_status = 0 ORDER BY user_registered DESC{$pag_sql}" ) ); 
     130        $total_users = $wpdb->get_var( $wpdb->prepare("SELECT DISTINCT count(ID) FROM " . CUSTOM_USER_TABLE . " WHERE spam = 0 AND deleted = 0 AND user_status = 0 ORDER BY user_registered DESC" ) ); 
     131        $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT ID as user_id, DATE_ADD( user_registered, INTERVAL " . get_option('gmt_offset') . " HOUR ) as user_registered FROM " . CUSTOM_USER_TABLE . " WHERE spam = 0 AND deleted = 0 AND user_status = 0 ORDER BY user_registered DESC{$pag_sql}" ) ); 
    132132         
    133133        return array( 'users' => $paged_users, 'total' => $total_users ); 
     
    140140            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 
    141141         
    142         $total_users = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(um.user_id) FROM {$wpdb->base_prefix}usermeta um LEFT JOIN {$wpdb->base_prefix}users u ON u.ID = um.user_id WHERE um.meta_key = 'last_activity' AND u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 ORDER BY FROM_UNIXTIME(um.meta_value) DESC" ) ); 
    143         $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT user_id FROM {$wpdb->base_prefix}usermeta um LEFT JOIN {$wpdb->base_prefix}users u ON u.ID = um.user_id WHERE um.meta_key = 'last_activity' AND u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 ORDER BY FROM_UNIXTIME(um.meta_value) DESC{$pag_sql}" ) ); 
     142        $total_users = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(um.user_id) FROM " . CUSTOM_USER_META_TABLE . " um LEFT JOIN " . CUSTOM_USER_TABLE . " u ON u.ID = um.user_id WHERE um.meta_key = 'last_activity' AND u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 ORDER BY FROM_UNIXTIME(um.meta_value) DESC" ) ); 
     143        $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT user_id FROM " . CUSTOM_USER_META_TABLE . " um LEFT JOIN " . CUSTOM_USER_TABLE . " u ON u.ID = um.user_id WHERE um.meta_key = 'last_activity' AND u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 ORDER BY FROM_UNIXTIME(um.meta_value) DESC{$pag_sql}" ) ); 
    144144         
    145145        return array( 'users' => $paged_users, 'total' => $total_users ); 
     
    155155            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 
    156156 
    157         $total_users = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(um.user_id) FROM {$wpdb->base_prefix}usermeta um LEFT JOIN {$wpdb->base_prefix}users u ON u.ID = um.user_id WHERE um.meta_key = 'total_friend_count' AND u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 ORDER BY CONVERT(um.meta_value, SIGNED) DESC" ) ); 
    158         $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT um.user_id FROM {$wpdb->base_prefix}usermeta um LEFT JOIN {$wpdb->base_prefix}users u ON u.ID = um.user_id WHERE um.meta_key = 'total_friend_count' AND u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 ORDER BY CONVERT(um.meta_value, SIGNED) DESC{$pag_sql}" ) ); 
     157        $total_users = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(um.user_id) FROM " . CUSTOM_USER_META_TABLE . " um LEFT JOIN " . CUSTOM_USER_TABLE . " u ON u.ID = um.user_id WHERE um.meta_key = 'total_friend_count' AND u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 ORDER BY CONVERT(um.meta_value, SIGNED) DESC" ) ); 
     158        $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT um.user_id FROM " . CUSTOM_USER_META_TABLE . " um LEFT JOIN " . CUSTOM_USER_TABLE . " u ON u.ID = um.user_id WHERE um.meta_key = 'total_friend_count' AND u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 ORDER BY CONVERT(um.meta_value, SIGNED) DESC{$pag_sql}" ) ); 
    159159         
    160160        return array( 'users' => $paged_users, 'total' => $total_users ); 
     
    167167            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 
    168168 
    169         $total_users = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(um.user_id) FROM {$wpdb->base_prefix}usermeta um LEFT JOIN {$wpdb->base_prefix}users u ON u.ID = um.user_id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND u.ID != %d ORDER BY RAND() DESC", $bp->loggedin_user->id ) ); 
    170         $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT um.user_id FROM {$wpdb->base_prefix}usermeta um LEFT JOIN {$wpdb->base_prefix}users u ON u.ID = um.user_id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND u.ID != %d ORDER BY RAND(){$pag_sql}", $bp->loggedin_user->id ) ); 
     169        $total_users = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(um.user_id) FROM " . CUSTOM_USER_META_TABLE . " um LEFT JOIN " . CUSTOM_USER_TABLE . " u ON u.ID = um.user_id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND u.ID != %d ORDER BY RAND() DESC", $bp->loggedin_user->id ) ); 
     170        $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT um.user_id FROM " . CUSTOM_USER_META_TABLE . " um LEFT JOIN " . CUSTOM_USER_TABLE . " u ON u.ID = um.user_id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND u.ID != %d ORDER BY RAND(){$pag_sql}", $bp->loggedin_user->id ) ); 
    171171         
    172172        return array( 'users' => $paged_users, 'total' => $total_users ); 
     
    179179            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 
    180180 
    181         $total_users = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(um.user_id) FROM {$wpdb->base_prefix}usermeta um LEFT JOIN {$wpdb->base_prefix}users u ON u.ID = um.user_id WHERE um.meta_key = 'last_activity' AND u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND DATE_ADD( FROM_UNIXTIME(um.meta_value), INTERVAL 5 MINUTE ) >= NOW() ORDER BY FROM_UNIXTIME(um.meta_value) DESC" ) ); 
    182         $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT um.user_id FROM {$wpdb->base_prefix}usermeta um LEFT JOIN {$wpdb->base_prefix}users u ON u.ID = um.user_id WHERE um.meta_key = 'last_activity' AND u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND DATE_ADD( FROM_UNIXTIME(um.meta_value), INTERVAL 5 MINUTE ) >= NOW() ORDER BY FROM_UNIXTIME(um.meta_value) DESC{$pag_sql}" ) ); 
     181        $total_users = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(um.user_id) FROM " . CUSTOM_USER_META_TABLE . " um LEFT JOIN " . CUSTOM_USER_TABLE . " u ON u.ID = um.user_id WHERE um.meta_key = 'last_activity' AND u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND DATE_ADD( FROM_UNIXTIME(um.meta_value), INTERVAL 5 MINUTE ) >= NOW() ORDER BY FROM_UNIXTIME(um.meta_value) DESC" ) ); 
     182        $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT um.user_id FROM " . CUSTOM_USER_META_TABLE . " um LEFT JOIN " . CUSTOM_USER_TABLE . " u ON u.ID = um.user_id WHERE um.meta_key = 'last_activity' AND u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND DATE_ADD( FROM_UNIXTIME(um.meta_value), INTERVAL 5 MINUTE ) >= NOW() ORDER BY FROM_UNIXTIME(um.meta_value) DESC{$pag_sql}" ) ); 
    183183 
    184184        return array( 'users' => $paged_users, 'total' => $total_users ); 
     
    194194            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 
    195195 
    196         $total_users = count( $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT u.ID user_id FROM {$wpdb->base_prefix}users u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND pf.name = %s ORDER BY pd.value ASC", BP_XPROFILE_FULLNAME_FIELD_NAME ) ) ); 
    197         $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT u.ID as user_id FROM {$wpdb->base_prefix}users u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND pf.name = %s ORDER BY pd.value ASC{$pag_sql}", BP_XPROFILE_FULLNAME_FIELD_NAME ) ); 
     196        $total_users = count( $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT u.ID user_id FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND pf.name = %s ORDER BY pd.value ASC", BP_XPROFILE_FULLNAME_FIELD_NAME ) ) ); 
     197        $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT u.ID as user_id FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND pf.name = %s ORDER BY pd.value ASC{$pag_sql}", BP_XPROFILE_FULLNAME_FIELD_NAME ) ); 
    198198 
    199199        return array( 'users' => $paged_users, 'total' => $total_users ); 
     
    214214        like_escape($letter); 
    215215 
    216         $total_users = count( $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT u.ID user_id FROM {$wpdb->base_prefix}users u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND pf.name = %s AND pd.value LIKE '$letter%%' ORDER BY pd.value ASC", BP_XPROFILE_FULLNAME_FIELD_NAME ) ) ); 
    217         $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT u.ID as user_id FROM {$wpdb->base_prefix}users u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND pf.name = %s AND pd.value LIKE '$letter%%' ORDER BY pd.value ASC{$pag_sql}", BP_XPROFILE_FULLNAME_FIELD_NAME ) ); 
     216        $total_users = count( $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT u.ID user_id FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND pf.name = %s AND pd.value LIKE '$letter%%' ORDER BY pd.value ASC", BP_XPROFILE_FULLNAME_FIELD_NAME ) ) ); 
     217        $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT u.ID as user_id FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND pf.name = %s AND pd.value LIKE '$letter%%' ORDER BY pd.value ASC{$pag_sql}", BP_XPROFILE_FULLNAME_FIELD_NAME ) ); 
    218218         
    219219        return array( 'users' => $paged_users, 'total' => $total_users ); 
     
    231231        like_escape($search_terms);  
    232232 
    233         $total_users = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(u.ID) as user_id FROM {$wpdb->base_prefix}users u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE pd.value LIKE '$search_terms%%' ORDER BY pd.value ASC" ) ); 
    234         $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT u.ID as user_id FROM {$wpdb->base_prefix}users u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE pd.value LIKE '$search_terms%%' ORDER BY pd.value ASC{$pag_sql}" ) ); 
     233        $total_users = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(u.ID) as user_id FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE pd.value LIKE '$search_terms%%' ORDER BY pd.value ASC" ) ); 
     234        $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT u.ID as user_id FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE pd.value LIKE '$search_terms%%' ORDER BY pd.value ASC{$pag_sql}" ) ); 
    235235         
    236236        return array( 'users' => $paged_users, 'total' => $total_users ); 
  • trunk/bp-core/bp-core-cssjs.php

    r1209 r1270  
    5858 */ 
    5959function bp_core_admin_bar_css() { 
     60    if ( defined( 'BP_DISABLE_ADMIN_BAR') ) 
     61        return false; 
     62         
    6063    if ( is_user_logged_in() || ( (int)get_site_option( 'show-loggedout-adminbar' ) && !is_user_logged_in() ) ) { 
    6164        wp_enqueue_style( 'bp-admin-bar', WPMU_PLUGIN_URL . '/bp-core/css/admin-bar.css' ); 
     
    110113 */ 
    111114function bp_core_add_admin_css() { 
     115    if ( defined( 'BP_DISABLE_ADMIN_BAR') ) 
     116        return false; 
     117         
    112118    wp_enqueue_style( 'bp-admin-bar', WPMU_PLUGIN_URL . '/bp-core/css/admin-bar.css' ); 
    113119} 
  • trunk/bp-forums.php

    r1262 r1270  
    1919 
    2020define ( 'BP_FORUMS_VERSION', '1.0-RC1' ); 
    21 define ( 'BP_FORUMS_PARENT_FORUM_ID', apply_filters( 'bp_forums_parent_forum_id', 0 ) ); 
     21 
     22/* Define the parent forum ID */ 
     23if ( !defined( 'BP_FORUMS_PARENT_FORUM_ID' ) ) 
     24    define ( 'BP_FORUMS_PARENT_FORUM_ID', 1 ); 
    2225 
    2326require ( 'bp-forums/bp-forums-bbpress-live.php' ); 
  • trunk/bp-friends.php

    r1262 r1270  
    1616define ( 'BP_FRIENDS_DB_VERSION', '937' ); 
    1717 
    18 define ( 'BP_FRIENDS_SLUG', apply_filters( 'friends_slug', 'friends' ) ); 
     18/* Define the slug for the component */ 
     19if ( !defined( 'BP_FRIENDS_SLUG' ) ) 
     20    define ( 'BP_FRIENDS_SLUG', 'friends' ); 
    1921 
    2022require ( 'bp-friends/bp-friends-classes.php' ); 
  • trunk/bp-groups.php

    r1262 r1270  
    1616define ( 'BP_GROUPS_DB_VERSION', '951' ); 
    1717 
    18 define ( 'BP_GROUPS_SLUG', apply_filters( 'groups_slug', 'groups' ) ); 
     18/* Define the slug for the component */ 
     19if ( !defined( 'BP_GROUPS_SLUG' ) ) 
     20    define ( 'BP_GROUPS_SLUG', 'groups' ); 
    1921 
    2022require ( 'bp-groups/bp-groups-classes.php' ); 
  • trunk/bp-messages.php

    r1262 r1270  
    1616define ( 'BP_MESSAGES_DB_VERSION', '948' ); 
    1717 
    18 define ( 'BP_MESSAGES_SLUG', apply_filters( 'messages_slug', 'messages' ) ); 
     18/* Define the slug for the component */ 
     19if ( !defined( 'BP_MESSAGES_SLUG' ) ) 
     20    define ( 'BP_MESSAGES_SLUG', 'messages' ); 
    1921 
    2022require ( 'bp-messages/bp-messages-classes.php' ); 
  • trunk/bp-wire.php

    r1250 r1270  
    1515define ( 'BP_WIRE_VERSION', '1.0-RC1' ); 
    1616 
    17 define ( 'BP_WIRE_SLUG', apply_filters( 'bp_wire_slug', 'wire' ) ); 
     17/* Define the slug for the component */ 
     18if ( !defined( 'BP_WIRE_SLUG' ) ) 
     19    define ( 'BP_WIRE_SLUG', 'wire' ); 
    1820 
    1921require ( 'bp-wire/bp-wire-classes.php' ); 
  • trunk/bp-xprofile.php

    r1262 r1270  
    1616define ( 'BP_XPROFILE_DB_VERSION', '948' ); 
    1717 
    18 define ( 'BP_XPROFILE_SLUG', apply_filters( 'xprofile_slug', 'profile' ) ); 
     18/* Define the slug for the component */ 
     19if ( !defined( 'BP_XPROFILE_SLUG' ) ) 
     20    define ( 'BP_XPROFILE_SLUG', 'profile' ); 
    1921 
    2022require ( 'bp-xprofile/bp-xprofile-classes.php' ); 
Note: See TracChangeset for help on using the changeset viewer.