PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.8.1
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.8.1
5.8.0 5.8.1 5.7.0 5.6.2 5.6.3 5.6.1 5.6.0 5.5.0 5.4.0 5.3.2 5.3.1 5.1.6 5.1.5 trunk 2.1.5 2.11 2.12 2.13 2.15 3.0.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.51 All 41 releases
← All changes | src/EmailTemplates/EmailHtmlGenerator.php +5 -11 5.6.3 → 5.8.1 View file →
@@ -42,15 +42,8 @@
42 42 */
43 43 private array $globalStyles = array();
44 44
45 45 /**
46 - * Block Registry for Pro checks.
47 - *
48 - * @var BlockRegistry|null
49 - */
50 - private ?BlockRegistry $blockRegistry = null;
51 -
52 - /**
53 46 * Generate email HTML from blocks.
54 47 *
55 48 * @param array $blocks Array of block data.
56 49 * @param array $globalStyles Optional. Global styles.
@@ -56,10 +49,9 @@
56 49 * @param array $globalStyles Optional. Global styles.
57 50 * @return string Generated HTML.
58 51 */
59 52 public function generate( array $blocks, array $globalStyles = array() ): string {
60 - $this->globalStyles = wp_parse_args( $globalStyles, $this->defaultStyles );
61 - $this->blockRegistry = new BlockRegistry();
53 + $this->globalStyles = wp_parse_args( $globalStyles, $this->defaultStyles );
62 54
63 55 $contentWidth = (int) $this->globalStyles['contentWidth'];
64 56 $backgroundColor = esc_attr( $this->globalStyles['backgroundColor'] );
65 57 $fontFamily = esc_attr( $this->globalStyles['fontFamily'] );
@@ -153,10 +145,12 @@
153 145 $customCss = $attributes['customCss'] ?? '';
154 146
155 147 $html = $this->renderBlockContent( $type, $attributes, $children, $parentBgColor );
156 148
157 - // Inject custom CSS as inline styles (Pro only)
158 - if ( ! empty( $customCss ) && $this->blockRegistry && $this->blockRegistry->isProActive() ) {
149 + // Custom CSS saved with the template is always rendered. Only admins
150 + // can store it (the editor add-on, manage_options), and a mail must
151 + // not change its look because a licence ran out.
152 + if ( ! empty( $customCss ) ) {
159 153 $html = $this->injectCustomCss( $html, $customCss );
160 154 }
161 155
162 156 return $html;