Example #1
0
		<li>
			<div class="fb-like" data-href="<?php echo $post_link; ?>" data-send="false" data-layout="button_count" data-width="90" data-show-faces="false"></div>
		</li>
	<?php endif; ?>	
	<?php if( tie_get_option( 'share_tweet' ) ): ?>
		<li><a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo $post_link; ?>" data-text="<?php echo $post_title; ?>" data-via="<?php echo tie_get_option( 'share_twitter_username' ) ?>" data-lang="en">tweet</a></li>
	<?php endif; ?>
	<?php if( tie_get_option( 'share_google' ) ): ?>
		<li style="width:80px;"><div class="g-plusone" data-size="medium" data-href="<?php echo $post_link; ?>"></div></li>
	<?php endif; ?>
	<?php if( tie_get_option( 'share_stumble' ) ): ?>
		<li><su:badge layout="2" location="<?php echo $post_link; ?>"></su:badge>
			<script type="text/javascript">
				(function() {
					var li = document.createElement('script'); li.type = 'text/javascript'; li.async = true;
					li.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + '//platform.stumbleupon.com/1/widgets.js';
					var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(li, s);
				})();
			</script>
		</li>
	<?php endif; ?>
	<?php if( tie_get_option( 'share_linkdin' ) ): ?>
		<li><script src="<?php echo $protocol ?>://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="<?php echo $post_link; ?>" data-counter="right"></script></li>
	<?php endif; ?>
	<?php if( tie_get_option( 'share_pinterest' ) ): ?>
		<li style="width:80px;"><script type="text/javascript" src="<?php echo $protocol ?>://assets.pinterest.com/js/pinit.js"></script><a href="http://pinterest.com/pin/create/button/?url=<?php echo $post_link; ?>&amp;media=<?php echo tie_thumb_src( 'slider' ); ?>" class="pin-it-button" count-layout="horizontal"><img border="0" src="<?php echo $protocol ?>://assets.pinterest.com/images/PinExt.png" title="Pin It" /></a></li>
	<?php endif; ?>
	</ul>
	<?php endif; ?>
	<div class="clear"></div>
</div> <!-- .share-post -->
Example #2
0
	<?php 
        $i = $j = 0;
        while ($featured_query->have_posts()) {
            $featured_query->the_post();
            $i++;
            $j++;
            ?>
		<div class="featured-post featured-post-<?php 
            echo $i;
            ?>
 fea-<?php 
            echo $j;
            ?>
">
			<div class="featured-post-inner" style="background-image:url(<?php 
            echo tie_thumb_src($size);
            ?>
);">	
				<div class="featured-cover"><a href="<?php 
            the_permalink();
            ?>
"></a></div>
				<div class="featured-title">
					<?php 
            tie_get_time();
            ?>
					<h2><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
function tie_og_image()
{
    global $post;
    if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
        $post_thumb = tie_thumb_src('', 660, 330);
    } elseif (get_post_format() == 'video') {
        $get_meta = get_post_custom($post->ID);
        $video_url = $get_meta["tie_video_url"][0];
        $video_link = @parse_url($video_url);
        if ($video_link['host'] == 'www.youtube.com' || $video_link['host'] == 'youtube.com') {
            parse_str(@parse_url($video_url, PHP_URL_QUERY), $my_array_of_vars);
            $video = $my_array_of_vars['v'];
            $post_thumb = 'http://img.youtube.com/vi/' . $video . '/0.jpg';
        } elseif ($video_link['host'] == 'www.vimeo.com' || $video_link['host'] == 'vimeo.com') {
            $video = (int) substr(@parse_url($video_url, PHP_URL_PATH), 1);
            $url = 'http://vimeo.com/api/v2/video/' . $video . '.php';
            $contents = @file_get_contents($url);
            $thumb = @unserialize(trim($contents));
            $post_thumb = $thumb[0][thumbnail_large];
        }
    }
    if (isset($post_thumb)) {
        echo '<meta property="og:image" content="' . $post_thumb . '" />';
    }
}
function tie_og_data()
{
    global $post;
    if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
        $post_thumb = tie_thumb_src('slider');
    } else {
        $protocol = is_ssl() ? 'https' : 'http';
        $get_meta = get_post_custom($post->ID);
        if (!empty($get_meta["tie_video_url"][0])) {
            $video_url = $get_meta["tie_video_url"][0];
            $video_link = @parse_url($video_url);
            if ($video_link['host'] == 'www.youtube.com' || $video_link['host'] == 'youtube.com') {
                parse_str(@parse_url($video_url, PHP_URL_QUERY), $my_array_of_vars);
                $video = $my_array_of_vars['v'];
                $post_thumb = $protocol . '://img.youtube.com/vi/' . $video . '/0.jpg';
            } elseif ($video_link['host'] == 'www.vimeo.com' || $video_link['host'] == 'vimeo.com') {
                $video = (int) substr(@parse_url($video_url, PHP_URL_PATH), 1);
                $url = $protocol . '://vimeo.com/api/v2/video/' . $video . '.php';
                $contents = @file_get_contents($url);
                $thumb = @unserialize(trim($contents));
                $post_thumb = $thumb[0]['thumbnail_large'];
            }
        }
    }
    $og_title = strip_shortcodes(strip_tags(get_the_title()));
    $og_description = htmlspecialchars(strip_tags(strip_shortcodes($post->post_content)));
    $og_type = 'article';
    if (is_home() || is_front_page()) {
        $og_title = get_bloginfo('name');
        $og_description = get_bloginfo('description');
        $og_type = 'website';
    }
    ?>
