[wp-hackers] Use-case for sunrise.php?

Mike Schinkel mikeschinkel at newclarity.net
Sat Dec 11 07:06:33 UTC 2010


Thanks all for the clarifications! 

On Dec 10, 2010, at 9:02 PM, Andrew Nacin wrote:

> On Fri, Dec 10, 2010 at 5:42 PM, Otto <otto at ottodestruct.com> wrote:
> 
>> On Fri, Dec 10, 2010 at 4:25 PM, Mike Schinkel
>> <mikeschinkel at newclarity.net> wrote:
>>> Quick question: What's the use-case that sunrise.php was added to
>> resolve?  Googling is letting me down here...
>> 
>> The domain mapping plugin uses it. The sunrise there determines what
>> url you're trying to get then switches you to the correct blog.
> 
> 
> Check out wp-includes/ms-settings.php. Sunrise gets included early. If
> $current_site and $current_blog are set by sunrise, then nearly all of the
> logic in that file gets skipped.
> 
> In there, you'll find a lot of logic to determine exactly which network and
> blog you're trying to reach. The purpose of sunrise is to optionally
> override all of that. Domain mapping is one such use case, for sure.
> 
> Nacin
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list