Changeset 6125 for trunk/wp-admin/import/mt.php
- Timestamp:
- 09/18/2007 04:32:22 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/mt.php
r6101 r6125 216 216 $post->post_author = $this->checkauthor($post->post_author); //just so that if a post already exists, new users are not created by checkauthor 217 217 $post_id = wp_insert_post($post); 218 if ( is_wp_error( $post_id ) ) 219 return $post_id; 218 220 219 221 // Add categories. … … 292 294 // Finishing a post. 293 295 $context = ''; 294 $this->save_post($post, $comments, $pings); 296 $result = $this->save_post($post, $comments, $pings); 297 if ( is_wp_error( $result ) ) 298 return $result; 295 299 $post = new StdClass; 296 300 $comment = new StdClass(); … … 416 420 $this->file = get_attached_file($this->id); 417 421 $this->get_authors_from_post(); 418 $this->process_posts(); 422 $result = $this->process_posts(); 423 if ( is_wp_error( $result ) ) 424 return $result; 419 425 } 420 426 … … 435 441 case 2: 436 442 check_admin_referer('import-mt'); 437 $this->import(); 443 $result = $this->import(); 444 if ( is_wp_error( $result ) ) 445 echo $result->get_error_message(); 438 446 break; 439 447 }
Note: See TracChangeset
for help on using the changeset viewer.