fail early
This commit is contained in:
parent
255ace3ae6
commit
5f1abd2461
1 changed files with 17 additions and 15 deletions
|
@ -80,22 +80,24 @@ class Scheduler {
|
||||||
$activity_type = 'Delete';
|
$activity_type = 'Delete';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $activity_type ) {
|
if ( ! $activity_type ) {
|
||||||
\wp_schedule_single_event(
|
return;
|
||||||
\time(),
|
|
||||||
'activitypub_send_activity',
|
|
||||||
array( $activitypub_post, $activity_type )
|
|
||||||
);
|
|
||||||
|
|
||||||
\wp_schedule_single_event(
|
|
||||||
\time(),
|
|
||||||
sprintf(
|
|
||||||
'activitypub_send_%s_activity',
|
|
||||||
\strtolower( $activity_type )
|
|
||||||
),
|
|
||||||
array( $activitypub_post )
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\wp_schedule_single_event(
|
||||||
|
\time(),
|
||||||
|
'activitypub_send_activity',
|
||||||
|
array( $activitypub_post, $activity_type )
|
||||||
|
);
|
||||||
|
|
||||||
|
\wp_schedule_single_event(
|
||||||
|
\time(),
|
||||||
|
sprintf(
|
||||||
|
'activitypub_send_%s_activity',
|
||||||
|
\strtolower( $activity_type )
|
||||||
|
),
|
||||||
|
array( $activitypub_post )
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue