}
/**
- * 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();
));
}
+/**
+ * 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;