Skip to content

Commit

Permalink
Assign $duplicate_selectors var to avoid duplicate implodes
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Aug 8, 2022
1 parent 4d33b27 commit ed847e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/style-engine/class-wp-style-engine-processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ private function combine_rules_selectors() {
unset( $this->css_rules[ $key ] );
}
// Create a new rule with the combined selectors.
$this->css_rules[ implode( ',', $duplicates ) ] = new WP_Style_Engine_CSS_Rule( implode( ',', $duplicates ), $declarations );
$duplicate_selectors = implode( ',', $duplicates );
$this->css_rules[ $duplicate_selectors ] = new WP_Style_Engine_CSS_Rule( $duplicate_selectors, $declarations );
}
}
}

0 comments on commit ed847e3

Please sign in to comment.