Ejemplo n.º 1
0
function wiziapp_buildArchiveByMonthPage($year, $month)
{
    global $wp_locale;
    $screen_conf = $GLOBALS['WiziappScreens']->getScreenLayout('posts', 'archived_list');
    $numberOfPosts = WiziappConfig::getInstance()->posts_list_limit;
    $cQuery = "orderby=modified&posts_per_page=-1&monthnum={$month}&year={$year}";
    $countQuery = new WP_Query($cQuery);
    $total = count($countQuery->posts);
    $pager = new WiziappPagination($total);
    $query = "orderby=modified&posts_per_page={$numberOfPosts}&monthnum={$month}&year={$year}&offset={$pager->getOffset()}";
    $title = sprintf(__('%1$s %2$d'), $wp_locale->get_month($month), $year);
    wiziapp_buildPostListPage($query, $title, $screen_conf['items'], false, $pager->leftToShow);
}