コード例 #1
0
ファイル: activate.php プロジェクト: deepakd92/anspress
 /**
  * Return an instance of this class.
  * @return    object    A single instance of this class.
  */
 public static function get_instance()
 {
     // If the single instance hasn't been set, set it now.
     if (null == self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
コード例 #2
0
ファイル: activate.php プロジェクト: alaershov/anspress
 /**
  * Return an instance of this class.
  * @return    object    A single instance of this class.
  */
 public static function get_instance($network_wide = '')
 {
     // If the single instance hasn't been set, set it now.
     if (null == self::$instance) {
         self::$instance = new self();
         global $network_wide;
         $network_wide = $network_wide;
     }
     return self::$instance;
 }
コード例 #3
0
/**
 * Creating table whenever a new blog is created
 * @param  integer $blog_id Blog id.
 * @param  integer $user_id User id.
 * @param  string  $domain  Domain
 * @param  string  $path    Path
 * @param  integer $site_id Site id.
 * @param  array   $meta    Site meta
 */
function ap_create_blog($blog_id, $user_id, $domain, $path, $site_id, $meta)
{
    if (is_plugin_active_for_network(plugin_basename(__FILE__))) {
        switch_to_blog($blog_id);
        AP_Activate::get_instance(true);
        restore_current_blog();
    }
}