Skip to content

Commit

Permalink
Merge pull request #64 from mbtools/patch-1
Browse files Browse the repository at this point in the history
Fix PHP warning in sitemap
  • Loading branch information
marcissimus authored Dec 9, 2023
2 parents e0e06ea + 1bd2fbf commit 87514fe
Showing 1 changed file with 28 additions and 29 deletions.
57 changes: 28 additions & 29 deletions code/template-sitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,35 +47,34 @@
<ul class='xoxo <?php echo $entity; ?>'>
<?php
switch ($entity) {
case 'pages':
wp_list_pages(array('title_li' => false));
continue 1;
case 'categories':
wp_list_categories(array('show_count' => true, 'use_desc_for_title' => false, 'title_li' => false));
continue 1;
case 'authors':
wp_list_authors(array('exclude_admin' => false, 'optioncount' => true, 'title_li' => false));
continue 1;
case 'years':
wp_get_archives(array('type' => 'yearly', 'show_post_count' => true));
continue 1;
case 'months':
wp_get_archives(array('type' => 'monthly', 'show_post_count' => true));
continue 1;
case 'weeks':
wp_get_archives(array('type' => 'weekly', 'show_post_count' => true));
continue 1;
case 'days':
wp_get_archives(array('type' => 'daily', 'show_post_count' => true));
continue;
case 'tag-cloud':
wp_tag_cloud(array('number' => 0));
continue 1;
case 'posts':
wp_get_archives(array('type' => 'postbypost'));
continue 1;
case 'pages':
wp_list_pages(array('title_li' => false));
break;
case 'categories':
wp_list_categories(array('show_count' => true, 'use_desc_for_title' => false, 'title_li' => false));
break;
case 'authors':
wp_list_authors(array('exclude_admin' => false, 'optioncount' => true, 'title_li' => false));
break;
case 'years':
wp_get_archives(array('type' => 'yearly', 'show_post_count' => true));
break;
case 'months':
wp_get_archives(array('type' => 'monthly', 'show_post_count' => true));
break;
case 'weeks':
wp_get_archives(array('type' => 'weekly', 'show_post_count' => true));
break;
case 'days':
wp_get_archives(array('type' => 'daily', 'show_post_count' => true));
break;
case 'tag-cloud':
wp_tag_cloud(array('number' => 0));
break;
case 'posts':
wp_get_archives(array('type' => 'postbypost'));
break;
}

?>
</ul><!-- /<?php echo $entity; ?> -->
<?php
Expand All @@ -99,4 +98,4 @@
?>
</div><!-- content -->
</div><!-- main col -->
<?php get_footer(); ?>
<?php get_footer(); ?>

0 comments on commit 87514fe

Please sign in to comment.