removed link at get_content() for all event
Some checks failed
Some checks failed
This commit is contained in:
parent
5fa3876c1a
commit
4f61a1c97e
3 changed files with 35 additions and 11 deletions
|
@ -326,4 +326,31 @@ abstract class Event extends Post {
|
||||||
|
|
||||||
return $activitypub_object;
|
return $activitypub_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the template to use to generate the content of the event.
|
||||||
|
*
|
||||||
|
* @return string The Template.
|
||||||
|
*/
|
||||||
|
protected function get_post_content_template() {
|
||||||
|
return "[ap_content]\n\n[ap_hashtags]";
|
||||||
|
|
||||||
|
// Decide: what kind of control does the user get?
|
||||||
|
// e.g. we could give the user way more control by only overriding (some) defaults like this:
|
||||||
|
|
||||||
|
/**
|
||||||
|
$type = \get_option( 'activitypub_post_content_type', 'content' );
|
||||||
|
|
||||||
|
switch ( $type ) {
|
||||||
|
case 'content':
|
||||||
|
return "[ap_content]\n\n[ap_hashtags]";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return parent::get_post_content_template();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
**/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,13 +129,6 @@ final class GatherPress extends Event {
|
||||||
return $user->get_url();
|
return $user->get_url();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the content.
|
|
||||||
*/
|
|
||||||
public function get_content(): string {
|
|
||||||
return $this->wp_object->post_content;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine whether the event is online.
|
* Determine whether the event is online.
|
||||||
*
|
*
|
||||||
|
|
|
@ -127,12 +127,16 @@ final class The_Events_Calendar extends Event {
|
||||||
* @return string The content.
|
* @return string The content.
|
||||||
*/
|
*/
|
||||||
protected function get_content() {
|
protected function get_content() {
|
||||||
$content = parent::get_content();
|
|
||||||
// /BeforeFirstRelease:
|
// /BeforeFirstRelease:
|
||||||
// * remove link at the end of the content.
|
// * [X] remove link at the end of the content.
|
||||||
// * add organizer.
|
// * [ ] add organizer.
|
||||||
// * do add Cancelled reason in the content.s
|
// * [ ] do add Cancelled reason in the content.
|
||||||
|
|
||||||
|
// Add Organizer:
|
||||||
|
// $this->wp_object->post_content .= organizer_string;
|
||||||
|
// rest will be handled by parent::get_content().
|
||||||
|
|
||||||
|
$content = parent::get_content();
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue