Welcart Voll 1.5.2 をリリースしました。修正点は以下のとおりです。
- PHP8.2対応
- get_terms() の引数指定方法を変更
- カテゴリー画像選択時、ログインユーザー以外がアップロードした画像を選択できない不具合を修正
- ロゴ画像を削除した際、サイトタイトルが表示されない不具合を修正
- 【WelcartPay】配送・支払方法ページのクレジットカードダイアログでテーブルとボタンの間隔を調整
- ページネーションのエラーを修正
- 【WCEX Auto Delivery】定期購入ボタンの表示崩れを修正
PHP8.2対応
テンプレート修正 : inc/theme-customizer.php 1313行目~1400行目あたり
/** * 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' ] = true; } if ( ! isset( $options [ 'display_soldout' ] ) ) { $options [ 'display_soldout' ] = true; } if ( ! isset( $options [ 'display_inquiry' ] ) ) { $options [ 'display_inquiry' ] = true; } if ( ! isset( $options [ 'display_inquiry_text' ] ) ) { $options [ 'display_inquiry_text' ] = __( 'Contacting this item' , 'welcart_basic_voll' ); } if ( ! isset( $options [ 'sidebar' ] ) ) { $options [ 'sidebar' ] = 'left-set' ; } 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 ( 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 = true; break ; case 'display_soldout' : $option_value = true; break ; case 'display_inquiry' : $option_value = true; break ; case 'display_inquiry_text' : $option_value = __( 'Contacting this item' , 'welcart_basic_voll' ); break ; case 'sidebar' : $option_value = 'left-set' ; 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 ; } } } return $option_value ; } |
get_terms() の引数指定方法を変更
テンプレート修正 : inc/theme-customizer.php 1417行目~1421行目あたり
$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 153行目~164行目あたり
file_frame = wp.media.frames.file_frame = wp.media({ title: '<?php esc_html_e( ' Front page ', ' welcart_basic_voll ' ); ?>' , library: { type: 'image' , author: userSettings.uid }, button: { text: '<?php esc_html_e( ' Set the category image ', ' welcart_basic_voll ' ); ?>' , close: true }, multiple: false }); |
file_frame = wp.media.frames.file_frame = wp.media({ title: '<?php esc_html_e( ' Front page ', ' welcart_basic_voll ' ); ?>' , library: { type: 'image' , }, button: { text: '<?php esc_html_e( ' Set the category image ', ' welcart_basic_voll ' ); ?>' , 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' , ) ); |
【WelcartPay】配送・支払方法ページのクレジットカードダイアログでテーブルとボタンの間隔を調整
CSS追加 : usces_cart.css
#escott-token-form .settlement_form { margin-bottom : 1.429em ; } |
ページネーションのエラーを修正
テンプレート修正 : archive.php 46行目~55行目あたり
テンプレート修正 : category.php 109行目~120行目あたり
テンプレート修正 : search.php 56行目~65行目あたり
<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】定期購入ボタンの表示崩れを修正
CSS追加 : usces_cart.css
#memberinfo .header_explanation .gotoedit a { padding : 0 2.142em ; border-radius : 0 ; } |
テンプレート修正 : inc/theme-customizer.php 1758行目~1780行目あたり
input[type= "button" ], input[type= "submit" ], input[type= "reset" ], .snav .membership li a, .widget_welcart_search div a, .widget_welcart_login .loginbox a.usces_logout_a, .widget_welcart_login .loginbox a.login_widget_mem_info_a, #itempage .item-info .itemsoldout, #wc_cart #cart .upbutton input, #point_table td input.use_point_button, #cart #coupon_table td .use_coupon_button, #wc_ordercompletion .send a, .member_submenu a, .member-page #memberinfo .send input.top, .member-page #memberinfo .send input.deletemember, #wc_login #nav a, #wc_lostmemberpassword #nav a, .reviews_btn a, #searchbox input.usces_search_button, .gotoedit a{ color: <?php echo esc_attr( $sub_btn_text ); ?>; background-color: <?php echo esc_attr( $sub_btn_bg ); ?>; } |
input[type= "button" ], input[type= "submit" ], input[type= "reset" ], .snav .membership li a, .widget_welcart_search div a, .widget_welcart_login .loginbox a.usces_logout_a, .widget_welcart_login .loginbox a.login_widget_mem_info_a, #itempage .item-info .itemsoldout, #wc_cart #cart .upbutton input, #point_table td input.use_point_button, #cart #coupon_table td .use_coupon_button, #wc_ordercompletion .send a, .member_submenu a, .member-page #memberinfo .send input.top, .member-page #memberinfo .send input.deletemember, #wc_login #nav a, #wc_lostmemberpassword #nav a, .reviews_btn a, #searchbox input.usces_search_button, .gotoedit a, #memberpages .header_explanation .gotoedit a { color: <?php echo esc_attr( $sub_btn_text ); ?>; background-color: <?php echo esc_attr( $sub_btn_bg ); ?>; } |
テンプレート修正 : inc/theme-customizer.php 1781行目~1798行目あたり
input[type= "button" ]:hover, input[type= "submit" ]:hover, input[type= "reset" ]:hover, .snav .membership li a:hover, .widget_welcart_search div a:hover, .widget_welcart_login .loginbox a.usces_logout_a:hover, .widget_welcart_login .loginbox a.login_widget_mem_info_a:hover, #wc_ordercompletion .send a:hover, .member_submenu a:hover, .member-page #memberinfo .send input.top:hover, .member-page #memberinfo .send input.deletemember:hover, #wc_login #nav a:hover, #wc_lostmemberpassword #nav a:hover, .reviews_btn a:hover, #searchbox input.usces_search_button:hover, .gotoedit a:hover { background-color: <?php echo esc_attr( $sub_btn_bg_hov ); ?>; } |
input[type= "button" ]:hover, input[type= "submit" ]:hover, input[type= "reset" ]:hover, .snav .membership li a:hover, .widget_welcart_search div a:hover, .widget_welcart_login .loginbox a.usces_logout_a:hover, .widget_welcart_login .loginbox a.login_widget_mem_info_a:hover, #wc_ordercompletion .send a:hover, .member_submenu a:hover, .member-page #memberinfo .send input.top:hover, .member-page #memberinfo .send input.deletemember:hover, #wc_login #nav a:hover, #wc_lostmemberpassword #nav a:hover, .reviews_btn a:hover, #searchbox input.usces_search_button:hover, .gotoedit a:hover, #memberpages .header_explanation .gotoedit a:hover { background-color: <?php echo esc_attr( $sub_btn_bg_hov ); ?>; } |