Commit f4544b35 authored by Simonas's avatar Simonas

merge conflict

parents c3bb2896 fd3303e7
...@@ -70,6 +70,8 @@ class JobsImporter ...@@ -70,6 +70,8 @@ class JobsImporter
*/ */
public function import() public function import()
{ {
global $permalink_manager_uris;
foreach ($this->data as $ad) { foreach ($this->data as $ad) {
// Set language code // Set language code
...@@ -125,6 +127,11 @@ class JobsImporter ...@@ -125,6 +127,11 @@ class JobsImporter
// Set post language // Set post language
$this->setPostLang($podId, $ad['lang']); $this->setPostLang($podId, $ad['lang']);
// if (isset($custom_uri)) {
// $permalink_manager_uris[$podId] = $custom_uri;
// update_option('permalink-manager-uris', $permalink_manager_uris);
// }
} }
} }
} }
......
...@@ -11,25 +11,26 @@ class JsonDataCollector ...@@ -11,25 +11,26 @@ class JsonDataCollector
'post_modified' => 'atnaujinta', 'post_modified' => 'atnaujinta',
'title' => 'pareigos', 'title' => 'pareigos',
'post_content' => 'aprasymas', 'post_content' => 'aprasymas',
'slug' => 'seo_url',
'contact' => 'kontaktai',
// 'email' => 'email', // 'email' => 'email',
// 'work_time' => 'darbo_laikas', // 'work_time' => 'darbo_laikas',
// 'contact' => 'kontaktai',
]; ];
// Taxonomies data map // Taxonomies data map
protected $terms = [ protected $terms = [
'city' => [ 'city' => [
'slug' => 'miestas_id', 'slug' => 'miestas_id',
'name' => 'regionas' 'name' => 'regionas'
], ],
'field' => [ 'field' => [
'slug' => 'kategorija', 'slug' => 'kategorija',
'name' => 'sritis' 'name' => 'sritis'
], ],
'company' => [ 'company' => [
'name' => 'imone' 'name' => 'imone'
], ],
'type' => [ 'type' => [
'slug' => 'type', 'slug' => 'type',
'name' => 'type' 'name' => 'type'
] ]
...@@ -41,7 +42,7 @@ class JsonDataCollector ...@@ -41,7 +42,7 @@ class JsonDataCollector
protected $posts = [ protected $posts = [
'division' => [ 'division' => [
'title' => 'padalinys_name', 'title' => 'padalinys_name',
'slug' => 'padalinys' 'slug' => 'padalinys'
] ]
]; ];
...@@ -149,8 +150,9 @@ class JsonDataCollector ...@@ -149,8 +150,9 @@ class JsonDataCollector
$result = []; $result = [];
foreach ($this->properties as $propertyKey => $propertyValue) { foreach ($this->properties as $propertyKey => $propertyValue) {
if (isset($ad->{$propertyValue})) if (isset($ad->{$propertyValue})) {
$dataValue = $ad->{$propertyValue}; $dataValue = $ad->{$propertyValue};
}
$result[$propertyKey] = $this->getValue($dataValue); $result[$propertyKey] = $this->getValue($dataValue);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment