Advertisement
Guest User

single.php

a guest
Aug 21st, 2015
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.19 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <?php
  4. $et_inreview_settings = maybe_unserialize( get_post_meta(get_the_ID(),'_et_inreview_settings',true) );
  5. $et_is_editor_choice = isset( $et_inreview_settings['et_is_editor_choice'] ) ? (bool) $et_inreview_settings['et_is_editor_choice'] : false;
  6. $et_fs_price = isset( $et_inreview_settings['et_fs_price'] ) && !empty($et_inreview_settings['et_fs_price']) ? $et_inreview_settings['et_fs_price'] : '';
  7. $et_affiliate_text = isset( $et_inreview_settings['et_affiliate_text'] ) && !empty($et_inreview_settings['et_affiliate_text']) ? $et_inreview_settings['et_affiliate_text'] : '';
  8. $et_affiliate_link = isset( $et_inreview_settings['et_affiliate_link'] ) && !empty($et_inreview_settings['et_affiliate_link']) ? $et_inreview_settings['et_affiliate_link'] : '';
  9.  
  10. $et_author_rating = get_post_meta(get_the_ID(),'_et_inreview_user_rating',true) ? get_post_meta(get_the_ID(),'_et_inreview_user_rating',true) : 0;
  11. $et_comments_rating = get_post_meta(get_the_ID(),'_et_inreview_comments_rating',true) ? get_post_meta(get_the_ID(),'_et_inreview_comments_rating',true) : et_get_post_user_rating(get_the_ID());
  12.  
  13. $et_features = get_post_meta(get_the_ID(),'_et_inreview_features',true) ? get_post_meta(get_the_ID(),'_et_inreview_features',true) : array();
  14. if ( !empty($et_features) ) $et_features = array_filter($et_features, 'strlen');
  15.  
  16. $et_features_rating = get_post_meta(get_the_ID(),'_et_features_rating',true) ? get_post_meta(get_the_ID(),'_et_features_rating',true) : array();
  17. ?>
  18.  
  19. <div id="main-content">
  20. <div id="main-content-wrap" class="clearfix">
  21. <div id="left-area">
  22. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  23. <?php get_template_part('includes/breadcrumbs'); ?>
  24. <div class="entry post clearfix">
  25. <?php if (get_option('inreview_integration_single_top') <> '' && get_option('inreview_integrate_singletop_enable') == 'on') echo(get_option('inreview_integration_single_top')); ?>
  26.  
  27. <?php if (get_option('inreview_thumbnails') == 'on') { ?>
  28. <?php
  29. $thumb = '';
  30. $width = 222;
  31. $height = 231;
  32. $classtext = 'post-thumb';
  33. $titletext = get_the_title();
  34. $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext,false,'Single');
  35. $thumb = $thumbnail["thumb"];
  36. ?>
  37.  
  38. <?php if($thumb <> '') { ?>
  39. <div class="post-thumbnail">
  40. <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext); ?>
  41. <span class="post-overlay"></span>
  42.  
  43. <?php if ( $et_is_editor_choice ){ ?>
  44. <span class="et-belt et-choice"></span>
  45. <?php } ?>
  46. <?php if ( $et_fs_price ){ ?>
  47. <span class="price-tag"><span><?php echo $et_fs_price; ?></span></span>
  48. <?php } ?>
  49. </div> <!-- end .post-thumbnail -->
  50. <?php } ?>
  51. <?php } ?>
  52.  
  53. <div class="post-description">
  54. <h1 class="title"><?php the_title(); ?></h1>
  55. <?php get_template_part('includes/postinfo'); ?>
  56.  
  57. <?php if ( $et_author_rating <> 0 ) { ?>
  58. <div class="rating-container">
  59. <div class="rating-inner clearfix">
  60. <span><?php esc_html_e('Author','InReview'); ?></span>
  61. <div class="review-rating">
  62. <div class="review-score" style="width: <?php echo et_get_star_rating($et_author_rating); ?>px;"></div>
  63. </div>
  64. </div> <!-- end .rating-inner -->
  65. </div> <!-- end .rating-container -->
  66. <?php } ?>
  67.  
  68. <?php if ( $et_comments_rating <> 0 ) { ?>
  69. <div class="rating-container">
  70. <div class="rating-inner clearfix">
  71. <span><?php esc_html_e('Users','InReview'); ?></span>
  72. <div class="review-rating">
  73. <div class="review-score" style="width: <?php echo et_get_star_rating($et_comments_rating); ?>px;"></div>
  74. </div>
  75. </div> <!-- end .rating-inner -->
  76. </div> <!-- end .rating-container -->
  77. <?php } ?>
  78.  
  79. <div class="clear"></div>
  80.  
  81. <?php if ( !empty($et_features) && !empty($et_features_rating) ) { ?>
  82. <div id="feature-box">
  83. <div id="feature-container">
  84. <ul id="feature-items">
  85. <?php for ( $i=0; $i < count($et_features); $i++ ){ ?>
  86. <li class="clearfix<?php if ( $i == ( count($et_features) - 1 ) ) echo ' last'; ?>">
  87. <span><?php echo $et_features[$i]; ?></span>
  88. <div class="review-rating">
  89. <div class="review-score" style="width: <?php echo et_get_star_rating($et_features_rating[$i]); ?>px;"></div> <!-- 16 * rating ( 0.5, 1, 1.5, 2... ) -->
  90. </div>
  91. </li>
  92. <?php } ?>
  93. </ul>
  94. </div> <!-- end #feature-container -->
  95. </div> <!-- end #feature-box -->
  96. <?php } ?>
  97. </div> <!-- end .post-description -->
  98. <div class="clear"></div>
  99.  
  100. <div class="entry-content">
  101. <?php the_content(); ?>
  102. <?php wp_link_pages(array('before' => '<p><strong>'.esc_html__('Pages','InReview').':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
  103. <?php edit_post_link(esc_html__('Edit this page','InReview')); ?>
  104. </div> <!-- end .entry-content -->
  105. </div> <!-- end .entry -->
  106.  
  107. <?php if ( $et_affiliate_link <> '' && $et_affiliate_text <> '' ) { ?>
  108. <div class="et-link"><a href="<?php echo $et_affiliate_link; ?>" class="readmore"><span><?php echo $et_affiliate_text; ?></span></a></div>
  109. <?php } ?>
  110.  
  111. <?php if (get_option('inreview_integration_single_bottom') <> '' && get_option('inreview_integrate_singlebottom_enable') == 'on') echo(get_option('inreview_integration_single_bottom')); ?>
  112.  
  113. <?php if (get_option('inreview_468_enable') == 'on') { ?>
  114. <?php if(get_option('inreview_468_adsense') <> '') echo(get_option('inreview_468_adsense'));
  115. else { ?>
  116. <a href="<?php echo esc_url(get_option('inreview_468_url')); ?>"><img src="<?php echo esc_attr(get_option('inreview_468_image')); ?>" alt="468 ad" class="foursixeight" /></a>
  117. <?php } ?>
  118. <?php } ?>
  119.  
  120. <?php if (get_option('inreview_show_postcomments') == 'on') comments_template('', true); ?>
  121. <?php endwhile; endif; ?>
  122. </div> <!-- end #left-area -->
  123.  
  124. <?php get_sidebar(); ?>
  125.  
  126. </div> <!-- end #main-content-wrap -->
  127. </div> <!-- end #main-content -->
  128. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement