最新版では修正済み
DISQUSプラグインを入れたらコメント管理の所でこんなエラーがでました
Warning: number_format() expects parameter 1 to be double, string given in /wp-includes/functions.php on line 155
ググッてみるとDISQUSプラグイン側が悪いようで修正方法が載ってましたが
英語文献しかなかったのでメモしときます
元記事:Fix: WordPress 3.1 and Disqus Plugin Error When Returning Comments Count | Techerator
直し方
*注意 バックアップを取る事をお勧めします
まず/wp-content/plugins/disqus-comment-system/disqus.phpの
692行目あたりのこの部分を
1 2 |
function dsq_comments_number($count) { global $post; if ( dsq_can_replace() ) { return '<span class="dsq-postid">'.$count.'</span>'; } else { return $count; } } |
このコードに置換します
1 |
function dsq_comments_number($count) { global $post; return $count; } |
これでエラーは出なくなりますがテーマーの中でcomments_number()
関数を使用してる場合追加でこのように修正すれば直るそうです
697行目あたりのこの部分を
1 |
function dsq_comments_text($comment_text) { global $post; if ( dsq_can_replace() ) { return '<span class="dsq-postid">View Comments</span>'; } else { return $comment_text; } } |
このコードに置換
1 |
function dsq_comments_text($comment_text) { global $post; $number_of_comments = get_comments_number(); return $number_of_comments; } |
#追記
プラグインのv2.65で修正されました