Written by Anonymous
function popular_entries_shortcode($atts) {
extract(shortcode_atts(array(
'days' => 'all',
'count' => 5,
'type' => 'default',
'rank' => 0,
'pv' => 0,
'cats' => 'all',
'children' => 0,
'ex_posts' => null,
'ex_cats' => null,
'bold' => 0,
'arrow' => 0,
'date' => 0,
'class' => null,
'snippet' => 0,
'author' => null,
'post_type' => 'post',
'horizontal' => 0,
'action' => null,
'comment' => 0,
'offset' => 0,
), $atts, 'popular_list'));
//countオプションに異常値が入っていた場合
if (!is_numeric($count) || (is_numeric($count) && (intval($count)) <= 0)) {
$count = 5;
}
//表示カテゴリー
$cat_ids = array();
if ($cats && $cats != 'all') {
$cat_id******plode(',', $cats);
}
//除外投稿
***clude_post_ids = array();
if (***_posts) {
***clude_post_id******plode(',', ***_posts);
}
//除外カテゴリー
***clude_cat_ids = array();
if (***_cats) {
***clude_cat_id******plode(',', ***_cats);
}
$atts = array(
'days' => $days,
'entry_count' => $count,
'entry_type' => $type,
'ranking_visible' => $rank,
'pv_visible' => $pv,
'cat_ids' => $cat_ids,
'children' => $children,
'exclude_post_ids' => ***clude_post_id**********clude_cat_ids' => ***clude_cat_ids,
'bold' => $bold,
'arrow' => $arrow,
'date' => $date,
'class' => $class,
'snippet' => $snippet,
'author' => $author,
'post_type' => $post_type,
'horizontal' => $horizontal,
'action' => $action,
'comment' => $comment,
'offset' => $offset,
);
ob_start();
generate_popular_entries_tag($atts);
$res = change_fa(ob_get_clean());
return $res;
}