Schema & Structured Data for WP & AMP - Version 1.9.54.1

Version Description

(11 Nov 2020) =

  • Added: Image missing in AMP after last update #1220
Download this release

Release Info

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

Code changes from version 1.9.54 to 1.9.54.1

core/3rd-party/aqua_resizer.php CHANGED
@@ -35,13 +35,13 @@ if ( ! defined( 'ABSPATH' ) ) {
35
  * @return str|array
36
  */
37
 
38
- if(!class_exists('Aq_Resize')) {
39
 
40
- if(!class_exists('Aq_Exception')){
41
- class Aq_Exception extends Exception {}
42
  }
43
 
44
- class Aq_Resize
45
  {
46
  /**
47
  * The singleton instance
@@ -49,7 +49,7 @@ if(!class_exists('Aq_Resize')) {
49
  static private $instance = null;
50
 
51
  /**
52
- * Should an Aq_Exception be thrown on error?
53
  * If false (default), then the error will just be logged.
54
  */
55
  public $throwOnError = false;
@@ -82,9 +82,9 @@ if(!class_exists('Aq_Resize')) {
82
  try {
83
  // Validate inputs.
84
  if (!$url)
85
- throw new Aq_Exception('$url parameter is required');
86
  if (!$width)
87
- throw new Aq_Exception('$width parameter is required');
88
 
89
  // Caipt'n, ready to hook.
90
  if ( true === $upscale ) add_filter( 'image_resize_dimensions', array($this, 'aq_upscale'), 10, 6 );
@@ -193,7 +193,7 @@ if(!class_exists('Aq_Resize')) {
193
 
194
  if ( ! $dims || ( true == $crop && false == $upscale && ( $dst_w < $width || $dst_h < $height ) ) ) {
195
  // Can't resize, so return false saying that the action to do could not be processed as planned.
196
- throw new Aq_Exception('Unable to resize image because image_resize_dimensions() failed');
197
  }
198
  // Else check if cache exists.
199
  elseif ( file_exists( $destfilename ) && @getimagesize( $destfilename ) ) {
@@ -220,7 +220,7 @@ if(!class_exists('Aq_Resize')) {
220
  $resized_rel_path = str_replace( $upload_dir, '', $resized_file['path'] );
221
  $img_url = $upload_url . $resized_rel_path;
222
  } else {
223
- throw new Aq_Exception('Unable to save resized image file: ' . $resized_file->get_error_message());
224
  }
225
 
226
  }
@@ -254,7 +254,7 @@ if(!class_exists('Aq_Resize')) {
254
 
255
  return $image;
256
  }
257
- catch (Aq_Exception $ex) {
258
  // Throwing errors for the images stored on CDN #2285
259
  /*error_log('Aq_Resize.process() error: ' . $ex->getMessage());*/
260
 
@@ -352,7 +352,7 @@ if(!function_exists('saswp_aq_resize')) {
352
 
353
  }
354
 
355
- $aq_resize = Aq_Resize::getInstance();
356
  return $aq_resize->process( $url, $width, $height, $crop, $single, $upscale );
357
 
358
  }
@@ -362,7 +362,7 @@ if(!function_exists('saswp_aq_resize')) {
362
  return fifu_amp_url($url, $width, $height);
363
  }
364
  else {
365
- $aq_resize = Aq_Resize::getInstance();
366
  return $aq_resize->process( $url, $width, $height, $crop, $single, $upscale );
367
  }
368
  }
35
  * @return str|array
36
  */
37
 
38
+ if(!class_exists('SASWP_Aq_Resize')) {
39
 
40
+ if(!class_exists('SASWP_Aq_Exception')){
41
+ class SASWP_Aq_Exception extends Exception {}
42
  }
43
 
44
+ class SASWP_Aq_Resize
45
  {
46
  /**
47
  * The singleton instance
49
  static private $instance = null;
50
 
51
  /**
52
+ * Should an SASWP_Aq_Exception be thrown on error?
53
  * If false (default), then the error will just be logged.
54
  */
55
  public $throwOnError = false;
82
  try {
83
  // Validate inputs.
84
  if (!$url)
85
+ throw new SASWP_Aq_Exception('$url parameter is required');
86
  if (!$width)
87
+ throw new SASWP_Aq_Exception('$width parameter is required');
88
 
89
  // Caipt'n, ready to hook.
90
  if ( true === $upscale ) add_filter( 'image_resize_dimensions', array($this, 'aq_upscale'), 10, 6 );
193
 
194
  if ( ! $dims || ( true == $crop && false == $upscale && ( $dst_w < $width || $dst_h < $height ) ) ) {
195
  // Can't resize, so return false saying that the action to do could not be processed as planned.
196
+ throw new SASWP_Aq_Exception('Unable to resize image because image_resize_dimensions() failed');
197
  }
198
  // Else check if cache exists.
199
  elseif ( file_exists( $destfilename ) && @getimagesize( $destfilename ) ) {
220
  $resized_rel_path = str_replace( $upload_dir, '', $resized_file['path'] );
221
  $img_url = $upload_url . $resized_rel_path;
222
  } else {
223
+ throw new SASWP_Aq_Exception('Unable to save resized image file: ' . $resized_file->get_error_message());
224
  }
225
 
226
  }
254
 
255
  return $image;
256
  }
257
+ catch (SASWP_Aq_Exception $ex) {
258
  // Throwing errors for the images stored on CDN #2285
259
  /*error_log('Aq_Resize.process() error: ' . $ex->getMessage());*/
260
 
352
 
353
  }
354
 
355
+ $aq_resize = SASWP_Aq_Resize::getInstance();
356
  return $aq_resize->process( $url, $width, $height, $crop, $single, $upscale );
357
 
358
  }
362
  return fifu_amp_url($url, $width, $height);
363
  }
364
  else {
365
+ $aq_resize = SASWP_Aq_Resize::getInstance();
366
  return $aq_resize->process( $url, $width, $height, $crop, $single, $upscale );
367
  }
368
  }
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.5
6
- Stable tag: 1.9.54
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -120,6 +120,11 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
120
 
121
  == Changelog ==
122
 
 
 
 
 
 
123
  = 1.9.54 (10 Nov 2020) =
124
 
125
  * Added: Rest api to show the headless output #1026
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.5
6
+ Stable tag: 1.9.54.1
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.54.1 (11 Nov 2020) =
124
+
125
+ * Added: Image missing in AMP after last update #1220
126
+
127
+
128
  = 1.9.54 (10 Nov 2020) =
129
 
130
  * Added: Rest api to show the headless output #1026
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.54
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.54');
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.54.1
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.54.1');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));