Improve the comment about checking the editor page
[MAILPOET-6090]
This commit is contained in:
committed by
Oluwaseun Olorunsola
parent
33e828f2ed
commit
b124ffe596
@@ -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
|
||||
|
Reference in New Issue
Block a user