duplicated code

This commit is contained in:
ruru4143 2024-09-29 11:44:14 +02:00
parent 7c9424526d
commit f0b73d8674

View file

@ -113,10 +113,8 @@ final class VS_Event_List extends Event_Transformer {
protected function get_excerpt(): ?string {
if ( get_post_meta( $this->wp_object->ID, 'event-summary', true ) ) {
return get_post_meta( $this->wp_object->ID, 'event-summary', true );
} elseif ( $this->wp_object->excerpt ) {
return $this->wp_object->post_excerpt;
} else {
return null;
return parent::extract_excerpt(); // todo naming not uniform
}
}
}