diff --git a/wp-admin/admin.php b/wp-admin/admin.php index 289c8a325c..2a65c30cfa 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -74,7 +74,7 @@ if (isset($_GET['page'])) { if (! file_exists(ABSPATH . "wp-admin/import/$importer.php")) die(__('Cannot load importer.')); - + include(ABSPATH . "wp-admin/import/$importer.php"); $parent_file = 'import.php'; @@ -85,6 +85,8 @@ if (isset($_GET['page'])) { require_once(ABSPATH . 'wp-admin/upgrade-functions.php'); + define('WP_IMPORTING', true); + call_user_func($wp_importers[$importer][2]); include(ABSPATH . 'wp-admin/admin-footer.php'); diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index e5ddbfd9f1..b0167ddae4 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -154,7 +154,7 @@ function wp_insert_post($postarr = array()) { if ($post_status == 'publish') { do_action('publish_post', $post_ID); - if ($post_pingback) + if ($post_pingback && !defined('WP_IMPORTING')) $result = $wpdb->query(" INSERT INTO $wpdb->postmeta (post_id,meta_key,meta_value)