Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #47 HTML Syntax Errors #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ td .tbl-bdf-td{
float: right;
margin-right: 10px;
}
div.ratings {
display: inline;
}
.star-blocks {
background:#FFF;
}
Expand Down
18 changes: 9 additions & 9 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function display_rich_snippet($content) {
$event .= '<span itemprop="addressRegion">'.esc_attr( $event_region ).'</span>';
if(trim($event_postal_code) != "")
$event .= '-<span itemprop="postalCode">'.esc_attr( $event_postal_code ).'</span>';
$event .= '</span>';
$itemprop="ratingValue" .= '</span>';

$event .='</span>
</div><div class="snippet-clear"></div>';
Expand Down Expand Up @@ -464,7 +464,7 @@ function display_rich_snippet($content) {
}
$product .= '<div class="snippet-data-img">';
$product .= '<span itemprop="ratingValue">'.average_rating().'</span>';
$product .= ' based on <span class="rating-count" itemprop="reviewCount">'.rating_count().'</span> votes </span></div></div><div class="snippet-clear"></div>';
$product .= ' based on <span class="rating-count" itemprop="reviewCount">'.rating_count().' votes </span></div></div><div class="snippet-clear"></div>';


if(trim($product_brand) != "")
Expand Down Expand Up @@ -492,7 +492,7 @@ function display_rich_snippet($content) {
{
if($args_product['product_avail'] != "")
$product .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_product['product_avail'] ) ).'</div>';
$product .= ' <div class="snippet-data-img"> <span itemprop="availability" content="'.esc_attr( $product_status ).'">'.esc_attr( $availability ).'</span></span></div><div class="snippet-clear"></div>';
$product .= ' <div class="snippet-data-img"> <span itemprop="availability" content="'.esc_attr( $product_status ).'">'.esc_attr( $availability ).'</span></div><div class="snippet-clear"></div>';
}
$product .= '</div><div class="snippet-clear"></div>';
}
Expand Down Expand Up @@ -676,7 +676,7 @@ function display_rich_snippet($content) {
$software .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_soft['software_agr'] ) ).'</div>';
$software .= '<div class="snippet-data-img">';
$software .= '<span itemprop="ratingValue">'.average_rating().'</span>';
$software .= ' based on <span class="rating-count" itemprop="reviewCount">'.rating_count().'</span> votes </span></div></div><div class="snippet-clear"></div>';
$software .= ' based on <span class="rating-count" itemprop="reviewCount">'.rating_count().' votes </span></div></div><div class="snippet-clear"></div>';

if(trim($software_name) != "")
{
Expand Down Expand Up @@ -971,7 +971,7 @@ function display_rich_snippet($content) {
$service .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_service['service_rating'] ) ).'</div>';
$service .= '<div class="snippet-data-img">';
$service .= '<span itemprop="ratingValue">'.average_rating().'</span>';
$service .= ' based on <span class="rating-count" itemprop="reviewCount">'.rating_count().'</span> votes </span></div></div><div class="snippet-clear"></div>';
$service .= ' based on <span class="rating-count" itemprop="reviewCount">'.rating_count().' votes </span></div></div><div class="snippet-clear"></div>';
}
}

Expand Down Expand Up @@ -1193,7 +1193,7 @@ function bsf_update_rating()
function display_rating() {

global $post;
$rating = '<span class="ratings"><div class="star-blocks">';
$rating = '<div class="ratings"><div class="star-blocks">';
$rating .= '<form name="rating" method="post" action="'. get_permalink() .'" id="bsf-rating" onsubmit="return false;">';
$rating .= '<input type="radio" name="star-review" class="star star-1" value="1"/>';
$rating .= '<input type="radio" name="star-review" class="star star-2" value="2"/>';
Expand All @@ -1203,7 +1203,7 @@ function display_rating() {
$rating .= '<input type="hidden" name="ip" value="'.get_the_ip().'" />';
$rating .= '<input type="hidden" name="post_id" value="'.$post->ID.'" />';
$rating .= '</form>';
$rating .= '</div></span>';
$rating .= '</div></div>';
$script = '<script type="text/javascript">
jQuery("#bsf-rating").click(function()
{
Expand All @@ -1225,7 +1225,7 @@ function (response) {
function bsf_display_rating($n) {

global $post;
$rating = '<span class="ratings"><div class="star-blocks">';
$rating = '<div class="ratings"><div class="star-blocks">';
$rating .= '<form name="rating" method="post" action="'. get_permalink() .'" id="bsf-rating" onsubmit="return false;">';
$rating .= '<input type="radio" name="star-review" class="star star-1" value="1" '; $n == 1 ? $rating .=' checked="checked"/>' : $rating .='/>';
$rating .= '<input type="radio" name="star-review" class="star star-2" value="2" '; $n == 2 ? $rating .=' checked="checked"/>' : $rating .='/>';
Expand All @@ -1235,7 +1235,7 @@ function bsf_display_rating($n) {
$rating .= '<input type="hidden" name="ip" value="'.get_the_ip().'" />';
$rating .= '<input type="hidden" name="post_id" value="'.$post->ID.'" />';
$rating .= '</form>';
$rating .= '</div></span>';
$rating .= '</div></div>';
$script = '<script type="text/javascript">
jQuery("#bsf-rating").click(function()
{
Expand Down