Skip to content
This repository has been archived by the owner. It is now read-only.

Update to UC People #21

Merged
merged 1 commit into from Mar 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion uc-people.php
Expand Up @@ -220,6 +220,7 @@ function importFile( $filename ){
'about' => 'About',
'url' => 'Website',
'author' => 'Author',
'department' => 'Department',
);

foreach( $data as $k => $v ){
Expand All @@ -245,7 +246,7 @@ function importFile( $filename ){
'post_author' => ( !empty($v['Author']) ? $v['Author']: get_current_user_id() ),
);
$id = wp_insert_post( $args, true );
wp_set_object_terms( $id, explode(' ', $v['Tags']), 'tag' );
wp_set_object_terms( $id, explode(',', $v['Tags']), 'persontag' );
set_post_thumbnail( $id, intval($v['Profile Image']) );
foreach ($fields as $l => $w) {
if( $l == 'netid' || $l == 'role' || $l == 'author' ){
Expand Down