Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
MSF
/
msf-climate-hub
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
24fb67f0
authored
2023-11-07 15:57:04 -0500
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
import update
Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent
09432036
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
wp-content/themes/msf-child/inc/commands.php
wp-content/themes/msf-child/inc/commands.php
View file @
24fb67f
...
...
@@ -13,12 +13,13 @@ class SYNC_FILES {
update_field
(
'authors'
,
$extracted_data
[
'authors'
],
$post_id
);
update_field
(
'document_year'
,
$extracted_data
[
'year'
],
$post_id
);
update_field
(
'version'
,
$extracted_data
[
'version'
],
$post_id
);
update_field
(
'wpml'
,
$extracted_data
[
'wmpl'
],
$post_id
);
update_field
(
'exclude_from_search'
,
0
,
$post_id
);
update_field
(
'msf_initiative'
,
$extracted_data
[
'initiative'
],
$post_id
);
update_field
(
'document_link'
,
$extracted_data
[
'link'
],
$post_id
);
update_field
(
'description'
,
$extracted_data
[
'description'
],
$post_id
);
update_field
(
'wpml'
,
$extracted_data
[
'wmpl'
],
$post_id
);
update_field
(
'exclude_from_search'
,
0
,
$post_id
);
$set_language_args
=
array
(
'element_id'
=>
$post_id
,
'element_type'
=>
'post_attachment'
,
...
...
@@ -60,6 +61,8 @@ class SYNC_FILES {
$link
=
self
::
cleanTerm
(
$data
[
self
::
$COLUMN_MAP
[
'link'
]]);
$title
=
self
::
cleanTerm
(
$data
[
self
::
$COLUMN_MAP
[
'title'
]]);
$description
=
self
::
cleanTerm
(
$data
[
self
::
$COLUMN_MAP
[
'description'
]]);
$wmpl
=
self
::
cleanTerm
(
$data
[
self
::
$COLUMN_MAP
[
'wmpl'
]]);
$safe_data
=
[
'tags'
=>
$tags
,
...
...
@@ -78,7 +81,8 @@ class SYNC_FILES {
'initiative'
=>
$initiative
,
'link'
=>
$link
,
'title'
=>
$title
,
'description'
=>
$description
'description'
=>
$description
,
'wmpl'
=>
$wmpl
];
return
$safe_data
;
...
...
@@ -110,7 +114,8 @@ class SYNC_FILES {
'key_4'
=>
21
,
'key_5'
=>
22
,
'description'
=>
23
,
'cat'
=>
24
'cat'
=>
24
,
'wpml'
=>
25
];
private
static
function
createDocument
(
$file
)
{
...
...
Please
register
or
sign in
to post a comment