Skip to content

Commit

Permalink
ショートコードのcountオプションの異常値設定の誤りを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
yhira committed Jan 1, 2024
1 parent d7a5cf8 commit 3650582
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/shortcodes.php
Expand Up @@ -57,7 +57,7 @@ function new_entries_shortcode($atts) {
), $atts, 'new_list'));

//countオプションに異常値が入っていた場合
if (!is_numeric($count) || (is_numeric($count) && intval($count)) > 0) {
if (!is_numeric($count) || (is_numeric($count) && (intval($count)) <= 0)) {
$count = 5;
}

Expand Down Expand Up @@ -138,7 +138,7 @@ function popular_entries_shortcode($atts) {
), $atts, 'popular_list'));

//countオプションに異常値が入っていた場合
if (!is_numeric($count) || (is_numeric($count) && intval($count)) > 0) {
if (!is_numeric($count) || (is_numeric($count) && (intval($count)) <= 0)) {
$count = 5;
}

Expand Down Expand Up @@ -1002,7 +1002,7 @@ function get_info_list_shortcode($atts){
), $atts, 'info_list'));

//countオプションに異常値が入っていた場合
if (!is_numeric($count) || (is_numeric($count) && intval($count)) > 0) {
if (!is_numeric($count) || (is_numeric($count) && (intval($count)) <= 0)) {
$count = 5;
}

Expand Down

0 comments on commit 3650582

Please sign in to comment.