Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dev.biuro
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Biuro
dev.biuro
Commits
f4544b35
Commit
f4544b35
authored
Jan 24, 2019
by
Simonas
Browse files
Options
Browse Files
Download
Plain Diff
merge conflict
parents
c3bb2896
fd3303e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
JobsImporter.php
wp-content/plugins/jobs-importer/JobsImporter.php
+7
-0
JsonDataCollector.php
wp-content/plugins/jobs-importer/JsonDataCollector.php
+9
-7
No files found.
wp-content/plugins/jobs-importer/JobsImporter.php
View file @
f4544b35
...
@@ -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);
// }
}
}
}
}
}
}
...
...
wp-content/plugins/jobs-importer/JsonDataCollector.php
View file @
f4544b35
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment