Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@scarstens
Created April 18, 2016 23:50
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 scarstens/478eaaf9d0536b5210daf4f1dcd02faa to your computer and use it in GitHub Desktop.
Save scarstens/478eaaf9d0536b5210daf4f1dcd02faa to your computer and use it in GitHub Desktop.
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 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment