| @@ 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; |
|
| @@ 576-587 (lines=12) @@ | ||
| 573 | $content_used_general_description = false; |
|
| 574 | ||
| 575 | //Set the post_content |
|
| 576 | if(false !== $importable_content && in_array('description',$importable_content)){ |
|
| 577 | if(isset($data[0]['content']['extended_description'])) |
|
| 578 | { |
|
| 579 | $data_post_content = $data[0]['content']['extended_description']; |
|
| 580 | }elseif(isset($data[0]['content']['general_description'])){ |
|
| 581 | $data_post_content = $data[0]['content']['general_description']; |
|
| 582 | $content_used_general_description = true; |
|
| 583 | }elseif(isset($data[0]['content']['teaser_description'])){ |
|
| 584 | $data_post_content = $data[0]['content']['teaser_description']; |
|
| 585 | } |
|
| 586 | $post['post_content'] = wp_strip_all_tags($data_post_content); |
|
| 587 | } |
|
| 588 | ||
| 589 | //set the post_excerpt |
|
| 590 | if(false !== $importable_content && in_array('excerpt',$importable_content)){ |
|