Welcart Carina 1.5.2 をリリースしました。修正点は以下のとおりです。
- PHP8.2対応
- get_terms() の引数指定方法を変更
- カテゴリー画像選択時、ログインユーザー以外がアップロードした画像を選択できない不具合を修正
- ロゴ画像を削除した際、サイトタイトルが表示されない不具合を修正
- 商品詳細ページの消費税表示のフォントサイズを調整
- 【WelcartPay】配送・支払方法ページのクレジットカードダイアログでテーブルとボタンの間隔を調整
- ページネーションのエラーを修正
- 【WCEX Auto Delivery】定期購入ボタンの表示崩れを修正
PHP8.2対応
テンプレート修正 : inc/theme-customizer.php 1260行目~1350行目あたり
/** * Get options * * @param string $key key. * @return mixed */ function wcct_get_options( $key = '' ) { if ( empty( $key ) ) { return null; } $options = get_option( 'basic_type_options' ); if ( ! is_admin() ) { if ( ! isset( $options['logo'] ) ) { $options['logo'] = ''; } if ( ! isset( $options['facebook_id'] ) ) { $options['facebook_id'] = ''; } if ( ! isset( $options['facebook_button'] ) ) { $options['facebook_button'] = false; } if ( ! isset( $options['twitter_id'] ) ) { $options['twitter_id'] = ''; } if ( ! isset( $options['twitter_button'] ) ) { $options['twitter_button'] = false; } if ( ! isset( $options['instagram_id'] ) ) { $options['instagram_id'] = ''; } if ( ! isset( $options['instagram_button'] ) ) { $options['instagram_button'] = false; } if ( ! isset( $options['home_cat_title'] ) ) { $options['home_cat_title'] = false; } if ( ! isset( $options['display_soldout'] ) ) { $options['display_soldout'] = true; } if ( ! isset( $options['sidebar'] ) ) { $options['sidebar'] = 'left-set'; } if ( ! isset( $options['display_inquiry'] ) ) { $options['display_inquiry'] = true; } if ( ! isset( $options['display_inquiry_text'] ) ) { $options['display_inquiry_text'] = __( 'Contacting this item', 'welcart_basic_carina' ); } if ( ! isset( $options['display_produt_tag'] ) ) { $options['display_produt_tag'] = true; } if ( ! isset( $options['cart_button'] ) ) { $options['cart_button'] = __( 'Add to Shopping Cart', 'usces' ); } if ( ! isset( $options['inquiry_link'] ) ) { $options['inquiry_link'] = 0; } if ( ! isset( $options['inquiry_link_button'] ) ) { $options['inquiry_link_button'] = false; } if ( ! isset( $options['review'] ) ) { $options['review'] = false; } if ( ! isset( $options['continue_shopping_button'] ) ) { $options['continue_shopping_button'] = false; } if ( ! isset( $options['continue_shopping_url'] ) ) { $options['continue_shopping_url'] = ''; } if ( ! isset( $options['display_info'] ) ) { $options['display_info'] = true; } if ( ! isset( $options['info_cat'] ) ) { $options['info_cat'] = wcct_get_info_default(); } if ( ! isset( $options['info_num'] ) ) { $options['info_num'] = 10; } if ( ! isset( $options['cat_image'] ) ) { $options['cat_image'] = true; } } if ( empty( $options[ $key ] ) ) { return null; } return $options[ $key ]; }
/** * Get options * * @param string $key key. * @return mixed */ function wcct_get_options( $key = '' ) { $option_value = null; if ( empty( $key ) ) { return $option_value; } $options = get_option( 'basic_type_options' ); if ( ! is_admin() ) { if ( isset( $options[ $key ] ) ) { $option_value = $options[ $key ]; } else { switch ( $key ) { case 'logo': $option_value = ''; break; case 'facebook_id': $option_value = ''; break; case 'facebook_button': $option_value = false; break; case 'twitter_id': $option_value = ''; break; case 'twitter_button': $option_value = false; break; case 'instagram_id': $option_value = ''; break; case 'instagram_button': $option_value = false; break; case 'home_cat_title': $option_value = false; break; case 'display_soldout': $option_value = true; break; case 'sidebar': $option_value = 'left-set'; break; case 'display_inquiry': $option_value = true; break; case 'display_inquiry_text': $option_value = __( 'Contacting this item', 'welcart_basic_carina' ); break; case 'display_produt_tag': $option_value = true; break; case 'cart_button': $option_value = __( 'Add to Shopping Cart', 'usces' ); break; case 'inquiry_link': $option_value = 0; break; case 'inquiry_link_button': $option_value = false; break; case 'review': $option_value = false; break; case 'continue_shopping_button': $option_value = false; break; case 'continue_shopping_url': $option_value = ''; break; case 'display_info': $option_value = true; break; case 'info_cat': $option_value = wcct_get_info_default(); break; case 'info_num': $option_value = 10; break; case 'cat_image': $option_value = true; break; } } } return $option_value; }
get_terms() の引数指定方法を変更
テンプレート修正 : inc/theme-customizer.php 1367行目~1371行目あたり
$target_arg = array( 'hide_empty' => false, 'exclude_tree' => usces_get_cat_id( 'item' ), ); $target_terms = get_terms( 'category', $target_arg );
$target_arg = array( 'taxonomy' => 'category', 'hide_empty' => false, 'exclude_tree' => usces_get_cat_id( 'item' ), ); $target_terms = get_terms( $target_arg );
カテゴリー画像選択時、ログインユーザー以外がアップロードした画像を選択できない不具合を修正
テンプレート修正 : inc/term-customized.php 110行目~121行目あたり
file_frame = wp.media.frames.file_frame = wp.media({ title: '<?php esc_html_e( 'Category image', 'welcart_basic_carina' ); ?>', library: { type: 'image', author: userSettings.uid }, button: { text: '<?php esc_html_e( 'Set the category image', 'welcart_basic_carina' ); ?>', close: true }, multiple: false });
file_frame = wp.media.frames.file_frame = wp.media({ title: '<?php esc_html_e( 'Category image', 'welcart_basic_carina' ); ?>', library: { type: 'image', }, button: { text: '<?php esc_html_e( 'Set the category image', 'welcart_basic_carina' ); ?>', close: true }, multiple: false });
ロゴ画像を削除した際、サイトタイトルが表示されない不具合を修正
関数追加 : inc/template-functions.php
/** * Save blank values * * @param string $input Text. * @return string */ function welcart_basic_callback_esc_url_raw( $input ) { return ( '' === $input ) ? '' : esc_url_raw( $input ); }
テンプレート修正 : inc/theme-customizer.php 23行目あたり
$wp_customize->add_setting( 'basic_type_options[logo]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) );
$wp_customize->add_setting( 'basic_type_options[logo]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'welcart_basic_callback_esc_url_raw', ) );
商品詳細ページの消費税表示のフォントサイズを調整
CSS追加 : usces_cart.css
.item-info .field_price em { font-size: .6em; } .item-info .tax_inc_block em { font-size: .8em; }
【WelcartPay】配送・支払方法ページのクレジットカードダイアログでテーブルとボタンの間隔を調整
CSS追加 : usces_cart.css
#escott-token-form .settlement_form { margin-bottom: 10px; }
ページネーションのエラーを修正
テンプレート修正 : archive.php 89行目~98行目あたり
テンプレート修正 : category.php 139行目~148行目あたり
テンプレート修正 : search.php 62行目~71行目あたり
<div class="pagination_wrapper"> <?php $args = array( 'type' => 'list', 'prev_text' => __( ' « ', 'welcart_basic' ), 'next_text' => __( ' » ', 'welcart_basic' ), ); echo wp_kses_post( paginate_links( $args ) ); ?> </div><!-- .pagenation-wrapper -->
<?php $args = array( 'type' => 'list', 'prev_text' => __( ' « ', 'welcart_basic' ), 'next_text' => __( ' » ', 'welcart_basic' ), ); $paginate_links = paginate_links( $args ); if ( $paginate_links ) : ?> <div class="pagination_wrapper"> <?php echo wp_kses_post( $paginate_links ); ?> </div><!-- .pagenation-wrapper --> <?php endif; ?>
【WCEX Auto Delivery】定期購入ボタンの表示崩れを修正
class追加 : usces_cart.css 1186行目~1191行目あたり
.member_submenu a, .gotoedit a { width: auto; padding: 0 20px; line-height: 40px; }
.member_submenu a, .gotoedit a, #memberpages .header_explanation .gotoedit a { width: auto; padding: 0 20px; line-height: 40px; }
class追加 : inc/theme-customizer.php 1726行目~1760行目あたり
input[type=reset], .member-page #nav a, #wc_lostmemberpassword #nav a, #wc_newcompletion #memberpages p a, #wc_lostcompletion #memberpages p a, #wc_changepasscompletion #memberpages p a, #wc_newcompletion .send a, #wc_lostcompletion .send input, #wc_lostcompletion .send a, #wc_changepasscompletion .send a, .member_submenu a, .gotoedit a, .member-page #memberinfo .send input.top, .member-page #memberinfo .send input.deletemember, #wc_cart #cart .upbutton input, #cart .action input.delButton, input.continue_shopping_button, input.back_cart_button, input.back_to_customer_button, input.back_to_delivery_button, #wc_ordercompletion .send a, #del_destination, .ui-dialog .ui-dialog-buttonpane button, #searchbox input.usces_search_button, .open_allocation_bt, input[type=submit].reset_coupon_button, #wdgctToCart a, #mobile-menu .membership a, .menu-on #mobile-menu .membership a, #mobile-menu .membership .logout a.usces_logout_a, .menu-on .widget_welcart_login a, #tofavorite-content #tofavorite-close { background-color: <?php echo esc_attr( $sub_btn_color ); ?>; color: <?php echo esc_attr( $sub_btn_text_color ); ?>; }
input[type=reset], .member-page #nav a, #wc_lostmemberpassword #nav a, #wc_newcompletion #memberpages p a, #wc_lostcompletion #memberpages p a, #wc_changepasscompletion #memberpages p a, #wc_newcompletion .send a, #wc_lostcompletion .send input, #wc_lostcompletion .send a, #wc_changepasscompletion .send a, .member_submenu a, .gotoedit a, #memberpages .header_explanation .gotoedit a, .member-page #memberinfo .send input.top, .member-page #memberinfo .send input.deletemember, #wc_cart #cart .upbutton input, #cart .action input.delButton, input.continue_shopping_button, input.back_cart_button, input.back_to_customer_button, input.back_to_delivery_button, #wc_ordercompletion .send a, #del_destination, .ui-dialog .ui-dialog-buttonpane button, #searchbox input.usces_search_button, .open_allocation_bt, input[type=submit].reset_coupon_button, #wdgctToCart a, #mobile-menu .membership a, .menu-on #mobile-menu .membership a, #mobile-menu .membership .logout a.usces_logout_a, .menu-on .widget_welcart_login a, #tofavorite-content #tofavorite-close { background-color: <?php echo esc_attr( $sub_btn_color ); ?>; color: <?php echo esc_attr( $sub_btn_text_color ); ?>; }
class追加 : inc/theme-customizer.php 1761行目~1794行目あたり
input[type=reset]:hover, .member-page #nav a:hover, #wc_lostmemberpassword #nav a:hover, #wc_newcompletion #memberpages p a:hover, #wc_lostcompletion #memberpages p a:hover, #wc_changepasscompletion #memberpages p a:hover, #wc_newcompletion .send a:hover, #wc_lostcompletion .send input:hover, #wc_lostcompletion .send a:hover, #wc_changepasscompletion .send a:hover, .member_submenu a:hover, .gotoedit a:hover, .member-page #memberinfo .send input.top:hover, .member-page #memberinfo .send input.deletemember:hover, #wc_cart #cart .upbutton input:hover, #cart .action input.delButton:hover, input.continue_shopping_button:hover, input.back_cart_button:hover, input.back_to_customer_button:hover, input.back_to_delivery_button:hover, #wc_ordercompletion .send a:hover, #del_destination:hover, .ui-dialog .ui-dialog-buttonpane button:hover, #searchbox input.usces_search_button:hover, .open_allocation_bt:hover, input[type=submit].reset_coupon_button:hover, #wdgctToCart a:hover, #mobile-menu .membership a:hover, .menu-on #mobile-menu .membership a:hover, .menu-on .widget_welcart_login a:hover, #tofavorite-content #tofavorite-close:hover { background-color: <?php echo esc_attr( $sub_btn_color_hov ); ?>; color: <?php echo esc_attr( $sub_btn_text_color ); ?>; }
input[type=reset]:hover, .member-page #nav a:hover, #wc_lostmemberpassword #nav a:hover, #wc_newcompletion #memberpages p a:hover, #wc_lostcompletion #memberpages p a:hover, #wc_changepasscompletion #memberpages p a:hover, #wc_newcompletion .send a:hover, #wc_lostcompletion .send input:hover, #wc_lostcompletion .send a:hover, #wc_changepasscompletion .send a:hover, .member_submenu a:hover, .gotoedit a:hover, #memberpages .header_explanation .gotoedit a:hover, .member-page #memberinfo .send input.top:hover, .member-page #memberinfo .send input.deletemember:hover, #wc_cart #cart .upbutton input:hover, #cart .action input.delButton:hover, input.continue_shopping_button:hover, input.back_cart_button:hover, input.back_to_customer_button:hover, input.back_to_delivery_button:hover, #wc_ordercompletion .send a:hover, #del_destination:hover, .ui-dialog .ui-dialog-buttonpane button:hover, #searchbox input.usces_search_button:hover, .open_allocation_bt:hover, input[type=submit].reset_coupon_button:hover, #wdgctToCart a:hover, #mobile-menu .membership a:hover, .menu-on #mobile-menu .membership a:hover, .menu-on .widget_welcart_login a:hover, #tofavorite-content #tofavorite-close:hover { background-color: <?php echo esc_attr( $sub_btn_color_hov ); ?>; color: <?php echo esc_attr( $sub_btn_text_color ); ?>; }