PluginProbe
ActivityPub / 8.0.2
ActivityPub v8.0.2
9.3.1 9.3.0 9.2.2 9.2.1 9.2.0 9.1.0 9.0.2 9.0.1 9.0.0 8.3.0 8.2.1 8.2.0 8.1.1 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.3.0 2.0.0 2.0.1 2.1.0 2.1.1 All 160 releases
← All changes | includes/handler/class-create.php +4 -4 9.2.08.0.2 View file →
@@ -7,9 +7,9 @@
7 7
8 8 namespace Activitypub\Handler;
9 9
10 10 use Activitypub\Collection\Interactions;
11 -use Activitypub\Collection\Remote_Posts;
11 +use Activitypub\Collection\Posts;
12 12 use Activitypub\Tombstone;
13 13
14 14 use function Activitypub\get_activity_visibility;
15 15 use function Activitypub\is_activity_reply;
@@ -109,9 +109,9 @@
109 109 if ( ! \get_option( 'activitypub_create_posts', false ) ) {
110 110 return false;
111 111 }
112 112
113 - $existing_post = Remote_Posts::get_by_guid( $activity['object']['id'] );
113 + $existing_post = Posts::get_by_guid( $activity['object']['id'] );
114 114
115 115 // If post exists, call update action.
116 116 if ( $existing_post instanceof \WP_Post ) {
117 117 Update::handle_update( $activity, (array) $user_ids, $activity_object );
@@ -118,9 +118,9 @@
118 118
119 119 return false;
120 120 }
121 121
122 - return Remote_Posts::add( $activity, $user_ids );
122 + return Posts::add( $activity, $user_ids );
123 123 }
124 124
125 125 /**
126 126 * Validate the object.
@@ -163,9 +163,9 @@
163 163 * @param int $outbox_id The ID of the outbox activity.
164 164 * @param \Activitypub\Activity\Activity $activity The Activity object.
165 165 */
166 166 public static function maybe_unbury( $outbox_id, $activity ) {
167 - if ( ! \in_array( $activity->get_type(), array( 'Create', 'Update' ), true ) ) {
167 + if ( ! in_array( $activity->get_type(), array( 'Create', 'Update' ), true ) ) {
168 168 return;
169 169 }
170 170
171 171 $object = $activity->get_object();