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

Build Version 1.6.12 #161

Merged
merged 14 commits into from
Oct 21, 2024
Merged
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
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Schema - All In One Schema Rich Snippets #
**Contributors:** [brainstormforce](https://profiles.wordpress.org/brainstormforce)
**Donate link:** https://www.paypal.me/BrainstormForce
**Tags:** schema markup, structured data, rich snippets, schema.org, Microdata, schema
**Tags:** schema markup, structured data, rich snippets, schema.org, schema
**Requires at least:** 3.7
**Tested up to:** 6.6
**Stable tag:** 1.6.11
**Stable tag:** 1.6.12
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
Boost CTR. Improve SEO & Rankings. Supports most of the content type. Works perfectly with Google, Bing, Yahoo & Facebook.
Expand Down Expand Up @@ -80,6 +80,10 @@ Review, Event, People, Product, Recipe, Software Application, Video, Articles et

## Changelog ##

### 1.6.12 ###
- Improvement: Added Product Image field in Review Schema.
- Improvement: Updated plugin metadata tags to improve search optimization.

### 1.6.11 ###
- Fixed: Improved code quality syntax and security checks for better coding standards and practices.
- Fixed: Recipe - Author type fix.
Expand Down
13 changes: 12 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function display_rich_snippet( $content ) {
$item_event_local = get_post_meta( $post->ID, '_bsf_item_event_local', true );
$item_event_region = get_post_meta( $post->ID, '_bsf_item_event_region', true );
$item_event_postal_code = get_post_meta( $post->ID, '_bsf_item_event_postal_code', true );
$item_pro_image = get_post_meta( $post->ID, '_bsf_item_pro_image', true );
$item_pro_name = get_post_meta( $post->ID, '_bsf_item_pro_name', true );
$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 );
Expand All @@ -112,6 +113,10 @@ function display_rich_snippet( $content ) {
$review .= '<div class="snippet-image"><img width="180" src="' . esc_url( $item_recp_photo ) . '" alt="recipe image"/></div>';
$review .= '<div class="aio-info">';
}
if ( 'item_product' == $item_review_type ) {
$review .= '<div class="snippet-image"><img width="180" src="' . esc_url( $item_pro_image ) . '" alt="recipe image"/></div>';
$review .= '<div class="aio-info">';
}
if ( 'item_video' == $item_review_type ) {
$review .= '<div class="snippet-image"><img width="180" src="' . esc_url( $item_video_thumb ) . '" alt="Video Image"/></div>';
$review .= '<div class="aio-info">';
Expand Down Expand Up @@ -213,6 +218,7 @@ function display_rich_snippet( $content ) {
}
$review .= " <div class='snippet-data'><span itemprop='name'>" . esc_attr( stripslashes( $item_pro_name ) ) . '</span></div>';
}

if ( '' != trim( $item_pro_price ) ) {

if ( '' != $item_product['product_price'] ) {
Expand All @@ -229,7 +235,12 @@ function display_rich_snippet( $content ) {
}
$review .= '</div>';
}
$review .= '</span>';

if ( '' != trim( $item_pro_image ) ) {
$review .= '<meta itemprop="image" content="' . esc_attr( $item_pro_image ) . '">';
}

$review .= '</span></div>';
}
if ( 'item_recipe' == $item_review_type ) {
$item_recipe = get_option( 'bsf_recipe' );
Expand Down
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: Brainstorm Force
* Author URI: https://www.brainstormforce.com
* Description: Welcome to the Schema - All In One Schema Rich Snippets! You can now easily add schema markup on various * pages and posts of your website. Implement schema types such as Review, Events, Recipes, Article, Products, Services * *etc.
* Version: 1.6.11
* Version: 1.6.12
* Text Domain: rich-snippets
* License: GPL2
*
Expand Down Expand Up @@ -68,7 +68,7 @@ public function define_constants() {
define( 'AIOSRS_PRO_BASE', plugin_basename( AIOSRS_PRO_FILE ) );
define( 'AIOSRS_PRO_DIR', plugin_dir_path( AIOSRS_PRO_FILE ) );
define( 'AIOSRS_PRO_URI', plugins_url( '/', AIOSRS_PRO_FILE ) );
define( 'AIOSRS_PRO_VER', '1.6.11' );
define( 'AIOSRS_PRO_VER', '1.6.12' );
}

/**
Expand Down
Loading
Loading