|
@@ 801-811 (lines=11) @@
|
| 798 |
|
/** |
| 799 |
|
* Set the spoken_languages |
| 800 |
|
*/ |
| 801 |
|
public function set_spoken_languages( $data, $id ) { |
| 802 |
|
if ( ! empty( $data[0]['features'] ) && isset( $data[0]['features']['spoken_languages'] ) && ! empty( $data[0]['features']['spoken_languages'] ) ) { |
| 803 |
|
$languages = false; |
| 804 |
|
|
| 805 |
|
foreach ( $data[0]['features']['spoken_languages'] as $spoken_language ) { |
| 806 |
|
$languages[] = sanitize_title( $spoken_language ); |
| 807 |
|
} |
| 808 |
|
|
| 809 |
|
if ( false !== $languages ) { |
| 810 |
|
$this->save_custom_field( $languages,'spoken_languages',$id ); |
| 811 |
|
} |
| 812 |
|
} |
| 813 |
|
} |
| 814 |
|
|
|
@@ 818-828 (lines=11) @@
|
| 815 |
|
/** |
| 816 |
|
* Set the friendly |
| 817 |
|
*/ |
| 818 |
|
public function set_friendly( $data, $id ) { |
| 819 |
|
if ( ! empty( $data[0]['features'] ) && isset( $data[0]['features']['suggested_visitor_types'] ) && ! empty( $data[0]['features']['suggested_visitor_types'] ) ) { |
| 820 |
|
$friendly_options = false; |
| 821 |
|
|
| 822 |
|
foreach ( $data[0]['features']['suggested_visitor_types'] as $visitor_type ) { |
| 823 |
|
$friendly_options[] = sanitize_title( $visitor_type ); |
| 824 |
|
} |
| 825 |
|
|
| 826 |
|
if ( false !== $friendly_options ) { |
| 827 |
|
$this->save_custom_field( $friendly_options,'suggested_visitor_types',$id ); |
| 828 |
|
} |
| 829 |
|
} |
| 830 |
|
} |
| 831 |
|
|
|
@@ 835-845 (lines=11) @@
|
| 832 |
|
/** |
| 833 |
|
* Set the special interests |
| 834 |
|
*/ |
| 835 |
|
public function set_special_interests( $data, $id ) { |
| 836 |
|
if ( ! empty( $data[0]['features'] ) && isset( $data[0]['features']['special_interests'] ) && ! empty( $data[0]['features']['special_interests'] ) ) { |
| 837 |
|
$interests = false; |
| 838 |
|
|
| 839 |
|
foreach ( $data[0]['features']['special_interests'] as $special_interest ) { |
| 840 |
|
$interests[] = sanitize_title( $special_interest ); |
| 841 |
|
} |
| 842 |
|
|
| 843 |
|
if ( false !== $interests ) { |
| 844 |
|
$this->save_custom_field( $interests,'special_interests',$id ); |
| 845 |
|
} |
| 846 |
|
} |
| 847 |
|
} |
| 848 |
|
|