<meta property="og:title" content="<?php 
    echo $og_title;
    ?>
"/>
<meta property="og:type" content="<?php 
    echo $og_type;
    ?>
"/>
<meta property="og:description" content="<?php 
    echo tie_content_limit($og_description, 100);
    ?>
"/>
<meta property="og:url" content="<?php 
    the_permalink();
    ?>
"/>
<meta property="og:site_name" content="<?php 
    echo get_bloginfo('name');
    ?>
"/>
<?php 
    if (!empty($post_thumb)) {
        echo '<meta property="og:image" content="' . $post_thumb . '" />' . "\n";
    }
}
			</script>
		</li>
	<?php 
}
?>
	<?php 
if (tie_get_option('share_linkdin')) {
    ?>
		<li><script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="<?php 
    the_permalink();
    ?>
" data-counter="right"></script></li>
	<?php 
}
?>
	<?php 
if (tie_get_option('share_pinterest')) {
    ?>
		<li style="width:80px;"><script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script><a href="http://pinterest.com/pin/create/button/?url=<?php 
    the_permalink();
    ?>
&amp;media=<?php 
    echo tie_thumb_src('slider');
    ?>
" class="pin-it-button" count-layout="horizontal"><img border="0" src="http://assets.pinterest.com/images/PinExt.png" title="Pin It" /></a></li>
	<?php 
}
?>
	</ul>
	<div class="clear"></div>
</div> <!-- .share-post -->
Example #6
0
 function tie_mega_start()
 {
     $sub_class = $last = '';
     $count = 0;
     if ($this->curItem->object == 'category' && empty($this->curItem->menu_item_parent)) {
         $cat_id = $this->curItem->object_id;
         $cat_options = get_option("tie_cat_{$cat_id}");
         if (!empty($cat_options['cat_mega_menu'])) {
             @($output .= "\n<div class=\"mega-menu-block\"><div class=\"container\"><div class=\"mega-menu-content\">\n");
             $cat_query = new WP_Query('cat=' . $cat_id . '&no_found_rows=1&posts_per_page=3');
             while ($cat_query->have_posts()) {
                 $count++;
                 if ($count == 3) {
                     $last = 'last-column';
                 }
                 $cat_query->the_post();
                 $output .= '<div class="mega-menu-item ' . $last . '">';
                 if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
                     $output .= '<a class="mega-menu-link" href="' . get_permalink() . '" title="' . get_the_title() . '"><img width="300" height="160" src="' . tie_thumb_src('tie-large') . '" /></a>';
                 }
                 $output .= '<h3 class="post-box-title"><a class="mega-menu-link" href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '</a></h3></div>';
             }
             return $output .= "\n</div><!-- .mega-menu-content --> \n";
         }
     }
 }
Example #7
0
			
	<?php 
        if (!empty($get_meta["tie_post_head_cover"][0])) {
            ?>
 
		<div class="single-post-thumb<?php 
            if (has_post_thumbnail()) {
                ?>
 single-has-thumb<?php 
            }
            ?>
"<?php 
            if (has_post_thumbnail()) {
                ?>
 style="background-image:url( <?php 
                echo tie_thumb_src('full');
                ?>
);"<?php 
            }
            ?>
>
			<div class="post-cover-title">
			<?php 
            tie_breadcrumbs();
            ?>
			<h1 class="name post-title entry-title" itemprop="itemReviewed" itemscope itemtype="http://schema.org/Thing"><span itemprop="name"><?php 
            the_title();
            ?>
</span></h1>
			<?php 
            get_template_part('framework/parts/meta-post');
