scarstens
4/18/2016 - 11:50 PM

Custom sunrise for TLD wordpress multisite in 1 file

Custom sunrise for TLD wordpress multisite in 1 file

<?php
if ( !empty( $_SERVER['HTTP_HOST'] ) ) {
    $site = get_site_by_path( strtolower( $_SERVER['HTTP_HOST'] ), '/');
    define( 'COOKIE_DOMAIN', '.' . $site->domain );
}