Skip to content
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ Review, Event, People, Product, Recipe, Software Application, Video, Articles et

## Changelog ##

### 1.6.11.1 ###
- Fixed: Product image schema error in Product schema.

### 1.6.11 ###
- Fixed: Improved code quality syntax and security checks for better coding standards and practices.
- Fixed: Recipe - Author type fix.
Expand Down
5 changes: 5 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,11 @@ function display_rich_snippet( $content ) {
$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 .= '<div itemprop="image" itemscope itemtype="https://schema.org/ImageObject">';
$product .= '<meta itemprop="contentUrl" content="' . esc_url( $product_image ) . '">';
$product .= '<link itemprop="url" href="' . esc_url( $product_image ) . '">';
$product .= '</div>';

if ( '' != trim( $product_brand ) ) {
if ( '' != $args_product['product_brand'] ) {
$product .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_product['product_brand'] ) ) . '</div>';
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ Review, Event, People, Product, Recipe, Software Application, Video, Articles et

== Changelog ==

= 1.6.11.1 =
- Fixed: Product image schema error in Product schema.

= 1.6.11 =
- Fixed: Improved code quality syntax and security checks for better coding standards and practices.
- Fixed: Recipe - Author type fix.
Expand Down
Loading