function zl_posts_custom_column_views($column_name, $id) { if ($column_name === 'post_views') { echo zl_getPostViews(get_the_ID()); } }
function zl_article_extra() { global $post; ?> <!-- category, link, comment --> <div id="zl_post_id_meta"> <ul class="zl_post_id_meta"> <li><span class="dashicons dashicons-portfolio"></span> <?php $category = get_the_category(); //echo $category[0]->cat_name; ?> <a href="<?php echo get_category_link($category[0]->term_id); ?> "><?php echo $category[0]->cat_name; ?> </a> </li> <li><span class="dashicons dashicons-admin-comments"></span> <a href="<?php the_permalink(); ?> #zl_comments"><?php comments_number('0', '1', '%'); ?> </a></li> <li><span class="dashicons dashicons-visibility"></span> <a href="<?php the_permalink(); ?> "><?php echo zl_getPostViews(get_the_ID()); ?> </a></li> <li><?php echo getPostLikeLink($post->ID); ?> </li> </ul> </div> <div class="clear"></div> <!-- oooooooooooooooooooooooooooooooooo Tags oooooooooooooooooooooooooooooooooooo--> <?php echo "<div class='zl_posttags'>"; the_tags('<span>' . zl_option('lang_tags', __('Tagged with: ', 'zatolab')) . '</span><div class="clear"></div>', ' ', '<br />'); echo "</div>"; ?> <div class="clear"></div> <!-- oooooooooooooooooooooooooooooooooo Share Button oooooooooooooooooooooooooooooooooooo--> <?php if (vp_option('zl_option.show_share') == 1) { ?> <a class="zl_post_readmore is_single" id="zl_share_it"><span class="dashicons dashicons-share"></span> <?php echo zl_option('lang_share', __('Share', 'zatolab')); ?> </a> <ul id="share_button"> <?php $link = get_permalink(); $linkparse = urlencode($link); ?> <?php $thumb = get_post_thumbnail_id(); $img_url = wp_get_attachment_url($thumb, 'full'); ?> <ul class="sharelist"> <li><a onclick="window.open('http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?> ','Facebook','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?> "><i class="sicon-facebook"></i> Facebook</a></li> <li><a onclick="window.open('https://twitter.com/intent/tweet?original_referer=<?php the_permalink(); ?> &text=<?php echo rawurlencode(get_the_title()); ?> &url=<?php the_permalink(); ?> ','Twitter','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="https://twitter.com/intent/tweet?original_referer=<?php the_permalink(); ?> &text=<?php echo rawurlencode(get_the_title()); ?> &url=<?php the_permalink(); ?> "><i class="sicon-twitter"></i> Twitter</a></li> <li><a onclick="window.open('https://plus.google.com/share?url=<?php the_permalink(); ?> ','Google Plus','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="https://plus.google.com/share?url=<?php the_permalink(); ?> "><i class="dashicons dashicons-googleplus"></i> Google+</a></li> <?php /* <li><a onclick="window.open('http://reddit.com/submit?url=<?php the_permalink(); ?>&title=<?php echo rawurlencode(get_the_title()); ?>','Reddit','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="http://reddit.com/submit?url=<?php the_permalink(); ?>&title=<?php echo rawurlencode(get_the_title()); ?>"><i class="sicon-reddit"></i></a></li> <li><a onclick="window.open('http://digg.com/submit?url=<?php the_permalink(); ?>&title=<?php echo rawurlencode(get_the_title()); ?>','Digg','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="http://digg.com/submit?url=<?php the_permalink(); ?>&title=<?php echo rawurlencode(get_the_title()); ?>#sthash.P7yHgObG.dpuf"><i class="sicon-digg"></i></a></li> */ ?> <li><a onclick="window.open('https://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink(); ?> &title=<?php echo rawurlencode(get_the_title()); ?> &summary=<?php echo rawurlencode(get_the_excerpt()); ?> &source=<?php the_permalink(); ?> ','LinkedIn','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="https://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink(); ?> &title=<?php echo rawurlencode(get_the_title()); ?> &summary=<?php echo rawurlencode(get_the_excerpt()); ?> &source=<?php get_permalink(); ?> "><i class="sicon-linkedin"></i> LinkedIn</a></li> <li><a onclick="window.open('https://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?> &media=<?php echo $img_url; ?> &description=<?php echo rawurlencode(get_the_excerpt()); ?> ','Pinterest','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="https://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?> &media=<?php echo $img_url; ?> &description=<?php echo rawurlencode(get_the_excerpt()); ?> "><i class="sicon-pinterest"></i> Pinterest</a></li> <li><a onclick="window.open('http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?> &title=<?php echo rawurlencode(get_the_title()); ?> ','Google Plus','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?> &title=<?php echo rawurlencode(get_the_title()); ?> "><i class="sicon-stumbleupon"></i> Stumbleupon</a></li> <li><a onclick="window.open('http://www.tumblr.com/share/link?url=<?php the_permalink(); ?> &name=<?php echo rawurlencode(get_the_title()); ?> &description=<?php echo rawurlencode(get_the_excerpt()); ?> ','Google Plus','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="http://www.tumblr.com/share/link?url=<?php the_permalink(); ?> &name=<?php echo rawurlencode(get_the_title()); ?> &description=<?php echo rawurlencode(get_the_excerpt()); ?> "><i class="sicon-tumblr"></i> Tumblr</a></li> <li><a href="mailto:?subject=<?php echo rawurlencode('I want to share ' . get_the_title() . ' from '); echo rawurlencode(get_bloginfo('name')); ?> &amp;body=<?php echo rawurlencode('See more at ' . get_permalink()); ?> "><i class="entypo mail"></i> Mail</a></li> </ul> <!-- end share button --> <div class="clear"></div><br> <?php } }