AbstractSegmentsListingEndpoint.php
1 month ago
DynamicSegmentsBulkActionEndpoint.php
2 months ago
DynamicSegmentsListingEndpoint.php
1 month ago
SegmentRequestValidationTrait.php
2 months ago
SegmentsBulkActionEndpoint.php
2 months ago
SegmentsEndpoint.php
2 months ago
SegmentsListingEndpoint.php
1 month ago
index.php
2 months ago
SegmentsEndpoint.php
19 lines
| 1 | <?php declare(strict_types = 1); |
| 2 | |
| 3 | namespace MailPoet\Segments\RestApi\Endpoints; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoet\API\REST\Endpoint; |
| 9 | use MailPoet\Config\AccessControl; |
| 10 | use MailPoet\WP\Functions as WPFunctions; |
| 11 | |
| 12 | abstract class SegmentsEndpoint extends Endpoint { |
| 13 | use SegmentRequestValidationTrait; |
| 14 | |
| 15 | public function checkPermissions(): bool { |
| 16 | return WPFunctions::get()->currentUserCan(AccessControl::PERMISSION_MANAGE_SEGMENTS); |
| 17 | } |
| 18 | } |
| 19 |