Raindrops 0.960 レビュー審査通過しました

Raindrops 0.960 がレビュー審査を通過できましたのでお知らせします。

ライブになるまで、しばらくかかると思いますが、お楽しみに

行間30:

❗ 今回のレビューで、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`

[php firstline=”581″ highlight=”585″]
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];
}
}
[/php]

修正コード

Corrected code
[php firstline=”581″ highlight=”585,586,587,588,589″]

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;
[/php]


コメントは受け付けていません。