Skip to content

Commit

Permalink
Revert "Add check to avoid PHP warnings (#30127)" (#30174)
Browse files Browse the repository at this point in the history
This reverts commit 816535d.
  • Loading branch information
aristath authored Mar 24, 2021
1 parent 719c5b7 commit f79664c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/class-wp-theme-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ private static function compute_style_properties( $declarations, $styles ) {
foreach ( $properties as $prop ) {
$value = self::get_property_value( $styles, $prop['value'] );
if ( ! empty( $value ) ) {
$declarations[] = array(
$declarations[] = array(
'name' => $prop['name'],
'value' => $value,
);
Expand Down Expand Up @@ -678,9 +678,6 @@ private static function compute_preset_classes( $settings, $selector ) {
$stylesheet = '';
foreach ( self::PRESETS_METADATA as $preset ) {
$values = _wp_array_get( $settings, $preset['path'], array() );
if ( empty( $values ) ) {
continue;
}
foreach ( $values as $value ) {
foreach ( $preset['classes'] as $class ) {
$stylesheet .= self::to_ruleset(
Expand Down Expand Up @@ -719,9 +716,6 @@ private static function compute_preset_classes( $settings, $selector ) {
private static function compute_preset_vars( $declarations, $settings ) {
foreach ( self::PRESETS_METADATA as $preset ) {
$values = _wp_array_get( $settings, $preset['path'], array() );
if ( empty( $values ) ) {
continue;
}
foreach ( $values as $value ) {
$declarations[] = array(
'name' => '--wp--preset--' . $preset['css_var_infix'] . '--' . $value['slug'],
Expand Down

0 comments on commit f79664c

Please sign in to comment.