PluginProbe
Parse.ly / 3.14.1
Parse.ly v3.14.1
3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 3.20.3 All 105 releases
wp-parsely / src / RemoteAPI / class-analytics-post-detail-api.php

class-analytics-post-detail-api.php in Parse.ly 3.14.1, at src/RemoteAPI/class-analytics-post-detail-api.php

43 lines 970 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class for Analytics Post Detail API (`/analytics/post/detail`).
4 *
5 * @package Parsely
6 * @since 3.6.0
7 */
8
9 declare(strict_types=1);
10
11 namespace Parsely\RemoteAPI;
12
13 use Parsely\Endpoints\Base_Endpoint;
14 use Parsely\Parsely;
15
16 /**
17 * Class for Analytics Post Detail API (`/analytics/post/detail`).
18 *
19 * @since 3.6.0
20 */
21 class Analytics_Post_Detail_API extends Base_Endpoint_Remote {
22 protected const API_BASE_URL = Parsely::PUBLIC_API_BASE_URL;
23 protected const ENDPOINT = '/analytics/post/detail';
24 protected const QUERY_FILTER = 'wp_parsely_analytics_post_detail_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 *
32 * @return bool
33 */
34 public function is_available_to_current_user(): bool {
35 return current_user_can(
36 // phpcs:ignore WordPress.WP.Capabilities.Undetermined
37 $this->apply_capability_filters(
38 Base_Endpoint::DEFAULT_ACCESS_CAPABILITY
39 )
40 );
41 }
42 }
43