Schema & Structured Data for WP & AMP - Version 1.8.2

Version Description

(13 May 2019) =

  • Bug Fixed: Warning: getimagesize #271
Download this release

Release Info

Developer magazine3
Plugin Icon 128x128 Schema & Structured Data for WP & AMP
Version 1.8.2
Comparing to
See all releases

Code changes from version 1.8.1 to 1.8.2

output/function.php CHANGED
@@ -49,6 +49,7 @@ function saswp_schema_markup_output() {
49
  global $sd_data;
50
  global $post;
51
 
 
52
  $output = '';
53
  $post_specific_enable = '';
54
  $schema_output = array();
49
  global $sd_data;
50
  global $post;
51
 
52
+ $custom_option = '';
53
  $output = '';
54
  $post_specific_enable = '';
55
  $schema_output = array();
output/output.php CHANGED
@@ -1195,9 +1195,9 @@ function saswp_schema_output() {
1195
  if(isset($schema_data['saswp_review_schema_image'])){
1196
 
1197
  $input1['itemReviewed']['image']['@type'] = 'ImageObject';
1198
- $input1['itemReviewed']['image']['url'] = esc_url($schema_data['saswp_review_schema_image']);
1199
- $input1['itemReviewed']['image']['width'] = esc_attr($schema_data['saswp_review_schema_image_detail']['width']);
1200
- $input1['itemReviewed']['image']['height']= esc_attr($schema_data['saswp_review_schema_image_detail']['height']);
1201
 
1202
  }
1203
 
1195
  if(isset($schema_data['saswp_review_schema_image'])){
1196
 
1197
  $input1['itemReviewed']['image']['@type'] = 'ImageObject';
1198
+ $input1['itemReviewed']['image']['url'] = isset($schema_data['saswp_review_schema_image']) ? esc_url($schema_data['saswp_review_schema_image']) : '';
1199
+ $input1['itemReviewed']['image']['width'] = isset($schema_data['saswp_review_schema_image_detail']) ? esc_attr($schema_data['saswp_review_schema_image_detail']['width']) : '';
1200
+ $input1['itemReviewed']['image']['height']= isset($schema_data['saswp_review_schema_image_detail']) ? esc_attr($schema_data['saswp_review_schema_image_detail']['height']) : '';
1201
 
1202
  }
1203
 
output/service.php CHANGED
@@ -1731,8 +1731,7 @@ Class saswp_output_service{
1731
 
1732
  if( is_array($image_details) ){
1733
 
1734
-
1735
-
1736
  if(isset($image_details[1]) && ($image_details[1] < 1200) && function_exists('ampforwp_aq_resize')){
1737
 
1738
  $width = array(1280, 640, 300);
@@ -1816,14 +1815,14 @@ Class saswp_output_service{
1816
 
1817
  if($content){
1818
 
1819
- $regex = '/src="([^"]*)"/';
1820
  preg_match_all( $regex, $content, $attachments );
1821
-
1822
  $attach_images = array();
1823
 
1824
  if(!empty($attachments)){
1825
  $k = 0;
1826
- foreach ($attachments[1] as $attachment) {
1827
 
1828
  $attach_details = getimagesize($attachment);
1829
  if($attach_details){
1731
 
1732
  if( is_array($image_details) ){
1733
 
1734
+
 
1735
  if(isset($image_details[1]) && ($image_details[1] < 1200) && function_exists('ampforwp_aq_resize')){
1736
 
1737
  $width = array(1280, 640, 300);
1815
 
1816
  if($content){
1817
 
1818
+ $regex = '/<img(.*?)src="(.*?)"(.*?)>/';
1819
  preg_match_all( $regex, $content, $attachments );
1820
+
1821
  $attach_images = array();
1822
 
1823
  if(!empty($attachments)){
1824
  $k = 0;
1825
+ foreach ($attachments[2] as $attachment) {
1826
 
1827
  $attach_details = getimagesize($attachment);
1828
  if($attach_details){
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.2
6
- Stable tag: 1.8.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -66,6 +66,11 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
66
  == Changelog ==
67
 
68
 
 
 
 
 
 
69
  = 1.8.1 (13 May 2019) =
70
 
71
  * New Feature: An option for adding own custom json schema markup on every post #257
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.2
6
+ Stable tag: 1.8.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
66
  == Changelog ==
67
 
68
 
69
+ = 1.8.2 (13 May 2019) =
70
+
71
+ * Bug Fixed: Warning: getimagesize #271
72
+
73
+
74
  = 1.8.1 (13 May 2019) =
75
 
76
  * New Feature: An option for adding own custom json schema markup on every post #257
structured-data-for-wp.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Schema & Structured Data for WP
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.8.1
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.8.1');
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
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.8.2
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.8.2');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));