Skip to content

Commit

Permalink
Merge branch 'release/1.11.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Hemberger committed Sep 3, 2020
2 parents 72d78f1 + 4d9c4da commit a6d9d35
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 22 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 1.11.7 (9/3/20)
* Changed: Added sitemap content type PHP filters.

## 1.11.6 (8/21/20)
* Fixed: Compatibility with WP 5.5, deprecated `wp_make_content_images_responsive()` in favor of `wp_filter_content_tags()` when available.
* Changed: Update updater.
Expand Down
52 changes: 32 additions & 20 deletions lib/functions/display.php
Original file line number Diff line number Diff line change
Expand Up @@ -608,26 +608,38 @@ function mai_get_sitemap() {

$post_counts = wp_count_posts();
if ( $post_counts->publish > 0 ) {
$sitemap .= sprintf( '<%2$s>%1$s</%2$s>', __( 'Categories:', 'mai-theme-engine' ), $heading );
$sitemap .= sprintf( '<ul>%s</ul>', wp_list_categories( array(
'number' => $number,
'sort_column' => 'name',
'title_li' => '',
'echo' => false,
) ) );
$sitemap .= sprintf( '<%2$s>%1$s</%2$s>', __( 'Authors:', 'mai-theme-engine' ), $heading );
$sitemap .= sprintf( '<ul>%s</ul>', wp_list_authors( array(
'number' => $number,
'exclude_admin' => false,
'optioncount' => true,
'echo' => false,
) ) );
$sitemap .= sprintf( '<%2$s>%1$s</%2$s>', __( 'Monthly:', 'mai-theme-engine' ), $heading );
$sitemap .= sprintf( '<ul>%s</ul>', wp_get_archives( array(
'number' => $number,
'type' => 'monthly',
'echo' => false,
) ) );

if ( apply_filters( 'mai_sitemap_show_categories', true ) ) {

$sitemap .= sprintf( '<%2$s>%1$s</%2$s>', __( 'Categories:', 'mai-theme-engine' ), $heading );
$sitemap .= sprintf( '<ul>%s</ul>', wp_list_categories( array(
'number' => $number,
'sort_column' => 'name',
'title_li' => '',
'echo' => false,
) ) );
}

if ( apply_filters( 'mai_sitemap_show_authors', true ) ) {

$sitemap .= sprintf( '<%2$s>%1$s</%2$s>', __( 'Authors:', 'mai-theme-engine' ), $heading );
$sitemap .= sprintf( '<ul>%s</ul>', wp_list_authors( array(
'number' => $number,
'exclude_admin' => false,
'optioncount' => true,
'echo' => false,
) ) );
}

if ( apply_filters( 'mai_sitemap_show_monthly', true ) ) {

$sitemap .= sprintf( '<%2$s>%1$s</%2$s>', __( 'Monthly:', 'mai-theme-engine' ), $heading );
$sitemap .= sprintf( '<ul>%s</ul>', wp_get_archives( array(
'number' => $number,
'type' => 'monthly',
'echo' => false,
) ) );
}
}

return $sitemap;
Expand Down
4 changes: 2 additions & 2 deletions mai-theme-engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Plugin URI: https://maitheme.com/
* Description: The Mai Theme Engine plugin
*
* Version: 1.11.6
* Version: 1.11.7
*
* GitHub URI: maithemewp/mai-theme-engine
*
Expand Down Expand Up @@ -89,7 +89,7 @@ public function __wakeup() {
private function setup_constants() {

// Plugin version.
define( 'MAI_THEME_ENGINE_VERSION', '1.11.6' );
define( 'MAI_THEME_ENGINE_VERSION', '1.11.7' );

// DB version.
define( 'MAI_THEME_ENGINE_DB_VERSION', '1600' );
Expand Down

0 comments on commit a6d9d35

Please sign in to comment.