renamed get_excerpt back to extract_excerpt
Some checks failed
Some checks failed
This commit is contained in:
parent
1a5e19f3c1
commit
ad09fa947c
2 changed files with 4 additions and 4 deletions
|
@ -126,7 +126,7 @@ abstract class Event extends Post {
|
||||||
*
|
*
|
||||||
* @return ?string
|
* @return ?string
|
||||||
*/
|
*/
|
||||||
protected function get_excerpt(): ?string {
|
protected function extract_excerpt(): ?string {
|
||||||
if ( $this->wp_object->post_excerpt ) {
|
if ( $this->wp_object->post_excerpt ) {
|
||||||
return $this->wp_object->post_excerpt;
|
return $this->wp_object->post_excerpt;
|
||||||
} else {
|
} else {
|
||||||
|
@ -233,7 +233,7 @@ abstract class Event extends Post {
|
||||||
public function get_summary(): ?string {
|
public function get_summary(): ?string {
|
||||||
// todo when do we add the filter? we could add it and just keep it?
|
// todo when do we add the filter? we could add it and just keep it?
|
||||||
add_filter( 'activitypub_object_content_template', array( self::class, 'remove_ap_permalink_from_template' ), 2, 2 );
|
add_filter( 'activitypub_object_content_template', array( self::class, 'remove_ap_permalink_from_template' ), 2, 2 );
|
||||||
$excerpt = $this->get_excerpt();
|
$excerpt = $this->extract_excerpt();
|
||||||
// BeforeFirstRelease: decide whether this should be a admin setting.
|
// BeforeFirstRelease: decide whether this should be a admin setting.
|
||||||
$fallback_to_content = true;
|
$fallback_to_content = true;
|
||||||
if ( is_null( $excerpt ) && $fallback_to_content ) {
|
if ( is_null( $excerpt ) && $fallback_to_content ) {
|
||||||
|
|
|
@ -104,11 +104,11 @@ final class VS_Event_List extends Event_Transformer {
|
||||||
*
|
*
|
||||||
* @return ?string
|
* @return ?string
|
||||||
*/
|
*/
|
||||||
protected function get_excerpt(): ?string {
|
protected function extract_excerpt(): ?string {
|
||||||
if ( get_post_meta( $this->wp_object->ID, 'event-summary', true ) ) {
|
if ( get_post_meta( $this->wp_object->ID, 'event-summary', true ) ) {
|
||||||
return get_post_meta( $this->wp_object->ID, 'event-summary', true );
|
return get_post_meta( $this->wp_object->ID, 'event-summary', true );
|
||||||
} else {
|
} else {
|
||||||
return parent::get_excerpt();
|
return parent::extract_excerpt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue