Rostislav Wolny
2c3932bdd3
Move simple-light template from the engine/package to the free plugin
...
The additional templates are registered by integrators.
This way, we will be able to use assets like images from MailPoet's CDN
and also various services from the plugins (e.g. CdnAssetsController)
[MAILPOET-6356]
2024-12-20 15:14:30 +01:00
Rostislav Wolny
6eca06780f
Add action for registering email templates
...
This commit introduces a new action to trigger registering email templates.
We need a custom action for that because the email editor engine controls
when we register templates and when we don't. Currently, we still skip
registering templates when we detect the site editor page.
[MAILPOET-6356]
2024-12-20 15:14:30 +01:00
Rostislav Wolny
e5aeae7989
Add workaround for saving post-template association for non-block themes
...
[MAILPOET-6356]
2024-12-20 15:14:30 +01:00
Rostislav Wolny
9b9187bb3e
Move the template_id construction logic to Templates class
...
[MAILPOET-6356]
2024-12-20 15:14:30 +01:00
Rostislav Wolny
a5db2564c8
Add post_types field to the template REST API response
...
We want to use post_type for filtering email templates.
There is a PR that adds this property https://github.com/WordPress/wordpress-develop/pull/7530
but it is not merged.
This commit added the property and also future compatibility check
so that we don't attempt to add it after the PR is merged.
[MAILPOET-6356]
2024-12-20 15:14:30 +01:00
Rostislav Wolny
ddd2108109
Fix a typo in a method name in Email_Editor
...
[MAILPOET-6356]
2024-12-20 15:14:30 +01:00
Rostislav Wolny
2e661f8b8e
Remove code that is no longer necessary for the templates to work
...
[MAILPOET-6356]
2024-12-20 15:14:30 +01:00
Rostislav Wolny
2fc0ad3c9e
Switch template registration to use register_block_template
...
[MAILPOET-6356]
2024-12-20 15:14:30 +01:00
Jan Lysý
e4c80a09b6
Add new Personalization Tag property defining value to insert
...
[MAILPOET-6376]
2024-12-20 10:12:04 +01:00
Jan Lysý
a570fa1641
Wrap personalization Tag token with square brackets
...
Because Gutenberg RichText component does not render square brackets around the HTML comment.
We need to append those brackets to tag tokens and expected them when we replace tags by their values.
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
Jan Lysý
bcc07c7503
Add API endpoint returning registered personalization tags
...
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
Jan Lysý
3ce8e38a00
Remove unused method from Email_editor class
...
[MAILPOET-6387]
2024-12-18 09:54:39 +01:00
Rostislav Wolny
c64e4caf27
Remove styles data added to templates REST API response
...
We no longer need to send CSS for every template because we use global styles
live from the editor.
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
Rostislav Wolny
ebe7151269
Remove code related to template themes
...
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
Rostislav Wolny
1e1bec4ce0
Use user theme in renderer instead of template themes
...
We no longer read styles associate with templates when we render an email
but we read the user theme instead
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
Rostislav Wolny
15818f37ef
Add user theme post cleanup to integration tests
...
This commit adds automatic cleanup of the user theme post before every test
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
Rostislav Wolny
993cbb4fd7
Run cleanup after each integration test
...
This is needed to get rid of posts created in tests to prevent test interdependency
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
Rostislav Wolny
0f7009438c
Add User_Theme class for managing user-defined styles and settings
...
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
Oluwaseun Olorunsola
cd184c373c
Update readme, implement PR feedback
...
MAILPOET-6256
2024-12-04 14:48:04 +01:00
Oluwaseun Olorunsola
8c2ede4ff9
Update Readme documentation
...
MAILPOET-6256
2024-12-04 14:48:04 +01:00
Oluwaseun Olorunsola
a5f0dbc2a3
Fix PHPStan and update git-blame-ignore
2024-12-03 09:32:42 +01:00
Oluwaseun Olorunsola
64b550e27d
Update Theme_Controller_Test, add case for loading theme.json file
...
MAILPOET-6043
2024-12-02 14:21:54 +01:00
Oluwaseun Olorunsola
5d6d7eba57
Add template integration tests
...
MAILPOET-6043
2024-12-02 14:21:54 +01:00
Oluwaseun Olorunsola
b49970e26e
Simplify GitHub workflow config for PHPStan
...
MAILPOET-6318
2024-12-02 08:44:22 +01:00
Oluwaseun Olorunsola
6df51455d2
Fix PHPStan errors
...
MAILPOET-6318
2024-12-02 08:44:22 +01:00
Oluwaseun Olorunsola
ccc3f9ab28
Ensure phpstan exit code is passed along to the shell window and address some pr comments
...
MAILPOET-6318
2024-12-02 08:44:22 +01:00
Oluwaseun Olorunsola
b1cc53ec5b
Update comments and fix code style warnings
...
MAILPOET-6318
2024-12-02 08:44:22 +01:00
Oluwaseun Olorunsola
5ce9008f90
Fix PHPStan class-string errors
...
MAILPOET-6318
2024-12-02 08:44:22 +01:00
Oluwaseun Olorunsola
0ac7a1ee02
Fix Bootstrap file IntegrationTesterActions.php does not exist.
...
MAILPOET-6318
2024-12-02 08:44:22 +01:00
Oluwaseun Olorunsola
6066fd6321
Automatically fix fixable code style lint errors
...
MAILPOET-6318
2024-12-02 08:44:22 +01:00
Oluwaseun Olorunsola
325c4c74f4
Fix PHPStan errors for Email editor PHP package integration test folder
...
MAILPOET-6318
2024-12-02 08:44:22 +01:00
Oluwaseun Olorunsola
a4ad960492
Fix PHPStan errors for Email editor PHP package unit test folder
...
MAILPOET-6318
2024-12-02 08:44:22 +01:00
Oluwaseun Olorunsola
bb71448c53
Fix PHPStan errors for Email editor PHP package src folder
...
MAILPOET-6318
2024-12-02 08:44:22 +01:00
Oluwaseun Olorunsola
40aac9e65c
Use email editor custom config for phpstan
...
MAILPOET-6318
2024-12-02 08:44:22 +01:00
Oluwaseun Olorunsola
30c4b5687f
Add phpstan command and script to Email editor PHP package
...
MAILPOET-6318
2024-12-02 08:44:22 +01:00
Jan Lysý
9b0880c0ef
Refactor HTML_Tag_Processor_Test integration test
...
[MAILPOET-6328]
2024-11-28 15:01:04 +01:00
Jan Lysý
1c20730817
Improve comments across Personalization Tags classes
...
[MAILPOET-6328]
2024-11-28 15:01:04 +01:00
Jan Lysý
f95688ca70
Add new class Personalization_Tag
...
The new class contains all necessary data to replace token with personalized value.
[MAILPOET-6328]
2024-11-28 15:01:04 +01:00
Jan Lysý
829905a0f5
Move Personalizer to a different namespace
...
[MAILPOET-6328]
2024-11-28 15:01:04 +01:00
Jan Lysý
7aad021735
Add Personalization Tags support for title
...
[MAILPOET-6328]
2024-11-28 15:01:04 +01:00
Jan Lysý
a761799c61
Add new class Personalizer managing tags replacement
...
[MAILPOET-6328]
2024-11-28 15:01:04 +01:00
Jan Lysý
806e960190
Add new class extending WP_HTML_Tag_Processor
...
The new class allows replacing tokens which is necessary for Personalization Tags implementation.
[MAILPOET-6328]
2024-11-28 15:01:04 +01:00
Jan Lysý
aab08fa5ab
Add personalization-tag-registry class
...
The new class which allows register Personalization Tags and then read them.
[MAILPOET-6328]
2024-11-28 15:01:04 +01:00
Rostislav Wolny
5bbdc41679
Add forward compatibility for template-locked mode
...
The setting was added in https://github.com/WordPress/gutenberg/pull/62304
and is needed with the newest Gutenberg version.
[MAILPOET-6319]
2024-11-26 16:44:11 +01:00
Rostislav Wolny
beb2994a71
Fix php8.2 deprecation warnings in email editor integration tests
...
[MAILPOET-6244]
2024-11-22 17:40:25 +01:00
Rostislav Wolny
bbbc21a5d5
Update email-editor unit tests
...
We need to require autoload manually because codeception is no longer part of the package
[MAILPOET-6244]
2024-11-22 17:40:25 +01:00
Rostislav Wolny
51510216cc
Remove codeception from email-editor package
...
[MAILPOET-6244]
2024-11-22 17:40:25 +01:00
Rostislav Wolny
e74e1ef2a2
Register email patterns directly in plugin
...
[MAILPOET-6243]
2024-11-22 08:45:46 +01:00
Rostislav Wolny
5885077838
Register only email content email pattern category
...
As for now, pattern categories are hardcoded in the engine.
[MAILPOET-6243]
2024-11-22 08:45:46 +01:00
Rostislav Wolny
927a5e9464
Add checks for invalid data for patterns and categories
...
[MAILPOET-6243]
2024-11-22 08:45:46 +01:00