| @@ 452-463 (lines=12) @@ | ||
| 449 | $content_used_general_description = false; |
|
| 450 | ||
| 451 | //Set the post_content |
|
| 452 | if(false !== $importable_content && in_array('description',$importable_content)){ |
|
| 453 | if(isset($data[0]['content']['extended_description'])) |
|
| 454 | { |
|
| 455 | $data_post_content = $data[0]['content']['extended_description']; |
|
| 456 | }elseif(isset($data[0]['content']['general_description'])){ |
|
| 457 | $data_post_content = $data[0]['content']['general_description']; |
|
| 458 | $content_used_general_description = true; |
|
| 459 | }elseif(isset($data[0]['content']['teaser_description'])){ |
|
| 460 | $data_post_content = $data[0]['content']['teaser_description']; |
|
| 461 | } |
|
| 462 | $post['post_content'] = wp_strip_all_tags($data_post_content); |
|
| 463 | } |
|
| 464 | ||
| 465 | //set the post_excerpt |
|
| 466 | if(false !== $importable_content && in_array('excerpt',$importable_content)){ |
|
| @@ 511-522 (lines=12) @@ | ||
| 508 | $content_used_general_description = false; |
|
| 509 | ||
| 510 | //Set the post_content |
|
| 511 | if (false !== $importable_content && in_array('description', $importable_content)) { |
|
| 512 | if (isset($data[0]['content']['extended_description'])) { |
|
| 513 | $data_post_content = $data[0]['content']['extended_description']; |
|
| 514 | } elseif (isset($data[0]['content']['general_description'])) { |
|
| 515 | $data_post_content = $data[0]['content']['general_description']; |
|
| 516 | $content_used_general_description = true; |
|
| 517 | } elseif (isset($data[0]['content']['teaser_description'])) { |
|
| 518 | $data_post_content = $data[0]['content']['teaser_description']; |
|
| 519 | } |
|
| 520 | $post['post_content'] = wp_strip_all_tags($data_post_content); |
|
| 521 | } |
|
| 522 | ||
| 523 | //set the post_excerpt |
|
| 524 | if (false !== $importable_content && in_array('excerpt', $importable_content)) { |
|
| 525 | if (isset($data[0]['content']['teaser_description'])) { |
|
| @@ 524-533 (lines=10) @@ | ||
| 521 | } |
|
| 522 | ||
| 523 | //set the post_excerpt |
|
| 524 | if (false !== $importable_content && in_array('excerpt', $importable_content)) { |
|
| 525 | if (isset($data[0]['content']['teaser_description'])) { |
|
| 526 | $data_post_excerpt = $data[0]['content']['teaser_description']; |
|
| 527 | } elseif (isset($data[0]['content']['extended_description'])) { |
|
| 528 | $data_post_excerpt = $data[0]['content']['extended_description']; |
|
| 529 | } elseif (isset($data[0]['content']['general_description']) && false === $content_used_general_description) { |
|
| 530 | $data_post_excerpt = $data[0]['content']['general_description']; |
|
| 531 | } |
|
| 532 | $post['post_excerpt'] = $data_post_excerpt; |
|
| 533 | } |
|
| 534 | ||
| 535 | if (false !== $id && '0' !== $id) { |
|
| 536 | $post['ID'] = $id; |
|