import update
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
1 changed file
with
9 additions
and
4 deletions
| ... | @@ -13,12 +13,13 @@ class SYNC_FILES { | ... | @@ -13,12 +13,13 @@ class SYNC_FILES { |
| 13 | update_field('authors', $extracted_data['authors'], $post_id); | 13 | update_field('authors', $extracted_data['authors'], $post_id); |
| 14 | update_field('document_year', $extracted_data['year'], $post_id); | 14 | update_field('document_year', $extracted_data['year'], $post_id); |
| 15 | update_field('version', $extracted_data['version'], $post_id); | 15 | update_field('version', $extracted_data['version'], $post_id); |
| 16 | update_field('wpml', $extracted_data['wmpl'], $post_id); | ||
| 17 | update_field('exclude_from_search', 0, $post_id); | ||
| 18 | update_field('msf_initiative', $extracted_data['initiative'], $post_id); | 16 | update_field('msf_initiative', $extracted_data['initiative'], $post_id); |
| 19 | update_field('document_link', $extracted_data['link'], $post_id); | 17 | update_field('document_link', $extracted_data['link'], $post_id); |
| 20 | update_field('description', $extracted_data['description'], $post_id); | 18 | update_field('description', $extracted_data['description'], $post_id); |
| 21 | 19 | ||
| 20 | update_field('wpml', $extracted_data['wmpl'], $post_id); | ||
| 21 | update_field('exclude_from_search', 0, $post_id); | ||
| 22 | |||
| 22 | $set_language_args = array( | 23 | $set_language_args = array( |
| 23 | 'element_id' => $post_id, | 24 | 'element_id' => $post_id, |
| 24 | 'element_type' => 'post_attachment', | 25 | 'element_type' => 'post_attachment', |
| ... | @@ -60,6 +61,8 @@ class SYNC_FILES { | ... | @@ -60,6 +61,8 @@ class SYNC_FILES { |
| 60 | $link = self::cleanTerm($data[self::$COLUMN_MAP['link']]); | 61 | $link = self::cleanTerm($data[self::$COLUMN_MAP['link']]); |
| 61 | $title = self::cleanTerm($data[self::$COLUMN_MAP['title']]); | 62 | $title = self::cleanTerm($data[self::$COLUMN_MAP['title']]); |
| 62 | $description = self::cleanTerm($data[self::$COLUMN_MAP['description']]); | 63 | $description = self::cleanTerm($data[self::$COLUMN_MAP['description']]); |
| 64 | $wmpl = self::cleanTerm($data[self::$COLUMN_MAP['wmpl']]); | ||
| 65 | |||
| 63 | 66 | ||
| 64 | $safe_data = [ | 67 | $safe_data = [ |
| 65 | 'tags'=>$tags, | 68 | 'tags'=>$tags, |
| ... | @@ -78,7 +81,8 @@ class SYNC_FILES { | ... | @@ -78,7 +81,8 @@ class SYNC_FILES { |
| 78 | 'initiative'=>$initiative, | 81 | 'initiative'=>$initiative, |
| 79 | 'link'=>$link, | 82 | 'link'=>$link, |
| 80 | 'title'=>$title, | 83 | 'title'=>$title, |
| 81 | 'description'=>$description | 84 | 'description'=>$description, |
| 85 | 'wmpl'=>$wmpl | ||
| 82 | ]; | 86 | ]; |
| 83 | 87 | ||
| 84 | return $safe_data; | 88 | return $safe_data; |
| ... | @@ -110,7 +114,8 @@ class SYNC_FILES { | ... | @@ -110,7 +114,8 @@ class SYNC_FILES { |
| 110 | 'key_4'=>21, | 114 | 'key_4'=>21, |
| 111 | 'key_5'=>22, | 115 | 'key_5'=>22, |
| 112 | 'description'=>23, | 116 | 'description'=>23, |
| 113 | 'cat'=>24 | 117 | 'cat'=>24, |
| 118 | 'wpml'=>25 | ||
| 114 | ]; | 119 | ]; |
| 115 | 120 | ||
| 116 | private static function createDocument($file) { | 121 | private static function createDocument($file) { | ... | ... |
-
Please register or sign in to post a comment