<?php

$post_id = get_the_ID();
$views = wolf_format_number(absint(get_post_meta($post_id, '_wolf_views', true)));
$likes = wolf_format_number(absint(get_post_meta($post_id, '_wolf_likes', true)));
$shares = wolf_format_number(absint(get_post_meta($post_id, '_wolf_shares', true)));
$comments = get_comments_number();
?>
<article <?php 
post_class('clearfix');
?>
   id="post-<?php 
the_ID();
?>
" data-post-id="<?php 
the_ID();
?>
">
	<div class="video">
		<?php 
echo wolf_post_media();
?>
		<div class="clearfix video-inner">
			<h1 class="video-title"><?php 
the_title();
?>
</h1>

			<?php 
if (wolf_get_theme_option('video_author')) {
    ?>
Ejemplo n.º 2
0
    /**
     * Display comments, views and like
     *
     * @access public
     * @return void
     */
    function wolf_icon_meta()
    {
        $post_id = get_the_ID();
        $post_type = get_post_type();
        $format = get_post_format() ? get_post_format() : 'standard';
        $views = wolf_format_number(absint(get_post_meta($post_id, '_wolf_views', true)));
        $likes = wolf_format_number(absint(get_post_meta($post_id, '_wolf_likes', true)));
        $comments = wolf_format_number(absint(get_comments_number()));
        $no_views = array('status', 'aside', 'link', 'quote');
        $enable_comments = 'post' == $post_type ? true : wolf_get_theme_option($post_type . '_comments');
        ?>
			<?php 
        if (comments_open() && (wolf_get_theme_option($post_type . '_comments') || 'post' == $post_type)) {
            ?>
				<span class="item-icon" title="<?php 
            printf(__('%d comments', 'wolf'), $comments);
            ?>
">
					<a href="<?php 
            echo get_permalink();
            ?>
#comments">
						<i class="fa fa-comment-o"></i> <span class="item-comments-count"><?php 
            echo absint($comments);
            ?>
</span>
					</a>
				</span><!-- .comments-link -->
				<?php 
        }
        // comments_open()
        ?>

			<?php 
        if (wolf_get_theme_option($post_type . '_likes')) {
            ?>
				<span class="item-icon item-like" title="<?php 
            _e('Like this', 'wolf');
            ?>
">
					<i class="fa fa-heart-o"></i> <span class="item-likes-count"><?php 
            echo sanitize_text_field($likes);
            ?>
</span>
				</span>
			<?php 
        }
        ?>
			<?php 
        if (wolf_get_theme_option($post_type . '_views') && !in_array($format, $no_views)) {
            ?>
				<span class="item-icon" title="<?php 
            printf(__('%d views', 'wolf'), $views);
            ?>
">
					<i class="fa fa-eye"></i> <span class="item-views-count"><?php 
            echo sanitize_text_field($views);
            ?>
</span>
				</span>
			<?php 
        }
        ?>
		<?php 
    }
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
$term_list = '';
$post_id = get_the_ID();
$post_type = get_post_type();
if (get_the_terms($post_id, $post_type . '_type')) {
    foreach (get_the_terms($post_id, $post_type . '_type') as $term) {
        $term_list .= $term->slug . ' ';
    }
}
$term_list = $term_list ? substr($term_list, 0, -1) : '';
$format = get_post_format() ? get_post_format() : 'standard';
$views = wolf_format_number(intval(get_post_meta($post_id, '_wolf_views', true)));
$likes = wolf_format_number(intval(get_post_meta($post_id, '_wolf_likes', true)));
$image = wolf_get_post_thumbnail_url('extra-large');
$bg = esc_url(wolf_get_url_from_attachment_id(get_post_thumbnail_id($post_id), 'extra-large'));
$comments = get_comments_number();
$print_term_list = get_the_term_list($post_id, $post_type . '_type', __('in ', 'wolf'), ', ', '');
?>
<article  id="post-<?php 
the_ID();
?>
" <?php 
post_class(array('modern-item', $term_list));
?>
 data-post-id="<?php 
the_ID();
?>
">
<?php

/**
 * The post loop
 */
$post_id = get_the_ID();
$format = get_post_format() ? get_post_format() : 'standard';
$media = wolf_post_media();
$views = wolf_format_number(absint(get_post_meta($post_id, '_wolf_views', true)));
$likes = wolf_format_number(absint(get_post_meta($post_id, '_wolf_likes', true)));
$comments = wolf_format_number(get_comments_number());
$no_views = array('status', 'aside', 'link', 'quote');
$bg = wolf_get_post_thumbnail_url('large');
?>
<article <?php 
post_class('clearfix');
?>
   id="post-<?php 
the_ID();
?>
" data-post-id="<?php 
the_ID();
?>
" data-bg="<?php 
echo esc_url($bg);
?>
">
	<?php 
if ($format != 'aside' && $format != 'status' && $format != 'link' && $format != 'quote' && $media) {
    ?>