woocommerce_light_or_dark

The WooCommerce woocommerce light or dark function.

Description

woocommerce_light_or_dark( $color, (string) $dark = '#000000', (string) $light = '#FFFFFF' ); 

Parameters (3)

0. $color
The color.
1. $dark — Optional. (string) => '#000000'
The dark.
2. $light — Optional. (string) => '#FFFFFF'
The light.

Usage

  1. if ( !function_exists( 'woocommerce_light_or_dark' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; 
  3.  
  4. // The color. 
  5. $color = null; 
  6.  
  7. // The dark. 
  8. $dark = '#000000'; 
  9.  
  10. // The light. 
  11. $light = '#FFFFFF'; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = woocommerce_light_or_dark($color, $dark, $light); 
  15.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-deprecated-functions.php  
  1. function woocommerce_light_or_dark( $color, $dark = '#000000', $light = '#FFFFFF' ) { 
  2. wc_deprecated_function( __FUNCTION__, '3.0', 'wc_light_or_dark' ); 
  3. return wc_light_or_dark( $color, $dark, $light );