From 5ad08952888d7989ea56eaf1bc752c4b1872d08a Mon Sep 17 00:00:00 2001 From: Jorge Date: Thu, 6 May 2021 22:17:58 +0100 Subject: [PATCH] Remove: Declarations parameter from compute_style_properties --- lib/class-wp-theme-json.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/class-wp-theme-json.php b/lib/class-wp-theme-json.php index e55bd014e811dd..2c90c1bb9f4521 100644 --- a/lib/class-wp-theme-json.php +++ b/lib/class-wp-theme-json.php @@ -566,12 +566,12 @@ private static function has_properties( $metadata ) { * ) * ``` * - * @param array $declarations Holds the existing declarations. * @param array $styles Styles to process. * * @return array Returns the modified $declarations. */ - private static function compute_style_properties( $declarations, $styles ) { + private static function compute_style_properties( $styles ) { + $declarations = array(); if ( empty( $styles ) ) { return $declarations; } @@ -835,7 +835,7 @@ private function get_block_styles( $style_nodes, $setting_nodes ) { $node = _wp_array_get( $this->theme_json, $metadata['path'], array() ); $selector = $metadata['selector']; - $declarations = self::compute_style_properties( array(), $node ); + $declarations = self::compute_style_properties( $node ); $is_link_element = self::is_link_element( $metadata['selector'] ); if ( ! $is_link_element ) { @@ -1220,7 +1220,7 @@ private static function remove_insecure_settings( $input ) { */ private static function remove_insecure_styles( $input, $selector ) { $output = array(); - $declarations = self::compute_style_properties( array(), $input ); + $declarations = self::compute_style_properties( $input ); // To be removed once the user styles // no longer use the --wp--style--color--link. if ( self::is_link_element( $selector ) ) {