adding todo's and reformatting
Some checks failed
Deploy to https://wordpress-test.event-federation.eu/ / deploy (push) Failing after 7s
Some checks failed
Deploy to https://wordpress-test.event-federation.eu/ / deploy (push) Failing after 7s
This commit is contained in:
parent
da059c0d70
commit
f61ccd7a18
1 changed files with 8 additions and 8 deletions
|
@ -16,9 +16,9 @@ require_once __DIR__ . '/class-place.php';
|
|||
*
|
||||
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-event
|
||||
*/
|
||||
class Event extends \Activitypub\Activity\Base_Object {
|
||||
const REPLIES_MODERATION_OPTION_TYPES = [ 'allow_all', 'closed'];
|
||||
const JOIN_MODE_TYPES = [ 'free', 'restricted', 'external'];
|
||||
class Event extends \Activitypub\Activity\Base_Object { // todo maybe rename to mobilizon event?
|
||||
const REPLIES_MODERATION_OPTION_TYPES = [ 'allow_all', 'closed' ];
|
||||
const JOIN_MODE_TYPES = [ 'free', 'restricted', 'external' ]; // amd 'invite', but not used by mobilizon atm
|
||||
|
||||
/**
|
||||
* Event is an implementation of one of the
|
||||
|
@ -159,7 +159,7 @@ class Event extends \Activitypub\Activity\Base_Object {
|
|||
public static function get_context() {
|
||||
$class = self::class;
|
||||
$transient = "activitypub_json_context_object_{$class}";
|
||||
$context = get_transient($transient);
|
||||
$context = get_transient( $transient );
|
||||
// if ( $context ) {
|
||||
// return $context;
|
||||
// }
|
||||
|
@ -177,7 +177,7 @@ class Event extends \Activitypub\Activity\Base_Object {
|
|||
// Extract context information from the doc comment.
|
||||
preg_match( '/@context\s+([^\s]+)/', $doc_omment, $matches );
|
||||
|
||||
if ( !empty( $matches[1] ) ) {
|
||||
if ( ! empty( $matches[1] ) ) {
|
||||
$key_context[ snake_to_camel_case( $property->name ) ] = $matches[1];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue