Hide notices on onboarding screen

[MAILPOET-4536]
This commit is contained in:
David Remer
2022-11-02 08:55:41 +02:00
committed by Jan Jakeš
parent fe4d78992f
commit e37a824d86
3 changed files with 26 additions and 1 deletions

View File

@@ -434,7 +434,8 @@ class Menu {
if (!$this->featuresController->isSupported(FeaturesController::AUTOMATION)) {
return;
}
$this->wp->addSubmenuPage(
$automationPage = $this->wp->addSubmenuPage(
self::MAIN_PAGE_SLUG,
$this->setPageTitle(__('Automations', 'mailpoet')),
// @ToDo Remove Beta once Automation is no longer beta.
@@ -465,6 +466,11 @@ class Menu {
);
// add body class for automation editor page
$this->wp->addAction('load-' . $automationPage, function() {
$this->wp->addFilter('admin_body_class', function ($classes) {
return ltrim($classes . ' mailpoet-automation-is-onboarding');
});
});
$this->wp->addAction('load-' . $automationEditorPage, function() {
$this->wp->addFilter('admin_body_class', function ($classes) {
return ltrim($classes . ' site-editor-php');