$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')) { ?> <div class="video-author-meta clearfix"> <?php echo get_avatar(get_the_author_meta('user_email'), 48); ?> <span class="video-author-name">
<?php if ('gallery' == $format && !wolf_is_blog()) { ?> <?php echo wolf_post_gallery_slider('classic-thumb'); ?> <?php } else { ?> <?php $media = wolf_post_media(true, 'masonry'); if ($media && !post_password_required()) { ?> <div class="post-media-container" class="clearfix"> <?php echo wolf_post_media(true, 'masonry'); ?> </div> <?php } ?> <?php } ?> </header><!-- header.entry-header --> <div class="entry-inner"> <?php if ($format != 'aside' && $format != 'status' && $format != 'link' && $format != 'quote') { ?>
/** * Excludes featured media from content. * The featured media will be displayed at the top in single page */ function wolf_content() { global $post; if (!is_single() && $post->post_excerpt || is_search()) { return '<p>' . get_the_excerpt() . '</p>'; } else { $media = wolf_post_media(false); $post_types = array('post', 'video'); $content = get_the_content(wolf_more_text()); // http://www.youtube.com/watch?v=QhwUydU5_F8&list=UUsLuPQzf-UV3eKrc4F4S0Ew // http://www.youtube.com/watch?v=QhwUydU5_F8&list=UUsLuPQzf-UV3eKrc4F4S0Ew // debug( $media ); // debug( $content ); $array = array('<p>[' => '[', ']</p>' => ']', ']<br />' => ']'); $content = strtr($content, $array); if (in_array(get_post_type(), $post_types) && $media) { $new_content = str_replace($media, '', $content); } else { $new_content = $content; } return apply_filters('the_content', $new_content); } }
/** * * * @param * @return */ function wolf_excerpt($echo = true) { $media = wolf_post_media(false); $excerpt = str_replace($media, '', get_the_excerpt()); if ($echo) { echo '<p>' . $excerpt . '</p>'; } return '<p>' . $excerpt . '</p>'; }