| 1 | <?php declare(strict_types = 1); |
| 2 | |
| 3 | namespace MailPoet\Newsletter\Embed\RestApi\Endpoints; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoet\API\REST\Endpoint; |
| 9 | use MailPoet\WP\Functions as WPFunctions; |
| 10 | |
| 11 | abstract class NewsletterEmbedEndpoint extends Endpoint { |
| 12 | public function checkPermissions(): bool { |
| 13 | return WPFunctions::get()->currentUserCan('edit_posts'); |
| 14 | } |
| 15 | } |
| 16 |