Ejemplo n.º 1
0
function enqueue_backstretch()
{
    if (!is_plugin_active('mobble/mobble.php')) {
        return;
    }
    if (!is_handheld()) {
        return;
    }
    // load Backstretch
    // Source: http://srobbin.com/jquery-plugins/backstretch/
    wp_enqueue_script('backstretch', get_stylesheet_directory_uri() . '/js/jquery.backstretch.min.js', array('jquery'), '1.0.0');
    wp_enqueue_script('backstretch-init', get_stylesheet_directory_uri() . '/js/backstretch-init.js', array('jquery', 'backstretch'), '1.0.0');
}
Ejemplo n.º 2
0
function custom_body_class($classes)
{
    global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome;
    // Top level
    if (is_handheld()) {
        $classes[] = "handheld";
    }
    if (is_mobile()) {
        $classes[] = "mobile";
    }
    if (is_ios()) {
        $classes[] = "ios";
    }
    if (is_tablet()) {
        $classes[] = "tablet";
    }
    // Specific
    if (is_iphone()) {
        $classes[] = "iphone";
    }
    if (is_ipad()) {
        $classes[] = "ipad";
    }
    if (is_ipod()) {
        $classes[] = "ipod";
    }
    if (is_android()) {
        $classes[] = "android";
    }
    if (is_blackberry()) {
        $classes[] = "blackberry";
    }
    if (is_opera_mobile()) {
        $classes[] = "opera-mobile";
    }
    if (is_palm()) {
        $classes[] = "palm";
    }
    if (is_symbian()) {
        $classes[] = "symbian";
    }
    if (is_windows_mobile()) {
        $classes[] = "windows-mobile";
    }
    if (is_lg()) {
        $classes[] = "lg";
    }
    if (is_motorola()) {
        $classes[] = "motorola";
    }
    if (is_nokia()) {
        $classes[] = "nokia";
    }
    if (is_samsung()) {
        $classes[] = "samsung";
    }
    if (is_samsung_galaxy_tab()) {
        $classes[] = "samsung-galaxy-tab";
    }
    if (is_sony_ericsson()) {
        $classes[] = "sony-ericsson";
    }
    if (is_nintendo()) {
        $classes[] = "nintendo";
    }
    // Computer browser
    if (!is_handheld()) {
        $classes[] = "desktop";
    }
    if ($is_lynx) {
        $classes[] = "lynx";
    }
    if ($is_gecko) {
        $classes[] = "gecko";
    }
    if ($is_opera) {
        $classes[] = "opera";
    }
    if ($is_NS4) {
        $classes[] = "ns4";
    }
    if ($is_safari) {
        $classes[] = "safari";
    }
    if ($is_chrome) {
        $classes[] = "chrome";
    }
    if ($is_IE) {
        $classes[] = "ie";
    }
    // IE Version check
    $ie_check = array();
    $ie_classes = array('ie7', 'ie8', 'ie9', 'ie10');
    $version = 7;
    while ($version < 11) {
        $ie_check[] = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE ' . $version . '.') !== FALSE;
        ++$version;
    }
    $ie = '';
    foreach ($ie_check as $key => $value) {
        if ($value == 1) {
            $ie = $ie_classes[$key] . ' oldie';
        }
    }
    $classes[] = $ie;
    // Check user logged in?
    if (!is_user_logged_in()) {
        $classes[] = 'not-login';
    }
    return $classes;
}
Ejemplo n.º 3
0
function mobble_body_class($classes)
{
    global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $mobble_detect;
    // top level
    if (is_handheld()) {
        $classes[] = "handheld";
    }
    if (is_mobile()) {
        $classes[] = "mobile";
    }
    if (is_ios()) {
        $classes[] = "ios";
    }
    if (is_tablet()) {
        $classes[] = "tablet";
    }
    // specific
    if (is_iphone()) {
        $classes[] = "iphone";
    }
    if (is_ipad()) {
        $classes[] = "ipad";
    }
    if (is_ipod()) {
        $classes[] = "ipod";
    }
    if (is_android()) {
        $classes[] = "android";
    }
    if (is_blackberry()) {
        $classes[] = "blackberry";
    }
    if (is_opera_mobile()) {
        $classes[] = "opera-mobile";
    }
    if (is_webos()) {
        $classes[] = "webos";
    }
    if (is_symbian()) {
        $classes[] = "symbian";
    }
    if (is_windows_mobile()) {
        $classes[] = "windows-mobile";
    }
    //if (is_lg()) { $classes[] = "lg"; }
    if (is_motorola()) {
        $classes[] = "motorola";
    }
    //if (is_smartphone()) { $classes[] = "smartphone"; }
    //if (is_nokia()) { $classes[] = "nokia"; }
    if (is_samsung()) {
        $classes[] = "samsung";
    }
    if (is_samsung_tablet()) {
        $classes[] = "samsung-tablet";
    }
    if (is_sony_ericsson()) {
        $classes[] = "sony-ericsson";
    }
    if (is_nintendo()) {
        $classes[] = "nintendo";
    }
    // bonus
    if (!is_handheld()) {
        $classes[] = "desktop";
    }
    if ($is_lynx) {
        $classes[] = "lynx";
    }
    if ($is_gecko) {
        $classes[] = "gecko";
    }
    if ($mobble_detect->is('Gecko')) {
        $classes[] = "gecko";
    }
    if ($is_opera) {
        $classes[] = "opera";
    }
    if ($mobble_detect->is('Opera')) {
        $classes[] = "opera";
    }
    if ($is_NS4) {
        $classes[] = "ns4";
    }
    if ($is_safari) {
        $classes[] = "safari";
    }
    if ($mobble_detect->is('Safari')) {
        $classes[] = "safari";
    }
    if ($is_chrome) {
        $classes[] = "chrome";
    }
    if ($mobble_detect->is('Chrome')) {
        $classes[] = "chrome";
    }
    if ($is_IE) {
        $classes[] = "ie";
    }
    if ($mobble_detect->is('IE')) {
        $classes[] = "ie";
    }
    return $classes;
}
Ejemplo n.º 4
0
"><i class="icon-user"></i></a>
							<?php 
}
?>
						</ul><!-- End social links -->

						<div class="search-collapse collapse">
							<?php 
