ID, $activity, $user_id, $visibility ); return $post; } /** * Handle outgoing reply from local actor. * * Creates a WordPress comment on the local post. The comment scheduler * will add it to the outbox and federate it. * * @param array $activity The activity data. * @param int $user_id The local user ID. * * @return \WP_Comment|false Comment on success, false if not a local reply. */ private static function create_comment( $activity, $user_id ) { $result = Interactions::add_comment( $activity, $user_id ); if ( ! $result ) { return false; } return \get_comment( $result ); } }