Plugin Directory

Changeset 3381500


Ignore:
Timestamp:
10/20/2025 06:54:39 PM (5 months ago)
Author:
wpgrim
Message:

Hotfix 2.2.0

Location:
xml-sitemap-generator-for-google/trunk/includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • xml-sitemap-generator-for-google/trunk/includes/Sitemap.php

    r3381488 r3381500  
    228228
    229229            $this->add_url(
    230                 trailingslashit( untrailingslashit( sgg_get_home_url() ) ),
     230                sgg_get_home_url_with_trailing_slash(),
    231231                $home->priority,
    232232                $home->frequency,
  • xml-sitemap-generator-for-google/trunk/includes/helpers.php

    r3375258 r3381500  
    8989}
    9090
     91function sgg_get_home_url_with_trailing_slash() {
     92    return trailingslashit( untrailingslashit( sgg_get_home_url() ) );
     93}
     94
    9195function sgg_is_nginx() {
    9296    return isset( $_SERVER['SERVER_SOFTWARE'] ) && stristr( sanitize_text_field( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ), 'nginx' ) !== false;
  • xml-sitemap-generator-for-google/trunk/includes/vendor/SitemapGenerator.php

    r3298498 r3381500  
    352352            foreach ( $this->sitemaps as $sitemap_key => $sitemap ) {
    353353                if ( ! empty( $sitemap ) && is_array( $sitemap ) ) {
    354                     if ( 'page' === $sitemap_key && sgg_get_home_url() === ( $sitemap[0]['loc'] ?? '' ) && 1 < count( $sitemap ) ) {
     354                    if ( 'page' === $sitemap_key && sgg_get_home_url_with_trailing_slash() === ( $sitemap[0]['loc'] ?? '' ) && 1 < count( $sitemap ) ) {
    355355                        $sitemap[0] = array(
    356356                            'loc'     => $sitemap[0]['loc'],
Note: See TracChangeset for help on using the changeset viewer.