The SEO Framework - Version 4.0.7

Version Description

This follow-up update to 4.0.6 addresses an issue where the WooCommerce shop page was seen as an actual archive mistakenly. For that page, this issue caused your post-edit input, among other SEO data, to no longer be honored.

Download this release

Release Info

Developer Cybr
Plugin Icon 128x128 The SEO Framework
Version 4.0.7
Comparing to
See all releases

Code changes from version 4.0.6 to 4.0.7

autodescription.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: The SEO Framework
4
  * Plugin URI: https://theseoframework.com/
5
  * Description: An automated, advanced, accessible, unbranded and extremely fast SEO solution for your WordPress website.
6
- * Version: 4.0.6
7
  * Author: The SEO Framework Team
8
  * Author URI: https://theseoframework.com/
9
  * License: GPLv3
@@ -64,7 +64,7 @@ defined( 'ABSPATH' ) or die;
64
  *
65
  * @since 2.3.5
66
  */
67
- define( 'THE_SEO_FRAMEWORK_VERSION', '4.0.6' );
68
 
69
  /**
70
  * The plugin Database version.
3
  * Plugin Name: The SEO Framework
4
  * Plugin URI: https://theseoframework.com/
5
  * Description: An automated, advanced, accessible, unbranded and extremely fast SEO solution for your WordPress website.
6
+ * Version: 4.0.7
7
  * Author: The SEO Framework Team
8
  * Author URI: https://theseoframework.com/
9
  * License: GPLv3
64
  *
65
  * @since 2.3.5
66
  */
67
+ define( 'THE_SEO_FRAMEWORK_VERSION', '4.0.7' );
68
 
69
  /**
70
  * The plugin Database version.
inc/classes/generate-url.class.php CHANGED
@@ -220,6 +220,7 @@ class Generate_Url extends Generate_Title {
220
  *
221
  * @since 3.0.0
222
  * @since 4.0.0 Can now fetch custom canonical URL for terms.
 
223
  * @see $this->get_canonical_url()
224
  *
225
  * @return string The canonical URL.
220
  *
221
  * @since 3.0.0
222
  * @since 4.0.0 Can now fetch custom canonical URL for terms.
223
+ * @TODO Remove the $id passthrough requirement? Methods lower than this pass it to the query handler...
224
  * @see $this->get_canonical_url()
225
  *
226
  * @return string The canonical URL.
inc/classes/query.class.php CHANGED
@@ -380,8 +380,7 @@ class Query extends Core {
380
  $post = \get_post( $post );
381
  $id = $post ? $post->ID : 0;
382
  } else {
383
- if ( ! \is_singular() ) return false;
384
- $id = $this->get_the_real_ID();
385
  }
386
 
387
  // phpcs:ignore, WordPress.CodeAnalysis.AssignmentInCondition
@@ -390,13 +389,14 @@ class Query extends Core {
390
 
391
  /**
392
  * @since 4.0.5
393
- * @param bool $is_singular_archive Whether the post ID is a singular archive.
394
- * @param int $id The current or supplied post ID.
 
395
  */
396
  $is_singular_archive = \apply_filters_ref_array(
397
  'the_seo_framework_is_singular_archive',
398
  [
399
- $this->is_blog_page_by_id( $id ),
400
  $id,
401
  ]
402
  );
@@ -530,6 +530,8 @@ class Query extends Core {
530
  * Detect the non-home blog page by query (ID).
531
  *
532
  * @since 2.3.4
 
 
533
  *
534
  * @param int $id the Page ID.
535
  * @return bool true if is blog page. Always false if blog page is homepage.
@@ -571,6 +573,8 @@ class Query extends Core {
571
  * Checks blog page by sole ID.
572
  *
573
  * @since 4.0.0
 
 
574
  *
575
  * @param int $id The ID to check
576
  * @return bool
380
  $post = \get_post( $post );
381
  $id = $post ? $post->ID : 0;
382
  } else {
383
+ $id = null;
 
384
  }
385
 
386
  // phpcs:ignore, WordPress.CodeAnalysis.AssignmentInCondition
389
 
390
  /**
391
  * @since 4.0.5
392
+ * @since 4.0.7 The $id can now be null, when no post is given.
393
+ * @param bool $is_singular_archive Whether the post ID is a singular archive.
394
+ * @param int|null $id The supplied post ID. Null when in the loop.
395
  */
396
  $is_singular_archive = \apply_filters_ref_array(
397
  'the_seo_framework_is_singular_archive',
398
  [
399
+ isset( $id ) ? $this->is_blog_page_by_id( $id ) : $this->is_blog_page(),
400
  $id,
401
  ]
402
  );
530
  * Detect the non-home blog page by query (ID).
531
  *
532
  * @since 2.3.4
533
+ * @todo deprecate
534
+ * @see is_wc_shop() -- that's the correct implementation. However, we're dealing with erratic queries here (ET & legacy WP)
535
  *
536
  * @param int $id the Page ID.
537
  * @return bool true if is blog page. Always false if blog page is homepage.
573
  * Checks blog page by sole ID.
574
  *
575
  * @since 4.0.0
576
+ * @todo deprecate
577
+ * @see is_wc_shop() -- that's the correct implementation.
578
  *
579
  * @param int $id The ID to check
580
  * @return bool
inc/compat/plugin-woocommerce.php CHANGED
@@ -65,8 +65,8 @@ function _set_real_id_wc_shop( $id ) {
65
  * @since 4.0.5
66
  * @access private
67
  *
68
- * @param bool $is_singular_archive Whether the post ID is a singular archive.
69
- * @param int $id The current or supplied post ID.
70
  * @return bool
71
  */
72
  function _set_shop_singular_archive( $is_singular_archive, $id ) {
65
  * @since 4.0.5
66
  * @access private
67
  *
68
+ * @param bool $is_singular_archive Whether the post ID is a singular archive.
69
+ * @param int|null $id The supplied post ID. Null when in the loop.
70
  * @return bool
71
  */
72
  function _set_shop_singular_archive( $is_singular_archive, $id ) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: seo, xml sitemap, google search, open graph, schema.org, twitter card, per
4
  Requires at least: 4.9.0
5
  Tested up to: 5.4
6
  Requires PHP: 5.6.0
7
- Stable tag: 4.0.6
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -229,6 +229,10 @@ If you wish to display breadcrumbs, then your theme should provide this. Alterna
229
 
230
  == Changelog ==
231
 
 
 
 
 
232
  = 4.0.6 =
233
 
234
  In this update, we addressed a few issues our amazing users helped investigate. With that, we implemented better bbPress title support, and fixed a bug regarding WooCommerce and term-ID collisions.
4
  Requires at least: 4.9.0
5
  Tested up to: 5.4
6
  Requires PHP: 5.6.0
7
+ Stable tag: 4.0.7
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
229
 
230
  == Changelog ==
231
 
232
+ = 4.0.7 =
233
+
234
+ This follow-up update to 4.0.6 addresses an issue where the WooCommerce shop page was seen as an actual archive mistakenly. For that page, this issue caused your post-edit input, among other SEO data, to no longer be honored.
235
+
236
  = 4.0.6 =
237
 
238
  In this update, we addressed a few issues our amazing users helped investigate. With that, we implemented better bbPress title support, and fixed a bug regarding WooCommerce and term-ID collisions.