Skip to content

Instantly share code, notes, and snippets.

@paulgibbs
Created August 16, 2014 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulgibbs/d4d8f8a98e5ec70cedb2 to your computer and use it in GitHub Desktop.
Save paulgibbs/d4d8f8a98e5ec70cedb2 to your computer and use it in GitHub Desktop.
diff --git a/src/bp-blogs/bp-blogs-loader.php b/src/bp-blogs/bp-blogs-loader.php
index 112cc80..a5abd17 100644
--- a/src/bp-blogs/bp-blogs-loader.php
+++ b/src/bp-blogs/bp-blogs-loader.php
@@ -75,6 +75,12 @@ class BP_Blogs_Component extends BP_Component {
// Setup the globals
parent::setup_globals( $args );
+
+ // On first installation - record all existing blogs in the system.
+ if ( ! $bp->site_options['bp-blogs-first-install'] && is_multisite() ) {
+ bp_blogs_record_existing_blogs();
+ bp_update_option( 'bp-blogs-first-install', true );
+ }
}
/**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment