PluginProbe
ActivityPub / 7.7.0
ActivityPub v7.7.0
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-collection-sync.php +7 -7 9.2.07.7.0 View file →
@@ -65,9 +65,9 @@
65 65 }
66 66
67 67 // Check for followers collection.
68 68 $collection_type = null;
69 - if ( \preg_match( '#/followers(?:/sync)?(?:\?|$)#', $params['url'] ) ) {
69 + if ( preg_match( '#/followers(?:/sync)?(?:\?|$)#', $params['url'] ) ) {
70 70 $collection_type = 'followers';
71 71 }
72 72
73 73 if ( ! $collection_type ) {
@@ -88,12 +88,12 @@
88 88 }
89 89
90 90 // Extract the user ID for cache key (collection sync is always for a single user).
91 91 $user_id = \is_array( $user_ids ) ? \reset( $user_ids ) : $user_ids;
92 - $cache_key = 'activitypub_collection_sync_received_' . $user_id . '_' . \md5( $actor_url );
92 + $cache_key = 'activitypub_collection_sync_received_' . $user_id . '_' . md5( $actor_url );
93 93 if ( false === \get_transient( $cache_key ) ) {
94 94 $frequency = self::get_frequency();
95 - \set_transient( $cache_key, \time(), $frequency );
95 + \set_transient( $cache_key, time(), $frequency );
96 96 } else {
97 97 return;
98 98 }
99 99
@@ -126,9 +126,9 @@
126 126 if ( empty( $args['body'] ) ) {
127 127 return $args;
128 128 }
129 129
130 - if ( ! \is_array( $args['body'] ) ) {
130 + if ( ! is_array( $args['body'] ) ) {
131 131 $body = \json_decode( $args['body'], true );
132 132 if ( null === $body ) {
133 133 return $args;
134 134 }
@@ -148,9 +148,9 @@
148 148 return $args;
149 149 }
150 150
151 151 // Check if we've already sent a sync header to this authority today.
152 - $transient_key = 'activitypub_collection_sync_sent_' . $user_id . '_' . \md5( $inbox_authority );
152 + $transient_key = 'activitypub_collection_sync_sent_' . $user_id . '_' . md5( $inbox_authority );
153 153 if ( false !== \get_transient( $transient_key ) ) {
154 154 return $args;
155 155 }
156 156
@@ -158,9 +158,9 @@
158 158 if ( $sync_header ) {
159 159 $args['headers']['Collection-Synchronization'] = $sync_header;
160 160
161 161 $frequency = self::get_frequency();
162 - \set_transient( $transient_key, \time(), $frequency );
162 + \set_transient( $transient_key, time(), $frequency );
163 163 }
164 164
165 165 return $args;
166 166 }
@@ -195,9 +195,9 @@
195 195 if ( \is_wp_error( $expected_collection ) ) {
196 196 return false;
197 197 }
198 198
199 - if ( \trailingslashit( $params['collectionId'] ) !== \trailingslashit( $expected_collection ) ) {
199 + if ( trailingslashit( $params['collectionId'] ) !== trailingslashit( $expected_collection ) ) {
200 200 return false;
201 201 }
202 202
203 203 // Build authorities for comparison.