Ticket #109 (closed enhancement: wontfix)
Correct sitemap date
| Reported by: | lifeisfoo@… | Owned by: | |
|---|---|---|---|
| Priority: | minor | Component: | sitemaps |
| Keywords: | sitemaps plugin | Cc: |
Description
The stample version of sitemap plugin (0.6), display in sitemap.xml date in atom-time format. The correct time format is yyyy-mm-dd (from http://sitemaps.org/protocol.php ). I added a function to utils.php
public static function sitemaptime($t) {
if ( ! is_numeric( $t ) ) {
$t = strtotime( $t );
} return date( "Y-m-d", $t );
}
and changed line 88 of sitemaps.plugin.php:
from
$url_lastmod= $url->addChild( 'lastmod', Utils::atomtime( $entry->updated ) );
to
$url_lastmod= $url->addChild( 'lastmod', Utils::sitemaptime( $entry->updated ) );
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
