revert scheduler/dispatcher changes
This commit is contained in:
parent
ced8cd0e29
commit
f207089269
1 changed files with 14 additions and 37 deletions
|
@ -82,45 +82,22 @@ class Scheduler {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// send User activities
|
$activitypub_post = new Post( $post, Users::BLOG_USER_ID );
|
||||||
if ( ! is_user_disabled( $post->post_author ) ) {
|
|
||||||
$activitypub_post = new Post( $post );
|
|
||||||
|
|
||||||
\wp_schedule_single_event(
|
\wp_schedule_single_event(
|
||||||
\time(),
|
\time(),
|
||||||
'activitypub_send_activity',
|
'activitypub_send_activity',
|
||||||
array( $activitypub_post, $type )
|
array( $activitypub_post, $type )
|
||||||
);
|
);
|
||||||
|
|
||||||
\wp_schedule_single_event(
|
\wp_schedule_single_event(
|
||||||
\time(),
|
\time(),
|
||||||
sprintf(
|
sprintf(
|
||||||
'activitypub_send_%s_activity',
|
'activitypub_send_%s_activity',
|
||||||
\strtolower( $type )
|
\strtolower( $type )
|
||||||
),
|
),
|
||||||
array( $activitypub_post )
|
array( $activitypub_post )
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
// send Blog-User activities
|
|
||||||
if ( ! is_user_disabled( User_Factory::BLOG_USER_ID ) ) {
|
|
||||||
$activitypub_post = new Post( $post, User_Factory::BLOG_USER_ID );
|
|
||||||
|
|
||||||
\wp_schedule_single_event(
|
|
||||||
\time(),
|
|
||||||
'activitypub_send_activity',
|
|
||||||
array( $activitypub_post, $type )
|
|
||||||
);
|
|
||||||
|
|
||||||
\wp_schedule_single_event(
|
|
||||||
\time(),
|
|
||||||
sprintf(
|
|
||||||
'activitypub_send_%s_activity',
|
|
||||||
\strtolower( $type )
|
|
||||||
),
|
|
||||||
array( $activitypub_post )
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue