git-svn-id: http://svn.automattic.com/wordpress/trunk@1944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c16f28ef5d
commit
e16bd7dae8
|
@ -90,9 +90,10 @@ $title = addslashes( trim($title[1]) );
|
|||
$post_name = sanitize_title($title);
|
||||
|
||||
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);
|
||||
$date = preg_replace('|(-[0-9:]+)$|', '', $date[1]);
|
||||
$date = strtotime($date);
|
||||
|
|
Loading…
Reference in New Issue