Skip to:
Content

BuddyPress.org

Changeset 3859


Ignore:
Timestamp:
01/24/2011 02:57:03 AM (16 years ago)
Author:
johnjamesjacoby
Message:

Move bp_core_ functions out of is_multisite check in bp-core-wpabstraction.php

File:
1 edited

Legend:

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

    r3853 r3859  
    1616        $wpdb->base_prefix = $wpdb->prefix;
    1717        $wpdb->blogid      = 1;
    18 
    19         /**
    20          * bp_core_is_main_site
    21          *
    22          * Checks if current blog is root blog of site. Deprecated in 1.3.
    23          *
    24          * @deprecated 1.3
    25          * @deprecated Use is_multisite()
    26          * @package BuddyPress
    27          * @param int $blog_id optional blog id to test (default current blog)
    28          * @return bool True if not multisite or $blog_id is main site
    29          * @since 1.2.6
    30          */
    31         function bp_core_is_main_site( $blog_id = '' ) {
    32                 _deprecated_function( __FUNCTION__, '1.3', 'is_main_site()' );
    33                 return is_main_site( $blog_id );
    34         }
    35 
    36         function bp_core_get_status_sql( $prefix = false ) {
    37                 if ( !is_multisite() )
    38                         return "{$prefix}user_status = 0";
    39                 else
    40                         return "{$prefix}spam = 0 AND {$prefix}deleted = 0 AND {$prefix}user_status = 0";
    41         }
    4218
    4319        if ( !function_exists( 'get_blog_option' ) ) {
    … …  
    9369}
    9470
     71/**
     72 * bp_core_is_main_site
     73 *
     74 * Checks if current blog is root blog of site. Deprecated in 1.3.
     75 *
     76 * @deprecated 1.3
     77 * @deprecated Use is_multisite()
     78 * @package BuddyPress
     79 * @param int $blog_id optional blog id to test (default current blog)
     80 * @return bool True if not multisite or $blog_id is main site
     81 * @since 1.2.6
     82 */
     83function bp_core_is_main_site( $blog_id = '' ) {
     84        _deprecated_function( __FUNCTION__, '1.3', 'is_main_site()' );
     85        return is_main_site( $blog_id );
     86}
     87
     88function bp_core_get_status_sql( $prefix = false ) {
     89        if ( !is_multisite() )
     90                return "{$prefix}user_status = 0";
     91        else
     92                return "{$prefix}spam = 0 AND {$prefix}deleted = 0 AND {$prefix}user_status = 0";
     93}
     94
     95
    9596?>
Note: See TracChangeset for help on using the changeset viewer.