| 1 |
<?php |
| 2 |
/** |
| 3 |
* Class for Related API (`/related`). |
| 4 |
* |
| 5 |
* @package Parsely |
| 6 |
* @since 3.2.0 |
| 7 |
*/ |
| 8 |
|
| 9 |
declare(strict_types=1); |
| 10 |
|
| 11 |
namespace Parsely\RemoteAPI; |
| 12 |
|
| 13 |
use Parsely\Parsely; |
| 14 |
use WP_REST_Request; |
| 15 |
|
| 16 |
/** |
| 17 |
* Class for Related API (`/related`). |
| 18 |
* |
| 19 |
* @since 3.2.0 |
| 20 |
*/ |
| 21 |
class Related_API extends Base_Endpoint_Remote { |
| 22 |
protected const API_BASE_URL = Parsely::PUBLIC_API_BASE_URL; |
| 23 |
protected const ENDPOINT = '/related'; |
| 24 |
protected const QUERY_FILTER = 'wp_parsely_related_endpoint_args'; |
| 25 |
|
| 26 |
/** |
| 27 |
* Returns whether the endpoint is available for access by the current |
| 28 |
* user. |
| 29 |
* |
| 30 |
* @since 3.14.0 |
| 31 |
* @since 3.16.0 Added the `$request` parameter. |
| 32 |
* |
| 33 |
* @param WP_REST_Request|null $request The request object. |
| 34 |
* @return bool |
| 35 |
*/ |
| 36 |
public function is_available_to_current_user( $request = null ): bool { |
| 37 |
return true; |
| 38 |
} |
| 39 |
} |
| 40 |
|