When the plugin was not activated on the WP plugins page (e.g., via WC NUX)
we forgot to clean the activation flag. That caused us to redirect
to the landing page on a subsequent plugin activation, even if the user activated
a different plugin.
This commit fixes the issue by making sure the PLUGIN_ACTIVATED flag is unset even when plugin
is not activated from WP plugins page.
[MAILPOET-5221]
This changes how the editor is initialized. The integration initialization class
doesn't get the engine class anymore, but integration is initialized via
mailpoet_email_editor_initialized action triggered from the engine.
This allows multiple integrations to hook into the engine.
[MAILPOET-5540]
Before this commit, maybeDbUpdate() was called inside Initializer::initialize(). This method is called using the WP `init` hook with a priority of `10`. To avoid running into situations where MailPoet code is executed before database changes are applied, we need to run maybeDbUpdate() as early as possible. To achieve this, this commit moves maybeDbUpdate() to its own action still using the `init` hook but with a priority of PHP_MIN_INT.
For more information of the potential problems of running the database changes too late check this example: pcNwfB-2V6-p2.
[MAILPOET-5564]
The idea is that there is a core class
Mailpoet\MailPoet\EmailEditor\Core\EmailEditor which will contain common email editor related stuff
that can be used and shared between projects.
Mailpoet\MailPoet\EmailEditor\Integration\EmailEditor which contains MailPoet specific settings and and extra modifications
specific for MailPoet.
[MAILPOET-5365]
Until now we were using the same render() method and Twig templates for
the segments and lists pages. This commit separates them by creating two
different render() methods, one for each page, and also separing the
Twig templates. Only the translations remain shared as separating them
would be more involved and probably not worth it.
[MAILPOET-5392]
The default color is #a7aaad, when CSS is ready, it can override it.
This approach seems to be also used by Woo.
I also removed useless title and groups from the SVG.
[MAILPOET-5296]