Ejemplo n.º 1
0
function weaverii_mobile_toggle($loc)
{
    global $weaverii_mobile_view;
    if (weaverii_is_mobile() && weaverii_mobile_gettype() != 'tablet' && weaverii_getopt('wii_layout_view_toggle') != 'none') {
        $home = home_url('/');
        $how = weaverii_getopt('wii_layout_view_toggle');
        if (!$how) {
            $how = 'both';
        }
        if ($weaverii_mobile_view) {
            $url = weaverii_relative_url('images/icons/notebook.png');
            $mob = weaverii_getopt('_wvr_mobile_fullmsg');
            //$mob = 'Full View';
            if (!$mob) {
                $link = '<img src="' . $url . '" alt="full" />';
            } else {
                $link = $mob;
            }
            if ($loc == 'header' && ($how == 'top' || $how == 'both')) {
                echo '<span class="wvr-to-desktop-top">';
                echo '<a href="' . $home . '?weaverii_mobile_toggle=web_view" title="Switch to standard web view.">';
                echo $link;
                echo '</a></span><div class="weaver-clear"></div>';
            }
            if ($loc == 'footer' && ($how == 'bottom' || $how == 'both')) {
                echo '<div class="wvr-to-desktop-bottom">
				<a href="' . $home . '?weaverii_mobile_toggle=web_view" title="Switch to standard web view.">';
                echo $link;
                echo '</a></div><div class="weaver-clear"></div>';
            }
        } else {
            $url = weaverii_relative_url('images/icons/smartphone.png');
            $mob = weaverii_getopt('_wvr_mobile_mobilemsg');
            //$mob = 'Mobile';
            if (!$mob) {
                $link = '<img src="' . $url . '" alt="mobile" />';
            } else {
                $link = $mob;
            }
            if ($loc == 'header' && ($how == 'top' || $how == 'both')) {
                echo '<span class="wvr-to-mobile-top">
					<a href="' . $home . '?weaverii_mobile_toggle=mobile_view" title="Switch to mobile view.">';
                echo $link;
                echo '</a></span><div class="weaver-clear"></div>';
            }
            if ($loc == 'footer' && ($how == 'bottom' || $how == 'both')) {
                echo '<div class="wvr-to-mobile-bottom">';
                echo '<a href="' . $home . '?weaverii_mobile_toggle=mobile_view" title="Switch to mobile view.">';
                echo $link;
                echo '</a></div><div class="weaver-clear"></div>';
            }
        }
    }
}
Ejemplo n.º 2
0
language_attributes();
?>
> <![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8) ] | !(IE 9) ><!-->	<html <?php 
language_attributes();
?>
> <!--<![endif]-->
<head>
<meta charset="<?php 
bloginfo('charset');
?>
" />
<?php 
$viewport = "<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes' />\n";
// Need to see if the visitor has opened Full View on a mobile device - use viewport to get full desktop view
if (weaverii_sim_mobile() && !weaverii_in_mobile_view() || weaverii_is_mobile() && weaverii_mobile_gettype() != 'tablet') {
    if (!weaverii_in_mobile_view()) {
        $tw = weaverii_getopt('wii_theme_width_int');
        if (!$tw) {
            $tw = 940;
        }
        $viewport = "<meta name='viewport' content='width=" . $tw . "px, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes' />\n";
    }
}
if (weaverii_getopt_checked('wii_theme_width_fixed') || weaverii_getopt_checked('_wii_mobile_disable')) {
    $viewport = "<!-- no viewport -->\n";
}
echo $viewport;
// comments_popup_script(400, 500);
?>
<title><?php