![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/gg.corals.io/wp-content/plugins/woocommerce/src/Blocks/Utils/ |
<?php namespace Automattic\WooCommerce\Blocks\Utils; /** * Utility methods used for the Mini Cart block. */ class MiniCartUtils { /** * Migrate attributes to color panel component format. * * @param array $attributes Any attributes that currently are available from the block. * @return array Reformatted attributes that are compatible with the color panel component. */ public static function migrate_attributes_to_color_panel( $attributes ) { if ( isset( $attributes['priceColorValue'] ) && ! isset( $attributes['priceColor'] ) ) { $attributes['priceColor'] = array( 'color' => $attributes['priceColorValue'], ); unset( $attributes['priceColorValue'] ); } if ( isset( $attributes['iconColorValue'] ) && ! isset( $attributes['iconColor'] ) ) { $attributes['iconColor'] = array( 'color' => $attributes['iconColorValue'], ); unset( $attributes['iconColorValue'] ); } if ( isset( $attributes['productCountColorValue'] ) && ! isset( $attributes['productCountColor'] ) ) { $attributes['productCountColor'] = array( 'color' => $attributes['productCountColorValue'], ); unset( $attributes['productCountColorValue'] ); } return $attributes; } }