function tie_pinterest_shortcode($atts, $content = null)
{
    global $post;
    return '<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>
	<a href="http://pinterest.com/pin/create/button/?url=' . get_permalink($post->ID) . '&amp;media=' . tie_thumb_src('slider') . ' class="pin-it-button" count-layout="vertical"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>';
}
Example #9
0
			$play = $visual = 'false';
			if( !empty( $get_meta["tie_audio_soundcloud_play"][0] )) $play = 'true';
			if( !empty( $get_meta["tie_audio_soundcloud_visual"][0] )) $visual = 'true';
			echo tie_soundcloud($get_meta["tie_audio_soundcloud"][0] , $play, $visual );?>
	<?php
		}
	}elseif( ( !empty( $get_meta['tie_post_head'][0] ) && $get_meta['tie_post_head'][0] == 'thumb' ) || ( empty( $get_meta['tie_post_head'][0] ) && tie_get_option( 'post_featured' ) ) ){
		if( (  !empty( $get_meta['tie_sidebar_pos'][0] ) && $get_meta["tie_sidebar_pos"][0] == 'full' ) || !empty( $get_meta["tie_post_head_cover"][0] ) ){
			$size = 'big-slider';
		}else{
			$size = 'slider';
		}
	?>
			
	<?php if( !empty( $get_meta["tie_post_head_cover"][0] ) ) : ?> 
		<div class="single-post-thumb<?php if( has_post_thumbnail() ){ ?> single-has-thumb<?php } ?>"<?php if( has_post_thumbnail() ){ ?> style="background-image:url( <?php echo tie_thumb_src( 'full' ); ?>);"<?php } ?>>
			<div class="post-cover-title">
			<?php tie_breadcrumbs() ?>
			<h1 class="name post-title entry-title" itemprop="itemReviewed" itemscope itemtype="http://schema.org/Thing"><span itemprop="name"><?php the_title(); ?></span></h1>
			<?php get_template_part( 'framework/parts/meta-post' ); ?>
			</div>
			
			<a href="#the-post" class="go-to-the-post"><i class="fa fa-angle-down"></i></a>
			
		</div>
		<script>
			jQuery(window).scroll(function(){
				var scrolled = jQuery(window).scrollTop();
				 jQuery('.post-cover-title').css({ opacity : 1-(scrolled/1000) });
				 jQuery('.post-cover-head .single-post-thumb').css('background-position', 'center '+ -(scrolled*0.3)+'px');
			});
Example #10
0
    /**
     * Ends the element output, if needed.
     */
    public function end_el(&$output, $item, $depth = 0, $args = array())
    {
        //By TieLabs ===========
        if ($depth === 0 && !empty($this->tie_megamenu_type) && $this->tie_megamenu_type != 'disable') {
            global $post;
            $output .= "\n<div class=\"mega-menu-content\">\n";
            //Sub Categories ===============================================================
            if ($this->tie_megamenu_type == 'sub-posts' && $item->object == 'category') {
                $no_sub_categories = $sub_categories_exists = $sub_categories = '';
                $query_args = array('child_of' => $item->object_id);
                $sub_categories = get_categories($query_args);
                //Check if the Category doesn't contain any sub categories.
                if (count($sub_categories) == 0) {
                    $sub_categories = array($item->object_id);
                    $no_sub_categories = true;
                } else {
                    $sub_categories_exists = ' mega-cat-sub-exists';
                }
                $output .= '<div class="mega-cat-wrapper"> ';
                if (!$no_sub_categories) {
                    $output .= '<ul class="mega-cat-sub-categories"> ';
                    foreach ($sub_categories as $category) {
                        $output .= '<li><a href="#mega-cat-' . $item->ID . '-' . $category->term_id . '">' . $category->name . '</a></li>';
                    }
                    $output .= '</ul> ';
                }
                $output .= ' <div class="mega-cat-content' . $sub_categories_exists . '">';
                foreach ($sub_categories as $category) {
                    if (!$no_sub_categories) {
                        $cat_id = $category->term_id;
                    } else {
                        $cat_id = $category;
                    }
                    $output .= '<div id="mega-cat-' . $item->ID . '-' . $cat_id . '" class="mega-cat-content-tab">';
                    $original_post = $post;
                    $args = array('posts_per_page' => 4, 'cat' => $cat_id, 'no_found_rows' => true, 'ignore_sticky_posts' => true);
                    $cat_query = new WP_Query($args);
                    while ($cat_query->have_posts()) {
                        $cat_query->the_post();
                        $img_classes = tie_get_post_class('post-thumbnail');
                        $post_time = tie_get_time(true);
                        $output .= '<div class="mega-menu-post">';
                        if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
                            $output .= '<div ' . $img_classes . '><a class="mega-menu-link" href="' . get_permalink() . '" title="' . get_the_title() . '"><img src="' . tie_thumb_src('tie-medium') . '" width="310" height="165" /><span class="fa overlay-icon"></span></a></div>';
                        }
                        $output .= '<h3 class="post-box-title"><a class="mega-menu-link" href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '</a></h3>
									' . $post_time . '
							</div> <!-- mega-menu-post -->';
                    }
                    $post = $original_post;
                    wp_reset_query();
                    $output .= '</div><!-- .mega-cat-content-tab --> ';
                }
                $output .= '</div> <!-- .mega-cat-content --> 
								<div class="clear"></div>
							</div> <!-- .mega-cat-Wrapper --> ';
            }
            // End of Sub Categories =====================================================
            //Recent + Check also ========================================================
            if ($this->tie_megamenu_type == 'recent' && $item->object == 'category') {
                $count = 0;
                $output_more_posts = '';
                $posts_number = empty($this->tie_has_children) ? 7 : 4;
                $original_post = $post;
                $args = array('posts_per_page' => $posts_number, 'cat' => $item->object_id, 'no_found_rows' => true, 'ignore_sticky_posts' => true);
                $cat_query = new WP_Query($args);
                while ($cat_query->have_posts()) {
                    $count++;
                    $cat_query->the_post();
                    $img_classes = tie_get_post_class('post-thumbnail');
                    $post_time = tie_get_time(true);
                    if ($count == 1) {
                        $output .= '<div class="mega-recent-post">';
                        if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
                            $output .= '<div ' . $img_classes . '><a class="mega-menu-link" href="' . get_permalink() . '" title="' . get_the_title() . '"><img src="' . tie_thumb_src('slider') . '"  width="660" height="330" /><span class="fa overlay-icon"></span></a></div>';
                        }
                        $output .= '<h3 class="post-box-title"><a class="mega-menu-link" href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '</a></h3>
						' . $post_time . '
						</div> <!-- mega-recent-post -->';
                    } else {
                        $output_more_posts .= '<li>';
                        if (function_exists("has_post_thumbnail") && has_post_thumbnail()) {
                            $output_more_posts .= '<div ' . $img_classes . '><a class="mega-menu-link" href="' . get_permalink() . '" title="' . get_the_title() . '"><img src="' . tie_thumb_src() . '"  width="110" height="75" /><span class="fa overlay-icon"></span></a></div>';
                        }
                        $output_more_posts .= '<h3 class="post-box-title"><a class="mega-menu-link" href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '</a></h3>' . $post_time;
                        $output_more_posts .= '</li>';
                    }
                }
                $post = $original_post;
                wp_reset_query();
                $output .= '<div class="mega-check-also"><ul>' . $output_more_posts . '</ul></div> <!-- mega-check-also -->';
            }
            // End of Sub Categories =====================================================
            $output .= "\n</div><!-- .mega-menu-content --> \n</div><!-- .mega-menu-block --> \n";
        }
        // =====================
        $output .= "</li>\n";
    }
	<?php 
    }
    ?>
	<?php 
    if (tie_get_option('share_linkdin')) {
        ?>
		<li><script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="<?php 
        the_permalink();
        ?>
" data-counter="right"></script></li>
	<?php 
    }
    ?>
	<?php 
    if (tie_get_option('share_pinterest')) {
        ?>
		<li style="width:80px;"><script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script><a href="http://pinterest.com/pin/create/button/?url=<?php 
        the_permalink();
        ?>
&amp;media=<?php 
        echo tie_thumb_src('', 660, 330);
        ?>
" class="pin-it-button" count-layout="horizontal"><img border="0" src="http://assets.pinterest.com/images/PinExt.png" title="Pin It" /></a></li>
	<?php 
    }
    ?>
	</ul>
	<div class="clear"></div>
