git-svn-id: https://develop.svn.wordpress.org/trunk@1944 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7ba3fa4bc0
commit
477525c8f7
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue