| @@ 560-571 (lines=12) @@ | ||
| 557 | $content_used_general_description = false; |
|
| 558 | ||
| 559 | //Set the post_content |
|
| 560 | if(false !== $importable_content && in_array('description',$importable_content)){ |
|
| 561 | if(isset($data[0]['content']['extended_description'])) |
|
| 562 | { |
|
| 563 | $data_post_content = $data[0]['content']['extended_description']; |
|
| 564 | }elseif(isset($data[0]['content']['general_description'])){ |
|
| 565 | $data_post_content = $data[0]['content']['general_description']; |
|
| 566 | $content_used_general_description = true; |
|
| 567 | }elseif(isset($data[0]['content']['teaser_description'])){ |
|
| 568 | $data_post_content = $data[0]['content']['teaser_description']; |
|
| 569 | } |
|
| 570 | $post['post_content'] = wp_strip_all_tags($data_post_content); |
|
| 571 | } |
|
| 572 | ||
| 573 | //set the post_excerpt |
|
| 574 | if(false !== $importable_content && in_array('excerpt',$importable_content)){ |
|
| @@ 481-492 (lines=12) @@ | ||
| 478 | $content_used_general_description = false; |
|
| 479 | ||
| 480 | //Set the post_content |
|
| 481 | if(false !== $importable_content && in_array('description',$importable_content)){ |
|
| 482 | if(isset($data[0]['content']['extended_description'])) |
|
| 483 | { |
|
| 484 | $data_post_content = $data[0]['content']['extended_description']; |
|
| 485 | }elseif(isset($data[0]['content']['general_description'])){ |
|
| 486 | $data_post_content = $data[0]['content']['general_description']; |
|
| 487 | $content_used_general_description = true; |
|
| 488 | }elseif(isset($data[0]['content']['teaser_description'])){ |
|
| 489 | $data_post_content = $data[0]['content']['teaser_description']; |
|
| 490 | } |
|
| 491 | $post['post_content'] = wp_strip_all_tags($data_post_content); |
|
| 492 | } |
|
| 493 | ||
| 494 | //set the post_excerpt |
|
| 495 | if(false !== $importable_content && in_array('excerpt',$importable_content)){ |
|
| @@ 495-504 (lines=10) @@ | ||
| 492 | } |
|
| 493 | ||
| 494 | //set the post_excerpt |
|
| 495 | if(false !== $importable_content && in_array('excerpt',$importable_content)){ |
|
| 496 | if(isset($data[0]['content']['teaser_description'])){ |
|
| 497 | $data_post_excerpt = $data[0]['content']['teaser_description']; |
|
| 498 | }elseif(isset($data[0]['content']['extended_description'])){ |
|
| 499 | $data_post_excerpt = $data[0]['content']['extended_description']; |
|
| 500 | }elseif(isset($data[0]['content']['general_description']) && false === $content_used_general_description){ |
|
| 501 | $data_post_excerpt = $data[0]['content']['general_description']; |
|
| 502 | } |
|
| 503 | $post['post_excerpt'] = $data_post_excerpt; |
|
| 504 | } |
|
| 505 | ||
| 506 | if(false !== $id && '0' !== $id){ |
|
| 507 | $post['ID'] = $id; |
|