Don't process enclosures when importing. Props: skeltoac. fixes #1771

git-svn-id: https://develop.svn.wordpress.org/trunk@2953 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-10-17 23:45:50 +00:00
parent ac45aae4d7
commit df1f4e7389
1 changed files with 23 additions and 5 deletions

View File

@ -164,6 +164,7 @@ function wp_insert_post($postarr = array()) {
(post_id,meta_key,meta_value)
VALUES ('$post_ID','_pingme','1')
");
if ( !defined('WP_IMPORTING') )
$result = $wpdb->query("
INSERT INTO $wpdb->postmeta
(post_id,meta_key,meta_value)
@ -694,4 +695,21 @@ function generate_page_rewrite_rules() {
}
}
function get_post_status($post = false) {
global $wpdb, $posts;
if ( false === $post )
$post = $posts[0];
elseif ( (int) $post )
$post = get_post($post, OBJECT);
if ( is_object($post) ) {
if ( ('object' == $post->post_status) && $post->post_parent && ($post->ID != $post->post_parent) )
return get_post_status($post->post_parent);
else
return $post->post_status;
}
return false;
}
?>