get_search_form($echo = true);
?>
						</div>

						<div class="nav-collapse collapse">
							<?php 
$params = array('theme_location' => 'primary', 'container' => '', 'menu_class' => 'nav', 'fallback_cb' => 'link_to_menu_editor');
if (!is_handheld()) {
    $params['walker'] = new DW_Mega_Walker();
} else {
    $params['walker'] = new DW_Mega_Walker_Mobile();
}
wp_nav_menu($params);
?>
						</div>	
		            </div>
		        </nav>

		        <div id="under-navigation" class="clearfix under-navigation">
		        	<div class="row-fluid">
		        		<?php 
$offset = '';
?>
Ejemplo n.º 5
0
    /**
     * Display Social Share, Print, Sent Button
     */
    function dw_focus_post_actions()
    {
        $post_id = get_the_ID();
        $url = rawurlencode(get_permalink());
        $title = rawurlencode(get_the_title());
        //Twitter
        $twitter_count = dw_get_twitter_count($url);
        $facebook_count = dw_get_facebook_count($url);
        $linkedin_count = dw_get_linkedin_count($url);
        ?>
		
		<div class="entry-action">
		<!-- Show author name/avatar -->
		<span class="author-name"><?php 
        echo get_avatar(get_the_author_email(), '24');
        ?>
  <?php 
        the_author();
        ?>
</span>
		<br>
		<!-- Show date -->
		<?php 
        $metadata = wp_get_attachment_metadata();
        printf(__('<span class="entry-date"><time class="entry-date" datetime="%1$s" pubdate>%2$s</time></span>', 'dw_focus'), esc_attr(get_the_date('c')), esc_html(get_the_date()));
        ?>

		<?php 
        $tags_list = get_the_tag_list('', __(', ', 'dw_focus'));
        if ($tags_list) {
            ?>
	    	<div class="tag-action">
		    	<span class="title-action"><?php 
            _e('Tags', 'dw_focus');
            ?>
</span>
		        <span class="tags-links">
		            <?php 
            printf(__('%1$s', 'dw_focus'), $tags_list);
            ?>
		        </span>
	        </div>
	        <?php 
        }
        // End if $tags_list
        ?>
		
		<br>
		<div class="social-action" data-nonce="<?php 
        echo wp_create_nonce('_dw_sharing_count_nonce');
        ?>
">
				<span class="title-action"><?php 
        _e('Sharing', 'dw_focus');
        ?>
</span>
				<ul>
					<li id="twitter-share" class="twitter" data-post-id="<?php 
        echo $post_id;
        ?>
" data-nonce="<?php 
        echo wp_create_nonce('_dw_focus_single_tweet_count_nonce');
        ?>
"><i class="icon-twitter"></i><a href="https://twitter.com/intent/tweet?url=<?php 
        echo $url;
        ?>
&amp;text=<?php 
        echo $title;
        ?>
"><?php 
        _e('Twitter', 'dw_focus');
        ?>
</a><span class="digit digit-twitter"><?php 
        echo $twitter_count;
        ?>
</span></li>
					<li class="facebook"><i class="icon-facebook-sign"></i><a href="https://www.facebook.com/sharer/sharer.php?u=<?php 
        echo $url;
        ?>
&amp;t=<?php 
        echo $title;
        ?>
" ><?php 
        _e('Facebook', 'dw_focus');
        ?>
</a><span class="digit digit-facebook"><?php 
        echo $facebook_count;
        ?>
</span></li>
					<li class="google"><i class="icon-google-plus-sign"></i><a href="https://plus.google.com/share?url=<?php 
        echo $url;
        ?>
" ><?php 
        _e('Google +', 'dw_focus');
        ?>
</a><span>0</span></li>
					<li class="linkedin"><i class="icon-linkedin-sign"></i><a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=<?php 
        echo $url;
        ?>
&amp;title=<?php 
        echo $title;
        ?>
&amp;summary=<?php 
        echo rawurlencode(get_the_excerpt());
        ?>
"><?php 
        _e('Linkedin', 'dw_focus');
        ?>
</a><span class="digit digit-linkedin"><?php 
        echo $linkedin_count;
        ?>
</span></li>
					<li class="email"><i class="icon-envelope-alt"></i><a href="mailto:?Subject=<?php 
        echo $title;
        ?>
&amp;body=<?php 
        echo $url;
        ?>
"><?php 
        _e('Email this article', 'dw_focus');
        ?>
</a></li>
                    <?php 
        if (!is_handheld()) {
            ?>
					<li class="print"><i class="icon-print"></i><a href="#" onclick="window.print();"><?php 
            _e('Print this article', 'dw_focus');
            ?>
</a></li>
                    <?php 
        }
        ?>
				</ul>
			</div>
		</div>
	<?php 
    }
Ejemplo n.º 6
0
/images/p7.jpg"/></div>
			<div><img class="car_img" data-lazy="<?php 
bloginfo('template_directory');
?>
/images/p8.jpg"/></div>
 		</div>
		
		
		</div><!-- carousel_content -->
		
</div><!-- overlay_inner -->
	
</div><!-- overlay_carousel -->

<?php 
if (is_handheld()) {
    ?>

<div class="mobile_menu_overlay">
	
	<div class="overlay_inner">
		
		<span style="color:#fff;margin-top:50px;margin-left:20px;display: block;">Mobile Menu Will Go Here</span>
		
	</div><!-- overlay_inner -->
	
</div><!-- mobile_menu_overlay -->

<?php 
}
?>