Add automation editor page
[MAILPOET-4287]
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
namespace MailPoet\Config;
|
||||
|
||||
use MailPoet\AdminPages\Pages\Automation;
|
||||
use MailPoet\AdminPages\Pages\AutomationEditor;
|
||||
use MailPoet\AdminPages\Pages\ExperimentalFeatures;
|
||||
use MailPoet\AdminPages\Pages\FormEditor;
|
||||
use MailPoet\AdminPages\Pages\Forms;
|
||||
@ -412,6 +413,23 @@ class Menu {
|
||||
'mailpoet-automation',
|
||||
[$this, 'automation']
|
||||
);
|
||||
|
||||
// Automation editor
|
||||
$automationEditorPage = $this->wp->addSubmenuPage(
|
||||
true,
|
||||
$this->setPageTitle('Automation Editor'),
|
||||
'Automation Editor',
|
||||
AccessControl::PERMISSION_MANAGE_EMAILS,
|
||||
'mailpoet-automation-editor',
|
||||
[$this, 'automationEditor']
|
||||
);
|
||||
|
||||
// add body class for automation editor page
|
||||
$this->wp->addAction('load-' . $automationEditorPage, function() {
|
||||
$this->wp->addAction('admin_body_class', function ($classes) {
|
||||
return ltrim($classes . ' block-editor-page');
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -448,6 +466,10 @@ class Menu {
|
||||
$this->container->get(Automation::class)->render();
|
||||
}
|
||||
|
||||
public function automationEditor() {
|
||||
$this->container->get(AutomationEditor::class)->render();
|
||||
}
|
||||
|
||||
public function experimentalFeatures() {
|
||||
$this->container->get(ExperimentalFeatures::class)->render();
|
||||
}
|
||||
|
Reference in New Issue
Block a user