diff --git a/README.md b/README.md
index 6a9efad..65fd111 100644
--- a/README.md
+++ b/README.md
@@ -80,6 +80,9 @@ Review, Event, People, Product, Recipe, Software Application, Video, Articles et
## Changelog ##
+### 1.6.6 ###
+- Fixed - Added image field in the product review schema.
+
### 1.6.5 ###
- Fixed - Code updated according to coding standard.
diff --git a/composer.json b/composer.json
index 22683e5..c92bce7 100644
--- a/composer.json
+++ b/composer.json
@@ -21,5 +21,10 @@
"post-update-cmd": "vendor/bin/cghooks update",
"format": "phpcbf --standard=phpcs.xml.dist",
"lint": "phpcs --standard=phpcs.xml.dist"
+ },
+ "config": {
+ "allow-plugins": {
+ "dealerdirect/phpcodesniffer-composer-installer": true
+ }
}
}
diff --git a/functions.php b/functions.php
index e8e16f5..803b2e4 100644
--- a/functions.php
+++ b/functions.php
@@ -95,6 +95,7 @@ function display_rich_snippet( $content ) {
$item_pro_price = get_post_meta( $post->ID, '_bsf_item_pro_price', true );
$item_pro_cur = get_post_meta( $post->ID, '_bsf_item_pro_cur', true );
$item_pro_status = get_post_meta( $post->ID, '_bsf_item_pro_status', true );
+ $item_pro_photo = get_post_meta( $post->ID, '_bsf_item_pro_product_image', true );
$item_recp_name = get_post_meta( $post->ID, '_bsf_item_recipes_name', true );
$item_recp_photo = get_post_meta( $post->ID, '_bsf_item_recipes_photo', true );
$item_soft_name = get_post_meta( $post->ID, '_bsf_item_soft_name', true );
@@ -116,6 +117,11 @@ function display_rich_snippet( $content ) {
$review .= '
';
$review .= '';
}
+ if ( 'item_product' == $item_review_type ) {
+ $review .= '
';
+ $review .= '
';
+
+ }
if ( '' != trim( $reviewer ) ) {
if ( '' != $args_review['item_reviewer'] ) {
$review .= '
';
@@ -210,6 +216,9 @@ function display_rich_snippet( $content ) {
$review .= "" . esc_attr( stripslashes( $item_product['product_name'] ) ) . '
';
}
$review .= " " . esc_attr( stripslashes( $item_pro_name ) ) . '
';
+ if ( '' != trim( $item_pro_photo ) ) {
+ $review .= '';
+ }
}
if ( '' != trim( $item_pro_price ) ) {
@@ -416,7 +425,7 @@ function display_rich_snippet( $content ) {
$org_latitude = get_post_meta( $post->ID, '_bsf_organization_latitude', true );
$org_longitude = get_post_meta( $post->ID, '_bsf_organization_longitude', true );
if ( '' != trim( $org_name ) ) {
- $organization .= 'Organization Name : ' . esc_attr( $org_nam ) . '';
+ $organization .= 'Organization Name :
' . esc_attr( $org_name ) . ' ';
}
if ( '' != trim( $org_url ) ) {
$organization .= 'Website : ' . esc_attr( $org_url ) . '';
diff --git a/meta-boxes.php b/meta-boxes.php
index 86374dc..92f6a01 100644
--- a/meta-boxes.php
+++ b/meta-boxes.php
@@ -202,6 +202,13 @@ function bsf_metaboxes( array $meta_boxes ) {
'class' => 'product_item_type',
'type' => 'text',
),
+ array(
+ 'name' => __( 'Product Image', 'all-in-one-schemaorg-rich-snippets' ),
+ 'desc' => __( 'Upload the product image or select from library. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
+ 'id' => $prefix . 'item_pro_product_image',
+ 'class' => 'product_item_type',
+ 'type' => 'file',
+ ),
array(
'name' => __( 'Product Price', 'all-in-one-schemaorg-rich-snippets' ),
'desc' => __( 'Enter the product Price.', 'all-in-one-schemaorg-rich-snippets' ),
diff --git a/package-lock.json b/package-lock.json
index 16ffa51..b83a9db 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "all-in-one-schemaorg-rich-snippets",
- "version": "1.6.4",
+ "version": "1.6.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/readme.txt b/readme.txt
index 024b7c2..fb8bf06 100644
--- a/readme.txt
+++ b/readme.txt
@@ -80,6 +80,9 @@ Review, Event, People, Product, Recipe, Software Application, Video, Articles et
== Changelog ==
+= 1.6.6 =
+- Fixed - Added image field in the product review schema.
+
= 1.6.5 =
- Fixed - Code updated according to coding standard.