| @@ -92,9 +92,8 @@ | ||
| 92 | 92 | * @return \WP_REST_Response Response object on success, dies on failure. |
| 93 | 93 | */ |
| 94 | 94 | public function get_item( $request ) { |
| 95 | 95 | $uri = $request->get_param( 'uri' ); |
| 96 | - $intent = $request->get_param( 'intent' ); | |
| 97 | 96 | $redirect_url = ''; |
| 98 | 97 | $object = Http::get_remote_object( $uri ); |
| 99 | 98 | |
| 100 | 99 | if ( \is_wp_error( $object ) || ! isset( $object['type'] ) ) { |
| @@ -135,11 +134,10 @@ | ||
| 135 | 134 | * |
| 136 | 135 | * @param string $redirect_url The URL to redirect to. |
| 137 | 136 | * @param string $uri The URI of the actor to follow. |
| 138 | 137 | * @param array $object The full actor object data. |
| 139 | - * @param string $intent The intent of the interaction. | |
| 140 | 138 | */ |
| 141 | - $redirect_url = \apply_filters( 'activitypub_interactions_follow_url', $redirect_url, $uri, $object, $intent ); | |
| 139 | + $redirect_url = \apply_filters( 'activitypub_interactions_follow_url', $redirect_url, $uri, $object ); | |
| 142 | 140 | break; |
| 143 | 141 | case 'Collection': |
| 144 | 142 | case 'CollectionPage': |
| 145 | 143 | case 'OrderedCollection': |
| @@ -153,11 +151,10 @@ | ||
| 153 | 151 | * |
| 154 | 152 | * @param string $redirect_url The URL to redirect to. |
| 155 | 153 | * @param string $uri The URI of the collection to import. |
| 156 | 154 | * @param array $object The full collection object data. |
| 157 | - * @param string $intent The intent of the interaction. | |
| 158 | 155 | */ |
| 159 | - $redirect_url = \apply_filters( 'activitypub_interactions_starter_kit_url', $redirect_url, $uri, $object, $intent ); | |
| 156 | + $redirect_url = \apply_filters( 'activitypub_interactions_starter_kit_url', $redirect_url, $uri, $object ); | |
| 160 | 157 | break; |
| 161 | 158 | default: |
| 162 | 159 | $redirect_url = \admin_url( 'post-new.php?in_reply_to=' . $url_param ); |
| 163 | 160 | |
| @@ -168,11 +165,10 @@ | ||
| 168 | 165 | * |
| 169 | 166 | * @param string $redirect_url The URL to redirect to. |
| 170 | 167 | * @param string $uri The URI of the object to reply to. |
| 171 | 168 | * @param array $object The full object data being replied to. |
| 172 | - * @param string $intent The intent of the interaction. | |
| 173 | 169 | */ |
| 174 | - $redirect_url = \apply_filters( 'activitypub_interactions_reply_url', $redirect_url, $uri, $object, $intent ); | |
| 170 | + $redirect_url = \apply_filters( 'activitypub_interactions_reply_url', $redirect_url, $uri, $object ); | |
| 175 | 171 | } |
| 176 | 172 | |
| 177 | 173 | /** |
| 178 | 174 | * Filters the redirect URL. |
| @@ -182,11 +178,10 @@ | ||
| 182 | 178 | * |
| 183 | 179 | * @param string $redirect_url The URL to redirect to. |
| 184 | 180 | * @param string $uri The URI of the object. |
| 185 | 181 | * @param array $object The object being interacted with. |
| 186 | - * @param string $intent The intent of the interaction. | |
| 187 | 182 | */ |
| 188 | - $redirect_url = \apply_filters( 'activitypub_interactions_url', $redirect_url, $uri, $object, $intent ); | |
| 183 | + $redirect_url = \apply_filters( 'activitypub_interactions_url', $redirect_url, $uri, $object ); | |
| 189 | 184 | |
| 190 | 185 | // Check if hook is implemented. |
| 191 | 186 | if ( ! $redirect_url ) { |
| 192 | 187 | // Use wp_die as this can be called from the front-end. See https://github.com/Automattic/wordpress-activitypub/pull/1149/files#r1915297109. |