From a0fd08c4885bf2ed8cb9f18c9f16a345289ae10f Mon Sep 17 00:00:00 2001 From: kurudrive Date: Sun, 28 Feb 2021 12:51:57 +0900 Subject: [PATCH 1/4] =?UTF-8?q?[=20=E3=81=9D=E3=81=AE=E4=BB=96=20]=20woo?= =?UTF-8?q?=E5=AF=BE=E5=BF=9C=E3=81=A7=E4=B8=8D=E8=A6=81=E3=81=A8=E6=80=9D?= =?UTF-8?q?=E3=82=8F=E3=82=8C=E3=82=8B=E3=82=B3=E3=83=BC=E3=83=89=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin-support/woocommerce/functions-woo.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin-support/woocommerce/functions-woo.php b/plugin-support/woocommerce/functions-woo.php index 6d6f656a0..2d2997b2c 100644 --- a/plugin-support/woocommerce/functions-woo.php +++ b/plugin-support/woocommerce/functions-woo.php @@ -133,6 +133,8 @@ function lightning_woo_is_subsection_display( $return ){ /** * ページヘッダーとパンくずの表示制御 + * + * 2021.2.28 現在不要と思われるので一旦動作停止(不具合報告がこなければ削除可) */ function lightning_woo_is_page_header_and_breadcrumb( $return ){ if ( lightning_woo_is_shop_page() ) { @@ -143,7 +145,7 @@ function lightning_woo_is_page_header_and_breadcrumb( $return ){ } return $return; } -add_filter( 'lightning_is_page_header_and_breadcrumb', 'lightning_woo_is_page_header_and_breadcrumb' ); +// add_filter( 'lightning_is_page_header_and_breadcrumb', 'lightning_woo_is_page_header_and_breadcrumb' ); /** * siteContent の上下余白 From ece04ba9ab0da1653e0f6d8a1f160559e70beb16 Mon Sep 17 00:00:00 2001 From: kurudrive Date: Sun, 28 Feb 2021 14:22:33 +0900 Subject: [PATCH 2/4] =?UTF-8?q?[=20=E4=B8=8D=E5=85=B7=E5=90=88=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=20]=20wooCommerce=E3=81=A7=E3=82=B7=E3=83=A7=E3=83=83?= =?UTF-8?q?=E3=83=97=E3=83=88=E3=83=83=E3=83=97=E3=83=9A=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=81=A7=E3=83=98=E3=83=83=E3=83=80=E3=83=BC=E3=83=88=E3=83=83?= =?UTF-8?q?=E3=83=97=E3=81=A8=E3=83=91=E3=83=B3=E3=81=8F=E3=81=9A=E3=81=AE?= =?UTF-8?q?=E9=9D=9E=E8=A1=A8=E7=A4=BA=E5=88=B6=E5=BE=A1=E3=81=8C=E5=80=8B?= =?UTF-8?q?=E5=88=A5=E5=88=B6=E5=BE=A1=E3=81=AB=E5=AF=BE=E5=BF=9C=E3=81=97?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F=E3=81=AE?= =?UTF-8?q?=E3=81=A7=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin-support/woocommerce/functions-woo.php | 43 +++++++++++++++----- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/plugin-support/woocommerce/functions-woo.php b/plugin-support/woocommerce/functions-woo.php index 2d2997b2c..856fdaf89 100644 --- a/plugin-support/woocommerce/functions-woo.php +++ b/plugin-support/woocommerce/functions-woo.php @@ -69,14 +69,22 @@ function lightning_woo_product_gallery_setup() { add_theme_support( 'wc-product-gallery-slider' ); } - - +/** + * ショップトップページに指定している固定ページのデザイン設定を取得 + */ function lightning_woo_get_design_setting(){ + + // Woo Shop Top Page ( 'shop' is settted for Shop Top that it's not slug. ) $shop_page_id = wc_get_page_id( 'shop' ); - $shop_page = get_post( $shop_page_id ); + + // 固定ページで指定しているレイアウト情報などを取得 $option = get_post_meta( $shop_page_id, '_lightning_design_setting', true ); return $option; } + +/** + * ショップトップのページかどうか? + */ function lightning_woo_is_shop_page(){ global $post; if ( 'product' === get_post_type( $post ) && ! is_singular() ) { @@ -85,7 +93,7 @@ function lightning_woo_is_shop_page(){ } /** - * カラム表示制御 + * ショップトップページのカラム表示制御 */ function lightning_woo_is_layout_onecolumn( $return ){ if ( lightning_woo_is_shop_page() ) { @@ -107,7 +115,7 @@ function lightning_woo_is_layout_onecolumn( $return ){ add_filter( 'lightning_is_layout_onecolumn', 'lightning_woo_is_layout_onecolumn' ); /** - * サブサクション表示制御 + * ショップトップページのサブサクション表示制御 */ function lightning_woo_is_subsection_display( $return ){ if ( lightning_woo_is_shop_page() ) { @@ -132,20 +140,33 @@ function lightning_woo_is_subsection_display( $return ){ add_filter( 'lightning_is_subsection_display', 'lightning_woo_is_subsection_display' ); /** - * ページヘッダーとパンくずの表示制御 - * - * 2021.2.28 現在不要と思われるので一旦動作停止(不具合報告がこなければ削除可) + * ショップトップページでのページヘッダーの表示制御 + */ +function lightning_woo_is_page_header( $return ){ + if ( lightning_woo_is_shop_page() ) { + $lightning_design_setting = lightning_woo_get_design_setting(); + if ( ! empty( $lightning_design_setting['hidden_page_header'] ) ) { + $return = false; + } + } + return $return; +} +add_filter( 'lightning_is_page_header', 'lightning_woo_is_page_header' ); + +/** + * ショップトップページでのパンくずの表示制御 */ -function lightning_woo_is_page_header_and_breadcrumb( $return ){ +function lightning_woo_is_breadcrumb( $return ){ if ( lightning_woo_is_shop_page() ) { $lightning_design_setting = lightning_woo_get_design_setting(); - if ( ! empty( $lightning_design_setting['hidden_page_header_and_breadcrumb'] ) ) { + if ( ! empty( $lightning_design_setting['hidden_breadcrumb'] ) ) { $return = false; } } return $return; } -// add_filter( 'lightning_is_page_header_and_breadcrumb', 'lightning_woo_is_page_header_and_breadcrumb' ); +add_filter( 'lightning_is_breadcrumb', 'lightning_woo_is_breadcrumb' ); + /** * siteContent の上下余白 From e6703afd3a01a0caef4f67b891d2b3571decaff3 Mon Sep 17 00:00:00 2001 From: kurudrive Date: Sun, 28 Feb 2021 15:44:29 +0900 Subject: [PATCH 3/4] =?UTF-8?q?woocommerce=E3=81=AE=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=81=8C=E3=83=91=E3=83=B3=E3=81=8F=E3=81=9A=E3=83=AA=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=81=AB=E5=8F=8D=E6=98=A0=E3=81=95=E3=82=8C=E3=81=AA?= =?UTF-8?q?=E3=81=84=20#549?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template-parts/breadcrumb.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/template-parts/breadcrumb.php b/template-parts/breadcrumb.php index 952c8d542..55a8da196 100755 --- a/template-parts/breadcrumb.php +++ b/template-parts/breadcrumb.php @@ -10,9 +10,8 @@ function lightning_bread_crumb() { // Get Post top page info /*-------------------------------------------*/ // get_post_type() だとtaxonomyページで該当の投稿がない時に投稿タイプを取得できないため lightning_get_post_type() を使用 - $post_type = lightning_get_post_type(); - $post_type = $post_type['slug']; - $post_type_object = get_post_type_object( $post_type ); + // また、wooCommerceなどはショップトップの名称が投稿タイプ名と異なるので、そのあたりの処理も lightning_get_post_type() で対応済み + $post_type_info = lightning_get_post_type(); $show_on_front = get_option( 'show_on_front' ); $page_for_post = get_option( 'page_for_posts' ); $post_top_name = ! empty( $page_for_post ) ? get_the_title( $page_for_post ) : ''; @@ -54,7 +53,7 @@ function lightning_bread_crumb() { /*-------------------------------*/ } elseif ( is_single() || is_page() ||is_category() || is_tag() || is_tax() || is_post_type_archive() || is_date() ) { - if ( 'post' === $post_type && 'page' === $show_on_front && $page_for_post ) { /* including single-post */ + if ( 'post' === $post_type_info['slug'] && 'page' === $show_on_front && $page_for_post ) { /* including single-post */ $breadcrumb_html .= ''; $breadcrumb_html .= ''; $breadcrumb_html .= '' . $post_top_name . ''; @@ -62,12 +61,12 @@ function lightning_bread_crumb() { $breadcrumb_html .= ''; } elseif ( is_post_type_archive() && ! is_date() ) { $breadcrumb_html .= '
  • '; - $breadcrumb_html .= '' . get_the_archive_title() . ''; + $breadcrumb_html .= '' . wp_kses_post( $post_type_info['name'] ) . ''; $breadcrumb_html .= '
  • '; - } elseif ( 'post' !== $post_type && 'page' !== $post_type ) { + } elseif ( 'post' !== $post_type_info['slug'] && 'page' !== $post_type_info['slug'] ) { $breadcrumb_html .= ''; - $breadcrumb_html .= ''; - $breadcrumb_html .= '' . $post_type_object->label . ''; + $breadcrumb_html .= ''; + $breadcrumb_html .= '' . wp_kses_post( $post_type_info['name'] ) . ''; $breadcrumb_html .= ''; $breadcrumb_html .= ''; } From 147fd1d8df8944acd75d402ed8e9218f9521f010 Mon Sep 17 00:00:00 2001 From: kurudrive Date: Sun, 28 Feb 2021 15:46:36 +0900 Subject: [PATCH 4/4] [ Change version ] 13.8.9 --- readme.txt | 9 ++++++--- style.css | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/readme.txt b/readme.txt index 61455ccf6..0b6b8e077 100644 --- a/readme.txt +++ b/readme.txt @@ -1,8 +1,8 @@ === Lightning === -Lightning WordPress theme, Copyright (C) 2015-2020 Vektor,Inc. +Lightning WordPress theme, Copyright (C) 2015-2021 Vektor,Inc. Lightning WordPress theme is licensed under the GPL. -Tested up to: 5.6.0 -Stable tag: 13.8.8 +Tested up to: 5.6.2 +Stable tag: 13.8.9 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -39,6 +39,9 @@ https://www.vektor-inc.co.jp/inquiry/ == Changelog == +v13.8.9 +[ Bug fix ][ WooCommerce ] Fix Breadcrumb shop top name + v13.8.8 [ Bug fix ] Fix Editor screen width diff --git a/style.css b/style.css index 53134540a..9cbb2e1ea 100644 --- a/style.css +++ b/style.css @@ -5,7 +5,7 @@ Theme URI: https://lightning.nagoya Description: Lightning is a very simple & easy to customize theme which is based on the Bootstrap. It is also very friendly with custom post types and custom taxonomies. When you add a new one, the breadcrumbs will be adjusted and posts will look beautifully without editing or adding a template files. Author: Vektor,Inc. Author URI: https://www.vektor-inc.co.jp -Version: 13.8.8 +Version: 13.8.9 Requires at least: 5.3 Tested up to: 5.6.1 Requires PHP: 5.6.0