yith_wcwl_colors_rules

The YITH WooCommerce Wishlist yith wcwl colors rules hook.

Description

apply_filters( 'yith_wcwl_colors_rules', (callback) $array ); 

Parameters (1)

0. $array — Optional. (callback) => array( 'add_to_wishlist' => '.woocommerce a.add_to_wishlist.button.alt','add_to_wishlist_hover' => '.woocommerce a.add_to_wishlist.button.alt:hover','add_to_cart' => '.woocommerce .wishlist_table a.add_to_cart.button.alt','add_to_cart_hover' => '.woocommerce .wishlist_table a.add_to_cart.button.alt:hover','button_style_1' => '.woocommerce a.button.ask-an-estimate-button, .woocommerce .hidden-title-form button, .yith-wcwl-wishlist-new .create-wishlist-button, .wishlist_manage_table tfoot button.submit-wishlist-changes, .yith-wcwl-wishlist-search-form button.wishlist-search-button','button_style_1_hover' => '.woocommerce a.button.ask-an-estimate-button:hover, .woocommerce .hidden-title-form button:hover, .yith-wcwl-wishlist-new .create-wishlist-button:hover, .wishlist_manage_table tfoot button.submit-wishlist-changes:hover, .yith-wcwl-wishlist-search-form button.wishlist-search-button:hover','button_style_2' => '.woocommerce .wishlist-title a.show-title-form, .woocommerce .hidden-title-form a.hide-title-form, .wishlist_manage_table tfoot a.create-new-wishlist','button_style_2_hover' => '.woocommerce .wishlist-title a.show-title-form:hover, .woocommerce .hidden-title-form a.hide-title-form:hover, .wishlist_manage_table tfoot a.create-new-wishlist:hover','wishlist_table' => '.woocommerce table.shop_table.wishlist_table','headers' => '.wishlist_table thead, .wishlist_table tfoot, .yith-wcwl-wishlist-new, .yith-wcwl-wishlist-search-form, .widget_yith-wcwl-lists ul.dropdown li.current a, .widget_yith-wcwl-lists ul.dropdown li a:hover, .selectBox-dropdown-menu.selectBox-options li.selectBox-selected a, .selectBox-dropdown-menu.selectBox-options li.selectBox-hover a' )
The array.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'yith_wcwl_colors_rules', $array ); 
  2.  
  3. if ( !empty( $array ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the yith_wcwl_colors_rules callback 
  2. function filter_yith_wcwl_colors_rules( $array ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'yith_wcwl_colors_rules', 'filter_yith_wcwl_colors_rules', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'yith_wcwl_colors_rules', 'filter_yith_wcwl_colors_rules', 10, 1 ); 

Defined (1)

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

/includes/class.yith-wcwl-init.php  
  1. $this->rules = apply_filters( 'yith_wcwl_colors_rules', array(