Sitemap improves
This commit is contained in:
parent
4eb51ee37e
commit
999bfabcfc
|
@ -44,9 +44,12 @@ class pluginSitemap extends Plugin {
|
||||||
unset($pages['error']);
|
unset($pages['error']);
|
||||||
foreach($pages as $key=>$db)
|
foreach($pages as $key=>$db)
|
||||||
{
|
{
|
||||||
$permalink = empty($filter) ? $url.'/'.$key : $url.'/'.$filter.'/'.$key;
|
if($db['status']=='published')
|
||||||
$date = Date::format($db['date'], DB_DATE_FORMAT, SITEMAP_DATE_FORMAT);
|
{
|
||||||
array_push($all, array('permalink'=>$permalink, 'date'=>$date));
|
$permalink = empty($filter) ? $url.'/'.$key : $url.'/'.$filter.'/'.$key;
|
||||||
|
$date = Date::format($db['date'], DB_DATE_FORMAT, SITEMAP_DATE_FORMAT);
|
||||||
|
array_push($all, array('permalink'=>$permalink, 'date'=>$date));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Posts ---
|
// --- Posts ---
|
||||||
|
@ -54,9 +57,12 @@ class pluginSitemap extends Plugin {
|
||||||
$posts = $dbPosts->getDB();
|
$posts = $dbPosts->getDB();
|
||||||
foreach($posts as $key=>$db)
|
foreach($posts as $key=>$db)
|
||||||
{
|
{
|
||||||
$permalink = empty($filter) ? $url.'/'.$key : $url.'/'.$filter.'/'.$key;
|
if($db['status']=='published')
|
||||||
$date = Date::format($db['date'], DB_DATE_FORMAT, SITEMAP_DATE_FORMAT);
|
{
|
||||||
array_push($all, array('permalink'=>$permalink, 'date'=>$date));
|
$permalink = empty($filter) ? $url.'/'.$key : $url.'/'.$filter.'/'.$key;
|
||||||
|
$date = Date::format($db['date'], DB_DATE_FORMAT, SITEMAP_DATE_FORMAT);
|
||||||
|
array_push($all, array('permalink'=>$permalink, 'date'=>$date));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate the XML for posts and pages
|
// Generate the XML for posts and pages
|
||||||
|
|
Loading…
Reference in New Issue