Raindrops 0.960 がレビュー審査を通過できましたのでお知らせします。
ライブになるまで、しばらくかかると思いますが、お楽しみに
❗ 今回のレビューで、PHPのパースエラーが1つあると指摘がありましたので、お知らせします。
このバグは、次のバーションで以下のように修正する予定です。
Raindrops has bug PHP parse error.
Raindrops 0.960 functions.php
Just a notice from debbuger;
Undefined index: raindrops_style_type in \raindrops\functions.php on
line 585
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
function raindrops_add_body_class($class) { global $post; $lang = get_locale(); $raindrops_options = get_option("raindrops_theme_settings"); $color_type = "rd-type-".$raindrops_options["raindrops_style_type"]; if(is_single() or is_page()){ $raindrops_content_check = get_post($post->ID); $raindrops_content_check = $raindrops_content_check->post_content; if(preg_match("!\[raindrops[^\]]+(color_type)=(\"|')*?([^\"' ]+)(\"|')*?[^\]]*\]!si",$raindrops_content_check,$regs)){ $color_type = "rd-type-".trim($regs[3]); } if(preg_match("!\[raindrops[^\]]+(col)=(\"|')*?([^\"' ]+)(\"|')*?[^\]]*\]!si",$raindrops_content_check,$regs)){ $color_type .= ' '; $color_type .= "rd-col-".$regs[3]; } } |
修正コード
Corrected code
1 2 3 4 5 6 7 8 9 10 11 12 |
function raindrops_add_body_class($class) { global $post; $lang = get_locale(); $raindrops_options = get_option("raindrops_theme_settings"); if(isset($raindrops_options["raindrops_style_type"]) and !empty($raindrops_options["raindrops_style_type"])){ $color_type = "rd-type-".$raindrops_options["raindrops_style_type"]; }else{ $color_type = ''; } if(is_single() or is_page()){ $raindrops_content_check = get_post($post->ID); $raindrops_content_check = $raindrops_content_check->post_content; |