← All changes
|
includes/Frontend/Form/View/Theme/Fields/TitleField.php
+5
-2
3.2.2
→
V3.3.2
View file →
| @@ -21,12 +21,14 @@ | ||
| 21 | 21 | if (!in_array($tag, $allowedTags, true)) { |
| 22 | 22 | $tag = 'h2'; |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | + // the title is a flex container, so loose text and inline tags would each become a flex | |
| 26 | + // item and lose the spaces between them; one span keeps the text a single flex item | |
| 25 | 27 | return sprintf( |
| 26 | 28 | ' <%1$s class="%2$s %3$s"> |
| 27 | 29 | %4$s |
| 28 | - %5$s | |
| 30 | + <span class="%7$s">%5$s</span> | |
| 29 | 31 | %6$s |
| 30 | 32 | </%1$s>', |
| 31 | 33 | $tag, |
| 32 | 34 | $fieldHelpers->getAtomicCls($cls), |
| @@ -32,9 +34,10 @@ | ||
| 32 | 34 | $fieldHelpers->getAtomicCls($cls), |
| 33 | 35 | $fieldHelpers->getCustomClasses($cls), |
| 34 | 36 | $preIcn, |
| 35 | 37 | $fieldHelpers->kses_post($text), |
| 36 | - $sufIcn | |
| 38 | + $sufIcn, | |
| 39 | + $fieldHelpers->getAtomicCls("{$cls}-txt") | |
| 37 | 40 | ); |
| 38 | 41 | } |
| 39 | 42 | |
| 40 | 43 | private static function iconImg($field, $object, $element, $fieldHelpers, $alt, $fk) |