Skip to content

Commit e5e5c42

Browse files
author
Chris Gårdenberg
committed
fix: Added repeatFrequency, repeatCount and courseMode for LD+JSON
fixes #511
1 parent 594c422 commit e5e5c42

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

PLUGIN-CHECKSUM

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
abf969511e900a6eadfd2d30dac37c94
1+
98e01efe2b2fb78b36679e1d78c8cfc9

content/template/data/ld-json.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@
8686
];
8787

8888
if ( $is_ondemand ) {
89-
$_event['courseMode'] = "online";
90-
$_event['location'] = "Online";
89+
$_event['courseMode'] = "Online";
9190
$_event['description'] = 'On-demand';
9291

9392
if ( $event['OnDemandAccessDays'] == null && $selected_course['OnDemandAccessDays'] != null ) {
@@ -109,14 +108,17 @@
109108
];
110109
}
111110
} else {
112-
$_event['location'] = $event['City'];
113-
$_event['startDate'] = $event['StartDate'];
114-
$_event['endDate'] = $event['EndDate'];
111+
$_event['courseMode'] = "Onsite";
112+
$_event['location'] = $event['City'];
113+
$_event['startDate'] = $event['StartDate'];
114+
$_event['endDate'] = $event['EndDate'];
115115

116116
$_event['courseSchedule'] = [
117-
'@type' => 'Schedule',
118-
'startDate' => $event['StartDate'],
119-
'endDate' => $event['EndDate'],
117+
'@type' => 'Schedule',
118+
'startDate' => $event['StartDate'],
119+
'endDate' => $event['EndDate'],
120+
'repeatFrequency' => 'Daily',
121+
'repeatCount' => count( $event['EventDates'] ),
120122
];
121123
}
122124

0 commit comments

Comments
 (0)