transformer_refactoring #44

Merged
linos merged 42 commits from transformer_refactoring into main 2024-10-02 19:15:29 +02:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit b4d3a7efa0 - Show all commits

View file

@ -126,8 +126,8 @@ abstract class Event extends Post {
*
* @return ?string
*/
protected function extract_excerpt(): ?string {
if ( $this->wp_object->excerpt ) {
protected function get_excerpt(): ?string {
if ( $this->wp_object->post_excerpt ) {
return $this->wp_object->post_excerpt;
} else {
return null;

View file

@ -108,7 +108,7 @@ final class VS_Event_List extends Event_Transformer {
if ( get_post_meta( $this->wp_object->ID, 'event-summary', true ) ) {
return get_post_meta( $this->wp_object->ID, 'event-summary', true );
} else {
return parent::extract_excerpt(); // todo naming not uniform.
return parent::get_excerpt();
}
}
}