</div> <!-- .share-post -->
<?php 
}
Example #12
0
		}
		elseif( $featured_posts_query  == 'page'){
			$pages_var = explode (',' , $get_meta['featured_posts_pages'][0]);
			$args= array('posts_per_page'=> $featured_posts_number , 'post_type' => 'page', 'post__in' => $pages_var, 'no_found_rows' => 1 );
		}
	
		$featured_query = new wp_query( $args );
	}
	
if( $featured_posts_query != 'custom' ): ?>		
	<?php if( $featured_query->have_posts() ) : ?>
	<div id="featured-posts"<?php if( $featured_posts_number <= 5 ) echo ' class="featured-posts-disable-nav"'; ?>>
	<?php $i = $j= 0;
		while ( $featured_query->have_posts() ) : $featured_query->the_post(); $i++; $j++; ?>
		<div class="featured-post featured-post-<?php echo $i; ?> fea-<?php echo $j; ?>">
			<div class="featured-post-inner" style="background-image:url(<?php echo tie_thumb_src( $size ); ?>);">	
				<div class="featured-cover"><a href="<?php the_permalink(); ?>"><span><?php the_title(); ?></span></a></div>
				<div class="featured-title">
					<?php tie_get_time() ?>
					<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
					<h3><?php echo tie_content_limit( get_the_excerpt() , 100 ) ?></h3>
				</div>
			</div>
		</div>
		<?php if( $i == 5) $i=0;
		endwhile;?>
	</div>
	<div class="clear"></div>
	<?php endif; ?>
<?php else: ?>