Schema fix
February 1, 2023
// organizer
$_schema_performer = $_schema_organizer = '';
if(!empty($event_organizer) ){
$_schema_organizer .= ',"organizer":[';
$_schema_organizer_data = array();
foreach($event_organizer as $EO_id=>$EO):
if( empty( $EO->name)) continue;
$_schema_organizer_content = '{"@type":"Organization","name":"'.$EO->name.'"';
$_schema_organizer_content .= !empty($EO->organizer_link)? ',"url":"'.$EO->organizer_link. '"' :'';
$_schema_organizer_content .= "}";
$_schema_organizer_data[] = $_schema_organizer_content;
endforeach;
$_schema_organizer .= implode(',', $_schema_organizer_data);
$_schema_organizer .= ']';
}
// perfomer data using organizer
if( $EVENT->check_yn('evo_event_org_as_perf') && !empty($event_organizer) ){
$_schema_performer .= ',"performer":[';
$_schema_performer_data = array();
foreach($event_organizer as $EO_id=>$EO):
if( empty( $EO->name)) continue;
$_schema_performer_data [] = '{"@type":"Person","name":"'.$EO->name.'"}';
endforeach;
$_schema_performer .= implode(',', $_schema_performer_data);
$_schema_performer .= ']';
}
Software version this patch fix applies to: 4.3.1
EventON Software: EventON
File name/directory this applies to: inclues/calendar/class-calendar-event-structure.php
What is solved with this patch fix: schema error
Learn how to apply this patch fix to your site →
Did this patch fix help you? If not, send us a ticket via helpdesk