<?php global $gp;

gp_get_hub_id( get_the_ID() );

?>

<div class="site-rating-wrapper large-rating rating-<?php echo sanitize_html_class( $gp['review_site_rating_style'] ); ?>"<?php if ( isset( $GLOBALS['gp_site_rich_snippets'] ) && $GLOBALS['gp_site_rich_snippets'] == true ) { ?> itemscope itemtype="http://schema.org/Review"<?php } ?>>

	<div class="rating-inner">
		<div class="score-clip <?php echo sanitize_html_class( $GLOBALS['gp_site_clip_class_1'] ); ?>">
			<div class="score-spinner" style="-webkit-transform: rotate(<?php echo esc_attr( $GLOBALS['gp_site_deg'] ); ?>deg); transform: rotate(<?php echo esc_attr( $GLOBALS['gp_site_deg'] ); ?>deg);"></div>
		</div>
		<div class="score-clip <?php echo sanitize_html_class( $GLOBALS['gp_site_clip_class_2'] ); ?>">
			<div class="score-filler"></div>
		</div>		
		<div class="score-inner">
			<div class="score-table">
				<div class="score-cell">					
					<?php if ( isset( $GLOBALS['gp_site_rich_snippets'] ) && $GLOBALS['gp_site_rich_snippets'] == true ) { ?> 
						<meta itemprop="itemReviewed" content="<?php the_title_attribute( array( 'post' => $GLOBALS['gp_hub_id'] ) ); ?>">
						<meta itemprop="author" content="<?php echo the_author_meta( 'display_name', $post->post_author ); ?>">
					<?php } ?>	
					<span<?php if ( isset( $GLOBALS['gp_site_rich_snippets'] ) && $GLOBALS['gp_site_rich_snippets'] == true ) { ?> itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating"<?php } ?>>
						<?php if ( isset( $GLOBALS['gp_site_rich_snippets'] ) && $GLOBALS['gp_site_rich_snippets'] == true ) { ?> 
							<meta itemprop="worstRating" content="1">
							<meta itemprop="bestRating" content="<?php echo floatval( $gp['review_rating_number'] ); ?>">
						<?php } ?>
						<span<?php if ( isset( $GLOBALS['gp_site_rich_snippets'] ) && $GLOBALS['gp_site_rich_snippets'] == true ) { ?> itemprop="ratingValue"<?php } ?>><?php echo floatval( $GLOBALS['gp_total_score'] ); ?></span>
					</span>
				</div>
			</div>
		</div>						
	</div>
	<?php if ( isset( $GLOBALS['gp_site_rating_text'] ) ) { ?><h4 class="rating-text"<?php if ( isset( $GLOBALS['gp_site_rich_snippets'] ) && $GLOBALS['gp_site_rich_snippets'] == true ) { ?> itemprop="description"<?php } ?>><?php echo esc_attr( $GLOBALS['gp_site_rating_text'] ); ?></h4><?php } ?>
		
</div>