fix tags merge in wp plugin and end_datetime

This commit is contained in:
lesion 2023-03-23 13:09:10 +01:00
parent c8493d0810
commit b91774ac39
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -35,9 +35,10 @@ function wpgancio_save_event ($post_id) {
return sanitize_title($tag->name); return sanitize_title($tag->name);
} }
// TODO: merge event tags with post tags
$tmp_tags = get_the_terms( $event, 'event-tag' ); $tmp_tags = get_the_terms( $event, 'event-tag' );
if ($tmp_tags) {
$tags = array_map('tagName', $tmp_tags); $tags = array_map('tagName', $tmp_tags);
}
$gancio_id = get_post_meta($post_id, 'wpgancio_gancio_id', TRUE); $gancio_id = get_post_meta($post_id, 'wpgancio_gancio_id', TRUE);
@ -55,9 +56,8 @@ function wpgancio_save_event ($post_id) {
'tags' => $tags, 'tags' => $tags,
'description' => $event->post_content, 'description' => $event->post_content,
'start_datetime' => intval($start_datetime), 'start_datetime' => intval($start_datetime),
'end_datetime' => intval($end_datetime),
'place_name' => $place_name, 'place_name' => $place_name,
'place_address' => "${place_address['address']}, ${place_address['city']}" 'place_address' => $place_address['address'] . ", " . $place_address['city']
); );
// add image if specified // add image if specified