PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/helpers/FrmCssScopeHelper.php +10 -1 6.29 → trunk View file →
@@ -281,9 +281,18 @@
281 281 if ( count( $parts ) > 1 ) {
282 282 $rest = $parts[1] . $parts[2];
283 283 }
284 284
285 - return $first . '.' . $class_name . $rest;
285 + // Capture all trailing pseudo-classes/pseudo-elements ( :before, :hover, etc. )
286 + // Capture the chained pseudos wraps (.form_field:nth-child(2):focus )
287 + $pseudo = '';
288 +
289 + if ( preg_match( '/^(.*?)((?::{1,2}[a-zA-Z-]+(?:\([^)]*\))?)+)$/', $first, $pseudo_parts ) ) {
290 + $first = $pseudo_parts[1];
291 + $pseudo = $pseudo_parts[2];
292 + }
293 +
294 + return $first . '.' . $class_name . $pseudo . $rest;
286 295 }
287 296
288 297 /**
289 298 * Remove the scope class from the first segment of a direct-scoped selector.