Esempio n. 1
0
function theme_sitemap($atts, $content = null, $code)
{
    if (isset($atts['type'])) {
        switch ($atts['type']) {
            case 'pages':
                return sitemap_pages($atts);
            case 'posts':
            default:
                return sitemap_posts($atts);
        }
    }
    return '';
}
Esempio n. 2
0
function sitemap_all($atts)
{
    extract(shortcode_atts(array('number' => '0', 'shows' => 'pages,categories,posts,portfolios'), $atts));
    $shows = explode(',', $shows);
    if (empty($shows)) {
        return '';
    }
    $output = '';
    if (in_array('pages', $shows)) {
        $output .= '<h2>' . __('Pages', 'striking_front') . '</h2>';
        $output .= sitemap_pages($atts);
        $output .= '<div class="divider top"><a href="#">' . __('Top', 'striking_front') . '</a></div> ';
    }
    if (in_array('categories', $shows)) {
        $output .= '<h2>' . __('Category Archives', 'striking_front') . '</h2>';
        $output .= sitemap_categories($atts);
        $output .= '<div class="divider top"><a href="#">' . __('Top', 'striking_front') . '</a></div> ';
    }
    if (in_array('posts', $shows)) {
        $output .= '<h2>' . __('Blog Posts', 'striking_front') . '</h2>';
        $output .= sitemap_posts($atts);
        $output .= '<div class="divider top"><a href="#">' . __('Top', 'striking_front') . '</a></div> ';
    }
    if (in_array('portfolios', $shows)) {
        $output .= '<h2>' . __('Portfolios', 'striking_front') . '</h2>';
        $output .= sitemap_portfolios($atts);
        $output .= '<div class="divider top"><a href="#">' . __('Top', 'striking_front') . '</a></div> ';
    }
    return $output;
}