Changeset 143875
- Timestamp:
- 02/28/2021 06:55:45 AM (5 years ago)
- Location:
- lightning/13.8.9
- Files:
-
- 4 edited
- 1 copied
- . (copied) (copied from lightning/13.8.8)
- plugin-support/woocommerce/functions-woo.php (modified) (5 diffs)
- readme.txt (modified) (2 diffs)
- style.css (modified) (1 diff)
- template-parts/breadcrumb.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lightning/13.8.9/plugin-support/woocommerce/functions-woo.php
r140864 r143875 70 70 } 71 71 72 /** 73 * ショップトップページに指定している固定ページのデザイン設定を取得 74 */ 75 function lightning_woo_get_design_setting(){ 72 76 77 // Woo Shop Top Page ( 'shop' is settted for Shop Top that it's not slug. ) 78 $shop_page_id = wc_get_page_id( 'shop' ); 73 79 74 function lightning_woo_get_design_setting(){ 75 $shop_page_id = wc_get_page_id( 'shop' ); 76 $shop_page = get_post( $shop_page_id ); 80 // 固定ページで指定しているレイアウト情報などを取得 77 81 $option = get_post_meta( $shop_page_id, '_lightning_design_setting', true ); 78 82 return $option; 79 83 } 84 85 /** 86 * ショップトップのページかどうか? 87 */ 80 88 function lightning_woo_is_shop_page(){ 81 89 global $post; … … 86 94 87 95 /** 88 * カラム表示制御96 * ショップトップページのカラム表示制御 89 97 */ 90 98 function lightning_woo_is_layout_onecolumn( $return ){ … … 108 116 109 117 /** 110 * サブサクション表示制御118 * ショップトップページのサブサクション表示制御 111 119 */ 112 120 function lightning_woo_is_subsection_display( $return ){ … … 133 141 134 142 /** 135 * ページヘッダーとパンくずの表示制御143 * ショップトップページでのページヘッダーの表示制御 136 144 */ 137 function lightning_woo_is_page_header _and_breadcrumb( $return ){145 function lightning_woo_is_page_header( $return ){ 138 146 if ( lightning_woo_is_shop_page() ) { 139 147 $lightning_design_setting = lightning_woo_get_design_setting(); 140 if ( ! empty( $lightning_design_setting['hidden_page_header _and_breadcrumb'] ) ) {148 if ( ! empty( $lightning_design_setting['hidden_page_header'] ) ) { 141 149 $return = false; 142 150 } … … 144 152 return $return; 145 153 } 146 add_filter( 'lightning_is_page_header_and_breadcrumb', 'lightning_woo_is_page_header_and_breadcrumb' ); 154 add_filter( 'lightning_is_page_header', 'lightning_woo_is_page_header' ); 155 156 /** 157 * ショップトップページでのパンくずの表示制御 158 */ 159 function lightning_woo_is_breadcrumb( $return ){ 160 if ( lightning_woo_is_shop_page() ) { 161 $lightning_design_setting = lightning_woo_get_design_setting(); 162 if ( ! empty( $lightning_design_setting['hidden_breadcrumb'] ) ) { 163 $return = false; 164 } 165 } 166 return $return; 167 } 168 add_filter( 'lightning_is_breadcrumb', 'lightning_woo_is_breadcrumb' ); 169 147 170 148 171 /** -
lightning/13.8.9/readme.txt
r143868 r143875 1 1 === Lightning === 2 Lightning WordPress theme, Copyright (C) 2015-202 0Vektor,Inc.2 Lightning WordPress theme, Copyright (C) 2015-2021 Vektor,Inc. 3 3 Lightning WordPress theme is licensed under the GPL. 4 Tested up to: 5.6. 05 Stable tag: 13.8. 84 Tested up to: 5.6.2 5 Stable tag: 13.8.9 6 6 License: GPLv2 or later 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 39 39 40 40 == Changelog == 41 42 v13.8.9 43 [ Bug fix ][ WooCommerce ] Fix Breadcrumb shop top name 41 44 42 45 v13.8.8 -
lightning/13.8.9/style.css
r143868 r143875 6 6 Author: Vektor,Inc. 7 7 Author URI: https://www.vektor-inc.co.jp 8 Version: 13.8. 88 Version: 13.8.9 9 9 Requires at least: 5.3 10 10 Tested up to: 5.6.1 -
lightning/13.8.9/template-parts/breadcrumb.php
r140864 r143875 11 11 /*-------------------------------------------*/ 12 12 // get_post_type() だとtaxonomyページで該当の投稿がない時に投稿タイプを取得できないため lightning_get_post_type() を使用 13 $post_type = lightning_get_post_type(); 14 $post_type = $post_type['slug']; 15 $post_type_object = get_post_type_object( $post_type ); 13 // また、wooCommerceなどはショップトップの名称が投稿タイプ名と異なるので、そのあたりの処理も lightning_get_post_type() で対応済み 14 $post_type_info = lightning_get_post_type(); 16 15 $show_on_front = get_option( 'show_on_front' ); 17 16 $page_for_post = get_option( 'page_for_posts' ); … … 55 54 } elseif ( is_single() || is_page() ||is_category() || is_tag() || is_tax() || is_post_type_archive() || is_date() ) { 56 55 57 if ( 'post' === $post_type && 'page' === $show_on_front && $page_for_post ) { /* including single-post */56 if ( 'post' === $post_type_info['slug'] && 'page' === $show_on_front && $page_for_post ) { /* including single-post */ 58 57 $breadcrumb_html .= '<li' . $microdata_li . '>'; 59 58 $breadcrumb_html .= '<a' . $microdata_li_a . ' href="' . esc_url( $post_top_url ) . '">'; … … 63 62 } elseif ( is_post_type_archive() && ! is_date() ) { 64 63 $breadcrumb_html .= '<li>'; 65 $breadcrumb_html .= '<span>' . get_the_archive_title() . '</span>';66 $breadcrumb_html .= '</li>'; 67 } elseif ( 'post' !== $post_type && 'page' !== $post_type) {64 $breadcrumb_html .= '<span>' . wp_kses_post( $post_type_info['name'] ) . '</span>'; 65 $breadcrumb_html .= '</li>'; 66 } elseif ( 'post' !== $post_type_info['slug'] && 'page' !== $post_type_info['slug'] ) { 68 67 $breadcrumb_html .= '<li' . $microdata_li . '>'; 69 $breadcrumb_html .= '<a' . $microdata_li_a . ' href="' . get_post_type_archive_link( $post_type ) . '">';70 $breadcrumb_html .= '<span' . $microdata_li_a_span . '>' . $post_type_object->label. '</span>';68 $breadcrumb_html .= '<a' . $microdata_li_a . ' href="' . get_post_type_archive_link( $post_type_info['slug'] ) . '">'; 69 $breadcrumb_html .= '<span' . $microdata_li_a_span . '>' . wp_kses_post( $post_type_info['name'] ) . '</span>'; 71 70 $breadcrumb_html .= '</a>'; 72 71 $breadcrumb_html .= '</li>';
Note: See TracChangeset for help on using the changeset viewer.