Version Description
(13 April 2022) =
- Fixed: Remove double slash in links from Reviews Badge #1631
- Fixed: PHP Deprecated: _content_template is deprecated since version 2.9.0 #1643
- Enhancement: Made PerformerIn Offers Availibility selection is optional #1644
- Added: Compatibility with Brands for Woocommerce #1646
Download this release
Release Info
Developer | magazine3 |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.9.96 |
Comparing to | |
See all releases |
Code changes from version 1.9.95 to 1.9.96
- core/array-list/schema-properties.php +1 -0
- modules/elementor/widgets/faq-block.php +3 -3
- modules/reviews/reviews_service.php +1 -1
- output/function.php +17 -8
- readme.txt +9 -1
- structured-data-for-wp.php +2 -2
- view/post_specific.php +1 -1
core/array-list/schema-properties.php
CHANGED
@@ -6154,6 +6154,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
6154 |
'id' => 'saswp_person_schema_performerin_offers_availability_'.$schema_id,
|
6155 |
'type' => 'select',
|
6156 |
'options' => array(
|
|
|
6157 |
'InStock' => 'In Stock',
|
6158 |
'OutOfStock' => 'Out Of Stock',
|
6159 |
'Discontinued' => 'Discontinued',
|
6154 |
'id' => 'saswp_person_schema_performerin_offers_availability_'.$schema_id,
|
6155 |
'type' => 'select',
|
6156 |
'options' => array(
|
6157 |
+
'' => 'Select',
|
6158 |
'InStock' => 'In Stock',
|
6159 |
'OutOfStock' => 'Out Of Stock',
|
6160 |
'Discontinued' => 'Discontinued',
|
modules/elementor/widgets/faq-block.php
CHANGED
@@ -24,7 +24,7 @@ class Faq_Block extends Widget_Base {
|
|
24 |
return 'eicon-text';
|
25 |
}
|
26 |
|
27 |
-
protected function
|
28 |
|
29 |
$this->start_controls_section(
|
30 |
'content_section',
|
@@ -104,7 +104,7 @@ class Faq_Block extends Widget_Base {
|
|
104 |
|
105 |
if ( $settings['list'] ) {
|
106 |
|
107 |
-
$saswp_elementor_faq = $settings['list'];
|
108 |
echo '<ul>';
|
109 |
$i = 1;
|
110 |
foreach ( $settings['list'] as $item ) {
|
@@ -124,7 +124,7 @@ class Faq_Block extends Widget_Base {
|
|
124 |
}
|
125 |
}
|
126 |
|
127 |
-
protected function
|
128 |
?>
|
129 |
<# if ( settings.list.length ) {
|
130 |
|
24 |
return 'eicon-text';
|
25 |
}
|
26 |
|
27 |
+
protected function register_controls() {
|
28 |
|
29 |
$this->start_controls_section(
|
30 |
'content_section',
|
104 |
|
105 |
if ( $settings['list'] ) {
|
106 |
|
107 |
+
$saswp_elementor_faq = $settings['list'];
|
108 |
echo '<ul>';
|
109 |
$i = 1;
|
110 |
foreach ( $settings['list'] as $item ) {
|
124 |
}
|
125 |
}
|
126 |
|
127 |
+
protected function content_template() {
|
128 |
?>
|
129 |
<# if ( settings.list.length ) {
|
130 |
|
modules/reviews/reviews_service.php
CHANGED
@@ -775,7 +775,7 @@ class saswp_reviews_service {
|
|
775 |
}
|
776 |
|
777 |
}else{
|
778 |
-
$review_data['saswp_review_platform_icon'] = SASWP_PLUGIN_URL.'
|
779 |
}
|
780 |
|
781 |
}
|
775 |
}
|
776 |
|
777 |
}else{
|
778 |
+
$review_data['saswp_review_platform_icon'] = SASWP_PLUGIN_URL.'admin_section/images/reviews_platform_icon/'.esc_attr($term->slug).'-img.png';
|
779 |
}
|
780 |
|
781 |
}
|
output/function.php
CHANGED
@@ -100,25 +100,34 @@ function saswp_wp_hook_operation(){
|
|
100 |
function saswp_schema_markup_output_in_buffer($content){
|
101 |
|
102 |
global $saswp_post_reviews, $saswp_elementor_qanda, $saswp_elementor_faq, $saswp_divi_faq, $saswp_elementor_howto, $saswp_evo_json_ld;
|
103 |
-
|
104 |
if(!$saswp_divi_faq){
|
105 |
$regex = "<script type='text/javascript' src='".SASWP_PLUGIN_URL."modules/divi-builder/scripts/frontend-bundle.min.js?ver=1.0.0'></script>";
|
106 |
$content = str_replace($regex, '', $content);
|
107 |
}
|
108 |
|
109 |
if($saswp_post_reviews || $saswp_elementor_qanda || $saswp_elementor_faq || $saswp_divi_faq || $saswp_elementor_howto || $saswp_evo_json_ld){
|
110 |
-
|
111 |
$saswp_json_ld = saswp_get_all_schema_markup_output();
|
112 |
-
|
|
|
113 |
if(!empty($saswp_json_ld['saswp_json_ld'])){
|
114 |
|
115 |
-
$
|
|
|
|
|
116 |
|
117 |
-
|
118 |
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
}
|
124 |
|
100 |
function saswp_schema_markup_output_in_buffer($content){
|
101 |
|
102 |
global $saswp_post_reviews, $saswp_elementor_qanda, $saswp_elementor_faq, $saswp_divi_faq, $saswp_elementor_howto, $saswp_evo_json_ld;
|
103 |
+
|
104 |
if(!$saswp_divi_faq){
|
105 |
$regex = "<script type='text/javascript' src='".SASWP_PLUGIN_URL."modules/divi-builder/scripts/frontend-bundle.min.js?ver=1.0.0'></script>";
|
106 |
$content = str_replace($regex, '', $content);
|
107 |
}
|
108 |
|
109 |
if($saswp_post_reviews || $saswp_elementor_qanda || $saswp_elementor_faq || $saswp_divi_faq || $saswp_elementor_howto || $saswp_evo_json_ld){
|
110 |
+
|
111 |
$saswp_json_ld = saswp_get_all_schema_markup_output();
|
112 |
+
|
113 |
+
|
114 |
if(!empty($saswp_json_ld['saswp_json_ld'])){
|
115 |
|
116 |
+
if(strpos($content, 'saswp-schema-markup-output') !== false){
|
117 |
+
|
118 |
+
$regex = '/<script type\=\"application\/ld\+json\" class\=\"saswp\-schema\-markup\-output\"\>(.*?)<\/script>/s';
|
119 |
|
120 |
+
preg_match($regex, $content, $match);
|
121 |
|
122 |
+
if(isset($match[0])){
|
123 |
+
$content = str_replace($match[0], $saswp_json_ld['saswp_json_ld'], $content);
|
124 |
+
}
|
125 |
+
|
126 |
+
}else{
|
127 |
+
|
128 |
+
$content = str_replace('</head>', $saswp_json_ld['saswp_json_ld'].'</head>', $content);
|
129 |
+
|
130 |
+
}
|
131 |
|
132 |
}
|
133 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: magazine3
|
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.9
|
6 |
-
Stable tag: 1.9.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -120,6 +120,14 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
120 |
|
121 |
== Changelog ==
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
= 1.9.95 (28 Mar 2022) =
|
124 |
|
125 |
* Fixed: Activation of the plugin is causing structure displacement on the website in Admin view. #1637
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.9
|
6 |
+
Stable tag: 1.9.96
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
120 |
|
121 |
== Changelog ==
|
122 |
|
123 |
+
= 1.9.96 (13 April 2022) =
|
124 |
+
|
125 |
+
* Fixed: Remove double slash in links from Reviews Badge #1631
|
126 |
+
* Fixed: PHP Deprecated: _content_template is deprecated since version 2.9.0 #1643
|
127 |
+
* Enhancement: Made PerformerIn Offers Availibility selection is optional #1644
|
128 |
+
* Added: Compatibility with Brands for Woocommerce #1646
|
129 |
+
|
130 |
+
|
131 |
= 1.9.95 (28 Mar 2022) =
|
132 |
|
133 |
* Fixed: Activation of the plugin is causing structure displacement on the website in Admin view. #1637
|
structured-data-for-wp.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP & AMP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
-
Version: 1.9.
|
6 |
Text Domain: schema-and-structured-data-for-wp
|
7 |
Domain Path: /languages
|
8 |
Author: Magazine3
|
@@ -13,7 +13,7 @@ License: GPL2
|
|
13 |
// Exit if accessed directly.
|
14 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
15 |
|
16 |
-
define('SASWP_VERSION', '1.9.
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP & AMP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
+
Version: 1.9.96
|
6 |
Text Domain: schema-and-structured-data-for-wp
|
7 |
Domain Path: /languages
|
8 |
Author: Magazine3
|
13 |
// Exit if accessed directly.
|
14 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
15 |
|
16 |
+
define('SASWP_VERSION', '1.9.96');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
view/post_specific.php
CHANGED
@@ -386,7 +386,7 @@ class saswp_post_specific {
|
|
386 |
. '</div>';
|
387 |
|
388 |
$cus_schema .= '<div id="saswp_specific_custom" class="saswp-post-specific-wrapper saswp_hide">';
|
389 |
-
$cus_schema .= '<div class="'.((isset($schema_enable['custom']) && $schema_enable['custom'] == 0) ? 'saswp_hide' : '').'"><textarea style="margin-left:5px;" placeholder="JSON-LD" schema-id="custom" id="saswp_custom_schema_field" name="saswp_custom_schema_field" rows="5" cols="
|
390 |
. $custom_markp
|
391 |
. '</textarea>';
|
392 |
$cus_schema .= '<span><strong>'.saswp_t_string( 'Note' ).': </strong>'.saswp_t_string( 'Please enter the valid Json-ld. Whatever you enter will be added in page source' ).'</span>';
|
386 |
. '</div>';
|
387 |
|
388 |
$cus_schema .= '<div id="saswp_specific_custom" class="saswp-post-specific-wrapper saswp_hide">';
|
389 |
+
$cus_schema .= '<div class="'.((isset($schema_enable['custom']) && $schema_enable['custom'] == 0) ? 'saswp_hide' : '').'"><textarea style="margin-left:5px;" placeholder="JSON-LD" schema-id="custom" id="saswp_custom_schema_field" name="saswp_custom_schema_field" rows="5" cols="85">'
|
390 |
. $custom_markp
|
391 |
. '</textarea>';
|
392 |
$cus_schema .= '<span><strong>'.saswp_t_string( 'Note' ).': </strong>'.saswp_t_string( 'Please enter the valid Json-ld. Whatever you enter will be added in page source' ).'</span>';
|