We want to remove/refactor the whole ModelValidator class as part of the
Doctrine refactor.
This commit moves the method ModelValidator::validateNonRoleEmail() to a
new Validator class as the method is not used by the validator system of
the Paris models. ModelValidator::validateEmail() was also moved as it
is called by ModelValidator::validateNonRoleEmail().
[MAILPOET-4343]
We save the falsy value for bold as "0" which was causing that labels
were rendered bold in front end also when the checkbox was disabled.
[MAILPOET-5139]
It's possible that other plugins might define wc_get_page_id, so it's
more important to know that WC is installed/active than to know if the
function itself exists.
For good measure I'm including a cast to int even though the WC version
of the function always returns an integer. This is probably unnecessary
but it protects us from the possibility of the WC version of the
function returning something other than an integer in the future.
[MAILPOET-4834]
The current Captcha class has a lot of responsibilities. It renders the captcha
image, can check if a certain captcha type is a Google captcha, if a captcha is
required for a certain email. The SubscriberSubscribeController is not only in
charge of "controlling" the subscription process but also validates, whether a
captcha is correct or not. This architecture made it difficult to extend the
functionality and introduce the audio captcha feature.
Therefore this commit refactors the captcha architecture and tries to seperate
the different concerns into several classes and objects. Validation is now done
by validators.
The CaptchaPhrase now is in charge of keeping the captcha phrase consistent
between the image and the new audio, so that you can renew the captcha and both
captchas are in sync.
[MAILPOET-4514]
The WooCommerce Shop page is a special kind of page. It’s basically a post archive.
The Shop page is a placeholder for a post type archive for products. It may render differently than other pages in your install.
https://woocommerce.com/document/woocommerce-pages/#section-4
It doesn’t have any content and WooCommerce core team is also removing the the-content filter from the Shop listing page hence why we are unable to hook into the the-content filter we use for other parts of the codebase
MAILPOET-4663
The legend html was not escaped and was ignoring block settings coming
from the form editor.
This commit adds a new helper function for rendering legend that respects
applies block settings and also escapes the output.
[MAILPOET-4471]
Added a 'type-message' for Parsley to display an error message when the input field is filled in incorrectly.
Also removed the global Parsley message to prevent it from overruling the 'required-message'.
[MAILPOET-4471]