diff --git a/index.php b/index.php index dd19bb8336..19673fa7f9 100644 --- a/index.php +++ b/index.php @@ -377,15 +377,9 @@ if($a->module != 'install') { } /** - * Build the page - now that we have all the components + * Add a "toggle mobile" link if we're using a mobile device */ -if(!$a->theme['stylesheet']) - $stylesheet = current_theme_url(); -else - $stylesheet = $a->theme['stylesheet']; -$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => $stylesheet)); - if($a->is_mobile || $a->is_tablet) { if(isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) { $link = $a->get_baseurl() . '/toggle_mobile?address=' . curPageURL(); @@ -399,6 +393,16 @@ if($a->is_mobile || $a->is_tablet) { )); } +/** + * Build the page - now that we have all the components + */ + +if(!$a->theme['stylesheet']) + $stylesheet = current_theme_url(); +else + $stylesheet = $a->theme['stylesheet']; +$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => $stylesheet)); + $page = $a->page; $profile = $a->profile;