git-svn-id: https://develop.svn.wordpress.org/trunk@1944 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2004-12-13 16:32:29 +00:00
parent 7ba3fa4bc0
commit 477525c8f7
1 changed files with 3 additions and 2 deletions

View File

@ -90,9 +90,10 @@ $title = addslashes( trim($title[1]) );
$post_name = sanitize_title($title); $post_name = sanitize_title($title);
preg_match('|<pubdate>(.*?)</pubdate>|is', $post, $date); preg_match('|<pubdate>(.*?)</pubdate>|is', $post, $date);
$date = strtotime($date[1]);
if (!$date) : // if we don't already have something from pubDate if ($date) :
$date = strtotime($date[1]);
else : // if we don't already have something from pubDate
preg_match('|<dc:date>(.*?)</dc:date>|is', $post, $date); preg_match('|<dc:date>(.*?)</dc:date>|is', $post, $date);
$date = preg_replace('|(-[0-9:]+)$|', '', $date[1]); $date = preg_replace('|(-[0-9:]+)$|', '', $date[1]);
$date = strtotime($date); $date = strtotime($date);