Don't process enclosures when importing. Props: skeltoac. fixes #1771
git-svn-id: http://svn.automattic.com/wordpress/trunk@2953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
845917e6ff
commit
a6ae47a303
|
@ -164,11 +164,12 @@ function wp_insert_post($postarr = array()) {
|
||||||
(post_id,meta_key,meta_value)
|
(post_id,meta_key,meta_value)
|
||||||
VALUES ('$post_ID','_pingme','1')
|
VALUES ('$post_ID','_pingme','1')
|
||||||
");
|
");
|
||||||
$result = $wpdb->query("
|
if ( !defined('WP_IMPORTING') )
|
||||||
INSERT INTO $wpdb->postmeta
|
$result = $wpdb->query("
|
||||||
(post_id,meta_key,meta_value)
|
INSERT INTO $wpdb->postmeta
|
||||||
VALUES ('$post_ID','_encloseme','1')
|
(post_id,meta_key,meta_value)
|
||||||
");
|
VALUES ('$post_ID','_encloseme','1')
|
||||||
|
");
|
||||||
//register_shutdown_function('do_trackbacks', $post_ID);
|
//register_shutdown_function('do_trackbacks', $post_ID);
|
||||||
} else if ($post_status == 'static') {
|
} else if ($post_status == 'static') {
|
||||||
generate_page_rewrite_rules();
|
generate_page_rewrite_rules();
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue