| @@ -10,9 +10,8 @@ | ||
| 10 | 10 | |
| 11 | 11 | namespace Parsely\RemoteAPI; |
| 12 | 12 | |
| 13 | 13 | use Parsely\Parsely; |
| 14 | -use WP_REST_Request; | |
| 15 | 14 | |
| 16 | 15 | /** |
| 17 | 16 | * Class for Related API (`/related`). |
| 18 | 17 | * |
| @@ -17,23 +16,17 @@ | ||
| 17 | 16 | * Class for Related API (`/related`). |
| 18 | 17 | * |
| 19 | 18 | * @since 3.2.0 |
| 20 | 19 | */ |
| 21 | -class Related_API extends Base_Endpoint_Remote { | |
| 22 | - protected const API_BASE_URL = Parsely::PUBLIC_API_BASE_URL; | |
| 20 | +class Related_API extends Remote_API_Base { | |
| 23 | 21 | protected const ENDPOINT = '/related'; |
| 24 | 22 | protected const QUERY_FILTER = 'wp_parsely_related_endpoint_args'; |
| 25 | 23 | |
| 26 | 24 | /** |
| 27 | - * Returns whether the endpoint is available for access by the current | |
| 28 | - * user. | |
| 25 | + * Indicates whether the endpoint is public or protected behind permissions. | |
| 29 | 26 | * |
| 30 | - * @since 3.14.0 | |
| 31 | - * @since 3.16.0 Added the `$request` parameter. | |
| 27 | + * @since 3.7.0 | |
| 32 | 28 | * |
| 33 | - * @param WP_REST_Request|null $request The request object. | |
| 34 | - * @return bool | |
| 29 | + * @var bool | |
| 35 | 30 | */ |
| 36 | - public function is_available_to_current_user( $request = null ): bool { | |
| 37 | - return true; | |
| 38 | - } | |
| 31 | + protected $is_public_endpoint = true; | |
| 39 | 32 | } |