Skip to content

Instantly share code, notes, and snippets.

@caseymilne
Created July 7, 2021 15:19
Show Gist options
  • Select an option

  • Save caseymilne/4f03730e640c30c497ef7e95406fb786 to your computer and use it in GitHub Desktop.

Select an option

Save caseymilne/4f03730e640c30c497ef7e95406fb786 to your computer and use it in GitHub Desktop.
WP Site Structure
<?php
/*
* This is the output from a \WP_Site
* WP_Site objects are passed during multisite setup in various hooks including 'wp_insert_site' and 'wp_initialize_site'.
* In a plugin you can use these action hooks to "do stuff when new multisite site is created".
* In Saber Commerce plugin we use 'wp_insert_site' and then take the blog_id and utilize it to setup new directories and database tables for the new site.
*/
C:\Users\Casey\Plugins\sacomA\saber-commerce.php:374:
object(WP_Site)[1175]
public 'blog_id' => string '6' (length=1)
public 'domain' => string 'sacom-saas.dev.cc' (length=17)
public 'path' => string '/a3/' (length=4)
public 'site_id' => string '1' (length=1)
public 'registered' => string '2021-07-07 15:11:14' (length=19)
public 'last_updated' => string '2021-07-07 15:11:14' (length=19)
public 'public' => string '1' (length=1)
public 'archived' => string '0' (length=1)
public 'mature' => string '0' (length=1)
public 'spam' => string '0' (length=1)
public 'deleted' => string '0' (length=1)
public 'lang_id' => string '0' (length=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment