From b124ffe596ad6a83947d77f6ca087b9cd69298fd Mon Sep 17 00:00:00 2001 From: Rostislav Wolny Date: Thu, 14 Nov 2024 11:31:28 +0100 Subject: [PATCH] Improve the comment about checking the editor page [MAILPOET-6090] --- mailpoet/lib/EmailEditor/Integrations/MailPoet/EmailEditor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailpoet/lib/EmailEditor/Integrations/MailPoet/EmailEditor.php b/mailpoet/lib/EmailEditor/Integrations/MailPoet/EmailEditor.php index 50dc03f744..26e358a4c4 100644 --- a/mailpoet/lib/EmailEditor/Integrations/MailPoet/EmailEditor.php +++ b/mailpoet/lib/EmailEditor/Integrations/MailPoet/EmailEditor.php @@ -62,7 +62,7 @@ class EmailEditor { if ($isEditorPage) { return $isEditorPage; } - // Check on for post editor page + // We need to check early if we are on the email editor page. The check runs early so we can't use current_screen() here. if ($this->wp->isAdmin() && isset($_GET['post']) && isset($_GET['action']) && $_GET['action'] === 'edit') { $post = $this->wp->getPost((int)$_GET['post']); return $post && $post->post_type === self::MAILPOET_EMAIL_POST_TYPE; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps