Пример #1
0
							</div>
							<?php 
        }
        ?>
							<div class="post-footer">
								<div class="social-icons ed-social-share-icons">
									<p class="share-title"><?php 
        esc_html_e('Share:', 'extra');
        ?>
</p>
									<?php 
        extra_post_share_links();
        ?>
								</div>
								<?php 
        if (extra_is_post_rating_enabled()) {
            ?>
								<div class="rating-stars">
									<?php 
            extra_rating_stars_display();
            ?>
								</div>
								<?php 
        }
        ?>
								<style type="text/css" id="rating-stars">
									.post-footer .rating-stars #rated-stars img.star-on,
									.post-footer .rating-stars #rating-stars img.star-on {
										background-color: <?php 
        echo esc_html($post_category_color);
        ?>
Пример #2
0
function et_extra_display_post_meta($args = array())
{
    $default_args = array('post_id' => get_the_ID(), 'author_link' => true, 'author_link_by' => __('by %s', 'extra'), 'post_date' => true, 'date_format' => et_get_option('extra_date_format', ''), 'categories' => true, 'comment_count' => true, 'rating_stars' => true);
    $args = wp_parse_args($args, $default_args);
    $meta_pieces = array();
    if ($args['author_link']) {
        $meta_pieces[] = sprintf($args['author_link_by'], extra_get_post_author_link($args['post_id']));
    }
    if ($args['post_date']) {
        $meta_pieces[] = extra_get_the_post_date($args['post_id'], $args['date_format']);
    }
    if ($args['categories']) {
        $meta_piece_categories = extra_get_the_post_categories($args['post_id']);
        if (!empty($meta_piece_categories)) {
            $meta_pieces[] = $meta_piece_categories;
        }
    }
    if ($args['comment_count']) {
        $meta_piece_comments = extra_get_the_post_comments_link($args['post_id']);
        if (!empty($meta_piece_comments)) {
            $meta_pieces[] = $meta_piece_comments;
        }
    }
    if ($args['rating_stars'] && extra_is_post_rating_enabled($args['post_id'])) {
        $meta_piece_rating_stars = extra_get_post_rating_stars($args['post_id']);
        if (!empty($meta_piece_rating_stars)) {
            $meta_pieces[] = $meta_piece_rating_stars;
        }
    }
    $output = implode(' | ', $meta_pieces);
    return $output;
}