Skip to:
Content

BuddyPress.org

Changeset 8946


Ignore:
Timestamp:
08/20/2014 02:40:04 PM (10 years ago)
Author:
boonebgorges
Message:

Reintroduce bp_blogs_record_existing_blogs() to bp_core_activation_notice()

It was originally removed in r8592 because it was taxing to resources, but

Fixes #5820. See #5825

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/admin/bp-core-functions.php

    r8664 r8946  
    201201 */
    202202function bp_core_activation_notice() {
    203     global $wp_rewrite;
     203    global $wp_rewrite, $wpdb;
    204204
    205205    // Only the super admin gets warnings
     
    221221    if ( is_network_admin() && ! bp_is_network_activated() ) {
    222222        return;
     223    }
     224
     225    /**
     226     * Check to make sure that the blog setup routine has run. This can't
     227     * happen during the wizard because of the order which the components
     228     * are loaded.
     229     */
     230    if ( bp_is_active( 'blogs' ) ) {
     231        $bp    = buddypress();
     232        $count = $wpdb->get_var( "SELECT COUNT(*) FROM {$bp->blogs->table_name}" );
     233
     234        if ( empty( $count ) ) {
     235            bp_blogs_record_existing_blogs();
     236        }
    223237    }
    224238
Note: See TracChangeset for help on using the changeset viewer.