From ff7c336af9e8b49358831ea7ab408a388463d0f5 Mon Sep 17 00:00:00 2001
From: lucha <lucha@paranoici.org>
Date: Sun, 9 Dec 2018 12:18:07 -0800
Subject: [PATCH] [auto] plugin: bogo 3.2.1

---
 wp-content/plugins/bogo/bogo.php           |  4 ++--
 wp-content/plugins/bogo/includes/query.php | 23 +++++++++++++++++++---
 wp-content/plugins/bogo/readme.txt         |  6 +++++-
 3 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/wp-content/plugins/bogo/bogo.php b/wp-content/plugins/bogo/bogo.php
index 321bd308d..aa2e2fcf5 100644
--- a/wp-content/plugins/bogo/bogo.php
+++ b/wp-content/plugins/bogo/bogo.php
@@ -7,10 +7,10 @@ Author: Takayuki Miyoshi
 Author URI: https://ideasilo.wordpress.com/
 Text Domain: bogo
 Domain Path: /languages/
-Version: 3.2
+Version: 3.2.1
 */
 
-define( 'BOGO_VERSION', '3.2' );
+define( 'BOGO_VERSION', '3.2.1' );
 
 define( 'BOGO_PLUGIN', __FILE__ );
 
diff --git a/wp-content/plugins/bogo/includes/query.php b/wp-content/plugins/bogo/includes/query.php
index ae15aa03e..eda1ef23c 100644
--- a/wp-content/plugins/bogo/includes/query.php
+++ b/wp-content/plugins/bogo/includes/query.php
@@ -15,7 +15,10 @@ function bogo_parse_query( $query ) {
 	}
 
 	if ( isset( $qv['post_type'] ) && 'any' != $qv['post_type'] ) {
-		$localizable = array_filter( (array) $qv['post_type'], 'bogo_is_localizable_post_type' );
+		$localizable = array_filter(
+			(array) $qv['post_type'],
+			'bogo_is_localizable_post_type'
+		);
 
 		if ( empty( $localizable ) ) {
 			$qv['bogo_suppress_locale_query'] = true;
@@ -50,14 +53,15 @@ function bogo_parse_query( $query ) {
 		return;
 	}
 
-	if ( $query->is_home && 'page' == get_option( 'show_on_front' ) && get_option( 'page_on_front' ) ) {
+	if ( $query->is_home
+	&& 'page' == get_option( 'show_on_front' )
+	&& get_option( 'page_on_front' ) ) {
 		$query_keys = array_keys( wp_parse_args( $query->query ) );
 		$query_keys = array_diff( $query_keys,
 			array( 'preview', 'page', 'paged', 'cpage', 'lang' ) );
 
 		if ( empty( $query_keys ) ) {
 			$query->is_page = true;
-			$query->is_singular = true;
 			$query->is_home = false;
 			$qv['page_id'] = get_option( 'page_on_front' );
 
@@ -75,6 +79,7 @@ function bogo_parse_query( $query ) {
 			$query->queried_object_id = (int) $query->queried_object->ID;
 		} else {
 			unset( $query->queried_object );
+			unset( $query->queried_object_id );
 		}
 
 		if ( 'page' == get_option( 'show_on_front' )
@@ -97,8 +102,20 @@ function bogo_parse_query( $query ) {
 			$query->queried_object_id = (int) $query->queried_object->ID;
 		} else {
 			unset( $query->queried_object );
+			unset( $query->queried_object_id );
 		}
 	}
+
+	if ( $query->is_posts_page
+	&& ( ! isset( $qv['withcomments'] ) || ! $qv['withcomments'] ) ) {
+		$query->is_comment_feed = false;
+	}
+
+	$query->is_singular =
+		( $query->is_single || $query->is_page || $query->is_attachment );
+
+	$query->is_embed =
+		$query->is_embed && ( $query->is_singular || $query->is_404 );
 }
 
 add_filter( 'posts_join', 'bogo_posts_join', 10, 2 );
diff --git a/wp-content/plugins/bogo/readme.txt b/wp-content/plugins/bogo/readme.txt
index 123cd5df2..9f71d8bf5 100644
--- a/wp-content/plugins/bogo/readme.txt
+++ b/wp-content/plugins/bogo/readme.txt
@@ -3,7 +3,7 @@ Contributors: takayukister
 Tags: multilingual, localization, language, locale, admin
 Requires at least: 4.9
 Tested up to: 4.9
-Stable tag: 3.2
+Stable tag: 3.2.1
 License: GPLv2 or later
 License URI: https://www.gnu.org/licenses/gpl-2.0.html
 Donate link: https://pledgie.com/campaigns/17860
@@ -61,6 +61,10 @@ Here are some technical details for those interested. Bogo plugin assigns [one l
 
 == Changelog ==
 
+= 3.2.1 =
+
+* Recalculates values in some WP query parameters in bogo_parse_query().
+
 = 3.2 =
 
 * Uses the install_languages as the default capability required for the Language Packs page.
-- 
GitLab