@@ -579,16 +579,14 @@ class SP_Event extends SP_Custom_Post{
|
||||
$appointments = array();
|
||||
|
||||
foreach ( $duties as $duty ) {
|
||||
$duty_appointments = sp_array_value( $officials, $duty->term_id, null );
|
||||
$duty_appointments = sp_array_value( $officials, $duty->term_id, array() );
|
||||
|
||||
if ( ! $include_empty && empty( $duty_appointments ) ) continue;
|
||||
|
||||
$appointed_officials = array();
|
||||
|
||||
if ( is_array( $duty_appointments ) ) {
|
||||
foreach ( $duty_appointments as $duty_appointment ) {
|
||||
$appointed_officials[ $duty_appointment ] = get_the_title( $duty_appointment );
|
||||
}
|
||||
foreach ( $duty_appointments as $duty_appointment ) {
|
||||
$appointed_officials[ $duty_appointment ] = get_the_title( $duty_appointment );
|
||||
}
|
||||
|
||||
if ( $include_empty && empty( $appointed_officials ) ) $appointed_officials[] = $placeholder;
|
||||
|
||||
Reference in New Issue
Block a user