Glue for Yoast SEO & AMP - Version 0.4.3

Version Description

  • Bugfixes:
    • Fixes a fatal error in combination with AMP for WordPress version 0.7.0. Props Ryan Kienstra.
Download this release

Release Info

Developer jipmoors
Plugin Icon 128x128 Glue for Yoast SEO & AMP
Version 0.4.3
Comparing to
See all releases

Code changes from version 0.4.2 to 0.4.3

Files changed (3) hide show
  1. classes/class-frontend.php +6 -1
  2. readme.txt +7 -3
  3. yoastseo-amp.php +1 -1
classes/class-frontend.php CHANGED
@@ -159,6 +159,9 @@ if ( ! class_exists( 'YoastSEO_AMP_Frontend' ) ) {
159
  * @return array
160
  */
161
  public function fix_amp_post_data( $data ) {
 
 
 
162
  $data['canonical_url'] = $this->front->canonical( false );
163
 
164
  if ( ! empty( $this->options['amp_site_icon'] ) ) {
@@ -182,7 +185,9 @@ if ( ! class_exists( 'YoastSEO_AMP_Frontend' ) ) {
182
  * @return array
183
  */
184
  public function fix_amp_post_metadata( $metadata, $post ) {
185
- $this->front = WPSEO_Frontend::get_instance();
 
 
186
 
187
  $this->build_organization_object( $metadata );
188
 
159
  * @return array
160
  */
161
  public function fix_amp_post_data( $data ) {
162
+ if ( ! $this->front ) {
163
+ $this->front = WPSEO_Frontend::get_instance();
164
+ }
165
  $data['canonical_url'] = $this->front->canonical( false );
166
 
167
  if ( ! empty( $this->options['amp_site_icon'] ) ) {
185
  * @return array
186
  */
187
  public function fix_amp_post_metadata( $metadata, $post ) {
188
+ if ( ! $this->front ) {
189
+ $this->front = WPSEO_Frontend::get_instance();
190
+ }
191
 
192
  $this->build_organization_object( $metadata );
193
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Glue for Yoast SEO & AMP ===
2
  Contributors: joostdevalk
3
  Tags: AMP, SEO
4
- Requires at least: 4.6
5
- Tested up to: 4.7.3
6
- Stable tag: 0.4.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -34,6 +34,10 @@ To change your AMP page design, go to SEO -> AMP, and look at the design tab.
34
 
35
  == Changelog ==
36
 
 
 
 
 
37
  = 0.4.2 =
38
  * Bugfixes:
39
  * Reverts the canonical removal.
1
  === Glue for Yoast SEO & AMP ===
2
  Contributors: joostdevalk
3
  Tags: AMP, SEO
4
+ Requires at least: 4.8
5
+ Tested up to: 4.9.5
6
+ Stable tag: 0.4.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
34
 
35
  == Changelog ==
36
 
37
+ = 0.4.3 =
38
+ * Bugfixes:
39
+ * Fixes a fatal error in combination with `AMP for WordPress` version 0.7.0. Props [Ryan Kienstra](https://github.com/kienstra).
40
+
41
  = 0.4.2 =
42
  * Bugfixes:
43
  * Reverts the canonical removal.
yoastseo-amp.php CHANGED
@@ -9,7 +9,7 @@
9
  * Plugin Name: Glue for Yoast SEO & AMP
10
  * Plugin URI: https://wordpress.org/plugins/glue-for-yoast-seo-amp/
11
  * Description: Makes sure the default WordPress AMP plugin uses the proper Yoast SEO metadata
12
- * Version: 0.4.2
13
  * Author: Joost de Valk
14
  * Author URI: https://yoast.com
15
  */
9
  * Plugin Name: Glue for Yoast SEO & AMP
10
  * Plugin URI: https://wordpress.org/plugins/glue-for-yoast-seo-amp/
11
  * Description: Makes sure the default WordPress AMP plugin uses the proper Yoast SEO metadata
12
+ * Version: 0.4.3
13
  * Author: Joost de Valk
14
  * Author URI: https://yoast.com
15
  */